diff --git a/templates/default/consul-sysconfig.erb b/templates/default/consul-sysconfig.erb index 5c87b718..1c8c50c9 100644 --- a/templates/default/consul-sysconfig.erb +++ b/templates/default/consul-sysconfig.erb @@ -1 +1 @@ -GOMAXPROCS=<%= node['cpu']['total'] %> +GOMAXPROCS=<%= [node['cpu']['total'], 2].max %> diff --git a/templates/default/sv-consul-run.erb b/templates/default/sv-consul-run.erb index 032c617d..eda48517 100644 --- a/templates/default/sv-consul-run.erb +++ b/templates/default/sv-consul-run.erb @@ -1,6 +1,6 @@ #!/bin/sh -export GOMAXPROCS=<%= node['cpu']['total'] %> +export GOMAXPROCS=<%= [node['cpu']['total'], 2].max %> exec 2>&1 exec <%= node['runit']['chpst_bin'] %> \