mpm.html.en revision 4b5981e276e93df97c34e4da05ca5cf8bbd937da
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<?xml version="1.0" encoding="ISO-8859-1"?>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams This file is generated from xml source: DO NOT EDIT
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams -->
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<title>Multi-Processing Modules (MPMs) - Apache HTTP Server</title>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<link href="/images/favicon.ico" rel="shortcut icon" /></head>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<body id="manual-page"><div id="page-header">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p class="apache">Apache HTTP Server Version 2.3</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<img alt="" src="/images/feather.gif" /></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div id="path">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Multi-Processing Modules (MPMs)</h1>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="toplang">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p><span>Available Languages: </span><a href="/de/mpm.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/en/mpm.html" title="English">&nbsp;en&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/es/mpm.html" hreflang="es" rel="alternate" title="Espa�ol">&nbsp;es&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/ja/mpm.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/ko/mpm.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p>This document describes what a Multi-Processing Module is and
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williamshow they are used by the Apache HTTP Server.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#introduction">Introduction</a></li>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<li><img alt="" src="/images/down.gif" /> <a href="#choosing">Choosing an MPM</a></li>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<li><img alt="" src="/images/down.gif" /> <a href="#defaults">MPM Defaults</a></li>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</ul></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="section">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<h2><a name="introduction" id="introduction">Introduction</a></h2>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>The Apache HTTP Server is designed to be a powerful and
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams flexible web server that can work on a very wide variety of
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams platforms in a range of different environments. Different
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams platforms and different environments often require different
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams features, or may have different ways of implementing the same
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams feature most efficiently. Apache has always accommodated a wide
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams variety of environments through its modular design. This design
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams allows the webmaster to choose which features will be included
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams in the server by selecting which modules to load either at
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams compile-time or at run-time.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>Apache 2.0 extends this modular design to the most basic
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams functions of a web server. The server ships with a selection of
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams Multi-Processing Modules (MPMs) which are responsible for
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams binding to network ports on the machine, accepting requests,
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams and dispatching children to handle the requests.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>Extending the modular design to this level of the server
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams allows two important benefits:</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <ul>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <li>Apache can more cleanly and efficiently support a wide
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams variety of operating systems. In particular, the Windows
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams version of Apache is now much more efficient, since
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> can use native
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams networking features in place of the POSIX layer used in
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams Apache 1.3. This benefit also extends to other operating
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams systems that implement specialized MPMs.</li>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <li>The server can be better customized for the needs of the
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams particular site. For example, sites that need a great deal of
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams scalability can choose to use a threaded MPM like
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <code class="module"><a href="/mod/worker.html">worker</a></code> or <code class="module"><a href="/mod/event.html">event</a></code>, while sites requiring
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams stability or compatibility with older software can use a
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <code class="module"><a href="/mod/prefork.html">prefork</a></code>.</li>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams </ul>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>At the user level, MPMs appear much like other Apache
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams modules. The main difference is that one and only one MPM must
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams be loaded into the server at any time. The list of available
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams MPMs appears on the <a href="mod/">module index page</a>.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="section">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<h2><a name="choosing" id="choosing">Choosing an MPM</a></h2>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>MPMs must be chosen during configuration, and compiled into
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams the server. Compilers are capable of optimizing a lot of
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams functions if threads are used, but only if they know that
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams threads are being used.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>To actually choose the desired MPM, use the argument
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <code>--with-mpm=<em>NAME</em></code> with the
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <code class="program"><a href="/programs/configure.html">configure</a></code> script. <em>NAME</em> is the name of the
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams desired MPM.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams <p>Once the server has been compiled, it is possible to
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams determine which MPM was chosen by using <code>/httpd
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams -l</code>. This command will list every module that is compiled
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams into the server, including the MPM.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="section">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<h2><a name="defaults" id="defaults">MPM Defaults</a></h2>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p>The following table lists the default MPMs for various operating
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williamssystems. This will be the MPM selected if you do not make another
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williamschoice at compile-time.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<table>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<tr><td>BeOS</td><td><code class="module"><a href="/mod/beos.html">beos</a></code></td></tr>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<tr><td>Netware</td><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code></td></tr>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<tr><td>OS/2</td><td><code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code></td></tr>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<tr><td>Unix</td><td><code class="module"><a href="/mod/prefork.html">prefork</a></code></td></tr>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<tr><td>Windows</td><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code></td></tr>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</table>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<div class="bottomlang">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p><span>Available Languages: </span><a href="/de/mpm.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/en/mpm.html" title="English">&nbsp;en&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/es/mpm.html" hreflang="es" rel="alternate" title="Espa�ol">&nbsp;es&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/ja/mpm.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<a href="/ko/mpm.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</div><div id="footer">
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p class="apache">Copyright 1995-2005 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>
9fce8bf90e08efa065faf5ebf13a8ce4ea48f0e6gary.williams</body></html>