LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-08-2012, 12:05 PM   #1
amr_salah944
LQ Newbie
 
Registered: Feb 2012
Posts: 20

Rep: Reputation: Disabled
HTTPD very high cpu load


Hello guys ,
I've a serious problem
HTTPD on my Centos 5.8 machine is eating cpu , here you are the output of top command :


Quote:
Tasks: 141 total, 4 running, 132 sleeping, 5 stopped, 0 zombie
Cpu(s): 70.2%us, 6.9%sy, 0.0%ni, 22.0%id, 0.3%wa, 0.2%hi, 0.3%si, 0.0%st
Mem: 3072584k total, 2095880k used, 976704k free, 413244k buffers
Swap: 2096472k total, 0k used, 2096472k free, 1002636k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10513 apache 16 0 65072 24m 5852 S 48.8 0.8 0:07.84 httpd
10506 apache 15 0 65352 24m 5284 S 44.5 0.8 0:07.88 httpd
10518 apache 15 0 65072 24m 5280 S 26.0 0.8 0:03.84 httpd
10511 apache 15 0 67392 27m 5892 S 15.2 0.9 0:08.85 httpd
10510 apache 16 0 71300 30m 5280 R 12.5 1.0 0:04.77 httpd
10232 mysql 15 0 844m 257m 5644 S 4.3 8.6 0:56.30 mysqld
10512 apache 16 0 70308 31m 7212 R 3.6 1.0 0:05.83 httpd
10509 apache 15 0 66376 25m 5280 S 0.7 0.9 0:07.43 httpd
1 root 15 0 2160 652 564 S 0.0 0.0 0:00.54 init

after some simple troubleshooting steps I found that after removing this file " /etc/php.d/dom.ini " and restarting httpd it runs better but my site goes down

I can't perform more advanced troubleshooting so please guide me .

Thanks in advance .
 
Old 08-08-2012, 12:38 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

Depends on how much your memory you have in server
then you can try optimize apache
with how many "worker threads" are allowed to run httpd service so you can spread the workload on many instances of httpd (I see you have only 7 listed in your top output)
which on my server is around 20 (with 4GB RAM).
If you have a "heavy" application working on your server (many connections, maybe PHP/MySQL CMS systems (joomla) then it's a hard nut to "crack" to get optimized.
It also depends how many CPU cores you have available (servers often have Xeon CPU's with 4 cores or more and 8 GB RAM and more)
 
Old 08-08-2012, 12:58 PM   #3
amr_salah944
LQ Newbie
 
Registered: Feb 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Hello lithos
Thanks for your reply , actually there is no high traffic hitting my server , and there is only one website "cms" and it's eating cpu mooooooore than expected ,I think there is a serious problem whatever I optimized .
 
  


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
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
apache high cpu load on high traffic awww Linux - Newbie 9 10-04-2011 02:22 PM
High load and high cpu kernel usage enid Linux - Server 8 09-30-2010 03:33 AM
Mysql and httpd memory load is HIGH !!! Pariah Linux - General 3 10-31-2009 12:56 PM
httpd (perl) High CPU Usage!? twproductions Linux - Software 7 04-21-2008 02:26 PM


All times are GMT -5. The time now is 09:56 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