Hello, This (very small) patch increases the request buffer size to 64kb, from 4kb.
In my testing, this increases throughput rather dramatically for downloading large files: Pre patch: 100 5120M 100 5120M 0 0 126M 0 0:00:40 0:00:40 --:--:-- 109M CPU Usage: 40.500 seconds = 26.537 user + 13.963 sys Post patch: 100 5120M 100 5120M 0 0 340M 0 0:00:15 0:00:15 --:--:-- 329M CPU Usage: 18.203 seconds = 12.477 user + 5.727 sys The relevant numbers being that pre-patch it took 40 seconds/126MB a second, and post patch it took 15 seconds/340MB a second. The above tests were done against squid 4.0.7, serving a 5gb file built with fallocate. The server was nothing fancy - Python's builtin HTTP server. Full disclosure, these numbers are over the loopback device - the client, proxy and server are all on my laptop. If I move the proxy off of my laptop, the numbers aren't as high, but the speed differences are comparable. We've been running this in production since late 2011 across many, many deployments, and haven't had any issues with it. Part of me wonders if this should be made configurable via the configure script? Happy to work on that instead if people see value in it. It's possible the same treatment should be applied to some of the other buffer sizes in src/defines.h, but we have not modified these at all. Thank you, Nathan.
Increase HTTP request buffer size to 64kb. This work is submitted on behalf of Bloomberg L.P. === modified file 'src/defines.h' --- src/defines.h 2016-01-01 00:12:18 +0000 +++ src/defines.h 2016-03-29 06:22:49 +0000 @@ -215,7 +215,7 @@ #define FILE_MODE(x) ((x)&(O_RDONLY|O_WRONLY|O_RDWR)) #endif -#define HTTP_REQBUF_SZ 4096 +#define HTTP_REQBUF_SZ 65535 /* CygWin & Windows NT Port */ #if _SQUID_WINDOWS_
_______________________________________________ squid-dev mailing list [email protected] http://lists.squid-cache.org/listinfo/squid-dev
