]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/renderd.conf.erb
tile: Fix Mac ARM compatibility (kitchen)
[chef.git] / cookbooks / tile / templates / default / renderd.conf.erb
index 8f441db2ca216269b8a627b85a1455861e02ad39..60206d1ceb09f1a578fde9ed003e9acf41466f28 100644 (file)
@@ -2,7 +2,7 @@
 
 [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