[squid-dev] [PATCH] Increase request buffer size to 64kb

Nathan Hoad nathan at getoffmalawn.com
Wed Mar 30 04:39:21 UTC 2016


On 30 March 2016 at 12:11, Alex Rousskov
<rousskov at measurement-factory.com> wrote:
> On 03/29/2016 06:06 PM, Nathan Hoad wrote:
>
>> This (very small) patch increases the request buffer size to 64kb, from 4kb.
>
>> -#define HTTP_REQBUF_SZ  4096
>> +#define HTTP_REQBUF_SZ  65535
>
>
>> In my testing, this increases throughput rather dramatically for
>> downloading large files:
>
> Based on your results alone, it is clear that the patch does more than
> "increases the request buffer size"(*). IMO, the important initial
> questions we need to answer are:
>
>   1. Why the performance is improved in this micro test?
>   2. What are the expected effects on other traffic?

I think these are reasonable questions to ask. Answering question one
will take time - I'll have to go through the uses of the constant and
modify them individually, to expose the specific code that has
benefited from this change.

I'm not sure how I can answer question two definitively - are there
any accepted benchmarking/test suites I can use to test the change on
different types of traffic, to see if particular situations have been
negatively affected?

>
> Increasing a buffer sizes will naturally improve performance on a
> micro-test that targets that buffer(*), but we should know more before
> deciding whether this increase is _generally_ useful and whether there
> is a better way to achieve similar (or better) performance results.
>
>
> Please note that this message is not meant to disparage your email or
> even the proposed change itself! I am just trying to explain what
> additional information is needed in order to start making an _informed_
> decision about the proposed change. Needless to say, many changes have
> been committed without proper disclosures and analysis, but we should
> strive to do better.
>
>
> Thank you,
>
> Alex.
> P.S. (*) The changed constant _name_ has nothing to do with the micro
> test: download vs. "request buffer size". IIRC, the constant itself is
> misnamed/misused, but that tidbit may be just the tip of the iceberg.

Yes I think you are right in that the constant may be
misnamed/misused. Once I've gone through all the places that use it, I
suppose reevaluating its name would be a good idea.

Thank you,

Nathan.


More information about the squid-dev mailing list