ITeye博客

Apache并发连接数

脑壳冒星星 · 2014-11-04 17:27 · 开源软件 · Markdown

可以使用以下参数配置Apache的并发连接数:

<IfModule prefork.c>
  StartServers            8
  MinSpareServers         5
  MaxSpareServers        20
  MaxClients            150
  MaxRequestsPerChild  1000
</IfModule>

<IfModule worker.c>
  StartServers            2
  MaxClients            150
  MinSpareThreads        25
  MaxSpareThreads        75 
  ThreadsPerChild        25
  MaxRequestsPerChild     0
</IfModule>

<IfModule mpm_winnt.c>
  ThreadsPerChild       250
  MaxRequestsPerChild     0
</IfModule>

对于Windows系统,缺省会使用mpm_winnt,配置中有用的是第三段,即:
<IfModule mpm_winnt.c>
  ThreadsPerChild       250
  MaxRequestsPerChild     0
</IfModule>

具体含义可参考Apache的官方文档:
http://httpd.apache.org/docs/2.2/mod/mpm_common.html#threadsperchild

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。