RPM dependency size viewer now available

The interactive RPM dependency size viewer (discussed earlier here and here) has now reached a stable 1.0 version. You can grab source and x86-64 RPMs from my website.

The diagram below shows an example, ocaml-camlp4-devel, a rather large OCaml package which I’m partly responsible for.

If you were to take a fresh Fedora 10 machine and yum install ocaml-camlp4-devel, you’d need a minimum of 404 MB (I mean, including things like glibc and the filesystem and everything else that camlp4 ultimately depends on). Where does the space go?

Click to enlarge

If you look at the top of the enlarged diagram, you can see that ocaml-camlp4-devel is not a tiny package, consuming 33 MB just for itself. The packages below it, ocaml, ocaml-camlp4, ocaml-runtime and glibc are ordered by the greatest to smallest total size (size inc. all dependencies) left to right. But the width shown is the incremental size, roughly speaking meaning if we got rid of that package, how much would we save.

We can see the ocaml-runtime pulls in util-linux-ng which has a huge chain of requirements (including python, interestingly). So one area to look at would be whether that dependency can be removed or narrowed down.

If you mouse-over a particular package, the colours change to show “parent packages” (above us, so sky blue), and dependent packages (below us, so grassy green):

Click to enlarge

There are still many ways to improve this viewer. I’m now out of time on this little project, but there is a git repository (kindly supplied by Red Hat / Jim Meyering) so if you want to hack away and supply patches, please send them. If you analyzed your own RPMs, let us know in the comments.



Filed under Uncategorized

4 responses to “RPM dependency size viewer now available

  1. foo

    Would it be possible to make this use PackageKit so that it can be useful on non-RPM distros? You could call it pkgdepsize!

  2. rwmj

    foo: I suppose so, I have no idea how though ..

  3. leif81

    this is really cool. slightly difficult to read though. I understand the Incremental value, but where does the Total line come from?

  4. rwmj

    leif81: Thanks for commenting, and I think it could be presented better too.

    I will just explain what the numbers mean:

    “Package” is the size of just the package itself.

    “Total” is the size of the package and all of its dependencies (including indirect ones, all the way down). This is what you would get if you were to take a completely empty system and do a “yum install <pkg>”. Such an experiment is actually possible using something like febootstrap or one of the kickstart-based appliance creators.

    “Incremental” is the additional space used by this dependency after all the previous dependencies of a package have been added. What is meant by “previous” in this context depends on how you navigate over the tree. In this diagram, it means assuming that dependencies are installed left to right, and dependencies are installed left to right in order of their total size.

    Complicated …

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.