style[:tile_directories].collect { |directory| directory[:name] }
end.flatten.sort.uniq
-package "renderd"
+package %w[
+ renderd
+ libgoogle-perftools4
+]
systemd_service "renderd" do
dropin "chef"
after "postgresql.service"
wants "postgresql.service"
+ environment "LD_PRELOAD" => "libtcmalloc.so.4"
limit_nofile 4096
+ memory_high "80%"
+ memory_max "90%"
sandbox true
restrict_address_families "AF_UNIX"
read_write_paths tile_directories
+ system_call_filter ["@known"]
restart "on-failure"
end
nodejs_package "carto"
+lowzoom_threads = [node.cpu_cores - 1, node[:memory][:total].to_f / 6291456].min.floor
+
systemd_service "update-lowzoom@" do
description "Low zoom tile update service for %i layer"
user "tile"
owner "root"
group "root"
mode "755"
- variables :style => name
+ variables :style => name, :threads => lowzoom_threads
end
service "update-lowzoom@#{name}" do
owner "root"
group "root"
mode "755"
+ variables :threads => lowzoom_threads
end
systemd_service "render-lowzoom" do