]> git.openstreetmap.org Git - chef.git/commitdiff
Match number of apache workers on tile servers to the CPU count
authorTom Hughes <tom@compton.nu>
Tue, 12 Sep 2023 23:09:02 +0000 (00:09 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 12 Sep 2023 23:13:05 +0000 (00:13 +0100)
cookbooks/tile/attributes/default.rb
roles/tile.rb

index 3d32e5632f5e0dcf9cc86fa435af7901832ea8ca..c471f2475bfe4666f0bb6d1fef0151c0e771e04b 100644 (file)
@@ -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]
index ce4e4a67e691ca581d5f9dd760520ae43d009187..6bb3dc9023f340283e70f1fc77e14d50a3562743 100644 (file)
@@ -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