]> git.openstreetmap.org Git - chef.git/commitdiff
Use one worker per CPU with squid 3 and 4
authorTom Hughes <tom@compton.nu>
Fri, 18 Oct 2019 09:50:37 +0000 (10:50 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 18 Oct 2019 09:50:37 +0000 (10:50 +0100)
cookbooks/squid/templates/default/squid.conf.erb

index 817fd5072144c7198abda28a1e2a699cfcc1dbb9..dabb406a345e96a262ad64db5c31b9c34c34adf5 100644 (file)
@@ -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