From 9d7f67e1b9f0ab55bc96eb7d4f19d3028b44e16f Mon Sep 17 00:00:00 2001
From: Joshua Slive
Date: Tue, 20 Aug 2002 20:30:58 +0000
Subject: [PATCH] Update docs on MaxClients under worker, and clean up a few
things.
This has been wrong for a LONG time, and it could really use a review
by some of the worker MPM developers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96458 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mpm_common.xml | 43 +++++++++++++++++-----------------
docs/manual/mod/worker.xml | 33 +++++++++++++++++++-------
2 files changed, 46 insertions(+), 30 deletions(-)
diff --git a/docs/manual/mod/mpm_common.xml b/docs/manual/mod/mpm_common.xml
index e391bc018d..9cd6d3ee53 100644
--- a/docs/manual/mod/mpm_common.xml
+++ b/docs/manual/mod/mpm_common.xml
@@ -220,34 +220,33 @@ listens to
Maximum number of child processes that will be created
to serve requests
MaxClients number
-MaxClients
- 8 (with threads) MaxClients 256
server config
workerprefork
The MaxClients directive sets the limit
- on the number of child processes that will be created to serve
- requests. When the server is built without threading, no more than
- this number of clients can be served simultaneously. To configure
- more than 256 clients with the prefork MPM, you must use the
- ServerLimit directive.
- To configure more than 1024 clients with the worker MPM, you must
- use the ServerLimit and
- ThreadLimit directives.
-
- Any connection attempts over the
- MaxClients limit will normally be queued,
- up to a number based on the ListenBacklog directive. Once a child
- process is freed at the end of a different request, the connection
- will then be serviced.
-
- When the server is compiled with threading, then the maximum
- number of simultaneous requests that can be served is obtained
- from the value of this directive multiplied by
- ThreadsPerChild.
+ on the number of simultaneous requests that will be served. Any
+ connection attempts over the MaxClients
+ limit will normally be queued, up to a number based on the
+ ListenBacklog
+ directive. Once a child process is freed at the end of a different
+ request, the connection will then be serviced.
+
+ For non-threaded servers (i.e., prefork),
+ MaxClients translates into the maximum
+ number of child processes that will be launched to serve requests.
+ The default value is 256; to increase it, you must also raise
+ ServerLimit.
+
+ For threaded servers (i.e., worker),
+ MaxClients restricts the total
+ number of threads that will be available to serve clients.
+ The default value is 16 multiplied by the value of
+ ThreadsPerChild.
+ To increase MaxClients to a value
+ that requires more than 16 processes, you must also
+ raise ServerLimit.
diff --git a/docs/manual/mod/worker.xml b/docs/manual/mod/worker.xml
index af18c1f633..38a94eb323 100644
--- a/docs/manual/mod/worker.xml
+++ b/docs/manual/mod/worker.xml
@@ -43,18 +43,35 @@
idle server threads, which stand ready to serve incoming
requests. In this way, clients do not need to wait for a new
threads or processes to be created before their requests can be
- served. 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 StartServers
+ directive. Then 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 MaxSpareThreads. Since this
process is very self-regulating, it is rarely necessary to modify
these directives from their default values. The maximum number of
- clients that may be served simultaneously is determined by
- multiplying the maximum number of server processes that will be
- created (MaxClients) by
- the number of threads created in each process (ThreadsPerChild).
+ 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
+
+ A typical configuration of the process-thread controls in
+ the worker MPM could look as follows:
+
+StartServers 2
+MaxClients 150
+MinSpareThreads 25
+MaxSpareThreads 75
+ThreadsPerChild 25
+ServerLimit 16
While the parent process is usually started as root under Unix
in order to bind to port 80, the child processes and threads are
--
2.40.0