我正在用php开发站点,我不需要很多apache的边缘配置来支持上千人,因为我只有10个人的能力。
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 1
MaxSpareServers 1
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 1
MinSpareThreads 1
MaxSpareThreads 5
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 1
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule> 我输入了站点,然后查看了我的请求,made.There只是(用firebug调查)9文件,但是(ps \ grep说)有4个apache进程正在运行(一个是母进程)。
root 1392 0.0 0.4 38452 8952 ? Ss Mar27 0:04 /usr/sbin/apache2 -k start
www-data 16407 0.0 0.6 43304 12316 ? S 21:36 0:01 /usr/sbin/apache2 -k start
www-data 16408 0.0 0.5 43048 12192 ? S 21:36 0:00 /usr/sbin/apache2 -k start
www-data 16644 0.0 0.2 38452 4244 ? S 21:58 0:00 /usr/sbin/apache2 -k start
nerkn 16646 0.0 0.0 3204 884 pts/1 S+ 21:58 0:00 grep --colour=auto apache 你能建议改进吗?
发布于 2011-03-31 19:44:06
不必为那事担心了。您所拥有的配置不会占用您的RAM。请注意,这三个www-数据进程是分叉,所以如果它们不提供数据,它们实际上不会使用那么多的额外内存。
https://serverfault.com/questions/254283
复制相似问题