LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-13-2008, 06:15 AM   #1
g_avadhut
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
web server CPU usage goes very high


Hi,

I am working on a web server which CPU usage in atop shows very high. This is the output of atop

ATOP - server 2008/11/13 13:14:01 3 seconds elapsed
PRC | sys 56.88s | user 4.57s | #proc 381 | #zombie 1 | #exit 2 |
CPU | sys 604% | user 44% | irq 1% | idle 110% | wait 41% |
cpu | sys 97% | user 3% | irq 0% | idle 0% | cpu004 w 0% |
cpu | sys 96% | user 4% | irq 0% | idle 0% | cpu001 w 0% |
cpu | sys 89% | user 5% | irq 0% | idle 5% | cpu006 w 1% |
cpu | sys 88% | user 5% | irq 0% | idle 7% | cpu005 w 0% |
cpu | sys 79% | user 3% | irq 0% | idle 7% | cpu002 w 11% |
cpu | sys 79% | user 2% | irq 0% | idle 19% | cpu003 w 0% |
cpu | sys 58% | user 4% | irq 0% | idle 38% | cpu007 w 0% |
cpu | sys 17% | user 19% | irq 1% | idle 33% | cpu000 w 30% |
CPL | avg1 9.80 | avg5 13.39 | avg15 15.96 | csw 1961 | intr 6522 |
MEM | tot 7.9G | free 2.8G | cache 2.9G | buff 291.6M | slab 491.3M |
SWP | tot 1.9G | free 1.9G | | vmcom 5.5G | vmlim 5.9G |
DSK | sda | busy 81% | read 2 | write 266 | avio 9 ms |
NET | transport | tcpi 2091 | tcpo 2801 | udpi 16 | udpo 16 |
NET | network | ipi 2111 | ipo 2817 | ipfrw 0 | deliv 2111 |
NET | eth0 0% | pcki 2204 | pcko 2903 | si 1320 Kbps | so 7360 Kbps |
NET | lo ---- | pcki 119 | pcko 119 | si 40 Kbps | so 40 Kbps |

PID SYSCPU USRCPU VGROW RGROW USERNAME THR ST EXC S CPU CMD 1/4
? 37.98s 3.15s 0K 0K nobody 0 NE 0 E 100% <httpd>
17159 3.07s 0.09s 0K 0K nobody 1 -- - R 100% httpd
17854 3.08s 0.08s 0K 0K nobody 1 -- - R 100% httpd
19680 3.03s 0.07s 0K 0K nobody 1 -- - R 100% httpd
19593 2.69s 0.07s 828K 1552K nobody 1 -- - R 92% httpd
18248 1.73s 0.03s 0K 0K nobody 1 -- - S 59% httpd
16891 1.72s 0.03s 0K 0K nobody 1 -- - S 58% httpd
19600 1.73s 0.02s 0K 0K nobody 1 -- - S 58% httpd
18262 1.39s 0.02s 520K 276K nobody 1 -- - R 47% httpd
19163 0.26s 0.01s 516K 248K nobody 1 -- - S 9% httpd
18549 0.02s 0.06s 1812K 1660K nobody 1 -- - S 3% httpd
18554 0.02s 0.05s 0K 0K nobody 1 -- - S 2% httpd
19727 0.01s 0.06s 2080K 2088K nobody 1 -- - R 2% httpd
18392 0.01s 0.06s -1544K -1380K nobody 1 -- - S 2% httpd
17543 0.01s 0.04s -260K -108K nobody 1 -- - S 2% httpd
17795 0.01s 0.03s 1036K 1248K nobody 1 -- - D 1% httpd
14514 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
17244 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19307 0.00s 0.03s -1544K -1104K nobody 1 -- - S 1% httpd
19717 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
18112 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
17818 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19155 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19433 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
18478 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19934 0.01s 0.02s 0K 0K nobody 1 -- - S 1% httpd
19595 0.00s 0.03s -520K -520K nobody 1 -- - S 1% httpd
19113 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19582 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19592 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
19667 0.00s 0.03s 0K 0K nobody 1 -- - S 1% httpd
20040 0.01s 0.02s 0K 0K root 1 -- - R 1% atop
18363 0.01s 0.01s 152K 220K nobody 1 -- - D 1% httpd
17860 0.00s 0.02s 1036K 620K nobody 1 -- - S 1% httpd
19589 0.01s 0.01s 1036K 624K nobody 1 -- - R 1% httpd
19986 0.01s 0.01s 1036K 664K nobody 1 -- - S 1% httpd


Can someone give the exact solution regarding it?

Thanks in advancs
 
Old 11-13-2008, 06:42 AM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,074

Rep: Reputation: 386Reputation: 386Reputation: 386Reputation: 386
It's strange unless you are running a web server that hits a really high traffic.

Assuming that's no the case, you should try to isolate your problem. First, try to run a simple site with only html. If that fixes it, it's a problem in your site, and probably into a script (javascript, php or whatever). This can be due to a bug in your scripts or to a vulnerability that some bot is using to hit your server.

If that doesn't solve your problem, then it might be a bug in the concrete version of apache you are running. You could try to use lighttpd if the site is not big and it fulfills your needs.
 
Old 12-10-2008, 04:33 AM   #3
yiangos
LQ Newbie
 
Registered: Sep 2003
Location: Athens, Greece
Distribution: openSuSE 11.0
Posts: 16

Rep: Reputation: 0
You have quite a few httpd processes that hit 100% (or close) CPU. Can you check that there are no web application issues? (an example is a script that does extensive calculations on a very big loop). Apart from that, you could also check that there are no odd processes running (i.e. your web server hasn't been cracked). What I usually do, is run top, then ask for the actual command name (hit "c" when the top listing appears) and then narrow down to the user that apache (my web server of choice) runs (in your case, you'd probably hit "u" and then "nobody"). All httpd processes should be the same. Anything different is suspicious.

HTH

Yiangos
 
  


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
CPU usage too high! rock.k Linux - Newbie 4 03-01-2008 05:48 AM
High CPU usage with vino server 2.10.0-4.1 in FC4 Flurd Linux - Server 4 08-01-2007 11:06 PM
Server aburptly stops running High CPU usage PERL script after about 5 hours bpmee Linux - Server 3 05-18-2007 12:24 PM
High Cpu usage untak Debian 21 01-23-2007 07:21 AM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration