From 55050ec0e5ec6fc99af4ed7b23a2c64be5714304 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Tue, 23 Jul 2019 15:09:34 +0300 Subject: [PATCH] cache.conf: increase NXDOMAIN cache size and set min TTL to 300 --- etc/unbound/unbound.conf.d/cache.conf | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/etc/unbound/unbound.conf.d/cache.conf b/etc/unbound/unbound.conf.d/cache.conf index 6da912c0..342b9a98 100644 --- a/etc/unbound/unbound.conf.d/cache.conf +++ b/etc/unbound/unbound.conf.d/cache.conf @@ -1,7 +1,6 @@ # Increasing caching -# This has potential to increase memory usage to 100m under heavy usage, but -# I find that unlikely as almost everything is using so short TTLs and I am -# not enforcing higher minimum TTL (cache-min-ttl, defaults to 0). +# This has potential to increase memory usage to 110m under heavy usage, but +# I find that unlikely as almost everything is using so short TTLs # See also MEMORY CONTROL EXAMPLE in man unbound.conf server: @@ -9,3 +8,10 @@ server: msg-cache-size: 50m # bytes in rrset cache, defaults to 4m rrset-cache-size: 50m + # nxdomain cache, default 1m + neg-cache-size: 10m + # Cache results for 5 minutes even if they had a shorter TTL. Cloudflare + # zone export used to have 1 second, and I have also been seeing 1 + # minute in the wild, I think this shouldn't break anything, but bigger + # might. + cache-min-ttl: 300