[squid-users] Squid 3.5.21 - High CPU (100%)
Alex Rousskov
rousskov at measurement-factory.com
Mon Sep 26 14:03:14 UTC 2016
On 09/26/2016 12:59 AM, Jasper Van Der Westhuizen wrote:
> On Wed, 2016-09-21 at 08:34 -0600, Alex Rousskov wrote:
>> On 09/21/2016 07:53 AM, Jasper Van Der Westhuizen wrote:
>>> I have been having some problems with Squid using 100% CPU at times
>>> which impacts my users browsing experience.
>> Sustained 100% CPU load at ~100/s rates with regular traffic on
>> reasonable hardware is a sign (albeit not a proof!) of a Squid bug
>> (including long searches and similar optimization problems).
> What I found now after making
> changes to my squid.conf file, my cache drive gets *hammered* at times
> of high usage.
That is a different problem that requires different approaches.
>> Next time this happens, consider getting a stack trace or two from the
>> process showing sustained 100% CPU utilization.
> I do not have much experience with strace.
I was not talking about strace but a stack trace produced by gdb and
such. However, I was trying to help you solve a different problem so you
should ignore those instructions.
> I have huge amounts of writes happening and this creates CPU wait and
> the user experience goes out of the window.
Yes, disk write queue overflow/flushing is a common performance problem.
IIRC, it does not manifest as 100% CPU usage but perhaps that is what
you see with aufs which I am not intimately familiar with.
> Is there anything that you guys can suggest I do around the cache?
> Should I try a different store type? A different filesystem type perhaps?
If your store has a configuration knob that effectively limits disk
writing rate, then use it to limit that rate to avoid overflowing the queue.
You can also consider using rock store that has an explicit write rate
limiting option (but comes with other problems that may or may not
affect your setup).
Adding more physical disk spindles helps, of course.
Alex.
More information about the squid-users
mailing list