From 0f0f3ae7dc5da502c1aaf4bb295778d7657a0af5 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 4 Mar 2020 21:11:52 +0000 Subject: [PATCH] unbound: Only launch one process MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When unbound is running multiple threads, we have observed that queries where sent for each thread. Since no user should have so much DNS traffic that more than one processor core is being saturated, this is a safe change. Signed-off-by: Peter Müller Signed-off-by: Arne Fitzenreiter Signed-off-by: Michael Tremer Signed-off-by: Arne Fitzenreiter --- src/initscripts/system/unbound | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/initscripts/system/unbound b/src/initscripts/system/unbound index c845c436f0..1cf26ec0e5 100644 --- a/src/initscripts/system/unbound +++ b/src/initscripts/system/unbound @@ -191,15 +191,6 @@ write_forward_conf() { write_tuning_conf() { # https://www.unbound.net/documentation/howto_optimise.html - # Determine number of online processors - local processors=$(getconf _NPROCESSORS_ONLN) - - # Determine number of slabs - local slabs=1 - while [ ${slabs} -lt ${processors} ]; do - slabs=$(( ${slabs} * 2 )) - done - # Determine amount of system memory local mem=$(get_memory_amount) @@ -234,16 +225,6 @@ write_tuning_conf() { ( config_header - # We run one thread per processor - echo "num-threads: ${processors}" - echo "so-reuseport: yes" - - # Adjust number of slabs - echo "infra-cache-slabs: ${slabs}" - echo "key-cache-slabs: ${slabs}" - echo "msg-cache-slabs: ${slabs}" - echo "rrset-cache-slabs: ${slabs}" - # Slice up the cache echo "rrset-cache-size: $(( ${mem} / 2 ))m" echo "msg-cache-size: $(( ${mem} / 4 ))m" -- 2.39.2