• Share
  • Dark

Performance: Multi-threaded I/O

  • Updated on 20 Sep 2018
  • 1 minute to read
  • Contributors 

Starting in BIND 9.9.0, ISC has made some important changes regarding performance of BIND on multi-core machines.  Among these is internal scaling of network traffic.  This article describes this change.

This feature is not available on the Windows version of BIND 9.

This change is automatically enabled in threaded builds. To find out if you are using a threaded build, see Determining if you are using a threaded build.


Prior to BIND 9.9.0, all incoming packets on a socket were processed by one "listener task" per listen-on statement.

  options {

In this example, the socket for address port 53 would have one listener task, port 53 another, and a third listener task.


These listener tasks take the received query on a UDP socket and hands it out to a waiting "worker task."  

The problem with this approach is that on a machine with a large number of CPU cores available, one task per socket may not be enough.  A very common situation is to have server which listens mostly on one address, or perhaps two.  The one socket task quickly becomes saturated, causing one CPU core to reach nearly 100% utilization while the remaining cores are underutilized.

The Solution

ISC has altered the socket code to use multiple listener tasks per listen-on statement. Each listen-on line gets its own pool of listener and worker tasks.


With this change, a 4-core machine will have four listener tasks, each delivering work to any of the four worker tasks available.  The number of listener tasks (per listen-on statement) defaults to the number of detected CPU cores, but may be changed using a command-line option.


This change is automatically enabled.  You will see a line similar to "using 4 UDP listeners per interface" in your log file when this feature is in use.

You may also alter the number of listener tasks per socket by using the "-U" option.  You may decrease the number (down to one) but you may not increase it beyond the number of cores detected.

Problems with this site? Email us at marketing@isc.org