[squid-users] Squid 3-5 CPU optimization and best practise .

Ahmad Alzaeem 0xff1f at gmail.com
Thu Mar 31 16:19:26 UTC 2022


Hello Alex ,
Thanks for your reply ,

I thought as long as squid is only as forward proxy only and no https , we may disable some built in squid features that is not required in my purpose for getting lower CPU consumption such as use minimum squid functions .

We don’t have any bottleneck in squid .
The only issue is when there is a very high traffic that will use the CPU at higher scale .
So my only goal is decrease squid CPU consumption as much as I can .

So I build local dns server to fasten the lookup , but still don’t see any rich topics online for my goal .


Thanks



From: squid-users <squid-users-bounces at lists.squid-cache.org> on behalf of Alex Rousskov <rousskov at measurement-factory.com>
Date: Thursday, March 31, 2022 at 8:59 AM
To: squid-users at lists.squid-cache.org <squid-users at lists.squid-cache.org>
Subject: Re: [squid-users] Squid 3-5 CPU optimization and best practise .
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.
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220331/e851f9ca/attachment.htm>


More information about the squid-users mailing list