How to Benchmark or check the speed of your DNS Server on Linux?

Updated on September 3, 2017

If you are a regular follower of Techglimpse, then by this time you must be aware of What is DNS, How it works and how to find out IP address of DNS configured on your PC and how to change or switch to public DNS. Before changing the DNS server, you must know the speed of your current DNS server compared to other DNS servers. It means, a comparison of DNS server will be a better starting point before migrating to a different DNS service.

If you are using Linux machine, then an open source package called namebench can help you to compare the speeds of various DNS servers. We’ll see how to do that,

How to test the speed of various DNS Servers? – DNS Benchmarking

On Debian, Ubuntu:

sudo apt-get install python-tk
wget http://namebench.googlecode.com/files/namebench-1.3.1-source.tgz
tar xvzf namebench-1.3.1-source.tgz
cd namebench-1.3.1
./namebench.py

On Redhat or Fedora Linux:

yum install tkinter
wget http://namebench.googlecode.com/files/namebench-1.3.1-source.tgz
tar xvzf namebench-1.3.1-source.tgz
cd namebench-1.3.1
./namebench.py

Namebench will read Alexa’s Top 2000 websites, Cache Latency Tests, checks connection quality, building initial DNS cache for 4516 name servers, and checks for available DNS for comparision.

Sample Output is here:

[root@catest namebench-1.3.1]# ./namebench.py
namebench 1.3.1 - best source (automatic) on 2013-10-10 14:35:57.084687
threads=40/2 queries=250 runs=1 timeout=3.5 health_timeout=3.75 servers=11
------------------------------------------------------------------------------
- Reading Top 2,000 Websites (Alexa): data/alexa-top-2000-domains.txt (0.7MB)
- Reading Cache Latency Test (100% hit): data/cache-hit.txt (0.1MB)
- Reading Cache Latency Test (100% miss): data/cache-miss.txt (0.1MB)
- Reading Cache Latency Test (50% hit, 50% miss): data/cache-mix.txt (0.1MB)
- Generating tests from Top 2,000 Websites (Alexa) (33575 records, selecting 250
- Selecting 250 out of 33542 sanitized records (weighted mode).

- Checking query interception status...
- Checking connection quality: 1/3...3/3
- Congestion level is 38.53X (check duration: 1541.33ms)
- Applied 4.50X timeout multiplier due to congestion: 2.2 ping, 16.9 health.
- Checking latest sanity reference
- Building initial DNS cache for 4516 nameservers (40 threads)
- Checking nameserver availability (40 threads): 0/4516

This should take few minutes (depending upon your system configuration) and then you’ll find the benchmark details as below,

Fastest individual response (in milliseconds):
----------------------------------------------
SYS-10.180.0.11 # 2.58803
DWL IN ######## 25.52795
Tatanova Mumbai ######### 27.31919
Tatanova IN ######### 28.43690
PaceNet IN ############### 48.16890
BSNL Broadband 1 #################### 62.51216
Cyberec-2 HK ############################ 89.13994
OpenDNS #################################### 114.25090
newttidc HK ######################################## 128.93414
DynGuide-2 ############################################ 141.72506
UltraDNS ##################################################### 171.75198

Mean response (in milliseconds):
--------------------------------
Tatanova Mumbai ############## 317.84
DWL IN ################ 357.67
UltraDNS ################ 373.97
OpenDNS ################## 410.44
DynGuide-2 ################### 441.36
newttidc HK ##################### 474.57
Cyberec-2 HK ###################### 510.87
PaceNet IN ######################## 552.91
SYS-10.180.0.11 ######################### 583.77
BSNL Broadband 1 ############################################# 1048.22
Tatanova IN ##################################################### 1245.82

Namebench will also tell you the fastest DNS server among the tested ones,

Recommended configuration (fastest + nearest):
----------------------------------------------
nameserver 203.124.230.12  # Tatanova Mumbai IN
nameserver 10.180.0.11     # SYS-10.180.0.11
nameserver 202.148.202.3   # DWL IN

********************************************************************************
In this test, Tatanova Mumbai IN is 83.7%: Faster
********************************************************************************

- Saving report to /tmp/namebench_2013-10-10_1522.html
- Saving detailed results to /tmp/namebench_2013-10-10_1522.csv

Once the test is done, namebench will save the reports in .csv and HTML formats.

To view graphical reports, copy the ‘namebench_2013-10-10_1522.html‘ to your web server or open it in your favorite web browser.

cp namebench_2013-10-10_1522.html /var/www/html/namebench.html

Sample graphical reports:

DNS server benchmark
DNS server benchmark
DNS Server Benchmark
DNS Server Benchmark

 

DNS Server Benchmark
DNS Server Benchmark

Was this article helpful?

Related Articles

Leave a Comment