Apache concurrency number under Windows modification

Source: Internet
Author: User

Haven't tried yet.

To modify the maximum number of connections for Apache, the method is as follows:

Step One
Modify the/path/apache/conf/httpd.conf file first.
# VI httpd.conf
Remove the "#" in front of "#Include conf/extra/httpd-mpm.conf" and save it.

Step Two
Modify the/path/apache/conf/extra/httpd-mpm.conf file again.
# VI Httpd-mpm.conf
Find this line

Original:

Startservers 5
Minspareservers 5
Maxspareservers 10
MaxClients 150
Maxrequestsperchild 0

After modification

Serverlimit #最大并发
Startservers #默认启动线程数
Minspareservers 5
Maxspareservers 15
MaxClients #apache可以同时处理的请求
Threadsperchild #每个进程的线程数, when the child process establishes these threads at startup, no new threads are established. The default value is 64 and the maximum value is 1920
Maxrequestsperchild #默认0 The official reference manual is not recommended to set to 0, mainly based on two points of consideration: (1) can prevent (accidental) memory leaks indefinitely, thus exhausting memory; (2) Give the process a limited lifespan, #从而有助于当服务器负载减轻的时候减少活动进程的数量.



Attention:
Serverlimit The instruction must be placed on the first line.

After modification, must not apachectl restart, but first apachectl stop and then apachectl start can.

--------------------------------------------------------------------------------------------------------------- ------------------------

If you follow the above, you will find that it seems to have no effect (at least I do), because Win2003 is not using Mpm_prefork_module, but Mpm_winnt_module, Serverlimit 1000 is mpm_winnt _module is not valid, looking for an afternoon did not find a way to increase the number of APAHCE in the window, guess the likelihood and maximum number of concurrent servers is the maximum number of connections?

2011-8-27

Today again pondering, or modify the conf/extra/httpd-mpm.conf file, since Windows is used Mpm_winnt_module, then modify this to try

My default is

<ifmodule mpm_winnt_module>
Threadsperchild 150
Maxrequestsperchild 0
</IfModule>

The AB test is about 250 or so.

Try to modify

Threadsperchild 250
Maxrequestsperchild 5000

AB test probably in more than 300 no, modify The Threadsperchild still have effect

As if the maximum concurrency is about 1.5 times times the threadsperchild (guess what, you try)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.