You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera" <as...@apache.org> on 2009/08/22 18:14:00 UTC

SessionInputBuffer and SOCKET_BUFFER_SIZE

Hi All

If I understand correctly the SOCKET_BUFFER_SIZE parameter specifies the
size of the SessionInputBuffer. However the SessionInputBuffer is simply
used to read the header of a http message (i.e. the request line and
http headers) - and never intended to read the entity body / payload. If
so is there any specific reason to call this parameter the
SOCET_BUFFER_SIZE which seems a misleading - or have I missed something?
Also if this is true, why is this generally set to 8K instead of
something much smaller?

thanks
asankha

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


Re: SessionInputBuffer and SOCKET_BUFFER_SIZE

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Oleg
>> If I understand correctly the SOCKET_BUFFER_SIZE parameter specifies the
>> size of the SessionInputBuffer. However the SessionInputBuffer is simply
>> used to read the header of a http message (i.e. the request line and
>> http headers) - and never intended to read the entity body / payload.
>>     
> This is not entirely correct. The socket buffer is also used to read the body
> of chunk coded messages. 
>   
>> If so is there any specific reason to call this parameter the
>> SOCET_BUFFER_SIZE which seems a misleading - or have I missed something?
>>     
> Maybe 'session buffer' would have been a better name. What would you call such
> a buffer?
>   
Sorry, I missed noticing the use of it within the ChunkDecoder. I do not
think a rename is necessary, but maybe it would be good to include this
into the documentation so that users will know how it is being used and
not confuse it with something related to a socket

thanks
asankha


Re: SessionInputBuffer and SOCKET_BUFFER_SIZE

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Sat, Aug 22, 2009 at 09:44:00PM +0530, Asankha C. Perera wrote:
> Hi All
> 
> If I understand correctly the SOCKET_BUFFER_SIZE parameter specifies the
> size of the SessionInputBuffer. However the SessionInputBuffer is simply
> used to read the header of a http message (i.e. the request line and
> http headers) - and never intended to read the entity body / payload.

This is not entirely correct. The socket buffer is also used to read the body
of chunk coded messages. 

 If
> so is there any specific reason to call this parameter the
> SOCET_BUFFER_SIZE which seems a misleading - or have I missed something?

Maybe 'session buffer' would have been a better name. What would you call such
a buffer?

> Also if this is true, why is this generally set to 8K instead of
> something much smaller?
> 

Based on a number of tests I have run socket buffers of that size appear to
produce the best I/O throughput. It can certainly be smaller but should not be
smaller than 1K.

Cheers

Oleg

> thanks
> asankha
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 

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