Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8d89273e47
Fetching contributors…

Cannot retrieve contributors at this time

135 lines (106 sloc) 5.87 kb
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="./style/manual.en.xsl"?>
<!-- $LastChangedRevision$ -->
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<manualpage metafile="mpm.xml.meta">
<title>Multi-Processing Modules (MPMs)</title>
<p>This document describes what a Multi-Processing Module is and
how they are used by the Apache HTTP Server.</p>
<section id="introduction"><title>Introduction</title>
<p>The Apache HTTP Server is designed to be a powerful and
flexible web server that can work on a very wide variety of
platforms in a range of different environments. Different
platforms and different environments often require different
features, or may have different ways of implementing the same
feature most efficiently. Apache httpd has always accommodated a wide
variety of environments through its modular design. This design
allows the webmaster to choose which features will be included
in the server by selecting which modules to load either at
compile-time or at run-time.</p>
<p>Apache HTTP Server 2.0 extends this modular design to the most basic
functions of a web server. The server ships with a selection of
Multi-Processing Modules (MPMs) which are responsible for
binding to network ports on the machine, accepting requests,
and dispatching children to handle the requests.</p>
<p>Extending the modular design to this level of the server
allows two important benefits:</p>
<li>Apache httpd can more cleanly and efficiently support a wide
variety of operating systems. In particular, the Windows
version of the server is now much more efficient, since
<module>mpm_winnt</module> can use native
networking features in place of the POSIX layer used in
Apache httpd 1.3. This benefit also extends to other operating
systems that implement specialized MPMs.</li>
<li>The server can be better customized for the needs of the
particular site. For example, sites that need a great deal of
scalability can choose to use a threaded MPM like
<module>worker</module> or <module>event</module>, while sites requiring
stability or compatibility with older software can use a
<p>At the user level, MPMs appear much like other Apache httpd
modules. The main difference is that one and only one MPM must
be loaded into the server at any time. The list of available
MPMs appears on the <a href="mod/">module index page</a>.</p>
<section id="defaults"><title>MPM Defaults</title>
<p>The following table lists the default MPMs for various operating
systems. This will be the MPM selected if you do not make another
choice at compile-time.</p>
<table border="1" style="zebra">
<columnspec><column width=".2"/><column width=".2"/></columnspec>
<tr><td>Unix</td><td><module>prefork</module>, <module>worker</module>, or
<module>event</module>, depending on platform capabilities</td></tr>
<section id="static"><title>Building an MPM as a static module</title>
<p>MPMs can be built as static modules on all platforms. A single MPM
is chosen at build time and linked into the server. The server must
be rebuilt in order to change the MPM.</p>
<p>To override the default MPM choice, use the
<code>--with-mpm=<em>NAME</em></code> option of the
<program>configure</program> script. <em>NAME</em> is the name of the
desired MPM.</p>
<p>Once the server has been compiled, it is possible to determine which MPM
was chosen by using <code>./httpd -l</code>. This command will list every
module that is compiled into the server, including the MPM.</p>
<section id="dynamic"><title>Building an MPM as a DSO module</title>
<p>On Unix and similar platforms, MPMs can be built as DSO modules and
dynamically loaded into the server in the same manner as other DSO
modules. Building MPMs as DSO modules allows the MPM to be changed by
updating the <directive module="mod_so">LoadModule</directive> directive
for the MPM instead of by rebuilding the server.</p>
<p>This feature is enabled using the
<code>--enable-mpms-shared</code> option of the <program>configure</program>
With argument <code><em>all</em></code>, all possible MPMs for the platform
will be installed. Alternately, a list of MPMs can be specified as the
<p>The default MPM, either selected automatically or specified with the
<code>--with-mpm</code> option of the <program>configure</program>
script, will be loaded in the generated server configuration file. Edit the
<directive module="mod_so">LoadModule</directive> directive to select a
different MPM.</p>
Jump to Line
Something went wrong with that request. Please try again.