From 5441891826af401fac1ad8a40d6c64a3071ca7c7 Mon Sep 17 00:00:00 2001 From: Paul Norman Date: Tue, 29 Dec 2020 14:54:53 -0800 Subject: [PATCH] Only reserve one CPU for other tasks on render servers --- cookbooks/tile/templates/default/render-lowzoom.erb | 2 +- cookbooks/tile/templates/default/renderd.conf.erb | 2 +- cookbooks/tile/templates/default/update-lowzoom.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbooks/tile/templates/default/render-lowzoom.erb b/cookbooks/tile/templates/default/render-lowzoom.erb index 55a98a754..390244a62 100644 --- a/cookbooks/tile/templates/default/render-lowzoom.erb +++ b/cookbooks/tile/templates/default/render-lowzoom.erb @@ -16,7 +16,7 @@ function update_<%= style %> --timestamp=${timestamp} \ --tile-dir=/srv/tile.openstreetmap.org/tiles \ --socket=/var/run/renderd/renderd.sock \ - --num-threads=<%= node[:cpu][:total] - 2 %> \ + --num-threads=<%= node[:cpu][:total] - 1 %> \ --map="<%= style %>" \ --max-load=70 \ --min-zoom=0 --max-zoom=12 diff --git a/cookbooks/tile/templates/default/renderd.conf.erb b/cookbooks/tile/templates/default/renderd.conf.erb index 69479e0b0..d02202d06 100644 --- a/cookbooks/tile/templates/default/renderd.conf.erb +++ b/cookbooks/tile/templates/default/renderd.conf.erb @@ -2,7 +2,7 @@ [renderd] socketname=/var/run/renderd/renderd.sock -num_threads=<%= node[:cpu][:total] - 2 %> +num_threads=<%= node[:cpu][:total] - 1 %> tile_dir=/srv/tile.openstreetmap.org/tiles stats_file=/var/run/renderd/renderd.stats diff --git a/cookbooks/tile/templates/default/update-lowzoom.erb b/cookbooks/tile/templates/default/update-lowzoom.erb index 277c71fc6..ce91eb48f 100644 --- a/cookbooks/tile/templates/default/update-lowzoom.erb +++ b/cookbooks/tile/templates/default/update-lowzoom.erb @@ -12,7 +12,7 @@ function update_tiles --timestamp=$(stat -c %Y "/srv/tile.openstreetmap.org/styles/<%= @style %>/project.xml") \ --tile-dir=/srv/tile.openstreetmap.org/tiles \ --socket=/var/run/renderd/renderd.sock \ - --num-threads=<%= node[:cpu][:total] - 2 %> \ + --num-threads=<%= node[:cpu][:total] - 1 %> \ --map="<%= @style %>" \ --max-load=70 \ --min-zoom=0 --max-zoom=12 -- 2.39.5