Ping and traceroute can be helpful (the latter especially to understand the data path), but at the end of the day, you will get a more meaningful measure of DNS performance if you look at the ranges for round-trip time of DNS queries rather than ICMP packets. The latter can be useful to put lower bounds on network delay and therefore distance, but it isn't really reasonable to evaluate a DNS service based on its ICMP performance.
$ ping -qc 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 13.459/14.912/16.573/1.280 ms
You can get DNS query timings with dig:
;; Query time: 22 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Jan 18 02:49:11 2017
;; MSG SIZE rcvd: 48
which shows the 22ms latency of a request answered from cache (you can tell this by the TTL of 182 rather than 300 or 299) and you can compare times for other resolvers in the same way. You can put an upper bound on the distance of the source of your answer by multiplying that by half the
speed of light in fiber, but that is an upper bound, a more realistic estimate of distance would be 100km of distance for each millisecond of ping RTT, subtracting 8-40ms for DNS processing depending on whether you are getting cached data or your query is going all the way to the authoritative servers). For an example of the latter, you can query the SOA of
dod.mil, which is only served from the US (and isn't likely to be in the cache of any resolver):
;; Query time: 103 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Jan 18 02:50:19 2017
;; MSG SIZE rcvd: 92
You can even use tools like
namebench 1.3.1 to benchmark the overall performance of the resolver you are using (there is also an unfinished
namebench 2.0) if you are feeling adventurous.
While the resolver locations listed at
developers.google.com/speed/public-dns/faq#locations do include Dublin, not all locations are actually used for Google Public DNS, as you noticed, so queries from Google Public DNS to authoritative servers will come only from a subset of the locations listed. However, bear in mind that Google Public DNS caches may be located closer to you than the IP addresses used to query authoritative servers, and this can be measured to some degree of accuracy by the query time difference between queries to Google Public DNS that are answered from cache, and queries directly to the authoritative name servers.
It's also important to note that with many websites now served by Content Deliver Networks (CDNs), the speed with which you get a DNS response may be much less important overall than the proximity of the address that is returned. To help improve the quality of responses by this important metric, Google Public DNS and other public resolvers, notably OpenDNS, developed the
EDNS Client Subnet (ECS) extension that has been adopted by the IETF as
RFC 7871 and by many authoritative servers (although not all, Microsoft and Facebook being the most notable current exceptions), allowing those that support ECS to return geographically accurate responses for clients in Ireland and India even when the resolvers sending them the query are located in Belgium and Singapore.