LinuxQuestions.org
Review your favorite Linux distribution.
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 02-25-2015, 05:11 AM   #1
k.shashidhar
LQ Newbie
 
Registered: Feb 2015
Posts: 1

Rep: Reputation: Disabled
Post httpd server taking 90% cpu usage


Hi,
my server centos 6 32bit, server config. 12core 16gb ram,only http and mysql(innodb).
promble: httpd service taking 90% cpu usage.
below is top command result and my.cnf conf..
some times site hangs.
any solution on this issue

top - 16:11:13 up 6 days, 5:38, 3 users, load average: 31.50, 30.64, 24.67
Tasks: 259 total, 35 running, 224 sleeping, 0 stopped, 0 zombie
Cpu(s): 61.2%us, 7.9%sy, 0.0%ni, 30.5%id, 0.2%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 15982704k total, 6111196k used, 9871508k free, 365788k buffers
Swap: 6291448k total, 0k used, 6291448k free, 2648472k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1500 apache 20 0 81188 55m 4660 R 47.7 0.4 3:53.51 httpd
1167 apache 20 0 80184 55m 4680 R 36.3 0.4 13:37.91 httpd
942 apache 20 0 86352 61m 4708 R 34.3 0.4 12:59.12 httpd
1157 apache 20 0 84272 59m 4704 R 34.3 0.4 13:04.18 httpd
1307 apache 20 0 86316 60m 4684 R 34.3 0.4 10:33.57 httpd
1363 apache 20 0 80164 55m 4676 R 34.3 0.4 7:07.59 httpd
1386 apache 20 0 86336 60m 4676 R 34.3 0.4 5:58.29 httpd
1620 apache 20 0 80164 54m 4660 R 34.3 0.3 3:01.97 httpd
937 apache 20 0 84084 59m 4712 R 32.4 0.4 13:04.31 httpd
1147 apache 20 0 84260 59m 4696 R 32.4 0.4 12:21.55 httpd
1158 apache 20 0 84084 60m 4688 R 32.4 0.4 12:39.18 httpd
1159 apache 20 0 84288 59m 4696 R 32.4 0.4 13:12.04 httpd

my.cnf conf. file
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
set-variable=max_allowed_packet=100M
set-variable=max_connections=500
set-variable=key_buffer_size=100M
#set-variable=key_buffer_size=64M
set-variable=sort_buffer_size=64M
#set-variable=innodb_buffer_pool_size=32M
set-variable=innodb_buffer_pool_size=1024M
#set-variable=innodb_buffer_pool_size=2048M
#set-variable=table_cache=1024
set-variable=table_cache=256
set-variable=thread_cache_size=16
set-variable=query_cache_size=16M
#set-variable=innodb_log_file_size=100MB
set-variable=interactive_timeout=60
set-variable=wait_timeout=60
 
Old 02-25-2015, 08:25 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,358
Blog Entries: 55

Rep: Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545
Quote:
Originally Posted by k.shashidhar View Post
promble: httpd service taking 90% cpu usage.
- Why is this a 32bit and not an x86_64?
- Does "centos 6" mean CentOS 6.6 (current) or any older version. If older: update.
- Doesn't that just mean resources are utilized properly?
- Else what are expected values?
- How many visitors (if any) are causing this load?
- What traffic volume does the machine draw?
- When did this behaviour start?
- Did anyone change any software or configuration at that point?
- What applications are running on top of Apache (and don't say "PHP" or "Ruby" but supply software package names)?
- Are all those software packages up to date including themes, plugins, addons etc, etc?
- Does the machine expose any other services we should know about?


Quote:
Originally Posted by k.shashidhar View Post
below is top command result and my.cnf conf..
Thanks but not (helpful) enough (unless you mean "go over the details and fix my errors for me"). Instead:
- What was tuned system-wise to get maximum performance?
- Same for the web server and the database?
- What do the Apache (extended) status pages show about resource utilization?
- What do the system and daemon log files (slow query log?) say with respect to errors?


Quote:
Originally Posted by k.shashidhar View Post
some times site hangs.
- Sometimes as in once a aeon, day or every n seconds?
- How are these "hangs" monitored or measured?


Quote:
Originally Posted by k.shashidhar View Post
any solution on this issue
Yes: start with troubleshooting the proper way. Indeed that's a skill so if you're not comfortable with it either hand off the task to a more experienced coworker or start reading / learning I'd say ;-p We sure can help you with troubleshooting but you have to do the hard work.
 
  


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
Server Automatic shutdown taking CPU usage, Memory I/O, network Flow into considerati ravishankaradepu Linux - Server 1 05-23-2012 04:47 AM
MYSQLD taking high CPU system usage varshajain87 Linux - Server 3 05-05-2011 09:44 AM
why a process ( written in c++) taking 200% cpu usage? sasd Linux - Games 2 03-24-2010 12:24 AM
httpd (perl) High CPU Usage!? twproductions Linux - Software 7 04-21-2008 02:26 PM
Apache httpd taking 99% CPU Usage nimish Linux - Software 1 11-04-2004 06:49 AM

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

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