DNS Load Testing Results
Years ago I stopped running BIND as an Authoritative Name Server within my sites – initially this was for security reasons but was quickly eclipsed for maintainability. After running almost every alternate DNS software available we've ended up running a mix of PowerDNS and BIND (BIND sneaked back in because of $GENERATE is just to convenient for in-addr.arpa domains). We are running PowerDNS against a Master -> Slave MySQL backend configuration and even though the maintainability is super easy (what could be better than a web interface to a SQL backend) I've always been a little paranoid about the potential loss of the DB backend and the loss of our DNS services as a result. I've always personally liked the simplicity of Tinydns from DJBDNS but the assumed performance loss on my part has always kept me at bay. Well today I broke down and ran some benchmarks. You could say that the results surprised me a little…
The first test is tinydns-1.05
> ./queryperf -d inputfile -s 207.171.12.31 DNS Query Performance Testing Tool Version: $Id: queryperf.c,v 1.8.192.3 2005/10/29 00:21:12 jinmei Exp $ [Status] Processing input data [Status] Sending queries (beginning with 207.171.12.31) [Status] Testing complete Statistics: Parse input file: once Ended due to: reaching end of file Queries sent: 600000 queries Queries completed: 600000 queries Queries lost: 0 queries Queries delayed(?): 0 queries RTT max: 0.087436 sec RTT min: 0.000055 sec RTT average: 0.002845 sec RTT std deviation: 0.000680 sec RTT out of range: 0 queries Percentage completed: 100.00% Percentage lost: 0.00% Started at: Tue Nov 20 15:29:18 2007 Finished at: Tue Nov 20 15:30:44 2007 Ran for: 85.816039 seconds Queries per second: 6991.700001 qps
Note: Tinydns is running with a 150 MByte data.cdb
The second test is PowerDNS 2.9.21 w/ MySQL:
> ./queryperf -d inputfile -s 207.171.11.22 DNS Query Performance Testing Tool Version: $Id: queryperf.c,v 1.8.192.3 2005/10/29 00:21:12 jinmei Exp $ [Status] Processing input data [Status] Sending queries (beginning with 207.171.11.22) [Status] Testing complete Statistics: Parse input file: once Ended due to: reaching end of file Queries sent: 600000 queries Queries completed: 600000 queries Queries lost: 0 queries Queries delayed(?): 0 queries RTT max: 0.086546 sec RTT min: 0.000401 sec RTT average: 0.002508 sec RTT std deviation: 0.000601 sec RTT out of range: 0 queries Percentage completed: 100.00% Percentage lost: 0.00% Started at: Tue Nov 20 15:32:11 2007 Finished at: Tue Nov 20 15:33:26 2007 Ran for: 75.741798 seconds Queries per second: 7921.649813 qps
The last test is BIND 9.3.3:
> ./queryperf -d input2 -s 207.171.11.32 DNS Query Performance Testing Tool Version: $Id: queryperf.c,v 1.8.192.3 2005/10/29 00:21:12 jinmei Exp $ [Status] Processing input data [Status] Sending queries (beginning with 207.171.11.32) [Timeout] Query timed out: msg id 60619 [Status] Testing complete Statistics: Parse input file: once Ended due to: reaching end of file Queries sent: 600000 queries Queries completed: 599999 queries Queries lost: 1 queries Queries delayed(?): 0 queries RTT max: 3.932287 sec RTT min: 0.000397 sec RTT average: 0.001155 sec RTT std deviation: 0.007110 sec RTT out of range: 0 queries Percentage completed: 100.00% Percentage lost: 0.00% Started at: Tue Nov 20 15:36:26 2007 Finished at: Tue Nov 20 15:37:02 2007 Ran for: 35.493465 seconds Queries per second: 16904.492137 qps
Needless to say I was impressed (and encouraged) to see that Tinydns wasn't much slower than PowerDNS in our configuration. However I was blown away that BIND ran twice as fast! I have some serious investigation to do and some further testing. I wonder what tinydns would look like against an SSD or RAMDISK.