在正常模式下,我的apache mod状态显示:
CPU Usage: u118.45 s9.79 cu0 cs0 - 14% CPU load
7.96 requests/sec - 18.1 kB/second - 2331 B/request
1 requests currently being processed, 29 idle workers
._.._._..._.___...._____...._.____.._.._.._....___._._____W.....
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
....................................................
但有时(约1-3分钟)我的网站有“滞后”,而apache状态如下:
CPU Usage: u222.29 s18.89 cu0 cs0 - 9.58% CPU load
7.77 requests/sec - 23.3 kB/second - 3064 B/request
20 requests currently being processed, 10 idle workers
WW.WW_W..WWC.._W.WCWW._._.W....WW_W..W__.W__...._...W...........
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................
....................................................
在这些时刻,请求通常是在任何时候。但是他们中有很多。 我没有频繁的任何cron工作。
增加prefork SpareServers mb会有所帮助,但我想知道为什么会发生这些波浪。 我当前的配置是
Timeout 60
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 20
<IfModule prefork.c>
StartServers 100
MinSpareServers 10
MaxSpareServers 30
ServerLimit 500
MaxClients 500
MaxRequestsPerChild 10000
</IfModule>
硬件足够强大。
抱歉我的英语不好 任何意见将是有益的。