--timestamp=${timestamp} \
--tile-dir=/srv/tile.openstreetmap.org/tiles \
--socket=/var/run/renderd/renderd.sock \
- --num-threads=<%= node[:cpu][:total] - 1 %> \
+ --num-threads=<%= [4, node.dig('cpu', 'total').to_i - 1, node.dig('cpu', 'cores').to_i - 1].max %> \
--map="<%= style %>" \
--max-load=<%= node[:cpu][:total] %> \
--min-zoom=0 --max-zoom=12
[renderd]
socketname=/var/run/renderd/renderd.sock
-num_threads=<%= node[:cpu][:total] - 1 %>
+num_threads=<%= [4, node.dig('cpu', 'total').to_i - 1, node.dig('cpu', 'cores').to_i - 1].max %>
tile_dir=/srv/tile.openstreetmap.org/tiles
stats_file=/var/run/renderd/renderd.stats
--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] - 1 %> \
+ --num-threads=<%= [4, node.dig('cpu', 'total').to_i - 1, node.dig('cpu', 'cores').to_i - 1].max %> \
--map="<%= @style %>" \
--max-load=<%= node[:cpu][:total] %> \
--min-zoom=0 --max-zoom=12