Enter your email address:

Delivered by FeedBurner

How to: Find the fastest apt mirror server


StumbleUpon Toolbar

If you want to use the fastest mirror to download the .deb files you may need to upgrade or update your Debian machines, you have to remember that not always your nearest server is the fastest one, and that could be because not only the distance the server is from you but also the network congestion is a factor when talking about network speed.

For instance, your ISP may have a direct satellite connection to another country, and thus your nearest server should be in that country, to avoid you the hassle to get that info, Debian give you some tools, I will touch two of them here.

netselect-apt

This tool will download the full list of mirrors and will quickly explore throw them for the fastest mirror for you, the use of it really easy and reliable.

Installation

You just need to run:

sudo aptitude install netselect-apt

Running it

Once installed, run

sudo netselect-apt -n -s lenny

Be sure to change lenny for your appropriate version, you can use the name of the version, (edge, lenny, sid) or the words stable, testing, unstable, experimental.

It will then write a sources.list file in the current directory, you may then copy that file to /etc/apt/sources.list or just edit and copy the lines you need from one to the other.

If you see, I have used -n and -s options, because I wanted to get the non-free section, and deb-src to be able to use apt-get source

apt-spy

apt-spy is a little bit more flexible, well maybe flexible is not the right word, as in netselect-apt you can also select some specific mirrors to explore, you have to edit the mirrors_full file, while with apt-spy you just enter the countries you may want to explore for servers.

Installation

To install it run:

sudo aptitude install apt-spy

Running it

You first need to get the mirrors file, and contrary to netselect-apt apt-spy does not do that automatically, so first run:

sudo apt-spy update

Now it is time to run the tool:

sudo apt-spy -a North-America -a Europe

To check for available servers in Noerth-America and Europe, if you want to create your own zone, just edit the file /etc/apt-spy.conf and add something like this:

France-Germany-Netherlands:
  FR
  DE
  NL

The sources.list will be then copied to /etc/apt/sources.list.d/apt-spy.list

As you see, it is really easy to manage, it takes a little bit longer than netselect-apt to run, but also works well.

Note: Remember that during the week, or even the day not the same server is the fastest one for you, as conditions in the Internet change all the time.

Trackback URL for this post:

http://www.go2linux.org/trackback/486
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

What do I have to put for a

What do I have to put for a ubuntu distrib with the netselect-apt command "sudo netselect-apt -n -s *****" ?
I've tried ubuntu, gutsy, gutsy-gibbon, 7.10,...
Nothing works :-S

It only works with Debian,

It only works with Debian, but you can try with netselect, and the different options of mirrors.

sudo netselect server1 server2 server3

hope that helps you, but for Ubuntu you can also use the graphical tool of synaptic, there is an option to select the fastest mirror there.

Guillermo Garron

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting