ArchLinux pacman: use a mirror next to you
The main ArchLinux ftp server recently had some bandwith problems due to a lot of people using it has their main mirror for their pacman updates.
This issues have been fixed by the archlinux administrators by throttling the bandwith of ftp.archlinux.org. This means that downloading from it will be extremely slow.
This problem is a consequence of the default settings of pacman, ArchLinux's packages manager. By default it uses ftp.archlinux.org as the default mirror, even if the default configuration actually has a full list of mirror.
I was one of that people who downloaded from ftp.archlinux.org. I thought that pacman was using some mirror rotations script on the mirror list. Instead it just uses the first mirror on the list which is ftp.archlinux.org.
Once pacman started downloading extremely slow I did some investigations and understood what happened.
The correct thing to do is then sets a mirror which is near as the default one. The only Italian Archlinux mirror is mi.mirror.garr.it.
I then configured pacman to use this mirror as the default one. This is quite easy. Just pickup your favorite mirror and edit /etc/pacman.conf.
Following the relevant lines in my /etc/pacman.conf for using mi.mirror.garr.it as the default download server.
[current] # Add your preferred servers here, they will be used first Server = ftp://mi.mirror.garr.it/mirrors/archlinux/current/os/i686 Include = /etc/pacman.d/current [extra] # Add your preferred servers here, they will be used first Server = ftp://mi.mirror.garr.it/mirrors/archlinux/extra/os/i686 Include = /etc/pacman.d/extra #[unstable] # Add your preferred servers here, they will be used first #Include = /etc/pacman.d/unstable #[community] # Add your preferred servers here, they will be used first Server = ftp://mi.mirror.garr.it/mirrors/archlinux/community/os/i686 Include = /etc/pacman.d/community
Results are quite impressing! Now I download packages updates at 150 KB/s - 400 KB/s while before I never downloaded faster than 100 KB/s. By using a local mirror you will speed up your packages updates.
However you will have to wait that the mirror updates before you will be able to get latest updated packages. It usually takes 1-6 hours.
- fabio's blog
- 2205 reads

Post new comment