Re: [squid-users] Squid high CPU usage issue

From: Chris Rosset <[email protected]>
Date: Mon, 26 Feb 2007 18:10:52 -0500

>>> Adrian Chadd <adrian@creative.net.au> 2/22/2007 11:26:22 PM >>>
On Thu, Feb 22, 2007, Chris Rosset wrote:
> I am using squid-2.5.STABLE6 and running into a very high CPU usage
> problem
> "top" shows almost 100% usage well it's a dual cpu box but shows 48% so
> it's almost maxed on one cpu.
> I've read various threads on the mailing list but cant figure out what
> i should do in my case,
> multiple disks, use aufs instead of ufs ?

Hm, I'd suggest upgrading to Squid-2.6 but I don't think anyone's written a
Squid-2.6 Solaris /dev/poll or similar support.

That'll probably drop your CPU down quite a bit.

How many requests per second on average during the busy parts of the day?

* Thanks for the reply
I just ran a calamaris report for last Tuesday the 20th, which was a heavy load day for us
for the 2 hour period 12pm - 2pm our stats were

method request % sec/req Byte % kB/sec
       
GET 58400 91.58 2.07 503335K 92.88 4.17
CONNECT 2933 4.60 18.40 23445844 4.23 0.42
POST 2330 3.65 2.75 15995671 2.88 2.44
HEAD 55 0.09 1.21 34248 0.01 0.50
PROPFIND 48 0.08 1.58 34560 0.01 0.45
       
Sum 63766 100.00 2.84 541919K 100.00 2.99

* So looks like 2.84 requests per second.

> - using 2 mirrored disks and 1 cache dir.
> - I am using the default cache_dir value
> cache_dir ufs /var/data/squid/cache 100 16 256

I'd definitely suggest moving to AUFS.

* Ok, but that would require us to create a new AUFS filesystem no?
I read diskd is almost as good and you can still use it on a UFS filesystem.
At least if you compile it into squid. Your thoughts?

> - I have about 2 or 3 ACL lists that are under 1k lines
> and one acl that has 8192 lines, mostly for denied sites.

Hm! That might also be increasing the load.
* yeah it's mostly spam sites we got the list from somewhere.
Someone reccomended squidgard maybe ill try that.

> I was about to install two instances of squid and run both with two
> different IP's the server is configured with
> and use http_port x.x.x.x:3128 for the first and http_port x.x.x.x:
> 3129 for the second squid to hopefully split the load between
> them, Please let me know if you have any other reccomendations to
> increase performance. Thanks!

That might also help in the interim. Squid isn't yet really built to take
advantage of multiple CPUs but this will change in time.

So, who wants to beat me to writing a Solaris devpoll/epoll implementation?
It shouldn't be hard, honest!

Would you be willing to trial something if I write a simple Solaris /dev/poll
against Squid-2.6?

* Well i could probably try it on our dev box, I am not positive we can upgrade to 2.6 though
One of our Admins told me he found some issues with it and preffered to stay on 2.5 for now.

Thanks very much!!

Adrian
Received on Mon Feb 26 2007 - 16:11:26 MST

This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:01 MST