Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm considering Google's public DNS servers as the external DNS for my network. Currently I'm using the DNS servers from my ISP. I've also considered OpenDNS in the past, but ultimately decided not to jump.

I'd like to be able to benchmark how quickly the respective servers are able to serve our DNS requests. I see nothing in nslookup that would help.

How can I test the round-trip times for externally provided DNS?

share|improve this question
up vote 5 down vote accepted

You can use a packet capture program (filtering for DNS) to track the DNS query\response times. You can run this on your machine or on your internal DNS server (if you have one). All things being more or less equal, this should give you a general idea of how quickly Google DNS is compared to your ISP.

share|improve this answer
Wireshark's DNS dissector does request/response tracking. The "dns.time" display filter can be used to find the response time. – Gerald Combs Dec 14 '09 at 16:28
@Gerald: Thanks for the info. – joeqwerty Dec 14 '09 at 17:11

dig @ | grep "Query time:"

;; Query time: 15 msec

dig @ | grep "Query time:"

;; Query time: 289 msec

share|improve this answer

Use GRC's Domain Name Speed Benchmark.

share|improve this answer
I checked out this tool... it rocks! – Mike L Dec 4 '09 at 19:08
I tried GRC's Benchmark after running Google's namebench. Google's said it's own was 21.1% faster than other's. However GRC's customized list w/added showed google's was one of the slowest and only marginally faster than my current DNS provided by Comcast. The fastest were all from Level 3 Communications. I trust GRC's DNS Benchmark over Google's now. And GRC's is written in assembly and runs from a single 184k file. Impressive! – Brian Boatright Feb 9 '12 at 4:58

I also took a look at namebench - Google's Open Source DNS Benchmark Utility. It was very comprehensive.

share|improve this answer

I have done some basic benchmarks between OpenDNS and GoogleDNS. The results suggest that the OpenDNS offering is consistently faster than Google's DNS service:

share|improve this answer

Firebug plugin for Firefox and IE has a "net" tab that gives you a graphical representation of load time for every file request.

It breaks it down into activity including DNS lookups, which are shown in green.

share|improve this answer

The simple shell script can be used for that:

% qtest -n3 "A"  

Here,, a local resolver, is faster, followed by the ISP resolver, then OpenDNS.

share|improve this answer
+1 useful script – mezgani Dec 17 '09 at 11:43

You can use ping to figure out how long it would take for a packet to move back and forth between your server and the DNS servers. As a general rule: never change what works.

A disadvantage to OpenDNS is that domains that do not exist may respond with an A record pointing to OpenDNS's search page, as they tend to do that. Google doesn't currently do it, but it would be foolish to assume they are simply providing DNS resolvers with nothing to gain from it.

share|improve this answer
If I could have split an answer, I would have. I liked the ping test for it's simplicity. I could let it run against all of them, then look at the averages. Here, I wanted to look at the response times for the query itself in addition to the round trip for the packets, so I opted for the packet capture. More work to set it up and test, but more exacting for the true performance of the external server. Thanks! – Mike L Dec 4 '09 at 16:39
Bad idea to use ping. Not all servers respond to ping and there is zero guarantee that the response time will be the same with DNS and with ICMP. – bortzmeyer Dec 17 '09 at 11:30

I wrote little nice script to evaluate connection to DNS servers:

cat >
#!/usr/bin/env ksh

if [ ! -f "$IPfile" ] || ! echo "$samples"|egrep -q "[0-9]+" ; then
  echo " <file-ip-list> <samples>"
  echo "<file-ip-list>       newline separated list of DNS server IP adresses"
  echo "<samples>            how many DNS resolution samples to take"
  echo "PURPOSE:"
  echo "          collect statistics about response times from list of DNS servers"
  exit 1

typeset -i i

while [ $i -lt $samples ]; do
  for IP in `cat $IPfile`; do
    time=`dig @$IP $site| awk '/Query time:/ {print " "$4}'`
    IPtrans=`echo $IP|tr \. _`
    eval `echo result$IPtrans=\"\\$result$IPtrans$time\"`

for IP in `cat $IPfile`; do
  IPtrans=`echo $IP|tr \. _`
  printf "%-15s " "$IP"; echo -e `eval "echo \\$result$IPtrans"`|tr ' ' "\n"|awk '/.+/ {rt=$1; rec=rec+1; total=total+rt; if (minn>rt || minn==0) {minn=rt}; if (maxx<rt) {maxx=rt}; }
             END{ if (rec==0) {ave=0} else {ave=total/rec}; printf "average %5i     min %5i     max %5i ms %2i responses\n", ave,minn,maxx,rec}'

./test_dns_list_speed server_list 20   average   949     min   523     max  2229 ms 20 responses   average   897     min   515     max  2017 ms 20 responses  average  1235     min   530     max  3362 ms 20 responses         average   759     min   529     max  1624 ms 20 responses
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.