From 8c35dfa8e0f464524d36a1237c79a6b49c887f2f Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Wed, 21 Aug 2024 16:27:12 +0200 Subject: [PATCH] fix(gerrit): tinker a bit with gerrit defaults for transfer & caching We had some issues in the past with too many packfiles and timeout during transfers, let's try to provide a bit of relief in bad scenarios. Signed-off-by: Raito Bezarius --- services/gerrit/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/gerrit/default.nix b/services/gerrit/default.nix index 7b2c72b..e079818 100644 --- a/services/gerrit/default.nix +++ b/services/gerrit/default.nix @@ -111,14 +111,16 @@ in receive.timeout = "4min"; # Default is 0, infinite. - transfer.timeout = "30min"; + # When system is under pressure and there's too many packfiles + # the search for reuse can take a stupid amount of time. + transfer.timeout = "60min"; # We may overshoot but it's OK. core.packedGitWindowSize = "256k"; # Sum of all current packfiles is ~1.2G # Largest packfile is 906MB. # Average packfile is ~5-10MB. - core.packedGitLimit = "1g"; + core.packedGitLimit = "2g"; # We have plenty of memory, let's avoid file system cache → Gerrit needless copies. core.packedGitUseStrongRefs = true; core.packedGitOpenFiles = 4096;