From: Stefan Fritsch Date: Mon, 20 Jun 2011 19:00:52 +0000 (+0000) Subject: Rename MaxClients to MaxRequestWorkers which describes more accurately what X-Git-Tag: 2.3.13~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d8de2ff429c61103aeae1e7c486380627969f9d;p=apache Rename MaxClients to MaxRequestWorkers which describes more accurately what it does. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137744 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3402aee66c..f43b34456a 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.3.13 + *) prefork, worker, event: Rename MaxClients to MaxRequestWorkers which + describes more accurately what it does. [Stefan Fritsch] + *) rotatelogs: Add -p argument to specify custom program to invoke after a log rotation. PR 51285. [, Joe Orton] diff --git a/docs/conf/extra/httpd-mpm.conf.in b/docs/conf/extra/httpd-mpm.conf.in index d4679592bd..3bd919a275 100644 --- a/docs/conf/extra/httpd-mpm.conf.in +++ b/docs/conf/extra/httpd-mpm.conf.in @@ -30,48 +30,48 @@ # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare -# MaxClients: maximum number of server processes allowed to start +# MaxRequestWorkers: maximum number of server processes allowed to start # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 5 MinSpareServers 5 MaxSpareServers 10 - MaxClients 150 + MaxRequestWorkers 150 MaxConnectionsPerChild 0 # worker MPM # StartServers: initial number of server processes to start -# MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 2 - MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 + MaxRequestWorkers 150 MaxConnectionsPerChild 0 # event MPM # StartServers: initial number of server processes to start -# MaxClients: maximum number of simultaneous client connections # MinSpareThreads: minimum number of worker threads which are kept spare # MaxSpareThreads: maximum number of worker threads which are kept spare # ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestWorkers: maximum number of worker threads # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating StartServers 2 - MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 + MaxRequestWorkers 150 MaxConnectionsPerChild 0 diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml index 64f9582f4c..32aebeeec8 100644 --- a/docs/manual/misc/perf-tuning.xml +++ b/docs/manual/misc/perf-tuning.xml @@ -56,7 +56,7 @@ that users consider "fast enough". This causes users to hit stop and reload, further increasing the load. You can, and should, control the MaxClients setting so that your server + >MaxRequestWorkers setting so that your server does not spawn so many children it starts swapping. This procedure for doing this is simple: determine the size of your average Apache process, by looking at your process list via a tool such as diff --git a/docs/manual/misc/security_tips.xml b/docs/manual/misc/security_tips.xml index d98882ff95..9424e57b19 100644 --- a/docs/manual/misc/security_tips.xml +++ b/docs/manual/misc/security_tips.xml @@ -105,7 +105,7 @@ require reconfiguration of your kernel.
  • Tune the MaxClients directive to allow + module="mpm_common">MaxRequestWorkers directive to allow the server to handle the maximum number of simultaneous connections without running out of resources. See also the performance tuning diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index cab1adf516..9d1a844e64 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -106,7 +106,7 @@ of consuming threads only for connections with active processing SendBufferSize -MaxClients +MaxRequestWorkers MaxMemFree diff --git a/docs/manual/mod/mpm_common.xml b/docs/manual/mod/mpm_common.xml index 9e8b5229bc..2d94317482 100644 --- a/docs/manual/mod/mpm_common.xml +++ b/docs/manual/mod/mpm_common.xml @@ -280,10 +280,10 @@ including other causes. -MaxClients +MaxRequestWorkers Maximum number of connections that will be processed simultaneously -MaxClients number +MaxRequestWorkers number See usage for details server config eventprefork @@ -291,30 +291,34 @@ simultaneously -

    The MaxClients directive sets the limit +

    The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served. Any - connection attempts over the MaxClients + connection attempts over the MaxRequestWorkers 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 + MaxRequestWorkers 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 and hybrid servers (e.g. event - or worker) MaxClients restricts + or worker) MaxRequestWorkers restricts the total number of threads that will be available to serve clients. For hybrid MPMs the default value is 16 (ServerLimit) multiplied by the value of 25 (ThreadsPerChild). Therefore, to increase MaxClients to a value that requires more than 16 processes, + >MaxRequestWorkers to a value that requires more than 16 processes, you must also raise ServerLimit.

    + +

    MaxRequestWorkers was called + MaxClients before version 2.3.13. The old name ist still + supported.

    @@ -540,39 +544,39 @@ Apache HTTP Server

    For the prefork MPM, this directive sets the maximum configured value for MaxClients for the lifetime of the + module="mpm_common">MaxRequestWorkers for the lifetime of the Apache httpd process. For the worker MPM, this directive in combination with ThreadLimit sets the maximum configured value for MaxClients for the lifetime of the + module="mpm_common">MaxRequestWorkers for the lifetime of the Apache httpd process. Any attempts to change this directive during a restart will be ignored, but MaxClients can be modified during + module="mpm_common">MaxRequestWorkers can be modified during a restart.

    Special care must be taken when using this directive. If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated. If both ServerLimit and MaxClients are set to values + module="mpm_common">MaxRequestWorkers are set to values higher than the system can handle, Apache httpd may not start or the system may become unstable.

    With the prefork MPM, use this directive only if you need to set MaxClients higher than 256 (default). + module="mpm_common">MaxRequestWorkers higher than 256 (default). Do not set the value of this directive any higher than what you might want to set MaxClients to.

    + module="mpm_common">MaxRequestWorkers to.

    With worker, use this directive only - if your MaxClients and + if your MaxRequestWorkers and ThreadsPerChild settings require more than 16 server processes (default). Do not set the value of this directive any higher than the number of server processes required by what you may want for MaxClients and MaxRequestWorkers and ThreadsPerChild.

    Note diff --git a/docs/manual/mod/prefork.xml b/docs/manual/mod/prefork.xml index 2d7068a19f..715b581a2c 100644 --- a/docs/manual/mod/prefork.xml +++ b/docs/manual/mod/prefork.xml @@ -39,8 +39,8 @@

    This MPM is very self-regulating, so it is rarely necessary to adjust its configuration directives. Most important is that - MaxClients be big enough to - handle as many simultaneous requests as you expect to receive, but + MaxRequestWorkers be big enough + to handle as many simultaneous requests as you expect to receive, but small enough to assure that there is enough physical RAM for all processes.

    @@ -59,14 +59,14 @@ uses

    The StartServers, MinSpareServers, MaxSpareServers, and - MaxClients regulate how + MaxRequestWorkers regulate how the parent process creates children to serve requests. In general, Apache httpd is very self-regulating, so most sites do not need to adjust these directives from their default values. Sites which need to serve more than 256 simultaneous requests may need to - increase MaxClients, + increase MaxRequestWorkers, while sites with limited memory may need to decrease MaxClients to keep the server from + module="mpm_common">MaxRequestWorkers to keep the server from thrashing (swapping memory to disk and back). More information about tuning process creation is provided in the performance hints @@ -104,7 +104,7 @@ uses ListenBacklog -MaxClients +MaxRequestWorkers MaxMemFree diff --git a/docs/manual/mod/worker.xml b/docs/manual/mod/worker.xml index 0e8ae16506..bd0baf1a69 100644 --- a/docs/manual/mod/worker.xml +++ b/docs/manual/mod/worker.xml @@ -39,7 +39,7 @@

    The most important directives used to control this MPM are ThreadsPerChild, which controls the number of threads deployed by each child process and - MaxClients, which + MaxRequestWorkers, which controls the maximum total number of threads that may be launched.

    @@ -68,9 +68,9 @@ 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. + MaxRequestWorkers directive. The maximum number of active child processes is determined by - the MaxClients + the MaxRequestWorkers directive divided by the ThreadsPerChild directive.

    @@ -80,7 +80,7 @@ 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 + MaxRequestWorkers directive divided by the ThreadsPerChild directive. ThreadLimit is a hard @@ -92,7 +92,7 @@ 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 + module="mpm_common">MaxRequestWorkers 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 using @@ -104,7 +104,7 @@
  • set the value of MaxSpareThreads to the same value as - MaxClients
  • + MaxRequestWorkers

    A typical configuration of the process-thread controls in @@ -113,7 +113,7 @@ ServerLimit 16
    StartServers 2
    - MaxClients 150
    + MaxRequestWorkers 150
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25 @@ -156,7 +156,7 @@ ListenBacklog -MaxClients +MaxRequestWorkers MaxMemFree diff --git a/docs/manual/upgrading.xml b/docs/manual/upgrading.xml index 77accafbac..56ab731a00 100644 --- a/docs/manual/upgrading.xml +++ b/docs/manual/upgrading.xml @@ -168,7 +168,15 @@