Showing
1 changed file
with
9 additions
and
8 deletions
1 | user www www; | 1 | user www www; |
2 | - | 2 | + |
3 | +# setup worker proccess and worker cpu affinity | ||
3 | worker_processes {{processor_count}}; | 4 | worker_processes {{processor_count}}; |
4 | {% if processor_count == '2' %} | 5 | {% if processor_count == '2' %} |
5 | - worker_cpu_affinity 01 10; | ||
6 | - {% elif processor_count == '4' %} | ||
7 | - worker_cpu_affinity 1000 0100 0010 0001; | ||
8 | - {% elif processor_count >= '8' %} | ||
9 | - worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; | ||
10 | - {% else %} | ||
11 | - worker_cpu_affinity 1000 0100 0010 0001; | 6 | +worker_cpu_affinity 01 10; |
7 | +{% elif processor_count == '4' %} | ||
8 | +worker_cpu_affinity 1000 0100 0010 0001; | ||
9 | +{% elif processor_count >= '8' %} | ||
10 | +worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000; | ||
11 | +{% else %} | ||
12 | +worker_cpu_affinity 1000 0100 0010 0001; | ||
12 | {% endif %} | 13 | {% endif %} |
13 | 14 | ||
14 | pid logs/nginx.pid; | 15 | pid logs/nginx.pid; |
-
Please register or login to post a comment