diff --git a/docker-compose.yml b/docker-compose.yml index f5cf9f6..dfabc5a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -171,6 +171,12 @@ services: - ENABLE_RECORDING - ENABLE_XMPP_WEBSOCKET - ENABLE_JAAS_COMPONENTS + - GC_TYPE + - GC_INC_TH + - GC_INC_SPEED + - GC_INC_STEP_SIZE + - GC_GEN_MIN_TH + - GC_GEN_MAX_TH - GLOBAL_CONFIG - GLOBAL_MODULES - JIBRI_RECORDER_USER diff --git a/prosody/rootfs/defaults/prosody.cfg.lua b/prosody/rootfs/defaults/prosody.cfg.lua index 4f1caf8..9c4be9c 100644 --- a/prosody/rootfs/defaults/prosody.cfg.lua +++ b/prosody/rootfs/defaults/prosody.cfg.lua @@ -1,6 +1,12 @@ {{ $LOG_LEVEL := .Env.LOG_LEVEL | default "info" }} {{ $XMPP_PORT := .Env.XMPP_PORT | default "5222" -}} {{ $ENABLE_IPV6 := .Env.ENABLE_IPV6 | default "true" | toBool -}} +{{ $GC_TYPE := .Env.GC_TYPE | default "incremental" -}} +{{ $GC_INC_TH := .Env.GC_INC_TH | default 150 -}} +{{ $GC_INC_SPEED := .Env.GC_INC_SPEED | default 250 -}} +{{ $GC_INC_STEP_SIZE := .Env.GC_INC_STEP_SIZE | default 13 -}} +{{ $GC_GEN_MIN_TH := .Env.GC_GEN_MIN_TH | default 20 -}} +{{ $GC_GEN_MAX_TH := .Env.GC_GEN_MAX_TH | default 100 -}} -- Prosody Example Configuration File -- @@ -105,6 +111,23 @@ limits = { }; } +--Prosody garbage collector settings +--For more information see https://prosody.im/doc/advanced_gc +{{ if eq $GC_TYPE "generational" }} +gc = { + mode = "generational"; + minor_threshold = {{ $GC_GEN_MIN_TH }}; + major_threshold = {{ $GC_GEN_MAX_TH }}; +} +{{ else }} +gc = { + mode = "incremental"; + threshold = {{ $GC_INC_TH }}; + speed = {{ $GC_INC_SPEED }}; + step_size = {{ $GC_INC_STEP_SIZE }}; +} +{{ end }} + pidfile = "/config/data/prosody.pid"; -- Force clients to use encrypted connections? This option will