Changing Apache MPM fro Prefork to Event

This post will depend on your distribution.

If you need to know what Apache MPM module you are using you can use a command similar to this.


$ httpd -V | grep -i 'version\|mpm'

This will tell you the current loaded Apache MPM module

If you want to change you you need to go to the Apache configuration files.

On Centos mpm has its own configuration files inside a configurations modules directory.


$ cd /etc/httpd/conf.modules.d/00-mpm.conf
$ sudo nano 00-mpm.cong

You can see in this Apache module configuration file the preform MPM is enabled (by not being commented out, #)

We simply comment out the prefork MPM and uncomment the event MPM

Save and close this file and restart Apache.

I then usually check top to see if I have my expected result. If moving from a process to threaded MPM you should see less Apache processes.

 

Or check out my process list

ps -f -u apache

Leave a Reply

Your email address will not be published. Required fields are marked *