This topic has gone dual. The title says about “pacman mirrors”, but there is also local Internet speed. It’s not the same.
About the internet speed, you need to investigate as several suggestions have been made.
About archlinux mirrors, each location has a different best mirrorlist.
Using known utilities helps in normal cases, but they can confuse you, for several reasons, like current availability, current sync status, server sync delay and maybe others.
The best (not the easiest) way to select your best mirrorlist, that would almost never change, is the manual way. Arch website and packages provide the best possible required tools.
Here is a “simple” way to find the best servers manually, with an example for Greece. Read and change settings to your location:
Dependencies
sudo pacman -S --needed jq pacman-contrib
Download Arch mirrors status.json
curl -s https://archlinux.org/mirrors/status/json/ | jq > status.json
Country and codes
Find the countries that are around your location and note their country codes
cat status.json | jq -c '.urls[] | [.country, .country_code] ' | sort -u | tr -d '[]\"'
Oneliners for ranking Greek mirrors with rankmirrors
The output presents the download time of the commutity.db
file which is large enough to compare server’s speed. The lowest number, the fastest the server.
- For Greek and Italian mirrors
Change the country code(s) to your chosen ones. You may add more countries, keeping the same format.
cat status.json | jq '.urls[] | select(.country_code == "GR"), select(.country_code == "IT") | .url ' | tr -d \" | sed 's|$|community/os/x86_64/|g' | xargs -I URL rankmirrors -u URL
- For Greek mirrors only http, htpps
If you want to narrow down according to server protocol. You may combine this to the previous example (with a little effort?
)
cat status.json | jq '.urls[] | select(.protocol == "https"), select(.protocol == "http") | select(.country_code == "GR") | .url ' | tr -d \" | sed 's|$|community/os/x86_64/|g' | xargs -I URL rankmirrors -u URL
Create your custom mirrorlist
After having decided which servers you will use, find the proper entries in /etc/pacman.d/mirrorlist{,.pacnew}
and copy them in the prefered order in the final /etc/pacman.d/mirrorlist
.
Run a sync first
sudo pacman -Syy
Now you can use them.
Usage on updates
If the download speed seems lower than usual, disable the 1st server in the mirrorlist (add #
at the beginning of the line) and resync (pacman -Syy
).
#Server = http://some.server.url
Try again. If the next active server is better, keep it like this until slow speed returns.
Do this manually for some time (changing servers), until you find (if ever) your best server.
And remember, even the best server may fail once in a while.