got a slow yum operation?

July 1, 2008

Do you have an operation in yum that you consider slower than it should be? Do you want to help us determine what you mean when you say ‘yum sucks, it is slow’? Then try these things:

1. run yum 3.2.14 or higher

2. run your yum command like this:

time echo “n” | yum -d3 [your command here] | grep “time:”

3. run it again.

4. save the output from a couple of runs.

5. post the results in a pastebin with some info on the machine you’re running it on (cpu, memory, etc)

thanks!

26 Responses to “got a slow yum operation?”

  1. agony Says:

    http://pastebin.com/f26d455fa
    I added the smolt url for the exact Data

    was pretty fast today, but sometimes it takes a bit

  2. icodenaked Says:

    A good place to start improving the yum experience is allowing users to configure yum (and by extension PackageKit) to function more like apt/Synaptic so that the package manager works from the local cache by default and only updates metadata from the remote repos when commanded by the user or when the specified operation absolutely requires it. Some of us (especially those coming from Debian-land) aren’t of the mindset that we need package metadata to be completely up-to-the-minute for every little operation we perform with the package manager.

    See: http://forums.fedoraforum.org/showthread.php?t=192802

  3. skvidal Says:

    Agony,
    So in the first timed output you’re almost definitely hitting the network. On the rest you’re working with cached data. Maybe my perspective is wrong by 3.3s for an update depsolve seems okay.

    -sv

  4. skvidal Says:

    icodenaked,
    A couple of things to keep in mind – fedora’s update repos tend to change fairly frequently so out of date metadata can be a problem. However, to avoid downloading repomd.xml too often look at the metadata_expire variable in yum.conf’s man page.

    Also you’ll note you can set a different metadata_expire per-repository. so for the ‘fedora’ repo which shouldn’t change often, if ever, you can set a metadata_expire of like 1 month. But for updates, leave it at one day or even less.

  5. Hansen Says:

    iconnaked, skvidal, I think the differences about fedora repo and debian repo is about multiple version exist at fedora repo and not exist at debian. So when debian user want to install something with old metadata and the version of that said app not exist, apt suggest to update metadata, when version match with old metadata then apt just download and install it without updating metadata. With fedora repo, if your metadata is old enough and you want to install app with multiple version exist at repo, if you are not update your metadata then you got the old version instead the new version. I think the debian repo much bandwith friendly๐Ÿ™‚ Why fedora repo can’t do that, so when I want to install 30K app and my metadata is old I’m not enforce to download 3M updated metadata? What the benefit that exist multiple version of application at repo? Thanks

  6. skvidal Says:

    Rahul,
    What ver of yum is that?

    b/c it should be outputting more timing info.

  7. skvidal Says:

    Rahul, actually, change your command to:

    time echo “n” | yum -d 3 update | grep “time:”

    I think wordpress is munging the ”’s a bit.

  8. skvidal Says:

    Rahul,
    What kind of box is this? Is it a fresh install or an updated install? Is it under any kind of load.

    The updates time seems awfully long which makes me wonder if going through your rpmdb isn’t taking longer than expected.

    try rebuilding your rpmdb and trying the command again, please.

    Here’s the same result on my laptop:
    time echo โ€œnโ€ | yum -d 3 check-update | grep “time:”
    Config time: 0.116
    rpmdb time: 0.000
    pkgsack time: 1.510
    up:Obs Init time: 0.406
    up:simple updates time: 0.198
    up:obs time: 0.005
    up:condense time: 0.000
    updates time: 2.249

    real 0m4.225s
    user 0m3.209s
    sys 0m0.229s

  9. icodenaked Says:

    I overlooked the metadata_expires option somehow. It should make yum behave closer to what I expect, but I’ll have to get back with you on that.๐Ÿ˜‰

    Two things:

    1. Why doesn’t PackageKit inherit metadata_expires? It seems to go online for everything, even if the metadata has just been updated.

    2. The metadata_expires entry in yum.conf’s manpage states: “The default is 1.5 hours,” but Fedora 9 seems to ship with a default value of 30 minutes. Outdated manpage?

  10. icodenaked Says:

    Oops, in the above I kept writing “metadata_expires”. I meant of course “metadata_expire”.๐Ÿ˜‰

  11. Rahul Sundaram Says:

    icodenaked,

    PackageKit is a different team and it is supposed to just let Yum do all the work which atleast in theory should honor all the flags. If not, you would want to file a bug report at http://bugzilla.redhat.com with more specific details.

  12. Rahul Sundaram Says:

    Tried rebuilding the db. That doesn’t seem to have improved things. Yes, it is a yum upgrade from previous releases. If you need more info, let me know.

    http://pastebin.ca/1060404

  13. mvpittman Says:

    How about a GUI with a slider that has endpoints “fast” and “slow” to configure yum? LOL.

    Seriously… good effort on measuring, hope more people step up, rather than just bitching and complaining.

  14. James Says:

    icodenaked: Thanks for the heads up on the yum.conf file in Fed-9, that should be fixed (removed) in the next update.

  15. spstarr Says:

    Result for yum

    The machine was a Fedora 9 install with 33 fc10 packages (controlled updates)

    1) Repository with presto enabled and livna turned on
    http://fpaste.org/paste/3193

    2) No livna and fedora-updates testing repo used, ignoring 1 dependency error

    http://fpaste.org/paste/3194

  16. James Says:

    spstarr: Did you run that first invocation multiple times? As I can only assume/hope that yum needed to download filelists within the depsolver (am I wrong?).

  17. JadeEmperor Says:

    Seth, coming from apt land i agree with both icodenaked and Hansen on two points:

    1. make yum more configurable much like, but not the same like apt-get

    2. if a user only needs to install firefox yum should only get and install firefox and dependencies and not worry about the whole system being not up to date

    i have a fresh install of FC9 and i use yum-presto and yum-fastestmirror just to make the experience fast.

  18. Pavan Says:

    hello,
    I have some queries about yum speed…plz share ur knowledge.
    is there any way to run more than one yum simultaneously on a Pc ?
    Since i am a college student and my college is using proxy server so it provide us more than one proxies on which we can use internet So i think that there might any way to run yum with multiple proxies, it might speed up yum download…????

    plz sha re your view on it…
    Thanx.

  19. c Says:

    If you still care, this is on Fedora 15/x86_64 on a MacBookPro (2.53GHz):

    # time yum –cacheonly –debuglevel 3 list available | grep time:
    Config time: 0.187
    pkgsack time: 1.455
    rpmdb time: 0.001

    real 0m21.691s
    user 0m17.796s
    sys 0m2.823s

    • Ryan Says:

      He clearly doesn’t care. Yum was a piece of junk 2 years ago and it still is. It probably always will be. I guess his version must have some magical speed increase but for everyone else it’s awful compared to apt.

      The fact is, apt makes exactly the right trade-offs betweek speed and corectness. Downloading a nasty 5mb sqlite database just to install a 50k package is NOT acceptable. Cry all you want about implementation details – it’s not at all necessary and anyway who says otherwise has tunnel vision.

  20. Clive Says:

    Simple. Try this. Type “yum install n”. Now wait 30+ seconds while yum refreshes a bloated 10MB database just to populate a simple completion list.

    Yes, seriously, that cancerous piece of shit yum does a resync even for bash-completions. What a joke.

    Yum is killing Fedora, plain and simple.

  21. Clive Says:

    Wow, not only does your package manager suck. Your blog software also sucks.

    Above was supposed to be “yum install n[tab]”

  22. Rafaela Says:

    It’s going to be finish of mine day, however before ending I aam reading this enormous
    piece of writing to improve my know-how.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: