From ebb571bf20be028869a54f85a1d1069d57a27f7c Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 15 Oct 2021 12:39:16 +0100 Subject: [PATCH] Increase GC frequenc to work around restic's high memory usage https://github.com/restic/restic/issues/1988 --- ansible/roles/restic/files/backrest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/restic/files/backrest.sh b/ansible/roles/restic/files/backrest.sh index 3ddc555..82e853f 100644 --- a/ansible/roles/restic/files/backrest.sh +++ b/ansible/roles/restic/files/backrest.sh @@ -6,6 +6,7 @@ export B2_ACCOUNT_ID="{{ restic_b2_account_id }}" export B2_ACCOUNT_KEY="{{ restic_b2_account_key }}" export RESTIC_PASSWORD="{{ restic_key }}" export RESTIC_REPOSITORY="b2:{{ restic_b2_bucket }}" +export GOGC=20 # HACK: Work around for restic's high memory usage https://github.com/restic/restic/issues/1988 export RESTIC_LOG_DIR="$HOME/log" export RESTIC_LOG_FILE="$RESTIC_LOG_DIR/$1-$(date -Iseconds).log"