本文给出了一些具体设置数值。但没有考虑硬件情况。所以具体数值不够严谨,仅供参考各项设置含义。
另一篇文章中,给出了一个设置算法。计算出来的数值远远小于本文的建议。
见:http://dingxuan.info/blog/post/tuning-Apache-Prefork-MPM.php
Apache使用哪种MPM在在安装的时候可以用
–with-mpm={beos|worker|prefork|mpmt_os2|perchild|leader|threadpool}
安装之后可以用httpd -l命令看到。
MPM的进程模块有有很多种( 见Apache官方文档:http://httpd.apache.org/docs-2.0/mod/)。
今天我主要是比较一下prefork MPM和worker MPM 继续阅读Apache 的prefork MPM和worker MPM
标签: prefork
Apache的PreFork MPM功能
首先我們來看有關於 MPM 的一些資料:
http://dz.adj.idv.tw/archiver/tid-214.html
在 MPM中, prefork 及 worker 是兩種不同的 multi-processing module, 在 apache 管方網站上分別有對這兩個 module 有深入的介紹:
http://httpd.apache.org/docs/2.0/mod/prefork.html
http://httpd.apache.org/docs/2.0/mod/worker.html 继续阅读Apache的PreFork MPM功能
Tuning the Apache Prefork MPM
Apache uses a set of values called the Prefork MPM to determine how many servers it will utilize and how many threads each server can process. Out of the box all Apache installations use the same values regardless of whether your server has 512Mb of RAM or 8Gb of RAM. It is important that as the server administrator you configure these values to work with your server load.
The Apache Prefork MPM can be found in the Apache configuration file; usually /etc/httpd/conf/httpd.conf. The default values are…
StartServers 2
MinSpareServers 3
MaxSpareServers 3
ServerLimit 75
MaxClients 75
MaxRequestsPerChild 1000
Each Directive taken from “http://httpd.apache.org/docs/trunk/mod/mpm_common.html” is detailed below. 继续阅读Tuning the Apache Prefork MPM