PreshBlog

Using rankmirrors script for faster Arch Linux package downloads

by on Oct.17, 2007, under Linux, System Administration

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!

:,

4 Comments for this entry

  • 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

  • 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.

  • Guy

    Excellent. Total newbie to Arch and this allowed me to update to KDE4.4, before I wasn’t getting the right mirrors.
    Nice one!

  • Treasa W.

    Thank you for sharing this code. It definitely works! Helped me speed up our repository mirrors at the office.

1 Trackback or Pingback for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!