Sunday, March 21, 2010

Updates with yum-presto

I have known about this for a long time, but I realized I haven't shared it here. In typical Linux distributions, each feature of the operating system is provided via a "package". (Of course, you can always install programs on your own, if a package is not available) I use Fedora Linux, so packages are distributed as "rpm" files, and the package manager is "yum".

Packages make software installs and updates a lot easier. With packages, everything you install is atomic. If you have something like Abiword, that's in a package. When an update is available, you install the package for the new version. No "updates", no "patches". Just a whole new version.

That may seem like it could eat up a lot of bandwidth, right? But Linux distributions now use a system to reduce the update size. On Fedora Linux, that's done via yum-presto.

From the description:
Yum-presto is a plugin for yum that looks for deltarpms rather than rpms whenever they are available. This has the potential of saving a lot of bandwidth when downloading updates.

A deltarpm is the difference between two rpms. If you already have foo-1.0 installed and foo-1.1 is available, yum-presto will download the deltarpm for foo-1.0 1.1 rather than the full foo-1.1 rpm, and then build the full foo-1.1 package from your installed foo-1.0 and the downloaded deltarpm.
But the key thing to remember is that you're still installing an rpm package. All that's changed is that you download a "diff" between one version and the next, and your system creates the rpm from the "diff". And you don't have to know anything about it to use yum-presto; it just there by default whenever you do an update.

Here's an example: I installed updates for my system yesterday, and (demonstrating the process for someone) happened to run the update from the command line. So I saw this message:

Presto reduced the update size by 77% (from 48 M to 12 M).

Rather than have to download 48 MB of packages to update, I only downloaded 12 MB. That saved me quite a bit of bandwidth - which is important, since I'm on vacation and the Internet connection here is very slow.


  1. I've heard of this before, though I don't recall exactly where (it is entirely possible that it was yumpresto/deltarpm). It's a great idea though.
    Do you know if APT/DEB-based distributions have a similar feature?
    a Linux Mint user since 2009 May 1 Please do follow and comment on my blog!

  2. This has been a standard feature since fedora 11 (current is fedora 12.) And it was available in fedora 10 if you set up your system config for it. A great add!

  3. Strictly speaking, RPM is the package file format, rpm is the package manager program, and yum is the update manager program.

  4. PV, I've done some googling, and while I can find lots of discussion on, say, Ubuntu forums asking about a "delta-debs" concept, and some people even started thinking about it - I don't see anything that says "delta-debs" actually exist today. So I think the answer to your question is no.

    But I'm not an APT/DEB expert, so I don't know for sure. Maybe someone else here can correct me?

  5. That was a neat post. I tried it for myself on my F12 box, at the command line, and got this for my latest set of updates {I haven't updated in a while}:

    Presto reduced the update size by 85% (from 30 M to 4.7 M).


Note: Only a member of this blog may post a comment.