Tuesday, September 25, 2007

Finding fastest mirror/site

Say if you are to download something from a mirror and have not been suggested the best mirror for you, how will you decide which one to download from?
Perhaps, speed and efficiency will be the factor for you. But, how to know which one will be the fastest and efficient mirror?

The answer to this question is netselect. This package chooses the fastest server automatically. On providing space separated list of sites, it chooses the fastest server. The calculation involves various factors like ping time, number of hops required to reach the target, the percentage of ping requests that got through successfully.

For example, say you want to download apache from its official site. You will be provided with a list of mirrors (you will be provided with a suggestion for best mirror-site but lets ignore that for the moment). I chose to find the fastest one out of 3 mirrors: http://apache.mirrors.hoobly.com/ http://apache.hoxt.com/ http://veritris.com/mirrors/apache/ .

So, I typed
$ sudo netselect http://apache.mirrors.hoobly.com/ http://apache.hoxt.com/ http://veritris.com/mirrors/apache/
which gave me output
2175 http://apache.mirrors.hoobly.com/
Hence the fastest one out of 3 was found.

Actually, netselect gives score to each mentioned server on the basis of various factors. The lower the score is, better is the server response. Now, to know the score of each server, run netselect in very verbose mode with -vv option. For more information on netselect, refer to netselect manual.

Also try netselect to check fastest search engine at your location by supplying a list of search engines with the netselect command.

Netselect will definitely make your life easier especially if you are using slow dial-up connections.

N.B.: I tried this command on Debian based Distro, Ubuntu. This command works on Debian based systems but I am not sure about rpm based systems.

No comments: