Chinaunix

标题: BIND 如何开启bind Thread-Model BIND 需要命令来打开支持多核CPU么? [打印本页]

作者: goldgod2004    时间: 2009-06-20 23:43
标题: BIND 如何开启bind Thread-Model BIND 需要命令来打开支持多核CPU么?
请问各位:

谢谢大家了,我用的是BIND 9.6 装在REDHAT as5.3上,但用TOP命令查看确只有一个CPU在使用(我用的是双XEON2.5四核的服务器)
BIND 如何开启bind Thread-Model BIND ?
需要什么命令来打开BIND支持多核CPU么?还是只呢这样?



top - 23:44:14 up 10 days,  4:43,  1 user,  load average: 0.01, 0.03, 0.00
Tasks: 166 total,   1 running, 165 sleeping,   0 stopped,   0 zombie
Cpu0  :  3.3%us,  0.7%sy,  0.0%ni, 95.3%id,  0.0%wa,  0.0%hi,  0.7%si,  0.0%st
Cpu1  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  0.3%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4147780k total,  1660168k used,  2487612k free,   233092k buffers
Swap:  5144568k total,        0k used,  5144568k free,  1143668k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                               
5341 root      15   0  130m 126m 2424 S  4.0  3.1 390:05.30 named                                                                  
23547 root      15   0  2328 1064  804 R  0.3  0.0   0:00.05 top                                                                    
    1 root      15   0  2064  592  516 S  0.0  0.0   0:03.21 init                                                                  
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.05 migration/0                                                            
    3 root      39  19     0    0    0 S  0.0  0.0   0:00.51 ksoftirqd/0                                                            
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0                                                            
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.06 migration/1                                                            
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/1
作者: cadeerty    时间: 2009-06-21 14:50
你可以运行rndc status看看bind启动了几个线程,一般情况下bind发现几个cpu就会启动几个线程。
CPUs found: ?
worker threads: ?
作者: goldgod2004    时间: 2009-06-21 15:59
请看看我的RNDC的结果:
[root@dns1 /]# /usr/local/named/sbin/rndc status
version: 9.6.0-P1 (1)
number of zones: 7
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 56/0/1000
tcp clients: 0/100
server is up and running


好像没你说的???:(
作者: goldgod2004    时间: 2009-06-22 08:12
感谢 cadeerty  的提示,问题已经解决。原因为BIND软件版本问题!
作者: cadeerty    时间: 2009-06-22 08:40
呵呵,解决了就好。
应该是你configure的时候没加enable-threads参数来开启多线程支撑。
作者: llzqq    时间: 2009-06-22 12:48
如果编译的BIND时启用了线程支持,启动NAMED时加“-n”参数即可。


       -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.




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2