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


Active Member

Reaction score: 3
Messages: 170

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
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.



Reaction score: 521
Messages: 1,399

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