![]() |
|
Apache httpd.conf 中的 prefork 及 worker
作者: cross 日期: 2008-08-22 16:43
執行 httpd -l 得知我用的 Multi-Processing Modules(MPMs)是什麼
1。prefork 使用子程序來提供服務
2。子程序則獨立使用記憶體,且利用檔案與其它子程序溝通
3。比較佔用記憶體, 但相容性及穩定性較佳
4。引用
http://newweb.syups.tp.edu.tw/documents/memo/apache2/apache2.htm
http://diary.tw/tim/506
http://www.camelrichard.org/apache-prefork-vs-worker
http://twntwn.info/blog/ajer001/archives/1793
看了以上這些東西,還是很難理解,需要靠實作來確認自已心中所了解的程度
more /etc/httpd/conf/httpd.conf
所以我用的 MPMs 是 perforkCompiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
1。prefork 使用子程序來提供服務
2。子程序則獨立使用記憶體,且利用檔案與其它子程序溝通
3。比較佔用記憶體, 但相容性及穩定性較佳
4。引用
參考:prefork的工作原理是,控制進程在最初建立“StartServers”個子進程后,為了滿足MinSpareServers設置的需要創建一個進程,等待一秒鐘,繼續創建兩個,再等待一秒鐘,繼續創建四個……如此按指數級增加創建的進程數,最多達到每秒32個,直到滿足 MinSpareServers設置的值為止。這就是預派生(prefork)的由來。這種模式可以不必在請求到來時再產生新的進程,從而減小了系統開銷以增加性能。
http://newweb.syups.tp.edu.tw/documents/memo/apache2/apache2.htm
http://diary.tw/tim/506
http://www.camelrichard.org/apache-prefork-vs-worker
http://twntwn.info/blog/ajer001/archives/1793
看了以上這些東西,還是很難理解,需要靠實作來確認自已心中所了解的程度
more /etc/httpd/conf/httpd.conf
server-info 資訊<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 100
MaxRequestsPerChild 4000
</IfModule>
Server Version: Apache/2.0.52 (CentOS)
API Version: 20020903:9
Timeouts: connection: 120 keep-alive: 120
MPM Information: Max Daemons: 100 Threaded: no Forked: yes
Config File: /etc/httpd/conf/httpd.conf
Server Built: Jan 14 2008 08:20:27
Hostname/port: 192.168.1.15:80
MPM Name: Prefork
Server Root: /etc/httpd
發表評論

上一篇
返回
下一篇
標籤:


Apache + 可以限制 .htaccess 只能使用某些參數嗎 (2009-02-02 18:52)
對 Apache 連線數多個概念 (2008-10-29 11:50)
Apache 模組 mod_defensible 阻擋 spammer (2008-09-18 20:15)
apache module 模組 mod_spamhaus 阻擋 Spammers/Hackers (2008-09-18 14:22)
apache + mod_gnutls 達到單一IP多個domain使用SSL服務 (2008-09-17 19:26)
munin + mod_watch 監控多台主機的 Virtual Host 網站流量 (未完) (2008-07-24 09:34)
Apache 模組: mod_geoip 分析 IP的國家名 (2008-06-15 00:59)
Apache 模組: 頻寬限制 mod_bw (2008-06-15 00:36)
Apache error_log 出現了 child pid 22545 exit signal Segmentation fault (11) (2008-06-03 17:44)