[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

Josiah Carlson report at bugs.python.org
Tue Mar 31 23:56:54 CEST 2009


Josiah Carlson <josiahcarlson at users.sourceforge.net> added the comment:

The spare 512 values are for code that I expect no one is actually 
using.

In terms of increasing the buffer size from 4096 to something larger, 
that can be done, but I think that more than just a 10mbit switched lan 
test should be performed.  I would tend to believe that a larger size 
would tend to perform better, but my concern is sending blocks too large 
to the OS and having it say "sorry, but you need to chop it up more" via 
sock.send() returning 1 or 2 (I've experienced this on Windows with 
stdio and sockets).

Considering how easy it is to adjust, and considering that the value is 
respected everywhere that matters (performance-conscious users aren't 
using simple_producer, nor are they using dispatcher_with_send), I think 
that 4096 is sufficient for the time being.  Adjusting it up to 16k in 
Python 2.8/3.2 seems reasonable to me.  Someone ping me in a year ;) .

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2073>
_______________________________________


More information about the Python-bugs-list mailing list