[Pdns-users] pdns-recursor: Only two threads used when threads=4

abang abang at t-ipnet.net
Fri Oct 21 08:28:57 UTC 2016

Hi Grace,

Since 3.7.0, Recursor distributes queries to the threads itself. See

Additional it hashes the queries with the goal to send the same query to 
the same thread. This improves the cache hit rate and thus the average 
latency and the overall performance.

I guess your query generator sends only 2 different queries (or more 
queries which lead to only 2 different hash results).


Am 21.10.2016 um 09:45 schrieb Øystein Viggen:
> Grace Wang <xiaohong.grace.wang at gmail.com> writes:
>>> I installed pdns-recursor 4.0.3 on a CentOS 6.5 box, that has 20 physical
>>> cores and 128G RAM. When I set the threads in /etc/pdns-recursor/
>>> recursor.conf to be 4 or 12, then issued tons of queries (one query sent
>>> multiple times using multiple dnsperf instances simultaneously) at it, I
>>> noticed only 2 of the threads were working actively, each using almost 100%
>>> CPU and ~90% CPU, respectively. The other threads were using 0% CPU.
> Could it be that pdns-recursor isn't optimized very well for serving the
> same same query at a very high rate?
> With about 2000 queries/second of real-world DNS traffic from servers
> and users, I'm seeing a good spread of the load over 24 threads on
> pdns-recursor 4.0.3.  (Ubuntu 16.04, if that matters).
> Øystein
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users

More information about the Pdns-users mailing list