mirror of https://github.com/zulip/zulip.git
supervisord: Improve memory footprint for small servers.
This cuts the number of uwsgi and message_sender works for smaller servers with only 2GB of RAM.
This commit is contained in:
parent
92985f888b
commit
f91a2a8ef2
|
@ -63,6 +63,15 @@ class zulip::app_frontend_base {
|
|||
# RAM; we just auto-detect based on available system RAM.
|
||||
$queues_multiprocess = $::memorysize_mb > 3500
|
||||
$queues = $zulip::base::normal_queues
|
||||
if $queues_multiprocess {
|
||||
$message_sender_default_processes = 4
|
||||
$uwsgi_default_processes = 6
|
||||
} else {
|
||||
$message_sender_default_processes = 2
|
||||
$uwsgi_default_processes = 4
|
||||
}
|
||||
$message_sender_processes = zulipconf("application_server", "message_sender_processes",
|
||||
$message_sender_default_processes)
|
||||
file { "/etc/supervisor/conf.d/zulip.conf":
|
||||
require => Package[supervisor],
|
||||
ensure => file,
|
||||
|
@ -73,7 +82,8 @@ class zulip::app_frontend_base {
|
|||
notify => Service["supervisor"],
|
||||
}
|
||||
|
||||
$uwsgi_processes = zulipconf("application_server", "uwsgi_processes", "5")
|
||||
$uwsgi_processes = zulipconf("application_server", "uwsgi_processes",
|
||||
$uwsgi_default_processes)
|
||||
file { "/etc/zulip/uwsgi.ini":
|
||||
require => Package[supervisor],
|
||||
ensure => file,
|
||||
|
|
|
@ -97,7 +97,7 @@ stdout_logfile=/var/log/zulip/events_message_sender.log ; stdout log pat
|
|||
stdout_logfile_maxbytes=20MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
stdout_logfile_backups=5 ; # of stdout logfile backups (default 10)
|
||||
directory=/home/zulip/deployments/current/
|
||||
numprocs=5
|
||||
numprocs=<%= @message_sender_processes %>
|
||||
|
||||
; The below sample group section shows all possible group values,
|
||||
; create one or more 'real' group: sections to create "heterogeneous"
|
||||
|
|
Loading…
Reference in New Issue