Message178728
he http.client HTTPConnection._send_output method has an optimization for avoiding bad interactions between delayed-ack and the Nagle algorithm:
http://hg.python.org/cpython/file/f32f67d26035/Lib/http/client.py#l884
Unfortunately this interacts rather poorly if the case where the message_body is a bytes instance and is rather large.
If the message_body is bytes it is appended to the headers, which causes a copy of the data. When message_body is large this duplication of data can cause a significant spike in memory usage.
(In my particular case I was uploading a 200MB file to 30 hosts at the same leading to memory spikes over 6GB.
[There is a short thread discussing this issue on python-dev; Subject: "http.client Nagle/delayed-ack optimization"; Date: Dec 15, 2012] |
|
Date |
User |
Action |
Args |
2013-01-01 09:36:02 | bennoleslie | set | recipients:
+ bennoleslie |
2013-01-01 09:36:02 | bennoleslie | set | messageid: <1357032962.36.0.684648136944.issue16833@psf.upfronthosting.co.za> |
2013-01-01 09:36:01 | bennoleslie | link | issue16833 messages |
2013-01-01 09:36:01 | bennoleslie | create | |
|