From 91c936b66782c73a5206f823a1a6c21002b9f3da Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 31 Oct 2024 11:39:57 +0100 Subject: [PATCH] unbound: Performance tweaks --- machines/valkyrie/unbound/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/machines/valkyrie/unbound/default.nix b/machines/valkyrie/unbound/default.nix index d0cb2bb..0e9815b 100644 --- a/machines/valkyrie/unbound/default.nix +++ b/machines/valkyrie/unbound/default.nix @@ -56,11 +56,18 @@ # Set cache size. rrset-cache-size should be twice what msg-cache-size is rrset-cache-size = "256m"; msg-cache-size = "128m"; - msg-cache-slabs = 4; + msg-cache-slabs = 16; + rrset-cache-slabs = 16; + infra-cache-slabs = 16; + key-cache-slabs = 16; # 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. - num-threads = 2; + num-threads = 16; + + # Increase number of queries per request and the number of ports + outgoing-range = 8192; + num-queries-per-thread = 4096; # Leave sections that are not requested out of the response message # Reduces response message significantly and may prevent TCP fallback