Hi, I'm not really sure this is the right place to post this but what the hell. I've recenly been having problems with apache's memory usage, the type of problem that forces me into restarting apache. The server is running php, apache and mysql on centos. To show you how bad this problem is here is the output of top;
Code:
top - 18:26:35 up 11:33, 3 users, load average: 4.23, 1.97, 0.88
Tasks: 132 total, 1 running, 131 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.8% us, 3.0% sy, 0.0% ni, 78.1% id, 2.5% wa, 0.2% hi, 0.3% si
Mem: 897304k total, 697232k used, 200072k free, 53100k buffers
Swap: 2048276k total, 160k used, 2048116k free, 442076k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22786 apache 15 0 108m 11m 3608 S 11 1.3 0:00.46 httpd
22677 apache 15 0 107m 11m 3720 S 5 1.3 0:00.29 httpd
22630 apache 15 0 107m 11m 3624 S 5 1.3 0:00.25 httpd
22813 apache 15 0 107m 11m 3604 S 4 1.3 0:00.13 httpd
22665 apache 15 0 107m 11m 3784 S 4 1.3 0:00.33 httpd
22794 apache 16 0 107m 11m 3608 S 3 1.3 0:00.20 httpd
3447 mysql 15 0 147m 35m 4736 S 1 4.1 11:55.80 mysqld
21008 apache 16 0 107m 11m 3664 S 1 1.3 0:00.99 httpd
22229 apache 15 0 108m 11m 3732 S 1 1.3 0:01.64 httpd
22604 apache 15 0 107m 11m 3616 S 1 1.3 0:00.29 httpd
22795 apache 15 0 107m 10m 3104 S 1 1.2 0:00.02 httpd
22265 apache 16 0 108m 12m 3872 S 0 1.4 0:00.87 httpd
22368 apache 16 0 107m 11m 3756 S 0 1.3 0:01.06 httpd
22610 apache 15 0 107m 11m 3648 S 0 1.3 0:00.56 httpd
22793 apache 15 0 108m 11m 3640 S 0 1.3 0:00.14 httpd
1 root 16 0 4756 552 456 S 0 0.1 0:00.56 init
As you can see this is less than Ideal, now too attempt to solve this problem I recompiled apache (or httpd) with support for prefork mpm and added the following settings to /etc/httpd/conf/httpd.conf ;
Code:
Timeout 15
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
ServerLimit 256
StartServers 15
MinSpareServers 15
MaxSpareServers 20
MaxClients 200
MaxRequestsPerChild 500
but after restarting httpd I have noticed no differences, this server only handels about 300 simultaneos connections / users, so I'm quite sure that the volume of users isn't the problem. the most visited part of the server is some forums on one of the sites, which uses mod_rewrite and has an rss feed (phpbb), could that be a problem? anyway I would be very greatful of some suggestions on how I might go about investigaing the cause of this problem otherwise.
Last edited by leef : 09-30-2008 at 02:35 PM.
Reason: there is no such thing as stupid spelling only stupid people
|