Having Yum for Breakfast

This week I decided to write a comparative article between Yum and Apt (the package managers). Using Fedora 11 and Ubuntu 9.04, I performed various tests and benchmarked both the time and CPU usage they took. But why? Let me explain.

I really like the Fedora project. Really. I like their stance on proprietary drivers and codecs (and of course free software) and these days they seem to be pushing the technological envelope more than others. Sure Red Hat drives the direction of the project somewhat, but I don’t mind Red Hat either.

In fact, I wish I could use Fedora as my main distro! But every time I try it I just get so frustrated with Yum. Sure it’s better than up2date, but it’s so damn slow and annoying. That’s a problem for someone like me who manually updates his package database first thing every morning and checks to see what packages are available and updates the system by hand. Why do I do that? Cause I like to.

But every time I’ve tried to get into Fedora that damn package manager has stopped me. I get frustrated after a day or so. I think the longest I’ve had it on was 2 days before I switched.

Recently I installed Fedora 10 and 11 to see if there was any performance increase. Actually, to tell you the truth I was completely surprised by Yum’s agility and speed. The old Fedora I remember was not to be seen.. or so it felt like anyway.

Hence, I thought it might be good to run some tests to see.

Of course as the article points out, does any of this matter? Do we really need a fast a nimble package manager? Well for me it matters. It matters a great deal. For most users though they probably won’t care, as they just let the package manager do its thing in the background.

Still, it makes for some interesting thoughts. I think.

7 Responses to “Having Yum for Breakfast”


  • What are missing in the posted article is a detailed methodology that include the list of packages used for these, transaction log that include time function (time foo bar command), all setup for both apt and yum so other packager can reproduce the benchmark.

    Without them, I question the validity of the benchmark because there are a lot of factors influencing the result.

  • Sure, I have all that information and at some point I’ll post it up. Of course you can replicate your own set of tests and see. For example, just time “yum search package” and compare the results to time “apt-cache search package”, etc.

    -c

  • Yum and Apt is not working with the same metadata. RPM has a lot more metadata than Deb does. For example, with RPM you can mark certain files as dependencies instead of package names and you can do yum install /usr/bin/foo.

    yum search foo and apt-cache search foo isn’t the same thing either. apt-cache works off the cache. If you want the same thing, you need yum -C search foo and you can modify metadata_expiry setting to higher value if you want somewhat apt like behaviour.

    Also from Seth Vidal, yum developer

    http://skvidal.wordpress.com/2009/06/18/yum-benchmarks/

  • Hey Rahul,

    Thanks for the information and link. I’d be interested in more tips like this, do you know of a “tweak Yum” howto?

    Cheers,
    Chris

  • There is a fairly good set of tips and tricks at

    http://blog.kagesenshi.org/2008/04/12-yum-tips-and-tricks.html

    The things I personally do,

    yum install yum-fastestmirror yum-presto

    set the metadata_expiry in /etc/yum.conf to expire every day instead of every 6 hours. If you want apt like behaviour, set it to zero instead. Also check out yum-updatesd. Yum because it is in python and because it has to deal with a lot more metadata will still be slower but in practise, it doesn’t really matter much anymore. The trade off is a lot more flexibility including a every growing list of very useful plugins that can be done within a few hours.

    Try yum list yum\* on a Fedora system.

  • Great, thanks a lot. I’ll do that and have another play :-)

    Cheers,
    Chris

  • >I really like the Fedora project. Really.
    Why do so many of us have to start our posts and list-msgs with such statements? it’s telling. If you really liked it, you wouldn’t have to qualifiy it like that.

    I’ve used redhat in the old days. It was my system. It worked and I could live with it’s small deficiencies. I’ve been burned by yum, so many times, I hate it and I’ve come to hate the community/company that pushes it. It’s stupid. I dream of a day when seth vidal screams at everyone who’s complaining and finally gives up on this bastard of a pkg management. yum is NIH.

    use puppy, woof, astrumi, stilax, pclinuxos even ubuntu/opensuse. cut the crap and stop using fedora.

    one angry ex-redhat user.

Leave a Reply