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