[Pdns-users] PowerDNS Recursor Performance and Tuning
otto at drijf.net
Sun Jan 16 08:05:55 UTC 2022
On Sun, Jan 16, 2022 at 09:39:01AM +0330, Hamed Haghshenas via Pdns-users wrote:
> Hello Dears,
> I install PowerDNS Recursor 4.6.0 on CentOS Linux release 7.9.2009. and
> configure it as bellow for Iran IP address. I want use it in my ISP
> environment for large scale and lots of DNS requests.
A more modern distribution might be better. What do you call lots?
> My Server have 4 core 2.6 Ghz (x64) and 8GB Ram (KVM Virtualization), I can
> apply more cpu or ram.
If you have 8G of RAM, likely the default cache sizes could be
enlarged (max-cache-entries for the record cache and
max-packetcache-entries for the packet cache)
Virtulization *could* be an issue, for example when the network
interface is virtualized in a way thet hinders performance.
> Could you please help me that is my configuration correct? How many
> distributor-threads and threads should I use? (same as number of cpu cores
> or more).
Some comments inline below.
> Need something to change, or any kernel optimization ?
> local-address=127.0.0.1 172.16.1.186
If you are using NAT: this *kills* the performance. See
Depending on kernel version and other factors resuseports and multiple
distributor thread might work better or not, best to start with
reuserport=no and distributor-threads=1, test & measure and then
change to yes and 4 and compare performance on your actual setup.
If you see a lot ot bogus results this might impact performance
This is likely slow, better use the default setting (leave it out).
This amount of logging will kill performance
You might want to reduce it to 3 if you use 1 distribnutor thread, as
the total number of threads doing lots of work is distributor threads +
worker threads. This is depedent on your cach hit ratios. Again:
try and measure.
More information about the Pdns-users