[Python-talk] Python socket speed ups?
bruce.labitt at autoliv.com
bruce.labitt at autoliv.com
Wed Sep 30 16:21:13 EDT 2009
As some of list may know, I've been working on a client-server application
using python. I prototyped the whole system, sockets and all, using
python. Since then, I have rewritten the server in C/C++ to exploit the
very fast FFT algorithm in FFTW. Although the profiling is incomplete, it
is now indicating that the client, which is written entirely in python
2.5.2, is likely the bottleneck. ( 66% of run time is waiting for the
data transfer )
It is appearing that the server is waiting for the client to send the
data. I'm using socket.sendall. Is there something that can be done to
boost the speed of the send? The data is present, it is just taking a
long time to be sent - much longer than the network speed would indicate.
The server is receiving 80,673,600 bytes in ~4.575 seconds, which works
out to ~141E6 bits/sec. Very respectable for most, but not quite good
enough for the application. I'd like to see 2-3x that. This is on a
1Gbit link that is about 50m long using CAT6 cable.
Is there a way to speed up the send? OS network buffers? Python speed
up? Call sockets in C?
Thanks for your suggestions! I really appreciate them.
Oh, yeah, the list is too quiet :P
Best Regards,
Bruce
Bruce Labitt
Autoliv Electronics
1011B Pawtucket Blvd, PO Box 1858
Lowell, MA 01853
Email: bruce.labitt at autoliv.com.
Tel: (978) 674-6526
Fax: (978) 674-6581
******************************
Neither the footer nor anything else in this E-mail is intended to or constitutes an <br>electronic signature and/or legally binding agreement in the absence of an <br>express statement or Autoliv policy and/or procedure to the contrary.<br>This E-mail and any attachments hereto are Autoliv property and may contain legally <br>privileged, confidential and/or proprietary information.<br>The recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way <br>disseminating any material contained within this E-mail without prior written <br>permission from the author. If you receive this E-mail in error, please <br>immediately notify the author and delete this E-mail. Autoliv disclaims all <br>responsibility and liability for the consequences of any person who fails to <br>abide by the terms herein. <br>
******************************
More information about the Python-talk
mailing list