DNSPod / dnspod-sr

A faster recursive dns server from DNSPod
Other
1.36k stars 328 forks source link

CPU一定要双核以上? #32

Closed chestermax01 closed 9 years ago

chestermax01 commented 9 years ago

运行的时候显示 set affinity fetcher failed, may be the cpu cores num less than (FETCHER_NUM + QUIZZER_NUM + 1)

低配机器有没有办法跑?

chzyer commented 9 years ago

我看了代码,你试试改一下src/author.h

enum {
    FETCHER_NUM = 2,
    SERVER_PORT = 53,
};

实际上就是强制fetcher跑在0和1两个CPU上,没有双核实际上还是可以跑,只是强制把第二个线程强制在CPU1这个失败了,还是会跑在CPU0上面。

jfb8856606 commented 9 years ago

谢谢楼上的解答,绑定CPU亲和性失败并不影响实际运行,只是之后的线程没有与CPU进行绑定。