Increasing DNS Performance for the Home User on Windows I guess you value your time. I do and I hate to be waiting when a web page is slowly rendered by my browser one piece at a time. If there's something I can do to improve the process I have to do it. I know that in the long run the time spent will be nothing compared to the time saved, and if this is true for me it's even more true for other people.
In the last months I tried to optimize the DNS performance of my Windows machine. DNS is the acronym for Domain Naming System. It's a distributed database which contains all the mappings between domain names and IP addresses on the internet. These mappings are necessary because domain names and not IP addresses are easily understandable by humans while IP addresses and not domain names are understandable by the hardware which routes data around the world.
Almost every web page nowadays contains images, frames and ads belonging to different domains which force our browsers to do a series of DNS queries before being able to render the page completely. Since every single query involves packets traveling on the network the whole process can take a considerable amount of time. Let's make an example tracing the queries my browser does when connecting to http://www.microsoft.com (on Jan 9th, 2006 at 21.05 GMT):
www.microsoft.com i.microsoft.com i2.microsoft.com rad.microsoft.com i3.microsoft.com c.microsoft.com c1.microsoft.com statse.webtrendslive.com global.msads.net
It makes a total of 9 requests with 700 milliseconds spent just for a single web page. Now let's try with http://www.zdnet.com (on Jan 9th, 2006 at 21.15 GMT):
www.zdnet.com i.i.com.com news.zdnet.com c1.zedo.com c7.zedo.com l5.zedo.com adlog.com.com i.t.com.com ads.com.com adimg.zdnet.com ad.doubleclick.net dw.com.com n.2mdn.net
Now it makes a total of 13 requests (and more than half of them are ads!) with 1010 milliseconds spent for, again, a single web page. Most of this time could have been saved by a smart DNS client. Unfortunately on Windows we have only a native DNS client designed to be used on a local network which is not able to make good use of its caching mechanisms when behind a modem.
I've searched for a while but since I couldn't find an open source local DNS proxy for Windows I finally resolved to write my own (I've found some free but closed source alternatives though like FastCache and DNSKong) and to release it under the GPL license (free with source code). In my opinion there are advantages to this approach:
A sliding expiration caching mechanism and background updates improve the browsing experience independently by the browser. If we retry with the previous http://www.zdnet.com example two days after the first try the time spent for the DNS queries is reduced from 1010 milliseconds to less than 0.5 milliseconds on a P3-733mhz machine and will never be larger than that for any of our favourite websites.
The quality of some ISP's offerings is quite bad. This is expecially true for the consumer market where servers and network hardware are often overloaded. When this happens the DNS service is likely the first to suffer the subsequent packet loss and delays because of its central role. This translates into users not being able to navigate not because there is no internet connectivity but just because there is no available machine to serve their DNS requests. A local DNS proxy can help these users overcome downtimes of their DNS servers by allowing them to visit at least their favourite websites. At the same time they will ease the burden on the DNS servers allowing other users to indirectly benefit from it.
A technique still widely used for fighting ads on web pages is to fill the HOSTS file (which the Windows DNS Client uses as a static cache) with thousands of domain names which are known sources of ads. Unfortunately the Windows DNS Client does not handle a large HOSTS file very well. This limitation can be solved by a local DNS proxy which is capable of handling it in a more efficient way. With Acrylic you can expect responses within 1 millisecond on a P3-733mhz machine with a HOSTS file containing 100,000 domain names.
In conclusion using a local DNS proxy can greatly increase the perceived speed and the fault tolerance of a typical home user internet connection. Usually the faster the connection is the greater the optimization will be because the DNS servers will more likely become the bottlenecks in the browsing process.
There are situations though where a local DNS proxy is almost useless if not counterproductive. This is typical with computers in a local network using a centralized server for their DNS and DHCP requests (like in a common Active Directory domain scenario). In this case computers are already using a cache for their DNS needs and they usually don't benefit from adding another layer of caching with a local DNS proxy.
More informations about the project can be found at the Acrylic DNS Proxy Home Page.
|
|