From e19b0a32afb33df956a1f4ec34d9091a4a48ab8c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 11 Nov 2021 14:40:09 +0000 Subject: [PATCH] prosody: Tune GC to be more aggressive by default It appears that, in some environments at least, large file uploads can still cause a significant increase in RAM. This reduces that effect. It is expected that a future release will switch to Lua 5.4, which has shown to have far better GC behaviour. --- ansible/files/prosody.cfg.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/files/prosody.cfg.lua b/ansible/files/prosody.cfg.lua index 83fed8f..480dfd7 100644 --- a/ansible/files/prosody.cfg.lua +++ b/ansible/files/prosody.cfg.lua @@ -29,6 +29,11 @@ data_path = "/snikket/prosody" pidfile = "/var/run/prosody/prosody.pid" +-- Aggressive GC to reduce resource consumption. These values are not +-- incredibly scientific, but should be good for a small private server. +-- They should be reviewed on the upgrade to Lua 5.4. +gc = { threshold = 100, speed = 750 } + modules_enabled = { -- Generally required