[EMAIL PROTECTED] wrote: > Sent: Wednesday, March 12, 2008 9:47 PM > To: [email protected] > Subject: Socket Performance > > Can anyone explain why socket performance (throughput) varies > depending on the amount of data send and recv are called with? > > For example: try creating a local client/server (running on the same > computer) where the server sends the client a fixed amount of data. > Using method A, recv(8192) and sendall( ) with 8192 bytes > worth of data. Do this 100 times. Using method B, recv(1) and > sendall( ) with 1 byte worth of data. Do this 819200 times. > > If you time both methods, method A has much greater > throughput than method B.
Why is it faster to drink a liter of water a cupful at a time than to drink it out of an eyedropper? - Brian -- http://mail.python.org/mailman/listinfo/python-list
