# prefork MPM
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 250
MaxConnectionsPerChild 0
</IfModule>
|
perfork模式:使用单独的子进程来处理每个请求
# StartServers: 服务启动时建立的server进程数
# MinSpareServers: 空闲server进程的最小数
# MaxSpareServers: 空闲server进程的最大数
# MaxRequestWorkers: 允许启动的最大server进程数
# MaxConnectionsPerChild: 每个server进程在生存期允许伺服的最大请求数
|
# worker MPM
<IfModule mpm_worker_module>
StartServers 3
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestWorkers 400
MaxConnectionsPerChild 0
</IfModule>
|
# worker MPM
# StartServers: 服务启动时建立的server进程数
# MinSpareThreads: 空闲的工作线程最小数
# MaxSpareThreads: 空闲的工作线程最大数
# ThreadsPerChild: 每个进程可建立的工作线程数
# MaxRequestWorkers: 最大的工作线程数
# MaxConnectionsPerChild:每个sever进程生存期允许伺服的最大请求数
worker模式由于使用线程来进行处理请求,所以能够处理海量请求,而系统资源的开销要小于基于进程的服务器.同时worker模式也使用了多进程,每个进程又有着多个线程,以获得基于进程服务器的稳定性.
|
# event MPM
<IfModule mpm_event_module>
StartServers 3
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestWorkers 400
MaxConnectionsPerChild 0
</IfModule>
|
# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestWorkers: maximum number of worker threads
# MaxConnectionsPerChild: maximum number of connections a server process serves before terminating
|
# NetWare MPM
<IfModule mpm_netware_module>
ThreadStackSize 65536
StartThreads 250
MinSpareThreads 25
MaxSpareThreads 250
MaxThreads 1000
MaxConnectionsPerChild 0
</IfModule>
|
# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxConnectionsPerChild: Maximum number of connections a thread serves. It is recommended that the default value of 0 be set for this directive on NetWare. This will allow the thread to continue to service requests indefinitely.
|
# OS/2 MPM
<IfModule mpm_mpmt_os2_module>
StartServers 2
MinSpareThreads 5
MaxSpareThreads 10
MaxConnectionsPerChild 0
</IfModule>
|
# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process, to handle request spikes MaxSpareThreads: Maximum number of idle threads per process MaxConnectionsPerChild: Maximum number of connections per server process
|