[Python-Dev] very bad network performance (original) (raw)
Ralf Schmitt schmir at gmail.com
Tue Apr 22 08:44:48 CEST 2008
- Previous message: [Python-Dev] very bad network performance
- Next message: [Python-Dev] r62342 - python/branches/py3k/Objects/bytesobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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(...SORCVBUF...). 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.
- Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20080422/990b817b/attachment.htm>
- Previous message: [Python-Dev] very bad network performance
- Next message: [Python-Dev] r62342 - python/branches/py3k/Objects/bytesobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]