[Python-talk] Python socket speed ups?
Mark Mc Mahon
mtnbikingmark at gmail.com
Wed Sep 30 19:54:34 EDT 2009
Hi,
What OS are you on?
I remember seeing a thread on python-dev mailing list recently about python
httplib on windows slowness (though I don't know if the problem was httplib
or sockets).
There isn't a conclusion as such...
http://mail.python.org/pipermail/python-dev/2009-August/091125.html
http://mail.python.org/pipermail/python-dev/2009-September/091581.html(maybe
here - but I haven't read the whole thread)
Thanks
Mark
On Thu, Oct 1, 2009 at 5:21 AM, <bruce.labitt at autoliv.com> wrote:
> 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>
> ******************************
> _______________________________________________
> Python-talk mailing list
> Python-talk at dlslug.org
> http://dlslug.org/mailman/listinfo/python-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://dlslug.org/pipermail/python-talk/attachments/20091001/d0c8fd61/attachment.html>
More information about the Python-talk
mailing list