April 10, 2016

Fedora DNF `fastestmirror=1` For The Win!

If you’re using one of the recent versions of Fedora, chances are you’ve been using DNF as default package manager. DNF (a.k.a Dandified Yum) was introduced in Fedora 18 and became the default package manager in Fedora 22. You can read more about DNF on its official Fedora wiki.

Lately, I was observing slow speeds while performing dnf update or dnf install especially when the cache is being updated. I thought it was an issue with my ISP. However, a few speed tests proved that my speculation was wrong and ISP was not the culprit.

It then struck me that it might have something to do with the Fedora mirrors. I dunno which mirror was being used but the speed was downright pathetic! A bit of Googling led me to search for fastestmirror plugin for DNF. Thankfully, before spending too much time on it, I stumbled upon an answer on Ask Fedora forums which indicated that DNF has the fastestmirror plugin built into it!

All I had to do was set fastestmirror=1 in the DNF configuration file under /etc/dnf/dnf.conf and check things again. I was pleasantly suprised when the download speed increased by upto 3 times it was earlier.

Obviously, I should have done a bit of RTFM, but gladly this time I wasn’t hurt by spending hours searching around for something that didn’t exist and was built-in! :smile: