The easiest way to do this is to use the mpm_winnt to set up the multi-channel module (MPM) as the default value on Windows NT. It uses a separate parent process to produce a separate subprocess in which multiple threads are generated in turn to process the request.
Describes the MPM that are specifically optimized for Windows NT
Status MPM
Module name Mpm_winnt_module
Source file mpm_winnt.c
apache2confhttpd.conf, find Maxrequestsperchild, change maxrequestsperchild 0 to Maxrequestsperchild 50.
If not all of the above we can find httpd-mpm.conf in the httpd.conf before the # went, and then to the Confextra directory to find httpd-mpm.conf, and then find the last line has # WinNT MPM Open, The representative can only use under Windows, other do not care, not suitable for our Windows Server.
If not, we can increase
Related parameter description
Threadsperchild
This parameter is used to set the number of threads per process, and the child process establishes these threads at startup and then no longer creates a new thread. On the one hand because mpm_winnt cannot start multiple processes, this value is large enough to handle the possible peak of requests; On the other hand, this parameter is based on the response speed of the server, the number of too large will slow. Therefore, it is necessary to balance a reasonable value.
The default value on the MPM_WINNT is 64, and the maximum value is 1920. This recommendation is set to 100-500, the server performance is high, the value of a little bit smaller.
Maxrequestsperchild
This argument is that the Apache process must quit and start again after processing the number of requests to avoid memory problems in the process.
Win32disableacceptex
AcceptEx () is a Microsoft WinSock2 API that delivers performance improvements by using the BSD-style accept () API. Some popular Windows products, such as anti-virus software or virtual private networking software, can interfere with the proper operation of AcceptEx (). If you encounter an error similar to the following:
[ERROR] (730038) An operation being attempted on something this is not a socket.: Winnt_accept:acceptex failed. Attempting to recover.
You will need to use this directive to prohibit the use of AcceptEx ()
Cases
code is as follows |
copy code |
< Ifmodule mpm_winnt_module> threadlimit 1000 threadsperchild maxrequestsperchild 10000 Win32disableacceptex enablemmap off Enablesendfile off </ifmodule> |