From 0364daf8925f1dbba90ee38d58ed2b096db5cffc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 18 Oct 2019 10:50:37 +0100 Subject: [PATCH] Use one worker per CPU with squid 3 and 4 --- cookbooks/squid/templates/default/squid.conf.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbooks/squid/templates/default/squid.conf.erb b/cookbooks/squid/templates/default/squid.conf.erb index 817fd5072..dabb406a3 100644 --- a/cookbooks/squid/templates/default/squid.conf.erb +++ b/cookbooks/squid/templates/default/squid.conf.erb @@ -5,6 +5,10 @@ visible_hostname <%= node.name %> #FIXME - configurable cache_mem <%= node[:squid][:cache_mem] %> +<% if node[:squid][:version] > 2 -%> + +workers <%= node[:cpu][:total] %> +<% end -%> max_filedescriptors 98304 -- 2.43.2