Introduction to the Apache Web Server - ApacheCon
Introduction to the Apache Web Server - ApacheCon
Introduction to the Apache Web Server - ApacheCon
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The “correct” value for <strong>the</strong>se directives will vary a great deal from one web site <strong>to</strong> ano<strong>the</strong>r. The goal is <strong>to</strong><br />
make sure that your spare server pool is sufficient <strong>to</strong> soak up any spikes in traffic.<br />
On Windows, <strong>the</strong>re is no reliable way <strong>to</strong> fork processes, and so a different model is used by default. There<br />
is a parent process, and a single threaded child process. Each thread is able <strong>to</strong> handle client connections.<br />
However, <strong>the</strong>re is a fixed number of threads.<br />
3.1.2 <strong>Apache</strong> 2.0<br />
<strong>Apache</strong> 2.0 introduces <strong>the</strong> MPM model<br />
The MPM - Multi Processing Module - is a way for <strong>the</strong> particular multi-processing technique of a given<br />
platform <strong>to</strong> be abstracted out. Two examples of multi-processing are threads and forking, and <strong>the</strong>se are two<br />
of <strong>the</strong> available MPMs. With <strong>Apache</strong> 1.3, this code was contained in if blocks, which were long, icky, and<br />
confusing. With 2.0, <strong>the</strong>y are moved out in<strong>to</strong> modules, and you pick <strong>the</strong> one that is most appropriate for<br />
your particular needs and platform. On Unix, you have a number of choices. On non-Unix systems, you are<br />
usually limited <strong>to</strong> a single choice.<br />
• Prefork<br />
• Worker<br />
• Perchild<br />
• Win32<br />
• OS/2<br />
• Netware<br />
• Various o<strong>the</strong>rs<br />
At this point, you may wish <strong>to</strong> rebuild <strong>Apache</strong> 2.0 using <strong>the</strong> worker MPM, so that you can see <strong>the</strong> difference<br />
that it makes in your process list, if nothing else. Since it takes a significant time <strong>to</strong> rebuild, you may want<br />
<strong>to</strong> do this and <strong>the</strong>n send folks on a coffee break while it compiles.<br />
./configure --with-mpm=worker<br />
./configure --with-mpm=prefork<br />
prefork<br />
http://httpd.apache.org/docs-2.0/mod/prefork.html<br />
14