namebench – open source DNS benchmark

By | 2014/02/26

namebench is an open source DNS benchmark app. It is available in most repos of Linux distros. Here is a quick how-to!


1. On Debian or Ubuntu, install namebench:

$ sudo apt-get install namebench

2. Then run with tack x for a command line version:

$ namebench -x

At the very end, recommended DNS servers are suggested:

Recommended configuration (fastest + nearest):
----------------------------------------------
nameserver 156.154.70.1    # UltraDNS  
nameserver 74.207.242.5    # SYS-74.207.242.5  
nameserver 2600:3c01::2    # SYS-2600:3c01::2  



********************************************************************************
In this test, UltraDNS is 67.9%: Faster 
********************************************************************************

Example output:

stmiller@li166-66:~$ namebench -x
namebench 1.3.1 - best source (automatic) on 2014-02-26 07:14:03.324627
threads=40/2 queries=250 runs=1 timeout=3.5 health_timeout=3.75 servers=11
------------------------------------------------------------------------------
- Reading Top 2,000 Websites (Alexa): /usr/share/namebench/data/alexa-top-2000-domains.txt (0.7MB)
- Reading Cache Latency Test (100% hit): /usr/share/namebench/data/cache-hit.txt (0.1MB)
- Reading Cache Latency Test (100% miss): /usr/share/namebench/data/cache-miss.txt (0.1MB)
- Reading Cache Latency Test (50% hit, 50% miss): /usr/share/namebench/data/cache-mix.txt (0.1MB)
- Generating tests from Top 2,000 Websites (Alexa) (33575 records, selecting 250 automatic)
- Selecting 250 out of 33542 sanitized records (weighted mode).

- Checking query interception status...
- Checking connection quality: 1/3...3/3
- Congestion level is 0.57X (check duration: 22.98ms)
- Checking latest sanity reference
- Building initial DNS cache for 4519 nameservers (40 threads)
- Checking nameserver availability (40 threads): 0/4519.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................915..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................1819....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................2723..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................3627................................................................................................................................................................................................................................................................................................................................................................................................................................................................................4519/4519
- 1246 of 4519 servers are available (duration: 0:03:03.314467)
- Removing secondary nameservers slower than 8.38ms (max=400)
- Running initial health checks on 53 servers (35 threads): 0/53.......14..................50..53/53
- 51 of 53 tested name servers are healthy
- Making Google Public DNS-2 [74.125] the primary anycast - faster than Google Public DNS [74.125] by 11.26ms
- Making OpenDNS-2 [7.pao] the primary anycast - faster than OpenDNS [5.pao] by 2.40ms
- Making DynGuide [default] the primary anycast - faster than DynGuide-2 [default] by 4.21ms
- Making UltraDNS [4.31] the primary anycast - faster than UltraDNS-2 [212.72] by 123.32ms
- Picking 13 secondary servers to use (6 nearest, 7 fastest)
- OpenDNS-3 [208.67.222.220] appears to be the nearest regional (1.50ms)
- Waiting for wildcard cache queries from 22 servers (22 threads): 0/22...........22/22
- Waiting 4s for TTL's to decrement.
- Running cache-sharing checks on 22 servers (40 threads): 0/462..............................................................................155.............................................................................308.........................................................................453...xx.x.462/462
- Disabling SYS-2600:3c01::3 - slower replica of SYS-74.207.242.5 by 5.2ms.
- Disabling Level 3/GTEI-2 - slower replica of Genuity LC by 2.5ms.
- Disabling SYS-74.207.241.5 - slower replica of SYS-2600:3c01::2 by 5.5ms.
- Picking 4 secondary servers to use (2 nearest, 2 fastest)
- OpenDNS-3 [208.67.222.220] appears to be the nearest regional (1.50ms)
- Running final health checks on 11 servers (11 threads): 0/11......11/11
- All nameservers have warning: www.paypal.com is hijacked: www.paypal.com.akadns.net (likely a false positive)
- All nameservers have warning: www.facebook.com appears incorrect: star.c10r.facebook.com (likely a false positive)

Final list of nameservers considered:
------------------------------------------------------------------------------
205.171.3.25    Qwest Redirect US  11  ms | www.google.com is hijacked: 74.125.224.211, 74.125.224.208, 74.125.224.212, 74.125.224.209, 74.125.224.210, twitter.com appears incorrect: 199.59.150.7, 199.59.149.198, 199.59.148.10, NXDOMAIN Hijacking (www)
2001:470:20::2  Hurricane Electric 20  ms | www.google.com is hijacked: 74.125.239.116, 74.125.239.115, 74.125.239.112, 74.125.239.114, 74.125.239.113, twitter.com appears incorrect: 199.59.150.39, 199.59.148.10, 199.59.149.230
8.8.4.4         Google Public DNS- 21  ms | twitter.com appears incorrect: 199.59.148.10, 199.59.150.39, 199.59.150.7, www.google.com is hijacked: 74.125.28.106, 74.125.28.99, 74.125.28.104, 74.125.28.147, 74.125.28.105, 74.125.28.103
4.2.2.6         Genuity LC         23  ms | twitter.com appears incorrect: 199.59.149.230, 199.59.150.39, 199.59.148.10, www.google.com is hijacked: 74.125.239.112, 74.125.239.114, 74.125.239.113, 74.125.239.115, 74.125.239.116, Replica of Level 3/GTEI-2 [4.2.2.2]
2600:3c01::2    SYS-2600:3c01::2   26  ms | Replica of SYS-74.207.241.5 [74.207.241.5], www.google.com is hijacked: 74.125.129.104, 74.125.129.99, 74.125.129.147, 74.125.129.106, 74.125.129.105, 74.125.129.103, twitter.com appears incorrect: 199.59.150.39, 199.59.148.10, 199.59.149.198
156.154.70.1    UltraDNS           29  ms | NXDOMAIN Hijacking, www.google.com is hijacked: 173.194.127.241, 173.194.127.243, 173.194.127.242, 173.194.127.244, 173.194.127.240, google.com appears incorrect: 173.194.127.224, 173.194.127.229, 173.194.127.231, 173.194.127.232, 173.194.127.230, 173.194.127.227, 173.194.127.233, 173.194.127.238, 173.194.127.226, 173.194.127.228, 173.194.127.225, twitter.com appears incorrect: 199.59.150.39, 199.59.149.230, 199.59.149.198
216.146.35.35   DynGuide           31  ms | www.google.com is hijacked: 74.125.224.179, 74.125.224.178, 74.125.224.180, 74.125.224.176, 74.125.224.177, NXDOMAIN Hijacking, twitter.com appears incorrect: 199.59.149.198, 199.59.150.39, 199.59.149.230
74.207.241.5    SYS-74.207.241.5   34  ms | (excluded: Slower replica of SYS-2600:3c01::2 [2600:3c01::2])
74.207.242.5    SYS-74.207.242.5   34  ms | www.google.com is hijacked: 74.125.239.145, 74.125.239.144, 74.125.239.148, 74.125.239.146, 74.125.239.147, Replica of SYS-2600:3c01::3 [2600:3c01::3], twitter.com appears incorrect: 199.59.150.7, 199.59.149.198, 199.59.148.10
208.67.222.222  OpenDNS-2          35  ms | www.google.com is hijacked: 74.125.239.145, 74.125.239.144, 74.125.239.148, 74.125.239.147, 74.125.239.146, twitter.com appears incorrect: 199.59.149.230, 199.59.148.10, 199.59.150.39
208.67.222.220  OpenDNS-3          36  ms | www.google.com is hijacked: 74.125.239.145, 74.125.239.148, 74.125.239.146, 74.125.239.144, 74.125.239.147, twitter.com appears incorrect: 199.59.149.230, 199.59.149.198, 199.59.148.10
2600:3c01::3    SYS-2600:3c01::3   37  ms | (excluded: Slower replica of SYS-74.207.242.5 [74.207.242.5])
208.67.220.220  OpenDNS            59  ms | www.google.com is hijacked: 74.125.239.145, 74.125.239.146, 74.125.239.147, 74.125.239.148, 74.125.239.144, twitter.com appears incorrect: 199.59.148.10, 199.59.149.230, 199.59.150.7

- Sending 250 queries to 11 servers: 0/2750....................................................................................................................................................................................................................................................................................................552....................................................................................................................................................................................................................................................................................................1103...........................................................................................................................................................................................................................................................................................................1664......................................................................................................................................................................................................................................................................................................2221..........................................................................................................................................................................................................................................................................................2750/2750

Fastest individual response (in milliseconds):
----------------------------------------------
SYS-74.207.242.5 #### 0.62799
SYS-2600:3c01::2 ##### 0.83995
OpenDNS-2        ####### 1.22023
OpenDNS          ####### 1.28007
OpenDNS-3        ####### 1.28794
Qwest Redirect U ####### 1.33801
Hurricane Electr ######## 1.60384
Genuity LC       ######### 1.72496
UltraDNS         ########## 1.87111
Google Public DN ############ 2.28691
DynGuide         ##################################################### 10.76698

Mean response (in milliseconds):
--------------------------------
UltraDNS         ######################### 88.15
Google Public DN ############################ 99.72
Qwest Redirect U ################################# 119.49
Genuity LC       ################################# 119.54
DynGuide         #################################### 129.36
SYS-2600:3c01::2 ###################################### 136.51
SYS-74.207.242.5 ######################################### 147.99
OpenDNS-2        ########################################### 156.86
OpenDNS          ################################################ 173.37
OpenDNS-3        ################################################# 177.33
Hurricane Electr ##################################################### 194.32

Response Distribution Chart URL (200ms):
----------------------------------------
http://chart.apis.google.com/chart?cht=lxy&chs=720x415&chxt=x,y&chg=10,20&chxr=0,0,200|1,0,100&chd=t:0,0,1,2,5,9,15,20,38,46,59,71,80,93,111|0,0,36,43,47,50,54,58,62,66,70,74,78,82,85|0,0,1,2,7,13,25,36,39,55,70,75,92,105|0,0,40,44,48,52,56,59,63,66,70,74,78,82|0,5,6,7,8,8,13,21,23,35,40,43,59,68,88,117|0,0,4,12,42,47,51,54,58,62,66,70,74,77,81,84|0,1,2,12,12,13,17,32,69,102|0,0,38,65,74,79,82,86,90,93|0,1,2,2,3,4,7,9,14,15,21,32,43,63,77,83,94,108|0,0,24,29,34,38,42,46,50,54,57,61,64,68,72,75,79,82|0,1,1,2,9,11,33,41,56,78,88,104|0,0,49,54,58,63,67,70,74,78,82,85|0,1,2,2,3,17,42,82,117|0,0,42,73,78,83,86,90,94|0,1,2,2,4,13,24,34,38,53,64,79,91,118|0,0,42,50,54,58,62,66,71,75,78,82,86,90|0,1,1,2,10,12,28,36,53,74,83,105|0,0,46,50,54,58,62,66,70,73,77,80|0,1,1,2,10,12,33,39,55,75,85,120|0,0,48,52,57,62,66,69,73,76,80,84|0,1,1,2,4,6,14,41,61,81,105|0,0,48,59,64,68,72,76,79,83,86&chco=ff9900,1a00ff,ff00e6,80ff00,00e6ff,fae30a,BE81F7,9f5734,000000,ff0000,3090c0&chxt=x,y,x,y&chxl=2:||Duration+in+ms||3:||%25|&chdl=SYS-2600%3A3c01%3A%3A2|SYS-74.207.242.5|DynGuide|Google+Public+DNS-2|Hurricane+Electric+IPv6|OpenDNS-2|UltraDNS|Genuity+LC|OpenDNS|OpenDNS-3|Qwest+Redirect+US

Response Distribution Chart URL (Full):
---------------------------------------
http://chart.apis.google.com/chart?cht=lxy&chs=720x415&chxt=x,y&chg=10,20&chxr=0,0,3500|1,0,100&chd=t:0,0,0,0,0,0,1,1,2,3,3,4,5,5,6,7,10,16,100|0,0,36,43,47,50,54,58,62,66,70,74,78,82,85,89,93,96,100|0,0,0,0,0,1,1,2,2,3,4,4,5,6,7,8,11,16,100|0,0,40,44,48,52,56,59,63,66,70,74,78,82,85,89,92,96,100|0,0,0,0,0,0,1,1,1,2,2,2,3,4,5,7,8,9,14,33,100|0,0,4,12,42,47,51,54,58,62,66,70,74,77,81,84,88,92,95,99,100|0,0,0,1,1,1,1,2,4,6,9,100|0,0,38,65,74,79,82,86,90,93,97,100|0,0,0,0,0,0,0,0,1,1,1,2,2,4,4,5,5,6,7,10,21,72,100|0,0,24,29,34,38,42,46,50,54,57,61,64,68,72,75,79,82,87,91,95,98,100|0,0,0,0,1,1,2,2,3,4,5,6,7,10,25,100|0,0,49,54,58,63,67,70,74,78,82,85,89,92,96,100|0,0,0,0,0,1,2,5,7,11,100|0,0,42,73,78,83,86,90,94,97,100|0,0,0,0,0,1,1,2,2,3,4,4,5,7,8,15,100|0,0,42,50,54,58,62,66,71,75,78,82,86,90,93,97,100|0,0,0,0,1,1,2,2,3,4,5,6,7,8,10,21,55,100|0,0,46,50,54,58,62,66,70,73,77,80,84,88,91,95,98,100|0,0,0,0,1,1,2,2,3,4,5,7,8,15,18,49,100|0,0,48,52,57,62,66,69,73,76,80,84,87,91,94,98,100|0,0,0,0,0,0,1,2,3,5,6,7,11,23,100|0,0,48,59,64,68,72,76,79,83,86,90,94,97,100&chco=ff9900,1a00ff,ff00e6,80ff00,00e6ff,fae30a,BE81F7,9f5734,000000,ff0000,3090c0&chxt=x,y,x,y&chxl=2:||Duration+in+ms||3:||%25|&chdl=SYS-2600%3A3c01%3A%3A2|SYS-74.207.242.5|DynGuide|Google+Public+DNS-2|Hurricane+Electric+IPv6|OpenDNS-2|UltraDNS|Genuity+LC|OpenDNS|OpenDNS-3|Qwest+Redirect+US

Recommended configuration (fastest + nearest):
----------------------------------------------
nameserver 156.154.70.1    # UltraDNS  
nameserver 74.207.242.5    # SYS-74.207.242.5  
nameserver 2600:3c01::2    # SYS-2600:3c01::2  



********************************************************************************
In this test, UltraDNS is 67.9%: Faster 
********************************************************************************


- Saving report to /tmp/namebench_2014-02-26_0721.html
- Saving detailed results to /tmp/namebench_2014-02-26_0721.csv
stmiller@li166-66:~$ 



Note the cool use of google’s chart api in the results!

01-namebench 02-namebench

Hack on,