TWEAK: Squid Cache + TreeWalk DNS = Faster Browsing

Having a local caching proxy server has significantly improved browsing speed; and, the local caching DNS server has improved security at the same time minimized dependence with the ISP. Both of these tweaks have boosted browsing speed. The apparent impacts of both are remarkable for sites frequently visited. This can be taken a step further by making the squid caching proxy take advantage of faster lookups by accessing the local DNS table cached by TreeWalk.

If you can recall, during the installation of TreeWalk, one of the prompts on the later parts was: "You are currently using a PROXY. If the proxy is not a local one disable it if possible, otherwise you may not take full advantage from the local DNS resolver." Good! It detected our squid caching proxy.

Squid Cache + TreeWalk DNS = Faster Browsing

Since we are using a local caching proxy, we can expect to gain the full benefit of having a local caching DNS server -- just the exact end state we want.

Open the squid configuration file on your favorite editor. On the default installation settings, the config file is in C:\squid\etc\squid.conf. Add this line:

Where: is the IP address of the TreeWalk DNS cache. If the DNS cache resides on a different machine, replace the with the corresponding IP address of the host. For some reason, squid doesn't like a host name in this directive. So IP address it is.

Save the configuration changes restart squid via Start > Run > C:\squid\sbin\squid -k reconfigure -n Squid.

To do a quick restart of squid, you might want to add this line to squid.conf:
shutdown_lifetime 2 second

With the above tweak you will notice restart or reconfigure is quicker. And finally, for a big speed boost enable pipelining on squid. Add this line to squid.conf:
pipeline_prefetch on

You will need to reconfigure (or restart) squid after making the tweaks above. Browsing will now be even faster given the benefits of both local caches. As always, don't forget to configure your browser to use the proxy. All this will be in vain if the browser will not take advantage of it.

You might also be interested in:


We at pimp-my-rig strive to keep on improving, help us reach that goal by leaving comments or constructive criticisms. Don't miss out on our next feature -- subscribe via RSS (What is RSS?).

Share This