From: Tom Hughes Date: Tue, 12 Sep 2023 23:09:02 +0000 (+0100) Subject: Match number of apache workers on tile servers to the CPU count X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/eaf2ba261061613a6e23f6514afeb4f50817db66 Match number of apache workers on tile servers to the CPU count --- diff --git a/cookbooks/tile/attributes/default.rb b/cookbooks/tile/attributes/default.rb index 3d32e5632..c471f2475 100644 --- a/cookbooks/tile/attributes/default.rb +++ b/cookbooks/tile/attributes/default.rb @@ -17,3 +17,7 @@ default[:postgresql][:versions] |= [node[:tile][:database][:cluster].split("/"). default[:postgresql][:monitor_database] = "gis" default[:accounts][:users][:tile][:status] = :role + +default[:apache][:event][:server_limit] = node.cpu_cores * 5 / 4 +default[:apache][:event][:max_request_workers] = node.cpu_cores * node[:apache][:event][:threads_per_child] +default[:apache][:event][:max_spare_threads] = node.cpu_cores * node[:apache][:event][:threads_per_child] diff --git a/roles/tile.rb b/roles/tile.rb index ce4e4a67e..6bb3dc902 100644 --- a/roles/tile.rb +++ b/roles/tile.rb @@ -14,11 +14,8 @@ default_attributes( :mpm => "event", :timeout => 60, :event => { - :server_limit => 80, - :max_request_workers => 1200, :threads_per_child => 20, :min_spare_threads => 300, - :max_spare_threads => 1200, :max_connections_per_child => 0, :async_request_worker_factor => 4, :listen_cores_buckets_ratio => 8