zim32
zim32

Reputation: 2619

How to find what MPM model Apache is using in Linux (worker, prefork or event)

Where I can get information about what kind of MPM Apache is using in my Linux system?

Upvotes: 50

Views: 66415

Answers (5)

JorgeeFG
JorgeeFG

Reputation: 5941

In Ubuntu 14.04

a2query -M

Tells event, prefork, worker

You can change it by adding symbolic links for mpm_<chosen> from mods-available to mods-enabled in /etc/apache2.

Only one is allowed in a time.

Upvotes: 37

Shatiz
Shatiz

Reputation: 817

httpd -V

then look for the Server MPM line.

Example:

# httpd -V
Server version: Apache/2.2.15 (Unix)
Server built:   Aug  2 2013 08:02:15
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"

Upvotes: 74

David Lam
David Lam

Reputation: 4948

noticed the previous answers don't mention apachectl !

[dlam@some-ubuntu-box~] $ apachectl -V | grep -i mpm

Server MPM: event

--

[dlam@some-fedora-box:~] $ httpd -V | grep -i mpm

Server MPM: Prefork

Upvotes: 49

virt
virt

Reputation: 206

You can see this by checking which modules are compiled with Apache.

See output of the following command:

# httpd -l

From there, seek for prefork.c.

Upvotes: 15

Jasonw
Jasonw

Reputation: 5064

If it is linux,it should be prefork by default. Read here for more information about apache mpm.

Upvotes: 1

Related Questions