Apache MPMs Explained

As we know Apache 2.x is a general purpose web-server, It is designed to provide a balance of flexibility, portability and performance, but it is not designed specifically to set benchmark records, In the real world situations Apache 2.x is capable of high performance.

What are Apache MPMs?

Apache uses one of the following Multi-Processing Module (MPM) for handling incoming requests and processes them. It modifies basic functionality of the Apache server related to multi-thread and multi-processes style of working. Only one MPM can be loaded into the server at any time.

Types of MPM’s

Below is some basic details about MPM’s and there functionality.

Prefork MPM :- Prefork MPM uses multiple child processes and each child process has only one thread and ultimately one process/thread is handling one connection at a time. It is used for security and stability purpose. It is higher memory consumption and lower performance over the newer Apache 2.0-based threaded MPM’s. It is Apache 1.3 based.

Worker MPM :- Worker MPM uses uses multiple child processes and each child process can have many threads and each thread handles one connection at a time. It is good choise for high-traffic servers because it has smaller memory footprint than the prefork MPM and has higher performance. It is Apache 2.0 based. It does not provide the same level of isolation such as request-to-request, as a process based MPM does.

Event MPM :- Event MPM is introduced in Apache 2.4, it is pretty similar to worker MPM but it is designed for managing high loads.

Each process under Event also can contain multiple threads but, unlike Worker, each is capable of more than one task. Apache has the lowest resource requirements when used with the Event MPM. Event, though, is supported only on servers running Apache 2.4. Under Apache 2.2, Event is considered experimental and is incompatible with some modules on older versions of Apache. Nevertheless, on high-traffic Apache 2.2 servers where Apache has experienced issues with memory, upgrading Apache to take advantage of the Event MPM can yield significant results.

You can determine this by running the following command on the command line.

# httpd -V | grep -i 'version\|mpm'
Server version: Apache/2.4.16 (Unix)
Server MPM: event

In this case, the server is running Apache 2.4 and using the Event MPM. This output may be different depending on the Apache version and MPM your server currently is running.


Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.

About the author


Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment