[squid-dev] [PATCH] Increase request buffer size to 64kb
rousskov at measurement-factory.com
Mon Apr 4 01:12:59 UTC 2016
On 03/30/2016 04:29 AM, Amos Jeffries wrote:
> The network HTTP request buffer is controlled by request_header_max_size
> - default 64KB.
You may be thinking about client_request_buffer_max_size (512 KB)
instead: request_HEADER_max_size controls HTTP request header parsing,
not request buffering or request reading AFAICT.
Please note that Squid starts reading each request (or perhaps the very
first request on a connection?) with CLIENT_REQ_BUF_SZ (4KB) and grows
the read buffer to client_request_buffer_max_size only if that buffer
gets full. Thus, the upload performance probably suffers from the same
"weakest link" problem that Nathan is fixing for downloads... IIRC,
there was even a confusing bug report or two about that!
See Server::maybeMakeSpaceAvailable() for details.
> The network HTTP reply buffer is controlled by reply_header_max_size -
> default 64KB.
AFAICT, reply_header_max_size affects the HTTP response reading only
until the headers are parsed:
> const int limitBuffer = (flags.headers_parsed ? Config.readAheadGap : Config.maxReplyHeaderSize);
This is actually kind of wrong because the first read should be
something like the maximum of those two values: Restricting response
header size should not restrict response body data prefetch during the
first I/O. Nathan, if you agree, fixing this would be in your patch
More information about the squid-dev