Apache Three MPM Analysis: Prefork, worker, and event

Source: Internet
Author: User

httpd.conf

LoadModule mpm_event_module modules/mod_mpm_event.so#loadmodule mpm_prefork_module modules/mod_mpm_prefork.so# LoadModule Mpm_worker_module modules/mod_mpm_worker.so
[Email protected] httpd]# vim extra/httpd-mpm.conf


prefork:   a process one request (select (): 1024x768 )

<ifmodule mpm_worker_module> startservers 3 minsparethreads maxsparethreads 2 Threadsperchild maxrequestworkers Maxconnectionsperchild 0</ifmodule>


Startservers: Number of worker processes started by default, Minspareservers: Minimum number of idle processes, Maxspareservers: Maximum number of idle processes, #serverlimit: Maximum number of active processes; maxrequestworkers : Maximum number of concurrent requests; Maxconnectionsperchild: The maximum amount of requests that each subprocess can serve in the life cycle, and then kill 0 to indicate an unqualified

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/72/wKioL1dCcPKDMNFrAABktwKzKnA187.png "title=" Http-perfork.png "alt=" Wkiol1dccpkdmnfraabktwkzkna187.png "/>

Worker: One process multiple threads, one thread one request

<ifmodule mpm_worker_module> startservers 3 minsparethreads maxsparethreads 2 Threadsperchild maxrequestworkers Maxconnectionsperchild 0</ifmodule>
Startservers: Number of child processes started Maxrequestworkers: Maximum number of concurrent requests; Startservers*threadsperchildminsparethreads: Minimum number of idle threads ; Maxsparethreads: Maximum number of idle threads; Threadsperchild: The number of threads that can be generated per child process, Maxconnectionsperchild: The maximum number of requests per subprocess that can be serviced in the life cycle, 0 means no qualification;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/80/72/wKioL1dCcaeSY2kOAABzcgk64mE267.png "title=" Http-worker.png "alt=" Wkiol1dccaesy2koaabzcgk64me267.png "/>

event: One thread responds to multiple requests

<ifmodule mpm_event_module> startservers 3 minsparethreads maxsparethreads 25 0 threadsperchild maxrequestworkers Maxconnectionsperchild 0</ifmodule>
Startservers: Start of the number of server processes Minsparethreads: understood as the minimum number of worker threads Maxsparethreads: understood as the maximum number of worker threads Threadsperchild: Understanding the fixed that is contained for each service process Number of worker threads Maxrequestworkers: Single Process max concurrent Maxconnectionsperchild: Maximum number of connections one server process service

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/72/wKioL1dCcdGgCJdDAABf5Vgp9g0958.png "title=" Http-event.png "alt=" Wkiol1dccdggcjddaabf5vgp9g0958.png "/>

Apache Three MPM Analysis: Prefork, worker, and event

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.