Return-Path:
Each process has a fixed
- number of threads. The server adjusts to handle load by
- increasing or decreasing the number of processes. A single control process is responsible for launching child
- processes. Each child process creates a fixed number of threads as
- specified in the A single control process (the parent) is responsible for launching
+ child processes. Each child process creates a fixed number of server
+ threads as specified in the Apache always tries to maintain a pool of spare or
idle server threads, which stand ready to serve incoming
@@ -54,25 +50,57 @@
these directives from their default values. The maximum number of
clients that may be served simultaneously (i.e., the maximum total
number of threads in all processes) is determined by the
-
Two directives set hard limits on the number of active child
+ processes and the number of server threads in a child process,
+ and can only be changed by fully stopping the server and then
+ starting it again.
In addition to a 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
A typical configuration of the process-thread controls in
the
While the parent process is usually started as root
1.15.2.6 +45 -17 httpd-2.0/docs/manual/mod/worker.html.en
Index: worker.html.en
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/mod/worker.html.en,v
retrieving revision 1.15.2.5
retrieving revision 1.15.2.6
diff -u -r1.15.2.5 -r1.15.2.6
--- worker.html.en 29 May 2003 19:29:53 -0000 1.15.2.5
+++ worker.html.en 12 Jan 2004 16:30:19 -0000 1.15.2.6
@@ -79,15 +79,11 @@
Each process has a fixed - number of threads. The server adjusts to handle load by - increasing or decreasing the number of processes.
- -A single control process is responsible for launching child
- processes. Each child process creates a fixed number of threads as
- specified in the ThreadsPerChild
directive. The
- individual threads then listen for connections and serve them when
- they arrive.
A single control process (the parent) is responsible for launching
+ child processes. Each child process creates a fixed number of server
+ threads as specified in the ThreadsPerChild
directive, as well
+ as a listener thread which listens for connections and passes them
+ to a server thread for processing when they arrive.
Apache always tries to maintain a pool of spare or
idle server threads, which stand ready to serve incoming
@@ -102,23 +98,55 @@
these directives from their default values. The maximum number of
clients that may be served simultaneously (i.e., the maximum total
number of threads in all processes) is determined by the
- MaxClients
directive,
- while the maximum number of processes that can be launched is set
- by the ServerLimit
- directive. ServerLimit
- multiplied by ThreadsPerChild
must be greater
- than or equal to MaxClients
MaxClients
directive.
+ The maximum number of active child processes is determined by
+ the MaxClients
+ directive divided by the
+ ThreadsPerChild
directive.
+
+ Two directives set hard limits on the number of active child
+ processes and the number of server threads in a child process,
+ and can only be changed by fully stopping the server and then
+ starting it again. ServerLimit
+
is a hard limit on the number of active child
+ processes, and must be greater than or equal to the
+ MaxClients
+ directive divided by the
+ ThreadsPerChild
directive.
+ ThreadLimit
is a hard
+ limit of the number of server threads, and must be greater than
+ or equal to the ThreadsPerChild
directive. If
+ 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
+ least one server thread is still handling an existing client
+ connection. Up to MaxClient
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
+ the following:
+ MaxRequestsPerChild
to zero
+ MaxSpareThreads
to the same value as
+ MaxClients
A typical configuration of the process-thread controls in
the worker
MPM could look as follows:
+ ServerLimit 16
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
- ThreadsPerChild 25
- ServerLimit 16
+ ThreadsPerChild 25
While the parent process is usually started as root