我正在尝试优化我们的Web服务器以处理尽可能多的连接.我读了很多帖子和Apache笔记.我试图了解我应该为MaxRequestsPerChild选择哪个值.
起初,我已经尝试将其设置为4,000,但服务器很难处理许多请求,所以我开始提高它.目前我的设置是:
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 40000
将MaxRequestsPerChild设置为40,000后,服务器设法处理更多连接,同时不使用更多内存/ cpu.
任何人都可以告诉我这个值是否太高或者是否可以获得如此高的价值?
谢谢!
OS信息:
[root@web06 ~]# uname -a
Linux web 2.6.18-164.el5PAE #1 SMP Thu Sep 3 04:10:44 EDT 2009 i686 i686 i386 GNU/Linux
[root@web06 ~]# free
total used free shared buffers cached
Mem: 3814660 3502968 311692 0 144368 2970468
-/+ buffers/cache: 388132 3426528
Swap: 5210104 0 5210104