From eaf2ba261061613a6e23f6514afeb4f50817db66 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 13 Sep 2023 00:09:02 +0100 Subject: [PATCH 1/1] Match number of apache workers on tile servers to the CPU count --- cookbooks/tile/attributes/default.rb | 4 ++++ roles/tile.rb | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5