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.
polym
  • 10,672
  • 9
  • 41
  • 65
Paulie-C
  • 231
  • 2
  • 10

1 Answers1

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

slm
  • 363,520
  • 117
  • 767
  • 871
  • 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)? – Paulie-C Jul 08 '14 at 06: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 Jul 08 '14 at 06:31