While Singapore has fantastic internet access, I often find that the Singapore debian mirror isn't as fast as I expect. (The Singapore Ubuntu mirror, however, is FAST - no issues there.) It's not "slow" - I've lived places where 10Kb on a download was cause for all the other IT guys in the office to gather around the screen and watch in wonder! It's just that my home connection has 1 Mb down, but I don't think I've ever seen over 150 Kb from this mirror.
That's fine for "normal" updates, but I often use debootstrap to build vservers, so I'm downloading the entire OS from the internet. At that point, I'd really like to use more of my bandwidth. Therefore I often choose another mirror here in Asia at random and try it out. Recently, I was building new debian squeeze servers, and after trying three or four random mirrors and never seeing over 100Kb down, I decided that here must be a better way to figure out what's the fastest mirror.
Turns out that there is - "netselect-apt".
sudo apt-get install netselect-apt
netselect-apt squeeze
It downloads a list of all the debian mirrors out there that host the distro I specified ("squeeze" in this case) and starts testing them. It take a few minutes to run, naturally, but when it's done, it creates a new 'sources.list' file there in the current directory. "netselect-apt" has several options you can give it that determine which types of mirror is checks (just FTP, just HTTP, etc.) as well as whhether it includes 'non-free' repositories, etc.
In my case, I'm not actually going to use the "sources.list" file, since I'm using debootstrap to create a new virtual service. I just want to know what the fastest mirror is and use that.
Sure enough, I change my debootstrap to use the mirror that netselect-apt tells me is the fastest, and my download speed goes from 100Kb to 1000Kb. A 10X increase for taking a couple of minutes to check the mirror speeds. Definitely worth the time. And my virtual machine is built and ready to go much faster.
Navigation
Search
Recent blog posts
- Installing OpenVPN on Ubuntu Natty
- apt-get remove old modules errors
- Cloning Drupal Sub-site
- GnuTLS error with FileZilla and vsftpd
- Installing grub on multiple drives
- Finding the fastest Debian repository
- Changing the console resolution in Grub2
- Lightning calendar plugin for x86_64
- Adding a CAPTCHA to a webform in Drupal
- Our High-Availability Setup

Comments
Does it change much/often? I
Does it change much/often? I mean, are there a couple of mirrors that are usually fast and others that are usually slow? Is there anything bad about choosing the fastest mirror you can find? Is it important whether or not it is nearby? Dennis
YMMV
I think this is a case of "Your Mileage May Vary". You could test for the fastest mirror each day and see if it changes, but that sounds like a lot of work to a basically lazy person like myself. Unfortunately this app doesn't give you any sort of ranking - it just prints the fastest mirror. So you can't see the top 5 sites or even what the download speed was.
At that point I'd probably adapt this program to print out rankings and speeds and run it from a cron job every hour for several days. I'd be very pleased with myself for all the time I saved by writing this until my wife pointed out that I just spent 3 hours writing and perfecting a script to save myself 1 minute of work each day (to run it manually). My script will only save me time if I run it for 6 months. ;-)
But for me, I just ran this once and have been happy using the mirror that was fastest at that moment. The download speeds have remained pretty constant. If there's a slightly faster mirror on any given day, it's not worth my time to check. Of course, if my download speeds fall way off while I'm trying to get 500MB worth of programs/updates, then I'll probably look for a faster mirror. For for the daily "apt-get update; apt-get upgrade", this mirror is fine.