# HG changeset patch # User Ruslan Ermilov # Date 1332941659 0 # Node ID 8275e169f77b151585ace37750c55c97fc58790e # Parent 31e81dcc4ffd4c3108550e9f49e0be2217c41520 Documented the "worker_cpu_affinity" directive. diff -r 31e81dcc4ffd -r 8275e169f77b xml/en/docs/ngx_core_module.xml --- a/xml/en/docs/ngx_core_module.xml Wed Mar 28 07:50:06 2012 +0000 +++ b/xml/en/docs/ngx_core_module.xml Wed Mar 28 13:34:19 2012 +0000 @@ -293,6 +293,43 @@ + +cpumask ... + +main + + +Binds worker processes to the sets of CPUs. +Each CPU set is represented by a bitmask of allowed to use CPUs. +There should be a separate set defined for each of the worker processes. +By default, worker processes are not bound to any specific CPUs. + + + +For example, + +worker_processes 4; +worker_cpu_affinity 0001 0010 0100 1000; + +binds each worker process to a separate CPU, while + +worker_processes 2; +worker_cpu_affinity 0101 1010; + +binds the first worker process to CPU0/CPU2, +and the second worker process to CPU1/CPU3. +The second example is suitable for hyper-threading. + + + + +The directive is only available on FreeBSD and Linux. + + + + + + number 0 diff -r 31e81dcc4ffd -r 8275e169f77b xml/ru/docs/ngx_core_module.xml --- a/xml/ru/docs/ngx_core_module.xml Wed Mar 28 07:50:06 2012 +0000 +++ b/xml/ru/docs/ngx_core_module.xml Wed Mar 28 13:34:19 2012 +0000 @@ -290,6 +290,44 @@ + +маска_CPU ... + +main + + +Привязывает рабочие процессы к группам процессоров. +Каждая группа процессоров задаётся битовой маской +разрешённых к использованию процессоров. +Для каждого рабочего процесса должна быть задана отдельная группа. +По умолчанию рабочие процессы не привязаны к конкретным процессорам. + + + +Например, + +worker_processes 4; +worker_cpu_affinity 0001 0010 0100 1000; + +привязывает каждый рабочий процесс к отдельному процессору, тогда как + +worker_processes 2; +worker_cpu_affinity 0101 1010; + +привязывает первый рабочий процесс к CPU0/CPU2, +а второй — к CPU1/CPU3. +Второй пример пригоден для hyper-threading. + + + + +Директива доступна только на FreeBSD и Linux. + + + + + + число 0