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?

10 Answers 10


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.

  • 4
    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

You can just simply dig and grep

$ dig @   www.rimuhosting.com | grep "Query time:"
;; Query time: 15 msec
$ dig @   www.rimuhosting.com | grep "Query time:"
;; Query time: 289 msec

Use GRC's Domain Name Speed Benchmark.

  • I checked out this tool... it rocks! – Mike L Dec 4 '09 at 19:08
  • 2
    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
  • Be wary of GRC's if you're not in the USA. It doesn't seem to test many (any?) non-USA hosted servers. – NickG Jul 12 '17 at 13:36

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

  • link expires :-( – Pol Hallen Sep 21 '16 at 20:26

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:



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.


The simple shell script qtest.sh can be used for that:

% qtest -n3 "A a.gtld-servers.net"  

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


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

cat >test_dns_list_speed.sh
#!/usr/bin/env ksh

if [ ! -f "$IPfile" ] || ! echo "$samples"|egrep -q "[0-9]+" ; then
  echo "test_dns_list_speed.sh <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

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.

  • 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
  • 1
    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

dnseval from dnsdiag works like a charm on windows linux and mac. (much better than the outdated namebench) download on github

To use it, first write a text file that each DNS you want to testcontains a line with its IP adress: mylist.txt:

and then run

./dnseval -f mylist.txt yahoo.com     # latency for cached sites
./dnseval -m -f mylist.txt yahoo.com  # latency for sites not in cache

While this does not inspect that cache size of the servers, it is a much easier and faster approach and I expect it to correlate well with real world performance.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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