From 8c9f959b533b2fd1e942db9da02b32ac3be0e5d7 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Mon, 5 Dec 2005 20:35:24 +0000 Subject: [PATCH] Give a clue about what event really does, and some small improvements to the leader and worker docs. Submitted by: Noirin Plunkett , Joshua Slive git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@354164 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/event.xml | 68 ++++++++++++++++++++++++++++++++++---- docs/manual/mod/leader.xml | 8 +++-- docs/manual/mod/worker.xml | 12 +++---- 3 files changed, 74 insertions(+), 14 deletions(-) diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index 715e77d9e4..2c92f7ba93 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -30,14 +30,46 @@ MPM Warning -

This MPM is experimental, so it may or may not work - as expected.

+

This MPM is experimental, so it may or may not work as + expected.

- + +

The event Multi-Processing Module (MPM) is + designed to allow more requests to be served simultaneously by + passing off some processing work to supporting threads, freeing up + the main threads to work on new requests. It is based on the + worker MPM, which implements a hybrid + multi-process multi-threaded server. Run-time configuration + directives are identical to those provided by + worker.

+

To use the event MPM, add --with-mpm=event to the configure script's arguments when building the httpd.

- + +
+ +The worker MPM + +
How it Works +

This MPM tries to fix the 'keep alive problem' in HTTP. After a client + completes the first request, the client can keep the connection + open, and send further requests using the same socket. This can + save signifigant overhead in creating TCP connections. However, + Apache traditionally keeps an entire child process/thread waiting + for data from the client, which brings its own disadvantages. To + solve this problem, this MPM uses a dedicated thread to handle both + the Listening sockets, and all sockets that are in a Keep Alive + state.

+ +

The MPM assumes that the underlying apr_pollset + implementation is reasonably threadsafe. This enables the MPM to + avoid excessive high level locking, or having to wake up the listener + thread in order to send it a keep-alive socket. This is currently + only compatible with KQueue and EPoll.

+ +
+
Requirements

This MPM depends on APR's atomic compare-and-swap operations for thread synchronization. If you are compiling for an x86 target and you don't need to support 386s, or @@ -46,8 +78,32 @@ MPM --enable-nonportable-atomics=yes to the configure script's arguments. This will cause APR to implement atomic operations using efficient opcodes not - available in older CPUs.

- + available in older CPUs.

+ +

This MPM does not perform well on older platforms which lack good + threading, but the requirement for EPoll or KQueue makes this + moot.

+ +
    + +
  • To use this MPM on FreeBSD, FreeBSD 5.3 or higher is recommended. + However, it is possible to run this MPM on FreeBSD 5.2.1, if you + use libkse (see man libmap.conf).
  • + +
  • For NetBSD, at least version 2.0 is recommended.
  • + +
  • For Linux, a 2.6 kernel is recommended. It is also necessary to + ensure that your version of glibc has been compiled + with support for EPoll.
  • + +
+
+ +
Issues +

At present, this MPM is incompatible with mod_ssl, and + other input filters.

+
+ AcceptMutex diff --git a/docs/manual/mod/leader.xml b/docs/manual/mod/leader.xml index b053ccfc3e..f2868171c0 100644 --- a/docs/manual/mod/leader.xml +++ b/docs/manual/mod/leader.xml @@ -43,7 +43,9 @@ MPM

To use the leader MPM, add --with-mpm=leader to the configure script's arguments when building the httpd.

- + + +
Requirements

This MPM depends on APR's atomic compare-and-swap operations for thread synchronization. If you are compiling for an x86 target and you don't need to support 386s, or you are compiling for a @@ -52,7 +54,9 @@ MPM configure script's arguments. This will cause APR to implement atomic operations using efficient opcodes not available in older CPUs.

- +
+ +The worker MPM AcceptMutex diff --git a/docs/manual/mod/worker.xml b/docs/manual/mod/worker.xml index 904c37e13d..059cb6edbc 100644 --- a/docs/manual/mod/worker.xml +++ b/docs/manual/mod/worker.xml @@ -30,9 +30,9 @@

This Multi-Processing Module (MPM) implements a hybrid - multi-process multi-threaded server. By using threads to serve + multi-process multi-threaded server. By using threads to serve requests, it is able to serve a large number of requests with - less system resources than a process-based server. Yet it + fewer system resources than a process-based server. However, it retains much of the stability of a process-based server by keeping multiple processes available, each with many threads.

@@ -60,7 +60,7 @@ uses threads or processes to be created before their requests can be served. The number of processes that will initially launched is set by the StartServers - directive. Then during operation, Apache assesses the total number + directive. During operation, Apache assesses the total number of idle threads in all processes, and forks or kills processes to keep this number within the boundaries specified by MinSpareThreads and non-default values are specified for these directives, they should appear before other worker directives.

-

In addition to a the set of active child processes, there may - be additional child processes which are terminating but where at +

In addition to the set of active child processes, there may + be additional child processes which are terminating, but where at least one server thread is still handling an existing client connection. Up to MaxClients terminating processes may be present, though the actual number can be expected to be much smaller. This behavior can be avoided by disabling the - termination of individual child processes, which is achieved by + termination of individual child processes, which is achieved using the following:

    -- 2.49.0