BSD上Apache性能的調(diào)整(2)_Windows教程
教程Tag:暫無(wú)Tag,歡迎添加,賺取U幣!
maxusers對(duì)其他kernel參數(shù)產(chǎn)生影響:
# Network options. NMBCLUSTERS defines the number of mbuf clusters and
# defaults to 256. This machine is a server that handles lots of traffic,
# so we crank that value.
options NMBCLUSTERS=4096 # mbuf clusters at 4096
#
# Misc. options
#
options CHILD_MAX=512 # maximum number of child processes
options OPEN_MAX=512 # maximum fds (breaks RPC svcs)
在許多情況下,NMBCLUSTERS應(yīng)該設(shè)置的比第一眼看上去需要設(shè)置的值大的多。這是因?yàn)槿绻麨g覽器在傳輸中中斷了連接,與特定連接相關(guān)的socket fd要在TIME_WAIT狀態(tài)等幾分鐘才釋放,在等待時(shí)mbuf并沒(méi)有釋放。另外,在服務(wù)器的timeouts中,一些連接會(huì)停留在FIN_WAIT_2狀態(tài),這個(gè)狀態(tài)不會(huì)超時(shí),瀏覽器又不會(huì)發(fā)出最終的FIN信號(hào)。
關(guān)于mbuf clusters更多的信息(From sys/mubf.h)
/*
* Mbufs are of a single size, MSIZE (machine/machparam.h), which
* includes overhead. An mbuf may add a single "mbuf cluster" of size
* MCLBYTES (also in machine/machparam.h), which has no additional overhead
* and is used instead of the internal data area; this is done when
* at least MINCLSIZE of data must be stored.
*/
- 進(jìn)程的最大數(shù)目
- 每個(gè)用戶(hù)進(jìn)程的最大數(shù)目
- 系統(tǒng)打開(kāi)文件數(shù)目限制
- 每個(gè)用戶(hù)打開(kāi)文件數(shù)目限制
- mbuf clusters最大數(shù)目
- Proc/pgrp hash表大小
# Network options. NMBCLUSTERS defines the number of mbuf clusters and
# defaults to 256. This machine is a server that handles lots of traffic,
# so we crank that value.
options NMBCLUSTERS=4096 # mbuf clusters at 4096
#
# Misc. options
#
options CHILD_MAX=512 # maximum number of child processes
options OPEN_MAX=512 # maximum fds (breaks RPC svcs)
在許多情況下,NMBCLUSTERS應(yīng)該設(shè)置的比第一眼看上去需要設(shè)置的值大的多。這是因?yàn)槿绻麨g覽器在傳輸中中斷了連接,與特定連接相關(guān)的socket fd要在TIME_WAIT狀態(tài)等幾分鐘才釋放,在等待時(shí)mbuf并沒(méi)有釋放。另外,在服務(wù)器的timeouts中,一些連接會(huì)停留在FIN_WAIT_2狀態(tài),這個(gè)狀態(tài)不會(huì)超時(shí),瀏覽器又不會(huì)發(fā)出最終的FIN信號(hào)。
關(guān)于mbuf clusters更多的信息(From sys/mubf.h)
/*
* Mbufs are of a single size, MSIZE (machine/machparam.h), which
* includes overhead. An mbuf may add a single "mbuf cluster" of size
* MCLBYTES (also in machine/machparam.h), which has no additional overhead
* and is used instead of the internal data area; this is done when
* at least MINCLSIZE of data must be stored.
*/
相關(guān)Windows教程:
- 相關(guān)鏈接:
- 教程說(shuō)明:
Windows教程-BSD上Apache性能的調(diào)整(2)。