<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello Alex , <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks for your reply ,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">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 .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">We don’t have any bottleneck in squid .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The only issue is when there is a very high traffic that will use the CPU at higher scale .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">So my only goal is decrease squid CPU consumption as much as I can .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">So I build local dns server to fasten the lookup , but still don’t see any rich topics online for my goal .<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">squid-users <squid-users-bounces@lists.squid-cache.org> on behalf of Alex Rousskov <rousskov@measurement-factory.com><br>
<b>Date: </b>Thursday, March 31, 2022 at 8:59 AM<br>
<b>To: </b>squid-users@lists.squid-cache.org <squid-users@lists.squid-cache.org><br>
<b>Subject: </b>Re: [squid-users] Squid 3-5 CPU optimization and best practise .<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">On 3/31/22 11:04, Ahmad Alzaeem wrote:<br>
<br>
> My main question is , is there any major changes in squid 5 that make it <br>
> faster than squid 3 or squid 4 in terms of low CPU usage?<br>
<br>
I do not recall any _major_ changes in that area, but the http_port <br>
worker-queues option may be of interest to those looking for performance <br>
optimizations.<br>
<br>
<br>
> Is there any best practice I can use to lower the cpu usage or response <br>
> time ?<br>
<br>
YMMV, but I would start by using (the right number of) SMP workers with <br>
cpu_affinity_map and worker-queues. More on that at<br>
<a href="https://wiki.squid-cache.org/Features/SmpScale#How_to_configure_SMP_Squid_for_top_performance.3F">https://wiki.squid-cache.org/Features/SmpScale#How_to_configure_SMP_Squid_for_top_performance.3F</a><br>
<br>
Beyond that, one would have to analyze your Squid performance to find <br>
out performance bottleneck(s) and then try to eliminate them or reduce <br>
their impact.<br>
<br>
<br>
> Like Deny caching on the HDD or server_persistent_connections off <br>
>   similar directives<br>
<br>
Disabling persistent connections will make things _worse_ in many cases <br>
but YMMV. Whether cache_dirs (and even shared memory cache) slow down or <br>
speed up an average response depends on your environment -- measure and <br>
adjust/remove accordingly.<br>
<br>
<br>
HTH,<br>
<br>
Alex.<br>
_______________________________________________<br>
squid-users mailing list<br>
squid-users@lists.squid-cache.org<br>
<a href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a><o:p></o:p></span></p>
</div>
</div>
</body>
</html>