Phyber has long maintained djbdns tinydns authoritative name servers. The simplicity of the design and the near fool proof replication model (with zero backend dependance) has made tinydns an ideal nameserver. Unfortunately djbdns has not seen a new release in years (although there is a healthy amount of patches available for it) and has for the most part sat idle. During the same period of time Phyber has also maintained a set of PowerDNS name servers used to slave zones from BIND and Active Directory masters. This dual server setup has run without issue and has never presented a reason for change.
Earlier this week during a casual geek out conversation with a friend the subject of name servers came up. I made reference to a benchmark I ran almost three years ago to determine if there was a compelling reason to use one software package vs another:
My friend made a bet that performance must be different now, and I accepted the challenge. First up tinydns…
mclark@people[~/dnsperf]% dnsperf -d input_file -s tinydns -l 60 DNS Performance Testing Tool Nominum Version 1.0.1.0 [Status] Processing input data [Status] Sending queries (to tinydns) [Status] Testing complete Statistics: Parse input file: multiple times Run time limit: 60 seconds Ran through file: 222035 times Queries sent: 888143 queries Queries completed: 888143 queries Queries lost: 0 queries Avg request size: 31 bytes Avg response size: 94 bytes Percentage completed: 100.00% Percentage lost: 0.00% Started at: Wed Aug 18 22:30:13 2010 Finished at: Wed Aug 18 22:31:13 2010 Ran for: 60.001358 seconds Queries per second: 14802.048314 qps
tinydns faired much better in this test mainly thanks to the use of the one.second.patch – a performance increase of over 200%.
The big surprise however came with powerdns…
mclark@people[~/dnsperf]% dnsperf -d input_file -s powerdns -l 60 DNS Performance Testing Tool Nominum Version 1.0.1.0 [Status] Processing input data [Status] Sending queries (to powerdns) [Timeout] Query timed out: msg id 0 [Status] Testing complete Statistics: Parse input file: multiple times Run time limit: 60 seconds Ran through file: 717113 times Queries sent: 2868456 queries Queries completed: 2868455 queries Queries lost: 1 queries Avg request size: 31 bytes Avg response size: 53 bytes Percentage completed: 100.00% Percentage lost: 0.00% Started at: Wed Aug 18 22:31:37 2010 Finished at: Wed Aug 18 22:32:37 2010 Ran for: 60.000499 seconds Queries per second: 47807.185737 qps
This is a performance increase of 600% over the previous benchmark, and more importantly represents more than 300% performance gain over our existing tinydns installation.
Both servers qps numbers are comical when you consider our average query load is under 200 qps, but this difference presents a compelling reason to consolidate our nameservers into a single PowerDNS installation.