[squid-users] Squid 3-5 CPU optimization and best practise .
Alex Rousskov
rousskov at measurement-factory.com
Thu Mar 31 15:59:38 UTC 2022
On 3/31/22 11:04, Ahmad Alzaeem wrote:
> My main question is , is there any major changes in squid 5 that make it
> faster than squid 3 or squid 4 in terms of low CPU usage?
I do not recall any _major_ changes in that area, but the http_port
worker-queues option may be of interest to those looking for performance
optimizations.
> Is there any best practice I can use to lower the cpu usage or response
> time ?
YMMV, but I would start by using (the right number of) SMP workers with
cpu_affinity_map and worker-queues. More on that at
https://wiki.squid-cache.org/Features/SmpScale#How_to_configure_SMP_Squid_for_top_performance.3F
Beyond that, one would have to analyze your Squid performance to find
out performance bottleneck(s) and then try to eliminate them or reduce
their impact.
> Like Deny caching on the HDD or server_persistent_connections off
> similar directives
Disabling persistent connections will make things _worse_ in many cases
but YMMV. Whether cache_dirs (and even shared memory cache) slow down or
speed up an average response depends on your environment -- measure and
adjust/remove accordingly.
HTH,
Alex.
More information about the squid-users
mailing list