Allow nginx to autotune workers
authorGrant Slater <git@firefishy.com>
Fri, 30 Dec 2016 16:50:54 +0000 (16:50 +0000)
committerGrant Slater <git@firefishy.com>
Fri, 30 Dec 2016 16:50:54 +0000 (16:50 +0000)
cookbooks/nginx/templates/default/nginx.conf.erb

index 903afd5..a895af3 100644 (file)
@@ -1,7 +1,8 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
 user  www-data;
-worker_processes <%= node['cpu']['total'] %>;
+worker_processes auto;
+worker_cpu_affinity auto;
 worker_rlimit_nofile 65536;
 
 error_log  /var/log/nginx/error.log warn;