Sunday, July 21, 2013

How to check your DNS server speed

Manually check your DNS performance or speed or compare your ISP DNS speed to other DNS server

I have looked around on ways on how to compare my ISP's DNS speed with that of Google Public DNS but the results I get are sketchy at best.

To check for a DNS speed one has to look not only on the ping test but the rate at which a DNS server resolves host names. Here is an excerpt from Google:

"In addition to the ping time, you also need to consider the average time to resolve a name. For example, if your ISP has a ping time of 20 ms, but a mean name resolution time of 500 ms, the overall average response time is 520 ms. If Google Public DNS has a ping time of 300 ms, but resolves many names in 1 ms, the overall average response time is 301 ms."

The formula therefore that I will be using here is:

DNS Speed = connection latency + host name resolution time

For connection latency this will be the result from Pinging. As for the host name resolution time, I could not find one anywhere. Well, at least not something that you still need to download.

I did found out that one way to check for a DNS response is by using the nslookup which has the command line nslookup www.example .com typed in the command prompt. The time it takes to give back result will be the host name resolution time.

The trick will be on how to get this elapsed time. You can try stop watch and time it starting the moment you press enter and stopping once result is displayed. This however is prone to error and result will be very inaccurate considering that the elapsed time is a fraction of a second.

The solution is to time stamp it by using the prompt $t. This command will change the C:\> prompt into time like this  1:30:50.62. Now you can just subtract the before and after time that the nslookup command was executed. Note though that this again will include the time you typed the command.

To remove the typing time for the command, use a batch file and this is what you have to run from DOS shell.

To create a batch file

  • Open a text editor like Notepad.
  • Write your code into Notepad. In my case I only wrote three lines:
    • prompt $t
    • nslookup www.example.com
    • prompt
  • The first line is to change the C prompt into time format, then the command nslookup and lastly, the third line is to change back the command prompt to C:/>
  • The result will be as follows


  • Save it as batch file by adding the .bat afer your file name and under Save as type, select All files
  • To launch this in DOS, just type the name of the file from the same directory you saved the batch file.
  • For this result, the host name resolution time is 9.25 seconds or 9250 millisecond (1:46:08.84 - 1:45:59.59)

Back to CyberLiving home page

Other Posts

0 comments

Post a Comment