[Python-Dev] very bad network performance
schmir at gmail.com
Tue Apr 22 08:44:48 CEST 2008
On Mon, Apr 21, 2008 at 8:10 PM, Gregory P. Smith <greg at krypto.org> wrote:
> The 64K hunch is wrong. The system limit can be found using
> getsockopt(...SO_RCVBUF...). It can easily be (and often is) set to many
> megabytes either at a system default level or on a per socket level by the
> user using setsockopt. When the system default is that large, limiting by
> the system limit would not help the 10mb read case.
but it would help in the 100mb read case.
> Even smaller allocations like 64K cause problems as mentioned in issue
> 1092502 linking to this twisted http://twistedmatrix.com/trac/ticket/1079bug. twisted's solution was to make the string object returned by a recv as
> short lived as possible by copying it into a StringIO. We could do the same
> in _fileobject.read() and readline().
this approach look reasonable to me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev