I read many posts regarding the Apache configuration, and tried to find the best values for our servers. To make sure what's best I used JMeter to simulate 2100 connections per second. After many rounds of fine tuning i got to the following configuration:
<IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 10 ServerLimit 2048 MaxClients 2048 MaxRequestsPerChild 20000 </IfModule>
[root@web06 ~]# free total used free shared buffers cached Mem: 3814660 1070152 2744508 0 146788 766944 -/+ buffers/cache: 156420 3658240 Swap: 5210104 0 5210104 [root@web06 ~]# grep -c processor /proc/cpuinfo 4 [root@web06 ~]# uname --a Linux web06 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009 i686 i686 i386 GNU/Linux
Memory used by a single Apache process:
[root@web06 ~]# cat /proc/5903/status | grep VmRSS VmRSS: 10076 kB
I know that my configuration is a bit high, but configuration gave me the best result on the stress test. I would appreciate your input, should I change anything?
Please note- I know there are better alternative to Apache, but I don't have the resources to make this kind of a change at the moment.