5

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.
2
  • what do you mean by How can I configure this to n bind processes? do you want bind to run n different processes
    – Nidal
    Commented Jul 6, 2014 at 12:05
  • Yes exactly. To limit bind/named to n number of instances. Commented Jul 6, 2014 at 12:08

1 Answer 1

4

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

2
  • Perfect, thanks. It seems that by default my bind9 installation (BIND 9.8.4-rpz2+rl005.12-P1) uses all available processors by default. Also, are there any guidelines as for optimal configuration of bind9 (in terms of processor usage)? Commented Jul 8, 2014 at 6:26
  • 1
    @PdC - I've seen no guidelines, I use CentOS/Fedora and typically let it go with the defaults there. I checked and my CentOS install does not limit the CPUs using the above. Curiously I only have 1 process running for my named daemon. I'm running bind 9.3 in this particular case and have an entire domain of systems querying against it. Given this I would set it to something low and then ratchet it up from there if needed.
    – slm
    Commented Jul 8, 2014 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .