From 8ea5e2156ae7b9a81aea66f85bf31b5f5ea31980 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 30 Jan 2024 12:18:18 -0800 Subject: [PATCH] puppet: Update rules for number of uwsgi processes. The defaults for how many uwsgi processes to run no longer depend on the queue processor mode, but instead the total memory on the system. (cherry picked from commit 62dbe2298e4e8d6d568748fb129780ac10276bd7) --- puppet/zulip/manifests/app_frontend_base.pp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/puppet/zulip/manifests/app_frontend_base.pp b/puppet/zulip/manifests/app_frontend_base.pp index 20176d8237..bd0db23f5d 100644 --- a/puppet/zulip/manifests/app_frontend_base.pp +++ b/puppet/zulip/manifests/app_frontend_base.pp @@ -148,10 +148,17 @@ class zulip::app_frontend_base { 'user_activity_interval', 'user_presence', ] - if $queues_multiprocess { + + if $zulip::common::total_memory_mb > 24000 { + $uwsgi_default_processes = 16 + } elsif $zulip::common::total_memory_mb > 12000 { + $uwsgi_default_processes = 8 + } elsif $zulip::common::total_memory_mb > 6000 { $uwsgi_default_processes = 6 - } else { + } elsif $zulip::common::total_memory_mb > 3000 { $uwsgi_default_processes = 4 + } else { + $uwsgi_default_processes = 3 } $tornado_ports = $zulip::tornado_sharding::tornado_ports