Using rankmirrors script for faster Arch Linux package downloads

If you use Arch Linux I’d strongly suggest using the snippet of code below to use rankmirrors to sort your pacman repository mirrors into an optimal order, to use the fastest servers first.


cd /etc/pacman.d
for repo in *; do
echo "Processing $repo..."
mv $repo $repo.b4.rankmirrors
rankmirrors -v $repo.b4.rankmirrors > $repo
done

I was getting an average of about 300-400K/sec; after doing this, I was reaching 10M/sec!

3 Responses to “Using rankmirrors script for faster Arch Linux package downloads”


  1. Gravatar Icon 1 fred

    thanks! thats awesome! i got python to run rankmirrors… but wasn’t sure how to speet up the stuff. anyway, am i right that you just take that and put it in a script.sh and run it in a terminal?

    thnx

    sv

  2. Gravatar Icon 2 bigpresh

    @fred

    Glad you found it useful. You can put it in a shell script and run that, or if you want you can just run it directly (paste it into a terminal and it should do the trick).

    A worthwhile improvement would be to include a step that outputs the name of the repository being processed at the moment so you can see how it’s getting on - I’ll edit the post with that in a second.

  1. 1 Random wisdom « A rather coolish blog

Leave a Reply

In the CAPTCHA box above, you must type both words you see. If they're too hard to read, click the "Get a new challenge" button (the top one of the three to the immediate right of the text entry box). Sorry for making you jump through hoops, but I've been suffering from way too much spam lately.

Subscribe without commenting





get some tasty email addresses here