apachectl -V | grep MPM
httpd -V | grep MPM
Server MPM: Prefork
-D APACHE_MPM_DIR="server/mpm/prefork"
top -bn 1 | grep httpd
56961 apache 20 0 406m 49m 40m S 1.9 0.1 0:21.92 httpd
56963 apache 20 0 406m 53m 44m S 1.9 0.1 0:20.45 httpd
56967 apache 20 0 402m 52m 42m S 1.9 0.1 0:20.28 httpd
56971 apache 20 0 404m 54m 44m S 1.9 0.1 0:21.18 httpd
56974 apache 20 0 415m 55m 42m S 1.9 0.1 0:20.07 httpd
RES column 是 Apache process 使用的内存量,左起第六列。
最大进程数 = Apache 所能消耗的内存总量 / 每个进程消耗内存量
<IfModule prefork.c>
StartServers 30%MaxClients
MinSpareServers 5%
MaxSpareServers 10%
ServerLimit 256
MaxClients 200 = 10G/50M
MaxRequestsPerChild 10000
</IfModule>
MaxClients
值MaxClients
计算出
这本是一篇文章。。。删删删