I have a debian squeeze running with apache2 and php5-cgi. Please see the following stats from my munin: http://imageshack.us/photo/my-images/545/multipscharts.png/
I am running these per-process stats since yesterday and I'm surprised to see such intensive use by php and also such high memory use by the apache processes.
More data: avg (1day) apache2: 30 busy servers, 9 idle Avg apache accesses: 340/minute
Now, I was wondering how I could reduce php's cpu usage and/or apache's memory usage. Note that I'm already server almost all static files by nginx (which is not in these stats).
Also, I'm apparently currently using mpm_prefork_module . The general settings of my apache2 look as follows:
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
HostnameLookups Off
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include conf.d/
Include sites-enabled/
GracefulShutDownTimeout 3
AddOutputFilter INCLUDES .shtml
AddType text/html .shtml
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Any ideas on what settings to look at?
Thanks!