Apache Memory performance Optimization in Windows 2003

Source: Internet
Author: User

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>

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.