Solved What does the parameter num-threads in unbound.conf mean?

It is described in the Unbound official documentation unbound.conf:

num-threads: <number>
The number of threads to create to serve clients. Use 1 for no
threading.

I understand it as the number of threads in a cpu.


But it is described in the unbound official guide "Howto Optimise":

Set num-threads equal to the number of CPU cores on the system. E.g. for 4 CPUs with 2 cores each, use 8.


So is it the number of threads or cores? Assume that the number of cores is not the same as the number of threads.
 
I understand it as the number of threads in a cpu

Not really, this setting doesn’t have anything to do with the cpu. It’s the number of software threads that you want unbound to create. You could quite easily have 8 software threads but only 1 single core cpu; that would probably be detrimental to performance though as the os would waste time switching between them.

According to the quote from their optimisation page, they seem to suggest you should set one software thread per cpu core.
 
  • Thanks
Reactions: sdf
Back
Top