Help pinpointing high HTTPD CPU usage in TOP


 
Thread Tools Search this Thread
Operating Systems Linux Help pinpointing high HTTPD CPU usage in TOP
# 1  
Old 12-05-2008
Help pinpointing high HTTPD CPU usage in TOP

Hi, new here and need some help. Sometimes my site is extremely slow, if when there aren't too many people on, whereas when there are over 300 online members the site may be very fast. We use CentOS, PHP 5.26. The server has 4GB and Plesk usually shows about 2 or 3 GB free.

I believe I can see the problem when I use TOP
Lastnight when I was trying to copy/paste this I noticed the load average said numbers around 19, yes nineteen and don't imagine that's a good thing. I'm no expert but I imagine the HTTPD is some sort of thread transferring data to the web. Most of the time the CPU usage seen in top is very low. Atleast several times per day I check TOP because I notice the site is slow and I see multiple HTTPD threads with 100%+ CPU usage. I kill them by PID and the server stops reacting so slowly. What makes the HTTPD CPU usage skyrocket for these occasional threads? An inefficiency with my script? Any help would be greatly appreciated!

Here's #TOP
(The problem arises regardless of what mysqld show for cpu usage. Below you can see mysqld has high cpu usage but again this slow problem exists regardless of cpu usage for mysqld.)
Code:
 
top - 08:56:45 up 28 days,  5:34,  1 user,  load average: 4.75, 5.01, 4.95
Tasks: 286 total,   5 running, 281 sleeping,   0 stopped,   0 zombie
Cpu(s): 63.3% us,  2.5% sy,  0.0% ni, 33.0% id,  1.2% wa,  0.0% hi,  0.0% si
Mem:   4148828k total,  2703768k used,  1445060k free,   242088k buffers
Swap:  2096472k total,    38412k used,  2058060k free,  1590868k cached
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                       
  458 mysql     15   0  200m  64m 5236 S 169.2  1.6   1192:49 mysqld                                                                                                                                                                       
 4446 apache    25   0 36840  16m 5932 R 100.1  0.4  55:10.58 httpd                                                                                                                                                                        
25649 apache    25   0 36896  16m 5856 R 100.1  0.4  19:43.61 httpd                                                                                                                                                                        
10043 apache    25   0 36760  17m 6468 R 99.8  0.4  22:13.09 httpd                                                                                                                                                                         
23264 apache    15   0 36372  16m 6632 S 15.1  0.4   0:21.37 httpd                                                                                                                                                                         
  625 apache    16   0 37456  17m 6044 S  9.1  0.4   0:03.57 httpd                                                                                                                                                                         
18765 apache    15   0 36248  16m 6288 S  6.7  0.4   0:10.98 httpd                                                                                                                                                                         
 4707 apache    15   0 36236  16m 6516 S  1.9  0.4   0:10.32 httpd                                                                                                                                                                         
 9463 apache    17   0 36256  16m 6688 S  1.3  0.4   0:29.70 httpd                                                                                                                                                                         
10045 apache    15   0 36180  16m 6216 S  1.3  0.4   0:08.11 httpd                                                                                                                                                                         
  521 apache    16   0 36068  15m 5852 S  1.1  0.4   0:03.98 httpd                                                                                                                                                                         
  643 apache    15   0 36068  15m 5812 S  1.1  0.4   0:01.40 httpd                                                                                                                                                                         
 3065 apache    15   0 36060  15m 5740 S  1.1  0.4   0:02.42 httpd                                                                                                                                                                         
25687 apache    17   0 36056  15m 5800 S  1.1  0.4   0:04.20 httpd                                                                                                                                                                         
 1082 apache    16   0 36252  16m 6448 S  0.8  0.4   0:02.16 httpd                                                                                                                                                                         
 4690 apache    16   0 36268  16m 6412 S  0.8  0.4   0:11.30 httpd                                                                                                                                                                         
 5840 apache    15   0 36068  15m 5700 S  0.8  0.4   0:00.48 httpd                                                                                                                                                                         
 7637 apache    15   0 36108  16m 6196 S  0.8  0.4   0:07.28 httpd                                                                                                                                                                         
23282 apache    16   0 36372  16m 6616 S  0.8  0.4   0:26.70 httpd                                                                                                                                                                         
  395 apache    16   0 36164  16m 6224 S  0.5  0.4   0:02.28 httpd                                                                                                                                                                         
  396 apache    16   0 36080  15m 5716 S  0.5  0.4   0:01.98 httpd                                                                                                                                                                         
  609 apache    15   0 36228  16m 6136 S  0.5  0.4   0:01.78 httpd                                                                                                                                                                         
 1090 apache    15   0 36248  16m 6552 S  0.5  0.4   0:23.91 httpd                                                                                                                                                                         
 2282 apache    16   0 36080  15m 5832 S  0.5  0.4   0:01.92 httpd                                                                                                                                                                         
 3064 apache    16   0 36072  15m 5824 S  0.5  0.4   0:03.21 httpd                                                                                                                                                                         
 3343 apache    16   0 36336  16m 6128 S  0.5  0.4   0:01.51 httpd                                                                                                                                                                         
 9460 apache    15   0 36260  16m 6712 S  0.5  0.4   0:29.97 httpd                                                                                                                                                                         
23565 apache    16   0 36236  16m 6580 S  0.5  0.4   0:22.23 httpd                                                                                                                                                                         
25627 apache    16   0 36232  16m 6352 S  0.5  0.4   0:04.23 httpd                                                                                                                                                                         
25651 apache    15   0 36164  16m 6072 S  0.5  0.4   0:06.32 httpd                                                                                                                                                                         
25655 apache    16   0 36180  16m 6120 S  0.5  0.4   0:03.17 httpd                                                                                                                                                                         
30861 apache    16   0 36368  17m 6796 S  0.5  0.4   0:41.49 httpd                                                                                                                                                                         
    8 root      RT   0     0    0    0 S  0.3  0.0   0:26.34 migration/3                                                                                                                                                                   
  379 apache    15   0 36168  16m 6184 S  0.3  0.4   0:02.91 httpd                                                                                                                                                                         
  393 apache    16   0 36064  15m 5788 S  0.3  0.4   0:03.53 httpd                                                                                                                                                                         
  752 apache    15   0 36324  16m 6464 S  0.3  0.4   0:04.09 httpd                                                                                                                                                                         
 1423 apache    15   0 36328  16m 6564 S  0.3  0.4   0:12.78 httpd                                                                                                                                                                         
 2281 apache    17   0 36100  15m 5664 S  0.3  0.4   0:03.17 httpd                                                                                                                                                                         
 3236 apache    15   0 36084  15m 5964 S  0.3  0.4   0:00.94 httpd                                                                                                                                                                         
 6716 apache    16   0 36100  15m 5928 S  0.3  0.4   0:10.75 httpd                                                                                                                                                                         
 9365 root      16   0  3824 1124  764 R  0.3  0.0   0:00.08 top                                                                                                                                                                           
14294 apache    16   0 36132  16m 6488 S  0.3  0.4 150:21.06 httpd                                                                                                                                                                         
14544 apache    16   0 36328  16m 6536 S  0.3  0.4   0:08.27 httpd                                                                                                                                                                         
17649 apache    16   0 36236  16m 6104 S  0.3  0.4   0:07.08 httpd                                                                                                                                                                         
18810 apache    16   0 36368  16m 6236 S  0.3  0.4   0:09.42 httpd                                                                                                                                                                         
22251 apache    15   0 36364  16m 6620 S  0.3  0.4   0:19.90 httpd                                                                                                                                                                         
23249 apache    15   0 36260  16m 6588 S  0.3  0.4   0:35.97 httpd                                                                                                                                                                         
25635 apache    16   0 36276  16m 6504 S  0.3  0.4   0:03.46 httpd                                                                                                                                                                         
25685 apache    16   0 36220  16m 6224 S  0.3  0.4   0:04.47 httpd                                                                                                                                                                         
26351 apache    16   0 36296  16m 6680 S  0.3  0.4   0:45.73 httpd

my.cnf
Code:
 
[mysqld]
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_connections=500 
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
     
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

httpd.conf
Code:
 
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers       16
MinSpareServers    16 
MaxSpareServers   64
ServerLimit      512
MaxClients       512
MaxRequestsPerChild  4000
</IfModule>
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>
Listen 80
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule auth_ldap_module modules/mod_auth_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
Include conf.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/var/www/html">
    Options Indexes FollowSymLinks ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_userdir.c>
     UserDir disable
</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
 
<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort NameWidth=*
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb 
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler imap-file map
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"
Alias /mail/ "/usr/local/atmail/webmail/"
Alias /mail "/usr/local/atmail/webmail/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>
</IfModule>
</IfModule>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

PS -EF
Code:
ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Nov07 ?        00:00:07 init [3]                                                      
root         2     1  0 Nov07 ?        00:00:00 [migration/0]
root         3     1  0 Nov07 ?        00:00:01 [ksoftirqd/0]
root         4     1  0 Nov07 ?        00:01:02 [migration/1]
root         5     1  0 Nov07 ?        00:00:01 [ksoftirqd/1]
root         6     1  0 Nov07 ?        00:01:10 [migration/2]
root         7     1  0 Nov07 ?        00:00:01 [ksoftirqd/2]
root         8     1  0 Nov07 ?        00:00:26 [migration/3]
root         9     1  0 Nov07 ?        00:00:00 [ksoftirqd/3]
root        10     1  0 Nov07 ?        00:03:23 [migration/4]
root        11     1  0 Nov07 ?        00:00:01 [ksoftirqd/4]
root        12     1  0 Nov07 ?        00:01:53 [migration/5]
root        13     1  0 Nov07 ?        00:00:01 [ksoftirqd/5]
root        14     1  0 Nov07 ?        00:00:00 [migration/6]
root        15     1  0 Nov07 ?        00:00:00 [ksoftirqd/6]
root        16     1  0 Nov07 ?        00:00:00 [migration/7]
root        17     1  0 Nov07 ?        00:00:00 [ksoftirqd/7]
root        18     1  0 Nov07 ?        00:00:00 [events/0]
root        19     1  0 Nov07 ?        00:00:00 [events/1]
root        20     1  0 Nov07 ?        00:00:00 [events/2]
root        21     1  0 Nov07 ?        00:00:00 [events/3]
root        22     1  0 Nov07 ?        00:00:00 [events/4]
root        23     1  0 Nov07 ?        00:00:00 [events/5]
root        24     1  0 Nov07 ?        00:00:00 [events/6]
root        25     1  0 Nov07 ?        00:00:00 [events/7]
root        26    18  0 Nov07 ?        00:00:00 [khelper]
root        27    18  0 Nov07 ?        00:00:00 [kacpid]
root        70    18  0 Nov07 ?        00:00:00 [kblockd/0]
root        71    18  0 Nov07 ?        00:00:00 [kblockd/1]
root        72    18  0 Nov07 ?        00:00:00 [kblockd/2]
root        73    18  0 Nov07 ?        00:00:00 [kblockd/3]
root        74    18  0 Nov07 ?        00:00:00 [kblockd/4]
root        75    18  0 Nov07 ?        00:00:00 [kblockd/5]
root        76    18  0 Nov07 ?        00:00:00 [kblockd/6]
root        77    18  0 Nov07 ?        00:00:00 [kblockd/7]
root        78     1  0 Nov07 ?        00:00:00 [khubd]
root        97     1  0 Nov07 ?        00:12:48 [kswapd0]
root        98    18  0 Nov07 ?        00:00:00 [aio/0]
root        99    18  0 Nov07 ?        00:00:00 [aio/1]
root       100    18  0 Nov07 ?        00:00:00 [aio/2]
root       101    18  0 Nov07 ?        00:00:00 [aio/3]
root       102    18  0 Nov07 ?        00:00:00 [aio/4]
root       103    18  0 Nov07 ?        00:00:00 [aio/5]
root       104    18  0 Nov07 ?        00:00:00 [aio/6]
root       105    18  0 Nov07 ?        00:00:00 [aio/7]
root       249     1  0 Nov07 ?        00:00:00 [kseriod]
root       300 32743  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root       301 32743  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root       302 32743  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root       303 32743  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root       348     1  0 Nov30 ?        00:00:02 /usr/local/atmail/spamassassin/bin/spamd -d -x -q -u atmail --virtual-config-dir=/usr/local/atmail/ -m 6 -r /usr/local/atmail/spamassassin/spamd.pid
root       351     1  0 Nov30 ?        00:00:03 /usr/bin/perl /usr/local/atmail/webmail/modules/log-daemon.pl
apache     366 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     378 14003  0 08:42 ?        00:00:02 /usr/sbin/httpd
apache     379 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     393 14003  0 08:42 ?        00:00:02 /usr/sbin/httpd
apache     394 14003  0 08:42 ?        00:00:02 /usr/sbin/httpd
apache     395 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     396 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
root       408     1  0 Dec04 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid
mysql      458   408 69 Dec04 ?        19:46:49 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock
root       484     1  0 Nov30 ?        00:00:00 /usr/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a
root       500    21  0 Nov07 ?        00:00:00 [ata/0]
root       501    21  0 Nov07 ?        00:00:00 [ata/1]
root       502    21  0 Nov07 ?        00:00:00 [ata/2]
root       503    21  0 Nov07 ?        00:00:00 [ata/3]
root       504    21  0 Nov07 ?        00:00:00 [ata/4]
root       505    21  0 Nov07 ?        00:00:00 [ata/5]
root       506    21  0 Nov07 ?        00:00:00 [ata/6]
root       507    21  0 Nov07 ?        00:00:00 [ata/7]
root       508    21  0 Nov07 ?        00:00:00 [ata_aux]
root       518     1  0 Nov07 ?        00:00:00 [scsi_eh_0]
root       519     1  0 Nov07 ?        00:00:00 [scsi_eh_1]
apache     521 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
root       557     1  0 Nov07 ?        00:08:02 [kjournald]
apache     582 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     609 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     624 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     625 14003  0 08:42 ?        00:00:02 /usr/sbin/httpd
apache     640 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     643 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     729 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     738 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     749 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     751 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     752 14003  0 08:42 ?        00:00:01 /usr/sbin/httpd
apache     753 14003  0 08:42 ?        00:00:00 /usr/sbin/httpd
apache     955 14003  0 06:17 ?        00:00:24 /usr/sbin/httpd
apache     957 14003  0 06:17 ?        00:00:21 /usr/sbin/httpd
root       999    20  0 Nov07 ?        00:00:00 [kauditd]
apache    1038 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1043 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1044 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1064 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1065 14003  0 08:43 ?        00:00:01 /usr/sbin/httpd
apache    1066 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1077 14003  0 08:43 ?        00:00:01 /usr/sbin/httpd
apache    1079 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1081 14003  0 08:43 ?        00:00:01 /usr/sbin/httpd
apache    1082 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1083 14003  0 08:43 ?        00:00:00 /usr/sbin/httpd
apache    1084 14003  0 08:43 ?        00:00:02 /usr/sbin/httpd
apache    1090 14003  0 06:17 ?        00:00:22 /usr/sbin/httpd
apache    1422 14003  0 07:30 ?        00:00:12 /usr/sbin/httpd
apache    1423 14003  0 07:30 ?        00:00:11 /usr/sbin/httpd
apache    1644 14003  0 06:17 ?        00:00:17 /usr/sbin/httpd
root      1801     1  0 Nov07 ?        00:00:00 udevd
root      2160     1  0 Nov09 ?        00:00:59 /usr/bin/perl /usr/local/atmail/webmail/modules/log-daemon.pl
apache    2276 14003  0 08:44 ?        00:00:02 /usr/sbin/httpd
apache    2281 14003  0 08:44 ?        00:00:00 /usr/sbin/httpd
apache    2282 14003  0 08:44 ?        00:00:00 /usr/sbin/httpd
root      2460     1  0 Nov07 ?        00:00:00 [scsi_eh_2]
root      2461     1  0 Nov07 ?        00:01:42 [usb-storage]
root      2571     1  0 Nov07 ?        00:00:00 [kjournald]
root      2572     1  0 Nov07 ?        00:11:34 [kjournald]
apache    3048 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3064 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3065 14003  0 08:46 ?        00:00:01 /usr/sbin/httpd
apache    3191 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3211 14003  0 08:46 ?        00:00:01 /usr/sbin/httpd
apache    3234 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3235 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3236 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3237 14003  1 08:46 ?        00:00:02 /usr/sbin/httpd
apache    3285 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3304 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3305 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
apache    3343 14003  0 08:46 ?        00:00:00 /usr/sbin/httpd
root      3496     1  0 Nov07 ?        00:00:14 syslogd -m 0
root      3500     1  0 Nov07 ?        00:00:00 klogd -x
root      3513     1  0 Nov07 ?        00:00:01 irqbalance
rpc       3596     1  0 Nov07 ?        00:00:00 portmap
rpcuser   3615     1  0 Nov07 ?        00:00:00 rpc.statd
root      3650     1  0 Nov07 ?        00:00:00 rpc.idmapd
root      3724     1  0 Nov07 ?        00:00:00 /usr/sbin/smartd
root      3733     1  0 Nov07 ?        00:00:00 /usr/sbin/acpid
root      3801     1  0 Nov07 ?        00:00:11 /usr/sbin/sshd
root      4054     1  0 Nov07 ?        00:00:00 gpm -m /dev/input/mice -t imps2
apache    4406 14003  0 07:38 ?        00:00:09 /usr/sbin/httpd
apache    4420 14003  0 07:38 ?        00:00:12 /usr/sbin/httpd
root      4438     1  0 Nov07 ?        00:00:04 crond
apache    4446 14003 67 07:38 ?        00:48:09 /usr/sbin/httpd
xfs       4470     1  0 Nov07 ?        00:00:00 xfs -droppriv -daemon
root      4487     1  0 Nov07 ?        00:00:00 /usr/sbin/atd
dbus      4500     1  0 Nov07 ?        00:00:00 dbus-daemon-1 --system
root      4511     1  0 Nov07 ?        00:10:59 hald
root      4518     1  0 Nov07 tty1     00:00:00 /sbin/mingetty tty1
root      4519     1  0 Nov07 tty2     00:00:00 /sbin/mingetty tty2
root      4520     1  0 Nov07 tty3     00:00:00 /sbin/mingetty tty3
root      4521     1  0 Nov07 tty4     00:00:00 /sbin/mingetty tty4
root      4522     1  0 Nov07 tty5     00:00:00 /sbin/mingetty tty5
root      4523     1  0 Nov07 tty6     00:00:00 /sbin/mingetty tty6
root      4524     1  0 Nov07 ttyS1    00:00:00 /sbin/agetty -h -L ttyS1 19200 vt100
apache    4690 14003  0 07:39 ?        00:00:10 /usr/sbin/httpd
apache    4702 14003  0 07:39 ?        00:00:04 /usr/sbin/httpd
apache    4707 14003  0 07:39 ?        00:00:09 /usr/sbin/httpd
apache    4709 14003  0 07:39 ?        00:00:08 /usr/sbin/httpd
apache    4710 14003  0 07:39 ?        00:00:12 /usr/sbin/httpd
apache    5571 14003  0 04:38 ?        00:00:33 /usr/sbin/httpd
root      5611 25584  0 08:49 pts/0    00:00:00 ps -ef
apache    6355 14003  0 03:01 ?        00:00:02 /usr/sbin/httpd
apache    6716 14003  0 07:43 ?        00:00:09 /usr/sbin/httpd
apache    6723 14003  0 07:43 ?        00:00:14 /usr/sbin/httpd
apache    6726 14003  0 07:43 ?        00:00:03 /usr/sbin/httpd
root      6803     1  0 Nov09 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
apache    7094 14003  0 07:44 ?        00:00:10 /usr/sbin/httpd
apache    7619 14003  0 07:45 ?        00:00:11 /usr/sbin/httpd
apache    7635 14003  0 07:45 ?        00:00:03 /usr/sbin/httpd
apache    7637 14003  0 07:45 ?        00:00:06 /usr/sbin/httpd
apache    7638 14003  0 07:45 ?        00:00:16 /usr/sbin/httpd
apache    7653 14003  0 07:45 ?        00:00:11 /usr/sbin/httpd
apache    7658 14003  0 07:45 ?        00:00:07 /usr/sbin/httpd
apache    8834 14003  0 04:42 ?        00:00:42 /usr/sbin/httpd
apache    9427 14003  0 05:34 ?        00:00:29 /usr/sbin/httpd
apache    9460 14003  0 05:34 ?        00:00:29 /usr/sbin/httpd
apache    9463 14003  0 05:34 ?        00:00:28 /usr/sbin/httpd
apache   10043 14003  4 03:04 ?        00:15:12 /usr/sbin/httpd
apache   10045 14003  0 03:04 ?        00:00:06 /usr/sbin/httpd
apache   10387 14003  0 04:00 ?        00:00:41 /usr/sbin/httpd
apache   10682 14003  0 06:35 ?        00:00:10 /usr/sbin/httpd
root     10738     1  0 Nov09 ?        00:01:02 /usr/bin/perl /usr/local/atmail/webmail/modules/log-daemon.pl
root     11157    20  0 04:02 ?        00:00:00 [pdflush]
apache   13221 14003  0 07:59 ?        00:00:05 /usr/sbin/httpd
named    13618     1  0 Dec01 ?        00:00:10 /usr/sbin/named -u named -c /etc/named.conf -u named -t /var/named/run-root
qmails   13637     1  0 Dec01 ?        00:00:00 qmail-send
qmaill   13639 13637  0 Dec01 ?        00:00:00 splogger qmail
root     13640 13637  0 Dec01 ?        00:00:00 qmail-lspawn ./Maildir/
qmailr   13641 13637  0 Dec01 ?        00:00:00 qmail-rspawn
qmailq   13642 13637  0 Dec01 ?        00:00:00 qmail-clean
root     13661     1  0 Dec01 ?        00:00:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd -maxprocs=40 -maxperip=4 -pid=/var/run/imapd.pid -nodnslookup -noidentlookup 143
root     13663     1  0 Dec01 ?        00:00:00 /usr/sbin/courierlogger imapd
root     13673     1  0 Dec01 ?        00:00:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd-ssl -maxprocs=40 -maxperip=4 -pid=/var/run/imapd-ssl.pid -nodnslookup -noidentlo
root     13675     1  0 Dec01 ?        00:00:00 /usr/sbin/courierlogger imapd-ssl
root     13683     1  0 Dec01 ?        00:00:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d -maxprocs=40 -maxperip=4 -pid=/var/run/pop3d.pid -nodnslookup -noidentlookup 110
root     13685     1  0 Dec01 ?        00:00:00 /usr/sbin/courierlogger pop3d
root     13694     1  0 Dec01 ?        00:00:00 /usr/lib/courier-imap/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d-ssl -maxprocs=40 -maxperip=4 -pid=/var/run/pop3d-ssl.pid -nodnslookup -noidentlo
root     13696     1  0 Dec01 ?        00:00:00 /usr/sbin/courierlogger pop3d-ssl
postgres 13735     1  0 Dec01 ?        00:00:00 /usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 13737 13735  0 Dec01 ?        00:00:00 postgres: stats buffer process                    
postgres 13738 13737  0 Dec01 ?        00:00:00 postgres: stats collector process                 
root     13796     1  0 Dec01 ?        00:00:00 /usr/local/psa/admin/bin/httpsd
root     13944     1  0 Dec01 ?        00:00:01 /usr/bin/spamd --username=popuser --daemonize --nouser-config --helper-home-dir=/var/qmail --max-children 5 --create-prefs --virtual-config-dir=/var/qmail/mailnames/%d/%l/.spamassassin --
popuser  13945 13944  0 Dec01 ?        00:00:00 spamd child
popuser  13946 13944  0 Dec01 ?        00:00:00 spamd child
drweb    13978     1  0 Dec01 ?        00:00:00 /opt/drweb/drwebd
drweb    13979 13978  0 Dec01 ?        00:00:00 /opt/drweb/drwebd
drweb    13980 13978  0 Dec01 ?        00:00:00 /opt/drweb/drwebd
drweb    13981 13978  0 Dec01 ?        00:00:00 /opt/drweb/drwebd
drweb    13982 13978  0 Dec01 ?        00:00:00 /opt/drweb/drwebd
root     14003     1  0 Dec01 ?        00:00:13 /usr/sbin/httpd
apache   14294 14003 38 02:20 ?        02:30:16 /usr/sbin/httpd
apache   14544 14003  0 08:02 ?        00:00:07 /usr/sbin/httpd
psaadm   15124 13796  0 Dec03 ?        00:00:08 /usr/local/psa/admin/bin/httpsd
apache   15929   348  0 Dec01 ?        00:00:00 spamd child
apache   15930   348  0 Dec01 ?        00:00:00 spamd child
apache   16294 14003  0 06:46 ?        00:00:17 /usr/sbin/httpd
apache   16298 14003  0 06:46 ?        00:00:11 /usr/sbin/httpd
apache   17576 14003  0 Dec03 ?        00:00:00 /usr/sbin/httpd
apache   17630 14003  0 08:09 ?        00:00:05 /usr/sbin/httpd
apache   17649 14003  0 08:09 ?        00:00:04 /usr/sbin/httpd
apache   18511 14003  0 08:11 ?        00:00:03 /usr/sbin/httpd
apache   18521 14003  0 08:11 ?        00:00:03 /usr/sbin/httpd
apache   18602 14003  0 08:11 ?        00:00:08 /usr/sbin/httpd
apache   18762 14003  0 08:11 ?        00:00:08 /usr/sbin/httpd
apache   18765 14003  0 08:11 ?        00:00:05 /usr/sbin/httpd
apache   18799 14003  0 08:11 ?        00:00:08 /usr/sbin/httpd
apache   18810 14003  0 08:11 ?        00:00:08 /usr/sbin/httpd
apache   18811 14003  0 08:11 ?        00:00:02 /usr/sbin/httpd
apache   18850 14003  0 03:38 ?        00:00:47 /usr/sbin/httpd
apache   19160 14003  0 Dec04 ?        00:02:22 /usr/sbin/httpd
apache   22006 14003  0 03:14 ?        00:00:02 /usr/sbin/httpd
apache   22251 14003  0 07:04 ?        00:00:18 /usr/sbin/httpd
apache   23249 14003  0 06:00 ?        00:00:32 /usr/sbin/httpd
apache   23264 14003  0 06:00 ?        00:00:19 /usr/sbin/httpd
apache   23282 14003  0 06:00 ?        00:00:25 /usr/sbin/httpd
apache   23533 14003  0 07:08 ?        00:00:16 /usr/sbin/httpd
apache   23546 14003  0 07:08 ?        00:00:14 /usr/sbin/httpd
apache   23547 14003  0 07:08 ?        00:00:18 /usr/sbin/httpd
apache   23548 14003  0 07:08 ?        00:00:15 /usr/sbin/httpd
apache   23558 14003  0 07:08 ?        00:00:15 /usr/sbin/httpd
apache   23561 14003  0 07:08 ?        00:00:12 /usr/sbin/httpd
apache   23562 14003  0 07:08 ?        00:00:13 /usr/sbin/httpd
apache   23563 14003  0 07:08 ?        00:00:12 /usr/sbin/httpd
apache   23565 14003  0 07:08 ?        00:00:18 /usr/sbin/httpd
psaadm   24038 13796  0 Dec02 ?        00:00:09 /usr/local/psa/admin/bin/httpsd
apache   24061 14003  0 07:09 ?        00:00:16 /usr/sbin/httpd
apache   24062 14003  0 07:09 ?        00:00:14 /usr/sbin/httpd
apache   24596 14003  0 07:10 ?        00:00:12 /usr/sbin/httpd
root     25576  3801  0 08:27 ?        00:00:00 sshd: root@pts/0 
root     25584 25576  0 08:27 pts/0    00:00:00 -bash
apache   25627 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25630 14003  0 08:27 ?        00:00:03 /usr/sbin/httpd
apache   25633 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25635 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25636 14003  0 08:27 ?        00:00:04 /usr/sbin/httpd
apache   25640 14003  0 08:27 ?        00:00:03 /usr/sbin/httpd
apache   25645 14003  0 08:27 ?        00:00:05 /usr/sbin/httpd
apache   25649 14003 57 08:27 ?        00:12:42 /usr/sbin/httpd
apache   25650 14003  0 08:27 ?        00:00:06 /usr/sbin/httpd
apache   25651 14003  0 08:27 ?        00:00:04 /usr/sbin/httpd
apache   25654 14003  0 08:27 ?        00:00:04 /usr/sbin/httpd
apache   25655 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25659 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25660 14003  0 08:27 ?        00:00:04 /usr/sbin/httpd
apache   25666 14003  0 08:27 ?        00:00:03 /usr/sbin/httpd
apache   25667 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25668 14003  0 08:27 ?        00:00:03 /usr/sbin/httpd
apache   25670 14003  0 08:27 ?        00:00:02 /usr/sbin/httpd
apache   25671 14003  0 08:27 ?        00:00:03 /usr/sbin/httpd
apache   25685 14003  0 08:28 ?        00:00:02 /usr/sbin/httpd
apache   25686 14003  0 08:28 ?        00:00:02 /usr/sbin/httpd
apache   25687 14003  0 08:28 ?        00:00:02 /usr/sbin/httpd
apache   25688 14003  0 08:28 ?        00:00:02 /usr/sbin/httpd
apache   25692 14003  0 08:28 ?        00:00:03 /usr/sbin/httpd
apache   26351 14003  0 04:23 ?        00:00:44 /usr/sbin/httpd
apache   26751 14003  0 05:09 ?        00:00:37 /usr/sbin/httpd
apache   26765 14003  0 05:09 ?        00:00:31 /usr/sbin/httpd
apache   26785 14003  0 05:09 ?        00:00:40 /usr/sbin/httpd
apache   26868 14003  0 05:09 ?        00:00:31 /usr/sbin/httpd
apache   28787 14003  0 07:19 ?        00:00:17 /usr/sbin/httpd
apache   29041 14003  0 07:19 ?        00:00:12 /usr/sbin/httpd
apache   29663 14003  0 07:21 ?        00:00:09 /usr/sbin/httpd
root     29816 25576  0 08:36 ?        00:00:00 /usr/libexec/openssh/sftp-server
apache   30861 14003  0 04:29 ?        00:00:40 /usr/sbin/httpd
root     31132    25  0 04:29 ?        00:00:00 [pdflush]
root     32558     1  0 Nov30 ?        00:00:00 cupsd
root     32742     1  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//sbin/courierlogger -pid=/usr/local/atmail/mailserver//var/authdaemon/pid -start /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root     32743 32742  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql
root     32767 32743  0 Nov30 ?        00:00:00 /usr/local/atmail/mailserver//libexec/authlib/authdaemond.mysql

Thank you for any information to help me fix the slow problem and letting me know what makes an HTTPD thread in TOP show 100% cpu usage?
# 2  
Old 12-05-2008
pspace,

You can use the toogle key of TOP to see memory usage.you can just see it in man page or just by pressing the help key at TOP. Advise to you is to adjust the settings of your httpd.conf. You need to adjust the config of the ff:

MaxKeepAliveRequests
KeepAliveTimeout
StartServers
MinSpareServers
MaxSpareServers
ServerLimit
MaxClients
MaxRequestsPerChild
# 3  
Old 12-05-2008
Thanks for helping! Per your post, I've researched the 'prefork MPM' section of my httpd.conf file but am not finding anything that helps me fine tune the settings for my particular server usage or server type.

I believe I saw some example .conf files that were like htppd-huge.conf htppd-large.conf htppd-small.conf and stuff like that. I went through each saw that the huge one was referring to a server with 4GB ram which is what mine has. I tried using those settings but my server didn't like it very much at all! Next I tried using the large and medium ones but again my server acted funny so I reverted back to what I have:
Code:
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       16
MinSpareServers    16 
MaxSpareServers   64
ServerLimit      512
MaxClients       512
MaxRequestsPerChild  4000
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

There must be a way to limit the CPU usage of each httpd thread so that it doesn't reach 100% ? I read doc's on the Apache site that explained what each of the above does but it didn't help me figure out which way to go with things. Do I leave the worker.c alone above and focus on the prefork? You said to modify the FF but I don't know what FF stands for sorry. Smilie You pasted MaxClients, etc. so I'm assuming it's the prefork I should mess with.

Another thing that I tried was since the huge .conf file example had settings almost double mine, I attempted to double the settings such as changing StartServers to 32 from 16, all the way down the module list. That didn't work either.

We have more than 2GB of RAM that's not being used since Plesk usually says we're using between 1GB and 2GB, so I don't imagine this is memory related. Also since most threads in TOP show 0.3% cpu usage to 1.7%cpu usage, it seems to be a problem when I find 100% usage. For instance I got home an hour ago and killed 5 threads that were 100% cpu usage in TOP. I just checked now and see 2 more running and bogging down my server. There's a big difference between 0.6% and 100% I'd say Smilie Any further help for my confusion would be GREATLY appreciated!

Chris

Last edited by pspace; 12-05-2008 at 06:45 PM..
# 4  
Old 12-05-2008
pspace,

You can check your httpd service if your using prefork or worker by typing

httpd -V and look for "-D APACHE_MPM_DIR="server/mpm/prefork"
that means your using prefork. if your MPM is worker then adjust instead of the prefork

<IfModule prefork.c>
StartServers 16
MinSpareServers 16
MaxSpareServers 64
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000
</IfModule>


Bigger settings doesnt mean good for server. Your settings is a bloated at prefork settings and also workers MPM.

Please take a look at this site. or research more in performance tuning.

(dv) HOWTO: Basic Apache performance tuning (httpd))

Just to give you idea, 1 httpd process sometimes consumes about 128 MB of your memory and based on your settings if you started 16 httpd process(startservers) multply by 128 MB plus additional 16 more (min spare) thats a lot of memory consumption. I never include the max clients that is allowed.

So bigger is not always good for settings in apache.conf. You can google for apache performance to look for more answer. Cheers
# 5  
Old 12-06-2008
In addition the advice from csorhand and looking at your processes it appears that you are using a LAMP configuration, so there are several things to take into account here (I am assuming the php part).

1. Examine your content, if you are serving pages that contain mixed content such as images and javascript along with dynamic php content, you might benefit from adding expiry to the static content, if client need to download less that will reduce some of your load.
Code:
        <IfModule mod_expires.c>
                ExpiresActive On
                <FilesMatch "\.(css|js|gif|jpg|jpeg|png|swf)$">
                        ExpiresDefault A2592000
                        Header Append Cache-Control "public"
                </FilesMatch>
        </IfModule>

2. Install a php cache such as xcache, eAccelerator or APC.

3. Look at this thread https://www.unix.com/web-programming-...primer-sh.html and use the tools linked to check your mysql configuration. I believe it is actually your communication with MySQL which is causing you the most problems.

4. Ensure that you have dns lookups turned off in apache:
Code:
HostnameLookups Off


Also check for "bad" pages that have nasty queries. We has on module on this site that put millions of rows in one db table, and tried to query that table every time specific pages were loaded. The server was running flat out for a few days until I managed to spot the strange behavior and truncated the table. The load went down instantly to a normal level.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Server showing high Sys% CPU usage

Hi Fellas, Not sure how I can dig in even further but we notice that one of our DB servers is showing high Sys% CPU usage even though when I execute the following command : I can see that postgres is the only one using the CPU. So if anyone can advise me what would be the best way to... (3 Replies)
Discussion started by: arizah
3 Replies

2. Solaris

How can i restrict user high cpu usage?

HI In my M5000 , one of domain is having SAp installed. from today onwards we are facing some stange issue. when we start SAP application, that particular user is taking 95 % of system CP and renaming 5 % is taken by system . because of this reason application is slow. i have 4 CPU(32... (4 Replies)
Discussion started by: bentech4u
4 Replies

3. Shell Programming and Scripting

High cpu usage

I have created one script and i have added it into cron to run after 10 mins. However I have noted that whenever that script runs, It causes CPU utilization of server to increase about 10-20 % I have rechecked script and there is no way i can make changes, Script contain only 2-3 commands. So... (4 Replies)
Discussion started by: Nakul_sh
4 Replies

4. AIX

High CPU Usage , users affected

Dear All, One production Server is affected by high usage. Application is slow now. Please guide me how to solve it? NMON Report shows full cpu usage. Here im posting some server details. bash-3.2# lparstat -i Node Name : ********* Partition Name ... (6 Replies)
Discussion started by: Thala
6 Replies

5. AIX

Wait time shows high CPU usage

Hi, I can't seem to make sense of this. My wait time is showing really high but vmstat's and topas are showing normal usage. ps aux USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 9961810 5680.7 0.0 448 384 - A Dec 16 6703072:12 wait ... (2 Replies)
Discussion started by: techy1
2 Replies

6. Linux

System Went panic after CPU usage high

Hi All, Yesterday my Linux server went panic and even a small command took a lot of time to run. When i monitored pl find the below output Cpu(s): 0.1%us, 98.4%sy, 0.0%ni, 1.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st the time spent on kernel mode is 98 % and also idle time is around 1.5 %...... (4 Replies)
Discussion started by: jegaraman
4 Replies

7. AIX

HELP!!! high CPU usage with ITM kuxagent

ibm tivoli monitor's kuxagent is taking up a lot of cpu usage. anybody has any idea? i attatched a screenshot. (3 Replies)
Discussion started by: curtis911
3 Replies

8. AIX

Script to identify high CPU usage processes

Hi Guys, I need to write a script capable of identifying when a high cpu utilitzation process. It sounds simple but we are on a AIX 5.3 environment with Virtual CPU's (VP's) and logical CPU's. Please any ideas or tips would be highly appreciated. Thanks. Harby. (6 Replies)
Discussion started by: arizah
6 Replies

9. Ubuntu

High System CPU Usage

I am running a Dell PE R815 with 4 x AMD 12 core CPUs with 128GB of RAM and a RAID 5 array of 6 SAS disks. This is an HPC application and is definitely CPU bound, however once I run 16 of these processes (thus pinning 16 cores) the work performed slows down dramatically, to maybe 5 or 10% of what... (2 Replies)
Discussion started by: mowmentous
2 Replies

10. Red Hat

CPU usage: PS versus TOP - Different output

CPU usage: PS versus TOP - Different output Hi When monitoring a Linux environment with PS command, reported CPU value for a certain process differs, sometimes greatly, from the value seen in TOP. I understood this is not a bug, they report different data. I can't understand the nature... (4 Replies)
Discussion started by: liav
4 Replies
Login or Register to Ask a Question