How do I set the fastest mirror?

There’s a few gotcha’s to be aware of.

  1. Pamac installs a mirrorlist timer.
  2. pacman-mirrors only writes the mirrorlist and optionally the utility will create a custom mirror pool.

The mirrorlist timer rewrites your mirrorlist (/etc/pacman.d/mirrorlist) every thursday at 7.00 (AM for the 12-hour people) using the command pacman-mirrors -f8. This means that whatever changes you make they are undone once a week and there is very little you can do about it.

On every run of pacman-mirrors -f (either by you or the timer) the mirror list will change and therefore your local copy of the package database is likely to become invalid. This invalidation requires a forced database sync next time a system sync (aka updating) is executed.

This forced download is to ensure you get no errors when syncing your system and is why the documentation always appends the pacman -Syyu command when referencing pacman-mirrors.

The second point to keep in mind is the fact that when you use the –interactive and/or –country argument - pacman-mirrors will create a custom mirror pool.

Such pool will effectively limit the number of mirrors available when the mirror list timer is executed or you manually run the pacman-mirrors utility.

Which brings us to the question on how to maintain the mirrorlist.

You should avoid mirror shopping - it does you no good in terms of stability. It is better to pick one mirror and stick with it as this will stabilise your update experience and only in the rare circumstance a mirror becomes available you should change the mirror.

The only viable long term solution is to create a custom mirror pool with one mirror. Which one is a matter of choice but it is recommended to select a mirror which has proven to be stable in terms of syncing with the mother ship mirror at repo.manjaro.org and has proven all-time accessible from your location.

Finally we have provided some hints to successful maintenance of your Manjaro system

2 Likes