MPM multi-Process Processing module
MPM is divided into three modes:
1,prefork
Process model, each process processes a request, pattern: Parent Process —————— > multiple child Processes —————— > One child process processing a request
2,worker
Threading model, each process derives multiple threads, each thread processes a request, pattern: Parent Process —————— > multiple child processes —————— > Multiple threads are derived from each child process-------> One thread processes a request task
3,event
Event-driven model, a process that processes multiple tasks, patterns: Parent process ———————— > multiple child processes--------> One child process processing multiple requests
CENTOS6 httpd-2.2 MPM Setup
Modify a file
/etc/sysconfig/httpd
Httpd=/usr/sbin/httpd.worker
Httpd=/usr/sbin/httpd.event
Default to Prefork mode
Restart HTTPD server after configuration is in effect
CENTOS7 httpd-2.4 MPM Setup
Modify File/etc/httpd/conf.modules.d/00-mpm.conf
LoadModule Mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule Mpm_worker_module modules/mod_mpm_worker.so
LoadModule Mpm_event_module modules/mod_mpm_event.so
Mode parameter Configuration detailed
<ifmodule prefork.c>//If the module is loaded, implement the configuration, a conditional module load
Startservers 8//service starts several sub-processes by default at startup
Minspareservers 5//Minimum number of idle processes
Maxspareservers 20//maximum number of idle processes
Serverlimit 256//Limit maxclients
MaxClients 256//MAX concurrency, which means simultaneous access to quantity
Maxrequestsperchild 4000//per child process maximum number of requests to process, kill and then restart after processing sufficient quantity
</IfModule>
This article is from the "Notes" blog, so be sure to keep this source http://snowbamboo1.blog.51cto.com/9291858/1860145
Centos setup httpd-2.2 or httpd-2.4 mpm mode