You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2004/07/03 02:24:57 UTC
DO NOT REPLY [Bug 29897] New: -
questionable default value for BufferedOutputStream size in HttpConnection
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29897>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29897
questionable default value for BufferedOutputStream size in HttpConnection
Summary: questionable default value for BufferedOutputStream size
in HttpConnection
Product: Commons
Version: 2.0 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: HttpClient
AssignedTo: commons-httpclient-dev@jakarta.apache.org
ReportedBy: bloch@laszlosystems.com
>From the dev list
--
Hi Eric
Thanks for bringing this up. HttpClient 3.0 allows for parameterization
of SO_SNDBUF and SO_RCVBUF settings. For HttpClient 2.0 (as well as for
3.0 when falling back onto the system defaults), however, it would make
sense to set a cap on the size of the send and receive buffers.
Feel free to open a ticket for this issue with Bugzilla
Oleg
On Fri, 2004-07-02 at 18:39, Eric Bloch wrote:
>> Hi httpclient folks,
>>
>> I've been looking at 2.0 source code and the default value for the
>> BufferedOutputStream that is used in an HttpConnectionn is coming from
>> socket.getSendBufferSize(). My hunch, is that, in general, this is
>> bigger than you'd want.
>>
>> Most HTTP "sends" are less than 1KByte ('cept for big POSTs).
>> The default value I get for socket.getSendBufferSize for this is 8192.
>> I would think a better default for this buffer would be 1K, no?
>>
>> Also, fyi, if someone happens to dork the system send buffer size hi
>> (say MB) and you are using the MultiThreadedConnectionManager in 2.0
>> (dunno about 3.0), you will use up a lot of memory for each connection
>> since the pool doesn't let idle connections (or their buffers) be gced.
>> I just got bit bad by that.
>>
>> -Eric
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org