mpm.html.en revision 52178ae4ccdd6ef40b8740e1efaa9e6fc5af7a2a
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<?xml version="1.0" encoding="ISO-8859-1"?>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd This file is generated from xml source: DO NOT EDIT
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd -->
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<title>Multi-Processing Modules (MPMs) - Apache HTTP Server</title>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<body id="manual-page"><div id="page-header">
2e545ce2450a9953665f701bb05350f0d3f26275nd<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>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<p class="apache">Apache HTTP Server Version 2.1</p>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<img alt="" src="/images/feather.gif" /></div>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<div id="path">
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<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-project/">Documentation</a> &gt; <a href="./">Version 2.1</a></div><div id="page-content"><div id="preamble"><h1>Multi-Processing Modules (MPMs)</h1>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<div class="toplang">
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<p><span>Available Languages: </span><a href="/en/mpm.html" title="English">&nbsp;en&nbsp;</a> |
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<a href="/ja/mpm.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<a href="/ko/mpm.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh</div>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen<p>This document describes what a Multi-Processing Module is and
d474d8ef01ec5c2a09341cd148851ed383c3287crbowenhow they are used by the Apache HTTP Server.</p>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd</div>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#introduction">Introduction</a></li>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen<li><img alt="" src="/images/down.gif" /> <a href="#choosing">Choosing an MPM</a></li>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen<li><img alt="" src="/images/down.gif" /> <a href="#defaults">MPM Defaults</a></li>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen</ul></div>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<div class="section">
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd<h2><a name="introduction" id="introduction">Introduction</a></h2>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <p>The Apache HTTP Server is designed to be a powerful and
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh flexible web server that can work on a very wide variety of
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh platforms in a range of different environments. Different
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd platforms and different environments often require different
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd features, or may have different ways of implementing the same
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd feature most efficiently. Apache has always accommodated a wide
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd variety of environments through its modular design. This design
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh allows the webmaster to choose which features will be included
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd in the server by selecting which modules to load either at
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh compile-time or at run-time.</p>
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh <p>Apache 2.0 extends this modular design to the most basic
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh functions of a web server. The server ships with a selection of
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh Multi-Processing Modules (MPMs) which are responsible for
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh binding to network ports on the machine, accepting requests,
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh and dispatching children to handle the requests.</p>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd <p>Extending the modular design to this level of the server
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd allows two important benefits:</p>
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh <ul>
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh <li>Apache can more cleanly and efficiently support a wide
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh variety of operating systems. In particular, the Windows
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh version of Apache is now much more efficient, since
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh <code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code> can use native
c40959d803d2d8328b2ead89dd975ac88ba946f6humbedooh networking features in place of the POSIX layer used in
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd Apache 1.3. This benefit also extends to other operating
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd systems that implement specialized MPMs.</li>
4eb0f4031876c60c0ba2035666579dac07304b9drbowen
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd <li>The server can be better customized for the needs of the
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd particular site. For example, sites that need a great deal of
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd scalability can choose to use a threaded MPM like
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh <code class="module"><a href="/mod/worker.html">worker</a></code>, while sites requiring
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd stability or compatibility with older software can use a
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh <code class="module"><a href="/mod/prefork.html">prefork</a></code>. In addition,
fc056b4d564cebe1d186a536e9d21fb661a2f5c5humbedooh special features like serving different hosts under different
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd userids (<code class="module"><a href="/mod/perchild.html">perchild</a></code>) can be
d05d0eb4ae6d2a5e513fc3bf2555ce33da416634nd provided.</li>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd </ul>
c82fca6d3f5608b946f18d37e8710b1d71e3478dnd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd <p>At the user level, MPMs appear much like other Apache
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen modules. The main difference is that one and only one MPM must
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen be loaded into the server at any time. The list of available
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd MPMs appears on the <a href="mod/">module index page</a>.</p>
205f749042ed530040a4f0080dbcb47ceae8a374rjung
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0d0ba3a410038e179b695446bb149cce6264e0abnd<div class="section">
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd<h2><a name="choosing" id="choosing">Choosing an MPM</a></h2>
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd <p>MPMs must be chosen during configuration, and compiled into
b636af865d96808dfb18913d607442a150fb53b6jim the server. Compilers are capable of optimizing a lot of
functions if threads are used, but only if they know that
threads are being used. Because some MPMs use threads on Unix
and others don't, Apache will always perform better if the MPM
is chosen at configuration time and built into Apache.</p>
<p>To actually choose the desired MPM, use the argument
--with-mpm= <em>NAME</em> with the /configure 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>
</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
<div class="section">
<h2><a name="defaults" id="defaults">MPM Defaults</a></h2>
<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>
<tr><td>BeOS</td><td><code class="module"><a href="/mod/beos.html">beos</a></code></td></tr>
<tr><td>Netware</td><td><code class="module"><a href="/mod/mpm_netware.html">mpm_netware</a></code></td></tr>
<tr><td>OS/2</td><td><code class="module"><a href="/mod/mpmt_os2.html">mpmt_os2</a></code></td></tr>
<tr><td>Unix</td><td><code class="module"><a href="/mod/prefork.html">prefork</a></code></td></tr>
<tr><td>Windows</td><td><code class="module"><a href="/mod/mpm_winnt.html">mpm_winnt</a></code></td></tr>
</table>
</div></div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="/en/mpm.html" title="English">&nbsp;en&nbsp;</a> |
<a href="/ja/mpm.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="/ko/mpm.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
</div><div id="footer">
<p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p>
<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>
</body></html>