Multiple named processes for bind9 in Debian

I’m running a name server using bind9 on Debian.

I noticed that there are multiple “named” processes running, when bind starts:

htop output

  • How can I limit this to n bind instances (processes)?
  • What is the recommended use of multiple bind processes? I know that bind is a relatively low intensive application in terms of CPU and network.
Asked By: Paulie-C

||

Depending on your distro there’s likely a configuration file that can contain the following switch to named, -n #cpus.

from the named man page

   -n #cpus
        Create #cpus worker threads to take advantage of multiple CPUs. If 
        not specified, named will try to determine the number of CPUs 
        present and create one thread per CPU. If it is unable to 
        determine the number of CPUs, a single worker thread will be
        created.

On Debian

$ sudo vi /etc/defaults/bind9

Append config line:

OPTIONS="-n 4"

Restart the server:

$ sudo service bind9 restart

On CentOS/Fedora

$ sudo vi /etc/sysconfig/named

To force bind to take advantage of 4 CPUs, add / modify as follows:

OPTIONS="-n 4"

Restart the service:

$ sudo service named restart

Referecnes

Answered By: slm
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.