hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Bloch <bl...@laszlosystems.com>
Subject questionable default value for BufferedOutputStream size in HttpConnection and memory usage?
Date Fri, 02 Jul 2004 16:39:22 GMT
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.


To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

View raw message