httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Rivera <>
Subject APR_BUCKET_BUFF_SIZE question
Date Wed, 09 Jul 2003 22:06:38 GMT
So currently Apache reads from the socket in APR_BUCKET_BUFF_SIZE chunks
(8000 bytes by default)

This value is a compiled value and can not be changed or configure at

I was wondering if there is a particular reason not to make this
configurable in some way.

I was looking at the code and was thinking about a very simple way where we
can read in larger or smaller chunks. I does not seems like a lot of code to
change but I may be missing something.

So the way I would deal with this is first:

Make the apr_recv len parameter an input/output parameter instead of an
output parameter so we can tell it how much data we would like to read.

So if I set the value of len to something greater than 0 it would use that
value. If len is zero or less it would use APR_BUCKET_BUFF_SIZE.

In the code input filter, set the len value to readbytes or a configure
value, or if not use APR_BUCKET_BUFF_SIZE.

So we could have something like:

ReadBufferSize 8000


ReadBufferSize 2000


ReadBufferSize Dynamic # This will use the readbytes value instead.

That way a filter could ask for more or less bytes than the 8K.

This seems awfully simple and I'm sure I'm missing something to why we don't
do this already. Can somebody shed some light on this one?


View raw message