Debian 中 bind9 的多个命名进程

PdC*_*PdC 5 debian bind9

我正在bind9Debian 上运行名称服务器。

我注意到有多个“命名”进程在运行,bind启动时:

输出

  • 如何将其限制为 n 个bind实例(进程)?
  • bind进程的推荐用途是什么?我知道bind就 CPU 和网络而言,这是一个相对较低的密集型应用程序。

slm*_*slm 4

根据您的发行版,可能有一个配置文件包含以下到named,的开关-n #cpus

从指定的手册页

   -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.
Run Code Online (Sandbox Code Playgroud)

在 Debian 上

$ sudo vi /etc/defaults/bind9
Run Code Online (Sandbox Code Playgroud)

追加配置行:

OPTIONS="-n 4"
Run Code Online (Sandbox Code Playgroud)

重新启动服务器:

$ sudo service bind9 restart
Run Code Online (Sandbox Code Playgroud)

在 CentOS/Fedora 上

$ sudo vi /etc/sysconfig/named
Run Code Online (Sandbox Code Playgroud)

要强制bind利用4个CPU,请添加/修改如下:

OPTIONS="-n 4"
Run Code Online (Sandbox Code Playgroud)

重新启动服务:

$ sudo service named restart
Run Code Online (Sandbox Code Playgroud)

参考文献