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
計算出