The procedure for configuring and compiling Apache has changed, as we will see later.
High-level decisions about the way Apache works internally can now be
made at compile time by including one of a series of Multi Processing
Modules (MPMs). This is done by attaching a flag to
configure
:
./configure <other flags> --with_mpm=<name of MPM>
Although MPMs are rather like ordinary modules, only one can be used at a time. Some of them are designed to adapt Apache to different operating systems; others offer a range of different optimizations for Unix.
It will be shown, along with the other compiled-in modules, by
executing httpd -l.
When we went to press,
these were the possible MPMs under Unix:
Default. Most closely imitates behavior of v1.3. Currently the default for Unix and sites that require stability, though we hope that threading will become the default later on.
Suitable for sites that require the benefits brought by threading, particularly reduced memory footprint and improved interthread communications. But see “prefork” earlier in this list.
Allows different hosts to have different user IDs.
Similar to prefork, but each child process has a specified number of threads. It is possible to specify a minimum and maximum number of idle threads.
Multiprocess, multithreaded MPM that allows you to specify a static number of processes.
Similar to Dexter, but you can define a seperate user and group for each child process to increase server security.
Other operating systems have their own MPMs:
For OS2.
For the Be OS.
Win32-specific version, taking advantage of completion ports and native function calls to give better network performance.
To begin with, accept the default MPM. More advanced users should refer to http://httpd.apache.org/docs-2.0/mpm.html and http://httpd.apache.org/docs-2.0/misc/perf-tuning.html.
See the entry for the AcceptMutex directive in Chapter 3.