From 80bbbd3aa8cb694121566a600eaa92eda385c7fc Mon Sep 17 00:00:00 2001 From: Evilham Date: Thu, 21 Apr 2022 14:34:33 +0200 Subject: [PATCH] [__jitsi_meet] Adapt jicofo and videobridge memory usage This enables us to setup smaller jitsi instances that work reliably. We set 3 threshholds: - < 3G RAM: use 0.75G max memory - < 5G RAM: use 1G max memory - < 8G RAM: use 2G max memory - >= 8G RAM: use 3G max memory (jitsi's default) For more information as to why and how this is done, see: https://gitlab.com/guifi-exo/projectes/-/issues/318 https://github.com/jitsi/jitsi-meet/issues/6589 as investigated back in the day by @pedro Sponsored by: camilion.eu, eXO.cat --- type/__jitsi_meet/explorer/configured-memory | 15 +++++++++ type/__jitsi_meet/gencode-remote | 33 ++++++++++++++++++++ type/__jitsi_meet/man.rst | 2 ++ 3 files changed, 50 insertions(+) create mode 100755 type/__jitsi_meet/explorer/configured-memory diff --git a/type/__jitsi_meet/explorer/configured-memory b/type/__jitsi_meet/explorer/configured-memory new file mode 100755 index 0000000..658f94b --- /dev/null +++ b/type/__jitsi_meet/explorer/configured-memory @@ -0,0 +1,15 @@ +#!/bin/sh -eu + +JICOFO="/usr/share/jicofo/jicofo.sh" +VIDEOBRIDGE="/usr/share/jitsi-videobridge/lib/videobridge.rc" + +if [ -f "${JICOFO:?}" ]; then + jicofo_memory="$(grep JICOFO_MAX_MEMORY= "${JICOFO:?}" | cut -d= -f 2 | cut -d ";" -f 1)" +fi +if [ -f "${VIDEOBRIDGE:?}" ]; then + vb_memory="$(grep VIDEOBRIDGE_MAX_MEMORY= "${VIDEOBRIDGE:?}" | cut -d= -f 2)" +fi +cat <