As I have seen more time outs using reflector, I have decided to move over to rate-mirrors and do some testing in that. One question I see repeatedly asked is how do I specify my starting country (knowing the default is the US)? This note below is what I have written to address this.
Simply, the rate-mirrors command parses “rate-mirrors --entry-country=” differently then when you specify get me arch mirrors “rate-mirrors --protocol=https arch”.
Any suggestion to the below note are welcome.
How to Setup Rate-Mirrors to get the fastest Arch Mirrors from your location
Rate-mirrors is a Rust application which will test the speed of various Arch\EndeavourOS mirrors and create a recommended list of completely synced mirrors. The application considers:
TeleGeography data (like submarine cables, internet exchanges).
The starting location you have specified (by default the application assumes the US).
Install Rate-Mirrors application:
sudo pacman -S rate-mirrors
Update Arch Mirror (setting Canada as the starting location) and saving the results to /etc/pacman.d/mirrorlist:
Thanks for the feedback. Look like the default is already 1.
Minimum mirror sync completion percentage, in a range of 0-1.
If this is below 1, the mirror synchronization is in progress and it's
best to filter out such mirrors [default: 1] [env: RATE_MIRRORS_COMPLETION=]
Options for rate-mirrors are somewhat different between Arch based distros.
BTW, if possible, you could try with even smaller max-delay values. I’m using approximately 100 as a value here, and it seems to give a good result here. But there can be a location related trade-off between speed and age of mirrors, so experimenting a bit will likely give the best result.
@dalto is right: you should not worry about helping rate-mirrors to know your location, default settings should work.
Adjust --max-delay, --protocol (if needed) and whether you want to see comments or not and that’s it.
I created aliases for it a while back, but only use it if I get really slow mirror results once every blue moon. Kind of a rarity throughout the year. I’m lazy like that and probably not needed/efficient(?), but good enough for me.
# Update mirrors: Arch.
alias update-mirrors="sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak && rate-mirrors arch --max-delay 43200 | sudo tee /etc/pacman.d/mirrorlist"
# Update mirrors: EndeavourOS.
## eos-rankmirrors (official tool EndeavourOS), but with parameter changes.
alias eos-mirrors="eos-rankmirrors --sort rate --timeout 15"
alias update-mirrors-eos="sudo mv /etc/pacman.d/endeavouros-mirrorlist /etc/pacman.d/endeavouros-mirrorlist.`date +"%Y.%m.%d-%H.%M.%S"` && rate-mirrors endeavouros | sudo tee /etc/pacman.d/endeavouros-mirrorlist"
# Update all mirrors, pacman- and aur packages.
alias update-all="update-mirrors && update-mirrors-eos && paru -Syyu"