comparison xml/en/docs/ngx_core_module.xml @ 571:71d775bef043

Documented accept_mutex, accept_mutex_delay, multi_accept, and lock_file.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 05 Jul 2012 13:13:45 +0000
parents 345012910707
children 5e9ff979eac8
comparison
equal deleted inserted replaced
570:9a5b1a63f654 571:71d775bef043
26 26
27 </section> 27 </section>
28 28
29 29
30 <section id="directives" name="Directives"> 30 <section id="directives" name="Directives">
31
32 <directive name="accept_mutex">
33 <syntax><literal>on</literal> | <literal>off</literal></syntax>
34 <default>on</default>
35 <context>events</context>
36
37 <para>
38 If enabled,
39 accepts of new connections by multiple worker processes will be serialized.
40 Otherwise, all worker processes will be notified about new connections,
41 and if volume of new connections is low, some of the worker processes
42 may just waste system resources.
43 <note>
44 The use of <link doc="events.xml" id="rtsig"/>
45 connection processing method
46 requires <literal>accept_mutex</literal> to be enabled.
47 </note>
48 </para>
49
50 </directive>
51
52
53 <directive name="accept_mutex_delay">
54 <syntax><value>time</value></syntax>
55 <default>500ms</default>
56 <context>events</context>
57
58 <para>
59 If <link id="accept_mutex"/> is enabled, specifies the maximum time
60 during which a worker process will try to restart accepting new
61 connections if another worker process is already doing this
62 currently.
63 </para>
64
65 </directive>
66
31 67
32 <directive name="daemon"> 68 <directive name="daemon">
33 <syntax><literal>on</literal> | <literal>off</literal></syntax> 69 <syntax><literal>on</literal> | <literal>off</literal></syntax>
34 <default>on</default> 70 <default>on</default>
35 <context>main</context> 71 <context>main</context>
222 </para> 258 </para>
223 259
224 </directive> 260 </directive>
225 261
226 262
263 <directive name="lock_file">
264 <syntax><value>file</value></syntax>
265 <default>logs/nginx.lock</default>
266 <context>main</context>
267
268 <para>
269 nginx uses the locking mechanism to implement <link id="accept_mutex"/>
270 and serialize accesses to shared memory.
271 On most systems the locks are implemented using atomic operations,
272 and this directive is ignored.
273 On other systems the “lock file” mechanism is used.
274 This directive specifies a prefix for the names of lock files.
275 </para>
276
277 </directive>
278
279
227 <directive name="master_process"> 280 <directive name="master_process">
228 <syntax><literal>on</literal> | <literal>off</literal></syntax> 281 <syntax><literal>on</literal> | <literal>off</literal></syntax>
229 <default>on</default> 282 <default>on</default>
230 <context>main</context> 283 <context>main</context>
231 284
232 <para> 285 <para>
233 Determines whether worker processes are started. 286 Determines whether worker processes are started.
234 This directive is intended for nginx developers. 287 This directive is intended for nginx developers.
288 </para>
289
290 </directive>
291
292
293 <directive name="multi_accept">
294 <syntax><literal>on</literal> | <literal>off</literal></syntax>
295 <default>off</default>
296 <context>events</context>
297
298 <para>
299 If disabled, a worker process
300 will accept one new connection at a time.
301 Otherwise, a worker process
302 will accept all new connections at a time.
303 <note>
304 The directive is ignored if <link doc="events.xml" id="kqueue"/>
305 connection processing method is used because it can report
306 the number of new connections waiting to be accepted.
307 </note>
308 <note>
309 The use of <link doc="events.xml" id="rtsig"/>
310 connection processing method
311 automatically enables <literal>multi_accept</literal>.
312 </note>
235 </para> 313 </para>
236 314
237 </directive> 315 </directive>
238 316
239 317