WHAT'S NEW?
Loading...

How can I change Apache from prefork to worker MPM on CentOS 6/7 ?

Multiple processing modules (MPM) are responsible for handling web server connections that come to the server. They decide how to bind network ports on the machine, accept requests and dispatch children to handle the request. MPMs are of two types Prefork and Worker. Apache configurations by default ship in with Prefork MPM which is slower than Worker MPM. Switching to Prefork MPM will let us handle more traffic while using less memory.

CentOS 6x:

modify file: /etc/sysconfig/httpd

HTTPD=/usr/sbin/httpd.worker

CentOS 7x:

$ cat /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

Restart

0 comments:

Post a Comment