]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
unbound: Only launch one process
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 4 Mar 2020 21:11:52 +0000 (21:11 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 4 Mar 2020 21:47:23 +0000 (21:47 +0000)
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 <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/system/unbound

index c845c436f037cca1aca05959a7448b66ca248e80..1cf26ec0e5df089c4d20c27d8dd906d1e80a3835 100644 (file)
@@ -191,15 +191,6 @@ write_forward_conf() {
 write_tuning_conf() {
        # https://www.unbound.net/documentation/howto_optimise.html
 
 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)
 
        # Determine amount of system memory
        local mem=$(get_memory_amount)
 
@@ -234,16 +225,6 @@ write_tuning_conf() {
        (
                config_header
 
        (
                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"
                # Slice up the cache
                echo "rrset-cache-size: $(( ${mem} / 2 ))m"
                echo "msg-cache-size: $(( ${mem} / 4 ))m"