comparison xml/en/docs/ngx_core_module.xml @ 469:8275e169f77b

Documented the "worker_cpu_affinity" directive.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 28 Mar 2012 13:34:19 +0000
parents 571b790ddf9e
children 8e1356bd281a
comparison
equal deleted inserted replaced
468:31e81dcc4ffd 469:8275e169f77b
291 </para> 291 </para>
292 292
293 </directive> 293 </directive>
294 294
295 295
296 <directive name="worker_cpu_affinity">
297 <syntax><value>cpumask</value> ...</syntax>
298 <default/>
299 <context>main</context>
300
301 <para>
302 Binds worker processes to the sets of CPUs.
303 Each CPU set is represented by a bitmask of allowed to use CPUs.
304 There should be a separate set defined for each of the worker processes.
305 By default, worker processes are not bound to any specific CPUs.
306 </para>
307
308 <para>
309 For example,
310 <example>
311 worker_processes 4;
312 worker_cpu_affinity 0001 0010 0100 1000;
313 </example>
314 binds each worker process to a separate CPU, while
315 <example>
316 worker_processes 2;
317 worker_cpu_affinity 0101 1010;
318 </example>
319 binds the first worker process to CPU0/CPU2,
320 and the second worker process to CPU1/CPU3.
321 The second example is suitable for hyper-threading.
322 </para>
323
324 <para>
325 <note>
326 The directive is only available on FreeBSD and Linux.
327 </note>
328 </para>
329
330 </directive>
331
332
296 <directive name="worker_priority"> 333 <directive name="worker_priority">
297 <syntax><value>number</value></syntax> 334 <syntax><value>number</value></syntax>
298 <default>0</default> 335 <default>0</default>
299 <context>main</context> 336 <context>main</context>
300 337