add worker_cpu_affinity to improve nginx performance

This commit is contained in:
Mengxin Liu 2018-03-12 23:04:26 +08:00 committed by oilbeater
parent ebcdfade8e
commit de04f9775d
2 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -16,6 +16,8 @@ load_module /etc/nginx/modules/ngx_http_modsecurity_module.so;
daemon off;
worker_processes {{ $cfg.WorkerProcesses }};
worker_cpu_affinity auto;
pid /run/nginx.pid;
{{ if ne .MaxOpenFiles 0 }}
worker_rlimit_nofile {{ .MaxOpenFiles }};