我在PHP开发网站,我不需要很多的Apache和stream血的边缘configuration,以支持千人,因为我只说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>
我input了网站,然后看了我的要求。只有(用firebug调查)9个文件,但是(ps aux | grep apache说)有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
你能build议改进吗?
别担心。 你有的configuration是不会吃你的RAM。 请注意,三个WWW数据进程是叉,所以如果他们没有提供数据,他们实际上并没有使用那么多额外的内存。