Reflector choosing the worst possible mirrors
I used to pick out mirrors manually and had servers very close to me, but I recently started using reflector to automate the process, but the mirrors it chooses is absolute dogshit and gives me really slow speeds.
What am I doing wrong?
Could you include what you're currently using for the various reflector command-line switches? (e.g. --age --protocol --sort ...)
Here's whats in
/etc/xdg/reflector/reflector.confYou are sorting by age, there is probably an option for sorting by speed or similar. You are already only choosing from the latest 5 synchronized mirrors, which should be very much up-to-date, so I'd sort by speed.
And IMO, your countries are not that many, maybe increase the list and double
--latestto 10.Thank you. I will apply your recommendations.
In my
reflector.conf, I have--score 5instead of--latest 5. I don't know how much this actually improves anything, but surely selecting by score is better than just using the most recently updated mirrors.Been a while since I mucked with reflector, but you don't seem to be prioritizing faster mirrors whatsoever. Try
--sort rateinstead. If that's not fast enough I'd also increase your--latestup to maybe 15 so that you have higher odds of a fast mirror being in the group of just-updated mirrors.Change “—sort age” to “—sort rate”
i believe that is what will be used by reflector if it is enabled/started as a systemd service. but, i think, that'll not be used if you're just calling it on the command-line. in that latter case, i think you must supply (those) command-line switches on ...the command-line. (maybe)
The systemd service is enabled, and when I did actually apply all these in the command line manually too before enabling the service.
ah. now armed with that extra information, i can only profess cluelessness. perhaps a "--verbose" option, well watched, would reveal something (maybe) good luck!
A bit off topic:
Normally the mirrors behind the CDN would have decent speeds everywhere, e.g.
These are the top tree mirrors currently on the mirror status and they are all behind cloudflare.
deflector?
If reflector is failing you, know that you can do it without reflector:
curl -s "https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -My config is set to: --country US --protocol https --sort rate --age 48 --latest 10. As a result, installations and updates are always very fast for me.
I usually do
reflector -l 20 -p https,http --sort rate --save /etc/pacman.d/mirrorlistEven though it'd probably be safer to omit the
,http.Reflector is broken now because it's hardcoded to test the community.db file, but that file is now just an empy stub as that repo was merged into extra. Reflector is just a python script so you could edit it to replace mention of community.db with extra.db until the devs fix it.