Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Gentoo (was: What is the proper way to optimize compilations?)
  • From: Danny Sauer <suse-linux-e.suselists@xxxxxxxxxxxxxxxxxxxx>
  • Date: Thu, 24 Mar 2005 08:55:32 -0600
  • Message-id: <200503240855.32276.suse-linux-e.suselists@xxxxxxxxxxxxxxxxxxxx>
On Wednesday 23 March 2005 09:19 pm, Philipp Thomas wrote:
> "Carlos E. R." <robin1.listas@xxxxxxxxxx> [20050324 01:39]:
[...speaking of installing Gentoo...]
> >I'm not so adventurous ;-)
>
> And it IMHO doesn't get you very much (besides the feeling that you
> built everything from scratch :)

Qualifier: I'm typing this from a Gentoo workstation right now, and might be
biased. I'm still running SuSE, Slackware, and RedHat/YellowDog on at
least 2 machines each, though. :)

Most of the loud Gentoo advocates will push things like the ability to
optimize all compilations for the given system, for speed. Honestly, most
of that speed increase is in their heads. While my Gentoo systems feel a
bit snappier than the SuSE setups I've had on the same hardware, for
example, it's more because of the package selections (I can remove some of
the bloat that I don't need) than from stupidly using "-O3 -funroll-loops"
all over the place. There are 2 main reasons that I personally use it.
First, if I want apache built without the threading MPM, and I want mod_php
and mod_perl to all use the same mysql libraries, it doesn't take any more
work than it would to install a threaded apache with a threaded mod_perl
built on a threaded perl. Just change a couple of USE flags and go.
Upgrade a library? Run revdep-rebuild and the stuff that depended on that
library gets rebuilt against the new lib. A package wants to change some
config files in a protected directory (like /etc)? Its change will
*always* be made to a new file, which you go through and
accept/reject/merge using etc-update (rather than looking for all of
the .rpmnew and .rpmbak files, depending on whether the packager wanted to
overwrite your config or not)

So far, it's pretty similar to an RPM-based system, except without editing
spec files. However, I think it's easier to create ebuild files than spec
files. So, when you find a package that you want but which isn't included
in the system, you pull down the source and either make an ebuild, or just
configure/make/make install. It'll definitely work with the other stuff on
your system. Sure, you can do that on any other distro, but it's just a
little more integrated on Gentoo.

However, those are more "features" than reasons to switch. The single
biggest reason I changed a bunch of machines over is the incremental
upgrades. When a new software package is released and marked stable, then
that package is available for Gentoo. It's not just available for the last
2 or 3 versions, because "versions" don't really exist. A new "version" is
just a snapshot of the current state of Gentoo affairs, and is only
relevent when you first install. Once you're installed, you just update
packages periodically, and you're kept up-to-date. I still have a SuSE 7.1
system "somewhere" - I've had to roll my own RPMs to keep
security-sensitive stuff up-to-date, and lots of stuff won't even build now
with the ancient glibc on there. If I had installed Gentoo 3 years ago,
say, I could be keeping the software up-to-date right now without ever
having to have done a "version" update. I simply got sick of having to
bring the machine down, boot from install media, and update hundreds of
packages at once. Now, I can let a Gentoo system sit without updating for
a year or so, run "emerge sync" to update my package list and then run
"emerge -u -D world" and bring my same package set up to current standards.
That'd make me a bad sysadmin, but it proves a point.

It's not all roses, though. Gentoo's "stability" testing isn't the
greatest. Sometimes things make it into stable that maybe should've been
in testing for a tad longer. However, a little time reading the forums
will bring to light those packages that tend to not be tested as well. The
"mask" system is rather nice for that. If I want to stay with apache
version 2.0.13 for some reason, I just mask off versions above that number
(one line in one config file), and then updates to apache beyond that
point, as well as any deps that would be affected, don't happen when
running the same update command. If something else needs apache updated,
it'll alert me and won't go on until the problem's fixed.

"But, I've got a bunch of machines to maintain, I can't be compiling the
same package over and over". Then you set compiler flags to generate code
that'll work on all of your machines, add the "-b -k" flags to your
updates/builds on one machine, and share the binary output directory among
all of those machines (I use CIFS for that). Then, the update is only
built from source if the binary doesn't already exist on the network. It
works nicely - I'm maintaining several machines in just that way.

If you need a support contract, Gentoo's not for you. If you're on a modem,
Gentoo will irritate you. If you're not pretty familiar with the operation
of a Linux system, Gentoo will probably be frustrating as a "first" distro.
If you don't have a fast (I'm talking fast by modern standards, though I
still consider a 500MHz proc "fast"), you'll spend a lot of time waiting
for something to compile - or you'll be using Gentoo's binay packages (yes,
you can easily go that route for some/all of a system too), which does
negate *some* of the gains. It took roughly 1.5 days to get a full system
with KDE installed on my dual 2.1GHz Athlon MP / 1.5GB RAM system, maybe 2
days to get a similar setup running on my 2 GHz Semperon-based system. It
took close to 4 days on my 400MHz P2 system. Using a compile farm
consisting of the 2.1GHz system and the P2 (as well as the local machine),
a 400MHz K6-3 gets the base system installed overnight. And this is with
me knowing pretty well what I'm doing - add a few hours for a first-timer.
So, there's a large time investment in a "stage-1" "build absolutely
everything" install. However, the system one ends up with is incrementally
upgradeable "forever", has access to as many or more packages than even
SuSE, and will never make me wait until the "next release" if I want to use
the newest KDE. It works very well for many situations (and isn't ideal in
some other situations - like my 24MB RAM 486-based mail router), and the
forums at forums.gentoo.org are on-par with this list, though with a little
worse expert/newbie ratio (this list has several real smart folks, but the
same people can sometimes get lost in the noise out on the Gentoo forums).

--Danny, needlesly defending his choice on an unrelated mailing list :)

< Previous Next >
Follow Ups