Bind9.16 spins up more cpu threads than set
Summary
Bind9.16 spins up more cpu threads than set using -n
parameter
BIND version used
BIND 9.16.31 (Extended Support Version)
Steps to reproduce
Start bind with an explicit number of workers/threads set with -n
parameter
What is the current bug behavior?
as per documentation
-n ncpus This option specifies the number of threads to use. By default, one thread is started for each detected CPU.
while starting bind with 2 thread eg. named -n 2
6 threads are created instead of 2. (and +1 more if high recursion quota is set in https://github.com/isc-projects/bind9/blob/main/bin/named/server.c#L8597
What is the expected correct behavior?
Based on the documentation this number should match the number of threads set using -n
parameter while it doesn't
Relevant configuration files
N/A
Relevant logs and/or screenshots
N/A
Possible fixes
I believe the documentation is outdated in relation to -n
parameter as based on the code, since netmgr was moved to libuv bind spins up at least double number of workers https://github.com/isc-projects/bind9/blob/main/bin/named/server.c#L3812 for netmgr only