LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2009, 10:42 PM   #1
ashfaq
Member
 
Registered: Feb 2004
Location: Islamabad, Pakistan
Distribution: Redhat Linux
Posts: 42

Rep: Reputation: 15
squid using 100 percent of processor


HI...
i am squid on enterprise redhat linux (hp proliant 385 server) ... its working ok...
but when i give top command..
its shows:
99 or 100 percent usage of prcessor by the squid process..
what should i suppose to do..
pl help me out
 
Old 08-12-2009, 07:44 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ashfaq View Post
HI...
i am squid on enterprise redhat linux (hp proliant 385 server) ... its working ok...
but when i give top command..
its shows:
99 or 100 percent usage of prcessor by the squid process..
what should i suppose to do..
pl help me out
maybe your server does not have enough resources left for running squid?
maybe your config has become too large for processing with the available resources?

could be one of many things. would need much more info
 
Old 08-12-2009, 10:02 PM   #3
ashfaq
Member
 
Registered: Feb 2004
Location: Islamabad, Pakistan
Distribution: Redhat Linux
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks for reply..

Thanks buddy..
i have checked the processor through top command :
result of top command is attached.. as gif file...
resources are available..
disk space is quite enough..its a proliant Hp 380 server.
space for cache is available in GBs.
size of log files are quite ok...
but running processor usage is almost 100 percent for squid...
although no problem significantly notices...except that some users are experiencing slow speed...
looking forward for your response..
thanks.
Attached Thumbnails
Click image for larger version

Name:	top.GIF
Views:	122
Size:	22.2 KB
ID:	1213  
 
Old 08-13-2009, 07:08 AM   #4
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ashfaq View Post
Thanks buddy..
i have checked the processor through top command :
result of top command is attached.. as gif file...
resources are available..
disk space is quite enough..its a proliant Hp 380 server.
space for cache is available in GBs.
size of log files are quite ok...
but running processor usage is almost 100 percent for squid...
although no problem significantly notices...except that some users are experiencing slow speed...
looking forward for your response..
thanks.

from that screenshot i am seeing 21.8% user space.
Not as bad as you first made out. the squid process does seem a little hungry.
Load averages are pretty low.
You might need to tune squid a bit.
Check disk write io

Code:
iostat -x sda/hda 5

check for rrqm/s and wrqm/s in the output of iostat. Look for relatively small numbers here.

hdparm can also tell you at which speed the disk is writing if io problems

Code:
hdparm -t /dev/sda  or /dev/hda
run an strace against the squid pid to see wht it is doing

Code:
strace -p 11630
check your squid log too to see what it is doing.
Does look a bit strange as my squid server, although i have just fired it up to gauge how much resources it uses, it is nowhere near as long as yours - but like i said - i have just started it up....

you might need to graph the cpu/load over a period of time?
cacti or mrtg can easily do this for you.
you might want to monitor the cpu and load too with nagios or the like. at least when warnings flag up, you can dive straight on the server and have a look at what is going on..
but like i said, looking at the screenshot, i cant see anything drastic.
pretty low load averages and 21% cpu usage...not too bad considering squid is the only major thing running on this box
 
Old 08-13-2009, 08:13 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Quote:
Originally Posted by centosboy View Post
check your squid log too to see what it is doing.
Considering low LA values and Squid's low mem + high CPU that would be the first thing I'd look at.


Quote:
Originally Posted by centosboy View Post
you might need to graph the cpu/load over a period of time?
cacti or mrtg can easily do this for you.
you might want to monitor the cpu and load too with nagios or the like. at least when warnings flag up, you can dive straight on the server and have a look at what is going on..
Having to install Cacti or MRTG seems a bit overkill to me for just graphing CPU/IO where reasonably less complex alternatives like Atop, Dstat or collectl exist. Sure it comes at a price as they won't generate pretty pretty graphs but at least Dstat allows you to export CSV so you can import in OOo and graph to your hearts content. For monitoring I'd choose Monit since a "watch resource and alert by email" kind of task will be *way* easier to configure.
 
Old 08-13-2009, 08:18 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by unSpawn View Post
Considering low LA values and Squid's low mem + high CPU that would be the first thing I'd look at.



Having to install Cacti or MRTG seems a bit overkill to me for just graphing CPU/IO where reasonably less complex alternatives like Atop, Dstat or collectl exist. Sure it comes at a price as they won't generate pretty pretty graphs but at least Dstat allows you to export CSV so you can import in OOo and graph to your hearts content. For monitoring I'd choose Monit since a "watch resource and alert by email" kind of task will be *way* easier to configure.
yeah true....in fact installing cacti wont help, cos that is a memory hog too
 
Old 08-13-2009, 07:13 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,904

Rep: Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614Reputation: 2614
You've got very low Load Averages (anything <1 is small) and the cpu itself is only at 21.8 %, again trivial.
Squid is using 89% of 21.8%, a small amt of total cpu.
Also, I note only 1 user logged in.
Implication is that this box is more or less dedicated to squid and coping easily. If your users are complaining, I'd check those complaints to see if they are real or perceived and whether you can reproduce them.
They may well be nothing to do with this box.
Maybe check network io load.
 
Old 08-13-2009, 11:13 PM   #8
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
It looks like OP has a four-way CPU, which is why 21.8% total CPU is being shown used. I'm not sure I see a problem here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux at 1 percent?! Ha! It's more like 45 percent LXer Syndicated Linux News 0 05-05-2009 01:11 PM
Java using 100% of processor Mojojo Linux - Software 2 05-08-2005 09:57 PM
Root file system shows 100% percent utilization simplyrahul Linux - Software 1 11-26-2004 10:53 AM
I think my ISP sucks, but not 100 percent sure jimdaworm Linux - Networking 2 06-10-2004 05:07 AM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration