From 9fd5d4580630b16448f45c6b878f9b8cb36ad240 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Thu, 29 Jul 2021 20:12:50 +0300
Subject: [PATCH] syncarchive: Drop --delay-updates; breaks incremental scan

The --delay-updates option results in 6G memory usage per archive mirror
for a total of ~18G memory used on gemini when all three archive mirrors
are syncing. Less important (but still revelant!) is the memory usage on
each mirror, which climbs to about 11G during each synchronization.

Removing the --delay-updates option should be OK considering the archive
hosts data that almost never changes. Without this option, rsync is able
to do a sequential scan which uses 90M of memory (per archive mirror) on
gemini and about 250M on each mirror individually.
---
 roles/syncarchive/files/syncarchive | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/syncarchive/files/syncarchive b/roles/syncarchive/files/syncarchive
index 536f50c95..50957f57b 100755
--- a/roles/syncarchive/files/syncarchive
+++ b/roles/syncarchive/files/syncarchive
@@ -11,7 +11,7 @@ exec 9>"${lock}"
 flock -n 9 || exit
 
 rsync_cmd() {
-	local -a cmd=(rsync -rlptH --safe-links --delete-delay --delay-updates
+	local -a cmd=(rsync -rlptH --safe-links --delete-delay
 		"--timeout=600" "--contimeout=60" --no-motd)
 
 	if stty &>/dev/null; then
-- 
GitLab