From aafe70122dfca1d45bcf5b7351558d07d086153d Mon Sep 17 00:00:00 2001 From: Gerd Date: Tue, 9 Aug 2022 08:10:51 +0200 Subject: [PATCH] Add performance settings to unbound.conf The added settings increase the performance. I have tried a lot and these settings offer a significant improvement. Update unbound.conf Reduce cache size --- rootfs_overlay/etc/unbound/unbound.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rootfs_overlay/etc/unbound/unbound.conf b/rootfs_overlay/etc/unbound/unbound.conf index f2317d5..8694083 100644 --- a/rootfs_overlay/etc/unbound/unbound.conf +++ b/rootfs_overlay/etc/unbound/unbound.conf @@ -74,6 +74,9 @@ server: # This only applies to domains that have been frequently queried prefetch: yes + # Fetch DS records earlier (DNSSEC): more cpu usage, less latency + prefetch-key: yes + # One thread should be sufficient, can be increased on beefy machines. # In reality for most users running on small networks or on a single machine, # it should be unnecessary to seek performance enhancement by increasing num-threads above 1. @@ -83,6 +86,15 @@ server: # (requires CAP_NET_ADMIN or privileged) # so-rcvbuf: 1m + # Increase cache size to utilize more RAM + msg-cache-size: 64m + rrset-cache-size: 128m + + # This attempts to reduce latency by serving the outdated record before + # updating it instead of the other way around + # Default: cache-min-ttl: 0 + serve-expired: yes + # The netblock is given as an IP4 or IP6 address with /size appended for a # classless network block. The action can be deny, refuse, allow or allow_snoop. access-control: 127.0.0.1/32 allow