[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/10: substitute: Don’t keep cache entries more than a few days.
From: |
guix-commits |
Subject: |
10/10: substitute: Don’t keep cache entries more than a few days. |
Date: |
Thu, 13 Jun 2024 05:39:28 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 7e00fb9f31f51ac2f9fa67b71a3eb8aaa23efdb6
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Jun 4 09:41:28 2024 +0200
substitute: Don’t keep cache entries more than a few days.
Experience has shown that keeping too many entries increases disk usage
and, more importantly, leads to long delays when cleaning up the cache,
measured in minutes on slow or busy HDDs with hundreds of thousands of
cache entries, as is common on build machines. In those cases, the cost
of the cache outweighs its benefit.
* guix/scripts/substitute.scm (%narinfo-expired-cache-entry-removal-delay):
Reduce to 5 days.
(cached-narinfo-expiration-time)[max-ttl]: Reduce to 2 days.
Change-Id: Iab212f572ee9041be61716423a3c014f93fe81ed
---
guix/scripts/substitute.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index a7ad56dbcd..8bcbca5e7a 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -77,7 +77,7 @@
(define %narinfo-expired-cache-entry-removal-delay
;; How often we want to remove files corresponding to expired cache entries.
- (* 7 24 3600))
+ (* 5 24 3600))
(define (warn-about-missing-authentication)
(warning (G_ "authentication and authorization of substitutes \
@@ -169,8 +169,9 @@ was found."
"Return the expiration time for FILE, which is a cached narinfo."
(define max-ttl
;; Upper bound on the TTL used to avoid keeping around cached narinfos for
- ;; too long, which makes the cache bigger and more expensive to traverse.
- (* 2 30 24 60 60)) ;2 months
+ ;; too long, which makes the cache bigger and more expensive to traverse
+ ;; when deleting old entries.
+ (* 2 24 60 60))
(catch 'system-error
(lambda ()
- branch master updated (f65bbca6e4 -> 7e00fb9f31), guix-commits, 2024/06/13
- 01/10: ci: Add cross-compilation jobs for x86_64-linux-gnux32., guix-commits, 2024/06/13
- 03/10: gnu: libreoffice: Update to 7.6.7.2., guix-commits, 2024/06/13
- 06/10: gnu: Add python-wavefile., guix-commits, 2024/06/13
- 05/10: gnu: Add python-mido., guix-commits, 2024/06/13
- 04/10: gnu: Add python-pymarshal., guix-commits, 2024/06/13
- 02/10: maint: Do not cross-compile to bare-metal targets., guix-commits, 2024/06/13
- 07/10: gnu: Add stargate., guix-commits, 2024/06/13
- 08/10: gnu: stargate: Move libsbsms and soundtouch forks to audio.scm., guix-commits, 2024/06/13
- 10/10: substitute: Don’t keep cache entries more than a few days.,
guix-commits <=
- 09/10: doc: Use a symbol for Cuirass specification names., guix-commits, 2024/06/13