I’ll admit, I haven’t been very active blogging lately. It’s not because too little is going on, it’s because too much is going on. One of the projects I’ve been most excited about recently is my 20% project at work: namebench: a DNS benchmarking tool.
What is DNS, and why would I benchmark it?
You can think of DNS as your computers phone book. When you type in a website name such as http://www.google.com/ – your DNS service looks this name up to match it to a computer address. Instead of having a street address like “14 Avenue R West”, computers have sets of numbers called IP addresses. This particular website lives at 8.12.42.228 – near San Jose in California.
Your internet service provider provides you with a free DNS service that your computer uses. However, sometimes an internet service provider supplies a very slow or unreliable DNS server, which makes your entire internet experience feel slow. There are alternative DNS server services which often do a better job. While they may be farther away from your computer, these services may do a better job memorizing commonly used requests, such as www.youtube.com. This means that the DNS server can deliver you an answer straight away without sending requests all over the internet to search for the right answer.
namebench
In late May, I was experiencing routing issues to a particular DNS server I was using, but had no way to appropriately benchmark it. So, I wrote a tool called namebench. namebench is open-source, which means anyone can use it or contribute code to the project. So far, this tool is for command-line users only, but I am working on interfaces for Mac OS X, Windows, and UNIX users.
Thus, if you are not comfortable with a command-line, wait until the next release.
The most accurate way to use namebench is to import your browser history. As of the namebench 0.8.8 beta release, we support importing Google Chrome, Apple Safari, Microsoft Internet Explorer, Mozilla Firefox, Opera, Epiphany, Chromium, and Squid histories:
./namebench.py -i chrome
namebench will then do it’s best to discover and report the best nameservers personalized to your web browsing habits. Expect it to take 3-5 minutes to run by default. If you do not have a web browser history available, you can also run benchmarks based on the Alexa Top 10,000 websites listing:
./namebench.py
The Results
The most important result is the final recommendation. From my home in Belgium, it recommends the following settings:
Recommended configuration (fastest + nearest): ---------------------------------------------- nameserver 193.74.208.65 # Scarlet-0 nameserver 208.67.220.220 # OpenDNS nameserver 208.67.222.222 # OpenDNS-2
With these settings, I can go into my computers internet configuration, and experience a faster internet compared to what my ISP has provided. Of course, text is boring, so namebench also provides a few graphs so that you can visualize what kind of effect changing DNS servers will have on your browsing experience. The most important graph is the average response time for each DNS server:
This graph is presented as both an ASCII graph and a Google Chart URL. If you want to get more detailed, there are other graphs, such as the distribution graph. This is the 200ms version that shows what percentage of requests were answered in what time scale:
As you can see, the Scarlet DNS servers have the lowest latency — they are able to return an answer back faster than anyone else. However, OpenDNS has a much higher cache hit rate, which means it is able to deliver me more memorized addresses than anyone else in this test.
The future of namebench
My next goal is to make namebench more user-friendly. I’ve been hacking away with PyObjC and Tkinter trying to make usable (though minimalist) graphical interfaces to namebench. My goal is to make this tool easy enough for even an grandmother to use. I have a new 20% project for Q4, so I am trying to wrap this project up as much as possible during this coming week. I hope you enjoy it!
Add New Comment
Viewing 6 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment
Trackbacks
(Trackback URL)