From c3ce52026eab09b872d134d909850f43f3fe4bb9 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Tue, 16 Apr 2024 02:04:03 +0200 Subject: [PATCH] knot-resolver: chill cache size Allows rebuilding the system again (lol). --- hosts/delta/knot-resolver.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hosts/delta/knot-resolver.nix b/hosts/delta/knot-resolver.nix index 63ac112..55a01bc 100644 --- a/hosts/delta/knot-resolver.nix +++ b/hosts/delta/knot-resolver.nix @@ -45,10 +45,9 @@ "${config.security.acme.certs."caspervk.net".directory}/fullchain.pem", "${config.security.acme.certs."caspervk.net".directory}/key.pem" ) - -- Cache is stored in /var/cache/knot-resolver, which is mounted as - -- tmpfs. Allow using 90% of the partition for caching. + -- Cache is stored in /var/cache/knot-resolver, which is mounted as tmpfs -- https://knot-resolver.readthedocs.io/en/stable/daemon-bindings-cache.html - cache.size = math.floor(cache.fssize() * 0.9) + cache.size = 1.5 * GB -- The predict module helps to keep the cache hot by prefetching -- records. Any time the resolver answers with records that are about to -- expire, they get refreshed.