2015年12月29日 星期二

APACHE2 性能調教


提升效能限制,可以提高成以下設定: 

<IfModule prefork.c> 
# number of server processes to start 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#startservers 
StartServers 128 
# minimum number of server processes which are kept spare 
http://httpd.apache.org/docs/2.2/mod/prefork.html#minspareservers 
MinSpareServers 16 
# maximum number of server processes which are kept spare 
http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers 
MaxSpareServers 64 
# highest possible MaxClients setting for the lifetime of the Apache process. 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit 
ServerLimit 2048 
# maximum number of server processes allowed to start 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients 
MaxClients 2048 
# maximum number of requests a server process serves 
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild 
MaxRequestsPerChild 10000 
</IfModule> 

重啟 apache 請先 stop 再 start。 



出處文章
http://mepopedia.com/forum/read.php?146,419