1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="./style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <manualpage metafile="mpm.xml.meta">
25 <title>Multi-Processing Modules (MPMs)</title>
28 <p>This document describes what a Multi-Processing Module is and
29 how they are used by the Apache HTTP Server.</p>
32 <section id="introduction"><title>Introduction</title>
34 <p>The Apache HTTP Server is designed to be a powerful and
35 flexible web server that can work on a very wide variety of
36 platforms in a range of different environments. Different
37 platforms and different environments often require different
38 features, or may have different ways of implementing the same
39 feature most efficiently. Apache has always accommodated a wide
40 variety of environments through its modular design. This design
41 allows the webmaster to choose which features will be included
42 in the server by selecting which modules to load either at
43 compile-time or at run-time.</p>
45 <p>Apache 2.0 extends this modular design to the most basic
46 functions of a web server. The server ships with a selection of
47 Multi-Processing Modules (MPMs) which are responsible for
48 binding to network ports on the machine, accepting requests,
49 and dispatching children to handle the requests.</p>
51 <p>Extending the modular design to this level of the server
52 allows two important benefits:</p>
55 <li>Apache can more cleanly and efficiently support a wide
56 variety of operating systems. In particular, the Windows
57 version of Apache is now much more efficient, since
58 <module>mpm_winnt</module> can use native
59 networking features in place of the POSIX layer used in
60 Apache 1.3. This benefit also extends to other operating
61 systems that implement specialized MPMs.</li>
63 <li>The server can be better customized for the needs of the
64 particular site. For example, sites that need a great deal of
65 scalability can choose to use a threaded MPM like
66 <module>worker</module> or <module>event</module>, while sites requiring
67 stability or compatibility with older software can use a
68 <module>prefork</module>.</li>
71 <p>At the user level, MPMs appear much like other Apache
72 modules. The main difference is that one and only one MPM must
73 be loaded into the server at any time. The list of available
74 MPMs appears on the <a href="mod/">module index page</a>.</p>
78 <section id="choosing"><title>Choosing an MPM</title>
80 <p>MPMs must be chosen during configuration, and compiled into
81 the server. Compilers are capable of optimizing a lot of
82 functions if threads are used, but only if they know that
83 threads are being used.</p>
85 <p>To actually choose the desired MPM, use the argument
86 <code>--with-mpm=<em>NAME</em></code> with the
87 <program>configure</program> script. <em>NAME</em> is the name of the
90 <p>Once the server has been compiled, it is possible to
91 determine which MPM was chosen by using <code>./httpd
92 -l</code>. This command will list every module that is compiled
93 into the server, including the MPM.</p>
96 <section id="defaults"><title>MPM Defaults</title>
98 <p>The following table lists the default MPMs for various operating
99 systems. This will be the MPM selected if you do not make another
100 choice at compile-time.</p>
103 <columnspec><column width=".2"/><column width=".2"/></columnspec>
104 <tr><td>BeOS</td><td><module>beos</module></td></tr>
105 <tr><td>Netware</td><td><module>mpm_netware</module></td></tr>
106 <tr><td>OS/2</td><td><module>mpmt_os2</module></td></tr>
107 <tr><td>Unix</td><td><module>prefork</module></td></tr>
108 <tr><td>Windows</td><td><module>mpm_winnt</module></td></tr>