comparison xml/en/docs/ngx_core_module.xml @ 1641:c0d1026e7e7b

Documented the "auto" parameter in worker_cpu_affinity.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 19 Jan 2016 14:19:30 +0300
parents d1e1a8d34bce
children 6b4cb951cf83
comparison
equal deleted inserted replaced
1640:442efe0268db 1641:c0d1026e7e7b
8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../dtd/module.dtd">
9 9
10 <module name="Core functionality" 10 <module name="Core functionality"
11 link="/en/docs/ngx_core_module.html" 11 link="/en/docs/ngx_core_module.html"
12 lang="en" 12 lang="en"
13 rev="15"> 13 rev="16">
14 14
15 <section id="example" name="Example Configuration"> 15 <section id="example" name="Example Configuration">
16 16
17 <para> 17 <para>
18 <example> 18 <example>
553 </directive> 553 </directive>
554 554
555 555
556 <directive name="worker_cpu_affinity"> 556 <directive name="worker_cpu_affinity">
557 <syntax><value>cpumask</value> ...</syntax> 557 <syntax><value>cpumask</value> ...</syntax>
558 <syntax><literal>auto</literal> [<value>cpumask</value>]</syntax>
558 <default/> 559 <default/>
559 <context>main</context> 560 <context>main</context>
560 561
561 <para> 562 <para>
562 Binds worker processes to the sets of CPUs. 563 Binds worker processes to the sets of CPUs.
577 worker_cpu_affinity 0101 1010; 578 worker_cpu_affinity 0101 1010;
578 </example> 579 </example>
579 binds the first worker process to CPU0/CPU2, 580 binds the first worker process to CPU0/CPU2,
580 and the second worker process to CPU1/CPU3. 581 and the second worker process to CPU1/CPU3.
581 The second example is suitable for hyper-threading. 582 The second example is suitable for hyper-threading.
583 </para>
584
585 <para>
586 The special value <literal>auto</literal> (1.9.10) allows
587 binding worker processes automatically to available CPUs:
588 <example>
589 worker_processes auto;
590 worker_cpu_affinity auto;
591 </example>
592 The optional mask parameter can be used to limit the CPUs
593 available for automatic binding:
594 <example>
595 worker_cpu_affinity auto 01010101;
596 </example>
582 </para> 597 </para>
583 598
584 <para> 599 <para>
585 <note> 600 <note>
586 The directive is only available on FreeBSD and Linux. 601 The directive is only available on FreeBSD and Linux.