You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2004/09/14 23:43:24 UTC
Re: Shorten the default config and the distribution (was:
IfModule in the Default Config)
At 01:30 PM 9/14/2004, Joshua Slive wrote:
>On Tue, 14 Sep 2004, William A. Rowe, Jr. wrote:
>>I'm trying to understand what other anomalies you mean between
>>Unix and Win32, they aren't that dis-similar.
>
>I was mainly refering to the big block of mpm-control directives near the top.
>
>But I like the suggestion of getting rid of almost all of that (besides some basic things like MaxClients) and not discriminating against non-unix mpms.
I'm actually thinking that httpd-mpm.conf would include -all- of
the performance characteristics and server resources (e.g. the
switchboard and other mechanical tools) for running the server.
Existing directives I'd suggest (beyond the big-per-mpm block :-)
include the following (and don't include enablesendfile/mmap etc
because those are filesystem dependant and can vary by <dir > block)
but only one-mpm-per-flavor of the .conf files...
52 #
53 # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
54 #
55 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.44&r2=1.45>fielding 1.45 #<IfModule !mpm_winnt.c>
56 #<IfModule !mpm_netware.c>
57 striker 1.1 #LockFile @rel_logfiledir@/accept.lock
58 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.44&r2=1.45>fielding 1.45 #</IfModule>
59 #</IfModule>
60 striker 1.1
61 #
62 # ScoreBoardFile: File used to store internal server process information.
63 # If unspecified (the default), the scoreboard will be stored in an
64 # anonymous shared memory segment, and will be unavailable to third-party
65 # applications.
66 # If specified, ensure that no two invocations of Apache share the same
67 # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
68 #
69 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.44&r2=1.45>fielding 1.45 #<IfModule !mpm_netware.c>
70 #<IfModule !perchild.c>
71 striker 1.1 #ScoreBoardFile @rel_logfiledir@/apache_runtime_status
72 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.44&r2=1.45>fielding 1.45 #</IfModule>
73 #</IfModule>
74 striker 1.1
75
76 #
77 # PidFile: The file in which the server should record its process
78 # identification number when it starts.
79 #
80 <IfModule !mpm_netware.c>
81 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.1&r2=1.2>jerenkrantz 1.2 PidFile @rel_runtimedir@/httpd.pid
82 striker 1.1 </IfModule>
83
84 #
85 # Timeout: The number of seconds before receives and sends time out.
86 #
87 Timeout 300
88
89 #
90 # KeepAlive: Whether or not to allow persistent connections (more than
91 # one request per connection). Set to "Off" to deactivate.
92 #
93 KeepAlive On
94
95 #
96 # MaxKeepAliveRequests: The maximum number of requests to allow
97 # during a persistent connection. Set to 0 to allow an unlimited amount.
98 # We recommend you leave this number high, for maximum performance.
99 #
100 MaxKeepAliveRequests 100
101
102 #
103 striker 1.1 # KeepAliveTimeout: Number of seconds to wait for the next request from the
104 # same client on the same connection.
105 #
106 KeepAliveTimeout 15
107
108 ##
109 ## Server-Pool Size Regulation (MPM specific)
110 ##
111
112 # prefork MPM
113 # StartServers: number of server processes to start
114 # MinSpareServers: minimum number of server processes which are kept spare
115 # MaxSpareServers: maximum number of server processes which are kept spare
116 # MaxClients: maximum number of server processes allowed to start
117 # MaxRequestsPerChild: maximum number of requests a server process serves
118 <IfModule prefork.c>
119 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 StartServers 5
120 MinSpareServers 5
121 MaxSpareServers 10
122 MaxClients 150
123 MaxRequestsPerChild 0
124 striker 1.1 </IfModule>
125
126 # worker MPM
127 # StartServers: initial number of server processes to start
128 # MaxClients: maximum number of simultaneous client connections
129 # MinSpareThreads: minimum number of worker threads which are kept spare
130 # MaxSpareThreads: maximum number of worker threads which are kept spare
131 # ThreadsPerChild: constant number of worker threads in each server process
132 # MaxRequestsPerChild: maximum number of requests a server process serves
133 <IfModule worker.c>
134 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 StartServers 2
135 MaxClients 150
136 MinSpareThreads 25
137 MaxSpareThreads 75
138 ThreadsPerChild 25
139 MaxRequestsPerChild 0
140 striker 1.1 </IfModule>
141
142 # perchild MPM
143 # NumServers: constant number of server processes
144 # StartThreads: initial number of worker threads in each server process
145 # MinSpareThreads: minimum number of worker threads which are kept spare
146 # MaxSpareThreads: maximum number of worker threads which are kept spare
147 # MaxThreadsPerChild: maximum number of worker threads in each server process
148 # MaxRequestsPerChild: maximum number of connections per server process
149 <IfModule perchild.c>
150 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 NumServers 5
151 StartThreads 5
152 MinSpareThreads 5
153 MaxSpareThreads 10
154 MaxThreadsPerChild 20
155 MaxRequestsPerChild 0
156 striker 1.1 </IfModule>
157
158 # WinNT MPM
159 # ThreadsPerChild: constant number of worker threads in the server process
160 # MaxRequestsPerChild: maximum number of requests a server process serves
161 <IfModule mpm_winnt.c>
162 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 ThreadsPerChild 250
163 MaxRequestsPerChild 0
164 striker 1.1 </IfModule>
165
166 # BeOS MPM
167 # StartThreads: how many threads do we initially spawn?
168 # MaxClients: max number of threads we can have (1 thread == 1 client)
169 # MaxRequestsPerThread: maximum number of requests each thread will process
170 <IfModule beos.c>
171 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 StartThreads 10
172 MaxClients 50
173 MaxRequestsPerThread 10000
174 </IfModule>
175 striker 1.1
176 # NetWare MPM
177 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.6&r2=1.7>slive 1.7 # ThreadStackSize: Stack size allocated for each worker thread
178 # StartThreads: Number of worker threads launched at server startup
179 # MinSpareThreads: Minimum number of idle threads, to handle request spikes
180 # MaxSpareThreads: Maximum number of idle threads
181 # MaxThreads: Maximum number of worker threads alive at the same time
182 # MaxRequestsPerChild: Maximum number of requests a thread serves. It is
183 # recommended that the default value of 0 be set for this
184 # directive on NetWare. This will allow the thread to
185 # continue to service requests indefinitely.
186 striker 1.1 <IfModule mpm_netware.c>
187 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 ThreadStackSize 65536
188 StartThreads 250
189 MinSpareThreads 25
190 MaxSpareThreads 250
191 MaxThreads 1000
192 MaxRequestsPerChild 0
193 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.56&r2=1.57>bnicholes 1.57 MaxMemFree 100
194 striker 1.1 </IfModule>
195
196 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.3&r2=1.4>bjh 1.4 # OS/2 MPM
197 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.6&r2=1.7>slive 1.7 # StartServers: Number of server processes to maintain
198 # MinSpareThreads: Minimum number of idle threads per process,
199 # to handle request spikes
200 # MaxSpareThreads: Maximum number of idle threads per process
201 # MaxRequestsPerChild: Maximum number of connections per server process
202 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.3&r2=1.4>bjh 1.4 <IfModule mpmt_os2.c>
203 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.27&r2=1.28>wsanchez 1.28 StartServers 2
204 MinSpareThreads 5
205 MaxSpareThreads 10
206 MaxRequestsPerChild 0
207 <http://cvs.apache.org/viewcvs.cgi/httpd-docs-2.0/conf/httpd-std.conf.in?r1=1.3&r2=1.4>bjh 1.4 </IfModule>
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org