huge socket recv speed discrepancy between different OSs

D

Dan Stromberg

Do you see this too?

Mor information and testcase here:

http://bugs.python.org/issue3766

I would also be interested in the profiler output under windows.

All the best
Thorben

I regret that I don't have a lot of time to look into this interesting
issue.

Perl may be buffering the socket I/O. That might be a question for
comp.lang.perl.

Usually, when you can reduce the number of function/method calls and
system calls done in your innermost loop(s), especially on a high speed
network, you've done a good thing - because otherwise CPU use becomes the
dominant term in the performance equation.

You might want to try my bufsock module to see if that'll help:

http://stromberg.dnsalias.org/~strombrg/bufsock.html

It'll give you buffered sockets, along with a flush method.

You probably also might want to try psyco when on an x86 system.
Unfortunately, it looks like psyco isn't available for x86-64.

Anyone know if pypy is ready to try such a program as Thorben's?
 
T

Thorben Krueger

If you follow the bug report, you might notice that this is probably
an issue of socket flags. I know that *BSD and Linux handle sockets
slightly differently, but that about covers my knowledge of these
things. Maybe a solution can be found simply by setting the right
flags for the socket...

Any ideas in this line of thought?

I am kind of afraid to approach the Perl guys with this issue,
although it might be worth a try...

Hm, I fear buffers don't help me at all. You see, I wish to send
thousands of very small tcp packets to the server in as little time as
possible. Thats where the program running under OS X outperforms the
Linux version by several orders of magnitude. This is what suggests
that the problem could be lying in the difference between BSD and
Linux sockets.

OT: How would you think pypy could help, if this is OS related?

Sorry if I did not make too much sense *tired

Thorben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top