Martin Pool's blog

--funroll-loops

I'm really fond of Gentoo. I'm running it on my laptop, and because distcc is very popular for speeding up whole-system compiles I deal with them fairly often. Like any group there are some pleasant and well-informed people and some who are less so. My impression is the overall level of experience (and maybe age) is lower than in Debian, but on the other hand you hear their project leaders calling each other assholes less often.

All that said, --funroll-loops is really funny:

This page is dedicated to the Linux Community's greatest ambassadors, Gentoo users. Like the annoying teenager next door with a 90hp import sporting a 6 foot tall bolt-on wing, Gentoo users are proof that society is best served by roving gangs of armed vigilantes, dishing out swift, cold justice with baseball bats to those fucking ricer bastards.

"I essentially started using Gentoo because my ....ing KDE clock would never show the right time in Red Hat."

"Watching shit scroll by for hours makes me a Linux expert overnight!"

I guess if it makes people happy and they learn something it's not all bad.

The whole thing kind of reminds of what Havoc said about metacity [img]:

Boring window manager for the adult in you. Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios.

Deltup for Gentoo

Wayne pointed out Deltup, a way to get delta updates for source in Gentoo. There seem to be some unsatisfactory details though.

First look at Gentoo

I installed Gentoo in a spare partition on the weekend. It looks interesting enough that I think I'll keep it, at least for a while, though I haven't removed Debian yet.

Gentoo Linux first came to my attention because it's such a killer app for distcc. (Or is it the other way around?)

Gentoo's big difference compared to other distributions like Debian or SuSE is that it generally doesn't distribute compiled binaries -- everything is compiled from scratch. So tools like distcc and ccache that can make compiles faster are really popular there, and some of the Gentoo user/developers like Wayne Davison have sent good patches.

Gentoo is not the first distribution to work this way. SourceMage and Lunar Linux also do this. Linux From Scratch takes the idea to the logical extreme, by having no software distribution at all but merely being a detailed description of how to build an system entirely manually.

Distributions are an interesting part of the Linux phenomenon: because they package up software that's available to everybody they're almost diaphanous, and yet they really shape the user experience and people become very attached to them. I'm not really aware of this happening to the same extent on any other system: I suppose the different BSD forks as are a little similar, and perhaps the collections of free software that people put out for OS/2 and Amiga are also related. Choice of distribution is right up there with choice of editor as an emotional/religious topic.

Gentoo made me reexamine the question: what is a distribution, and what makes one good?

Installer

The first and most obvious thing a distribution does is provide some kind of installer. There is no installer program as such: rather, the Gentoo boot disc gives you a root prompt from which you can create a partition and filesystem, untar a base image, and start installing software. It's pretty straightforward, though I think it helps to have some experience with Linux to help with any snags that turn up. I couldn't really recommend it for your first Linux install unless you had a knowledgeable friend standing by.

As it happens, I'm installing Red Hat on a colleague's machine at the moment. contrast is pretty stark: the Red Hat anaconda graphic installer is very pretty and allows a default installation with just a few clicks. Gentoo requires only about the same number of interactions, but they're command invocations rather than menu choices. I did need to carefully read the Gentoo manual despite being familiar with Linux, which is certainly not the case with Red Hat.

Because everything has to be built from source the install process goes somewhat slower than copying from a CD, although it's better than I expected. In about one day I had XFree86, GNOME, emacs and Mozilla Phoenix up and running. You can start using the machine quite early in the install -- I did some work with emacs in text mode while I was waiting for X11 to build.

Ironically enough, because I only have one working machine at home at the moment I couldn't use distcc.

Visual feel

Another point of differentiation for distributions, which the installer helps to establish, is the visual feel. BSD has a charming old-school feeling; Red Hat 9 is very slick and a little corporate; Debian is kind of quirky and spills technical detail everywhere.

Gentoo feels younger somehow; more fun and yet still polished. The GDM login screen literally made me say "wow". There's heavy use of ANSI color during the install program which really helps the eye follow vast screens of visual information, at the same time as establishing something like an IRC feeling.

Gentoo makes you feel like a participant in development, rather than just a consumer.

(I'm sure some people don't want this: many people want a computer that just works and they don't want to be part of a development team. Gentoo is not for them, at least not at the moment. That's fine: there are plenty of other distributions like SuSE or Red Hat which support that very well.)

A lot of discussions about Gentoo seem to take place on web bulletin boards rather than mailing lists. I can see that this might work pretty well but it makes me feel like an old fogey. In particular labelling new posters as "n00bs" on every post seems pretty lame. If Linus got interested in Gentoo and posted to their web site would they really want him labelled that way?

Editorial control

Distributions perform a role something like an editor or publisher in gently restricting the flow of software from developers to users. As a user I don't necessarily *want* to upgrade every bit of software as soon as it is released. It's kind of nice if somebody with a similar machine can install it first and let me know if it works, or can tell me what other packages need to be upgraded to get a proper installation.

This breaks down if the restriction is too tight: Debian has in my opinion persistently had trouble getting the right balance between stability and freshness. Perhaps there is in fact no single right balance: many users or developers are interested in tracking developement releases of some particular package but they want the rest of their system to stay stable. Using binary packages with relatively tight library dependencies means that sometimes upgrading a desired package will pull others forward. Building from source allows the dependencies to be as loose as the underlying software allows.

The main form of this in Gentoo is "masking" out packages or releases that are broken, so that they won't be installed by default. But this can be easily overridden by the user, if they want to take the risk for themselves. It seems like a nice balance to me.

Gentoo ship (optionally) a fairly heavily patched 2.4.20 kernel called gentoo-sources. In particular this contains the HZ=200 and preemption patches, which are supposed to improve interactive response. I have to say that it really does seem to work: the same machine running Gentoo is noticeably snappier than running Debian with stock 2.4.20.

Of course I could install all these patches onto Debian, but it's unlikely that I would go through all the work of finding them, worrying about their stability, and keeping them up to date. I think Gentoo performs a really useful intermediary role here by selecting patches that improve their user experience.

I'm not sure how much of the improved performance is due to the patched kernel and how much to the Athlon-specific binaries. I suspect it's more of the former.

Bogosities

People make some strange arguments for source-based distributions.

One is that they are more secure, which to me seems just crazy. No end user audits all the source that they install; they trust the upstream author to have checked it appropriately. Getting packages from a binary packager introduces one more person that you have to trust, but I've never heard of somebody wilfully corrupting their packages. Perhaps the finer control of a source distribtion allows you to exclude unwanted software, but the editorial control of a good distribution balances that out. I think building from source is pretty neutral for security.

There's also an idea that rebuilding for your specific machine will make things much faster -- using Athlon-specific opcodes rather than generic x86. It's possible, but I'm not sure I buy it. 99.9% of the code on a machine is not performance-critical, and so rebuilding it is in a sense wasteful. If people really cared about this, they'd profile crucial programs and fix the algorithms in them, rather than making a source-based distribution. On the other hand, Gentoo really does seem more responsive, so perhaps I'm wrong.

I don't think these are reasons not to use it. They're just not particularly reasons to use it.

Connection with upstream

To me one of the most important things a distribution can do is help the users communicate with the upstream authors, primarily to report bugs and suggestions.

A really good thing about the emerge system is that it seems easy for people to deal directly with the software. Updating to a new upstream version of a package looks far simpler than creating a new deb -- just copy and edit the existing ebuild.

Similarly, creating a debug-enabled build of a package is a simple matter. The lack of debug symbols on Debian has been annoying.

I really liked about Debian that it was easy to report bugs and that after being filtered by the package maintainer they'd be promptly passed on to upstream. It gives a good standard way to keep track of bugs, even if the upstream author is not responsive or doesn't have a public bug list.

I'm not convinced that Bugzilla works quite as well as debbugs for this purpose. But my impression is that Gentoo doesn't want to be a filter for bug reports in the same way that Debian does. Perhaps that's good; I've certainly had experiences of Debian maintainers ignoring bug reports that both I and the upstream maintainer thought were very serious.

Futures

One thing I'd like to see is downloads of deltas for package source. This ought to work really well, since source gives much better deltas than binaries. I guess the lack of this is my own damn fault.

Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May