|
|
Subscribe / Log in / New account

Gentoo Optimizations Benchmarked (Linux Magazine)

Linux Magazine looks at benchmarks for Gentoo using different levels of GCC optimization. Testing -O2, -O3, and -Os (the latter being "optimize for size") for Gentoo, as well as adding Ubuntu 9.04 into the mix, they run the Phoronix test suite and graph the results. As one might guess, the results are mixed: "These tests show that when it comes to optimizing with GCC, there is not a huge amount of difference between them. If there had to be a winner, it would probably be -O2. It was often on par with -O3 while sometimes leading and sometimes trailing by a small margin. The fact that -O2 will also result in lower memory usage probably helps to tip the scales in its favour."

to post comments

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 18:11 UTC (Fri) by khc (guest, #45209) [Link] (2 responses)

not the same version of kernel, not the same version of X, and not even the same version of Nvidia driver. That doesn't stop them from making a comparison though, especially with so many graphics oriented tests.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 18:35 UTC (Fri) by realnc (guest, #60393) [Link] (1 responses)

The X11 comparisons are not very useful because of that. However, the rest is valid; the different kernels don't make much difference.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 23:24 UTC (Fri) by mmcgrath (guest, #44906) [Link]

> the different kernels don't make much difference.

prove it, they didn't.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 18:33 UTC (Fri) by realnc (guest, #60393) [Link]

The results are a confirmation that different software benefits from different flags; mainly -Os vs -O2. For best results, distributions should take this into account, IMO, and build the packages accordingly.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 18:55 UTC (Fri) by Trelane (subscriber, #56877) [Link]

A big dangling question here is the libraries. Clearer impact of optimization flags would be achieved if the entire system were emerged from stage1 with the respective compiler option. As it is, a big dependency is how much the program calls into the default-compiled libraries.

Also, it'd be clearer how much of a benefit -O2 is if they compared with slower RAM.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 18:57 UTC (Fri) by puntium (guest, #58115) [Link] (33 responses)

What I took away from this article is that I can run Ubuntu and in exchange for a ~1-2% slowdown, I don't need to deal with building junk from source.

I'll take that tradeoff any day of the week. Gentoo only seems to makes sense for people who have no concept of opportunity cost or the value of time. If the energy people put into developing Gentoo were put into macro-level optimization of upstream (make Cairo faster, improve speculative readahead or I/O performance, improve boot parallelization or whatever), you'd get far more than a 1-2% ROI.

Of course, it's FOSS, so nobody can tell anybody what to do. Sigh.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:06 UTC (Fri) by flewellyn (subscriber, #5047) [Link] (32 responses)

What I took away is that people are still not understanding the real benefit of Gentoo. They hear "optimize your system for your needs" and think of GCC code optimizations, which is not the point.

The real point is choosing exactly which features you have in your software, without having to roll your own. The build system takes care of tracking the dependencies, and you end up with precisely the feature set you need. THAT is the optimizing that Gentoo really enables. This compilation stuff is, as you note, trivial by comparison.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:11 UTC (Fri) by Trelane (subscriber, #56877) [Link] (11 responses)

The problem is, in my experience, that you end up becoming part of a large-scale wetware USE and compiler flag bug testing system. :)

Is why I switched to ubuntu, ultimately. Things just kept breaking. Maybe it's better now.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:14 UTC (Fri) by flewellyn (subscriber, #5047) [Link] (10 responses)

I never had large problems with that. My main issues came about when I decided to ditch GNOME for KDE. I had to rebuild with new USE flags, which took a bit of time.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 23:35 UTC (Fri) by maney (subscriber, #12630) [Link] (9 responses)

So all that careful tweaking optimized your system... as long as you didn't change it much, and then you got to build it over again with new rules to accomodate the new order?

There's a reason Knuth called premature optimization the root of all evil. Just sayin'

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 0:28 UTC (Sat) by nix (subscriber, #2304) [Link] (7 responses)

Computer time is cheap these days. Really really cheap. Worrying about
spending a bit of time recompiling things is pretty much pointless.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 16:21 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

Computer time is cheap. Electricity is not.

Gentoo has a non-trivial impact on your power bill.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 20:29 UTC (Sun) by nix (subscriber, #2304) [Link] (1 responses)

Living in a cold country has a nontrivial impact on my power bill. Heating
the whole house is somewhat more expensive than heating one room, and
heating one room a bit using computational overspill is just gravy :)

(this reason may not apply to countries which aren't cold).

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 10:58 UTC (Mon) by mjthayer (guest, #39183) [Link]

Poor house insulation has a non-trivial impact on your electricity (/gas/oil/whatever) bill. Which tends to be a bit of a problem in the UK, as it isn't really cold enough to make people tackle the problem seriously :) (I have been in flats here in Germany which kept a comfortable inside temperature when it was -15°C outside and the heating was off (turned off by the thermostat).

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 16:58 UTC (Sun) by vonbrand (subscriber, #4458) [Link] (3 responses)

Computer time is cheap these days. Really really cheap. Worrying about spending a bit of time running slower applications is pretty much pointless. (Specially as most time is spent running GUIs, where it just doesn't matter if it takes 1 or 1.5 seconds to display something, which the user then ponders a full minute before taking the next step).

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 20:27 UTC (Sun) by nix (subscriber, #2304) [Link]

Yes: but you don't take the time recompiling *because* you can recompile,
but for the other reasons people have outlined here (I also like the
ability to easily patch the hell out of things and keep upgrading them
using the distro's tools, only stopping when the thing changes so much one
of the patches no longer applies).

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 10:27 UTC (Mon) by nye (subscriber, #51576) [Link] (1 responses)

That's a pretty silly comparison.

For one thing, 1 to 1.5 seconds is a massive difference, and it happens in the middle of something you're doing, which is annoying (generally speaking, if I have to wait more than a couple of hundred milliseconds for a response to an action, I start to get frustrated). On the other hand, running a compile in the background has effectively zero cost.

Perhaps the previous poster should have rephrased as 'throughput is cheap; interactivity is expensive'.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 15:38 UTC (Mon) by csigler (subscriber, #1224) [Link]

> 'throughput is cheap; interactivity is expensive'

+1

One of the most insightful comments I've read in a long while, esp. the "interactivity is expensive" part.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 6:04 UTC (Sat) by flewellyn (subscriber, #5047) [Link]

That "careful tweaking" amounted to switching the USE flags to "USE kde" instead of "USE gnome", and then "emerge --newuse world".

And the compile only took a few hours, during which time I was at work anyway.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:48 UTC (Fri) by yokem_55 (subscriber, #10498) [Link] (5 responses)

Not to mention that the infrastructure in gentoo means that you can mix and match bleeding edge components with other more stable components, pretty much to your heart's desire. Want a stable gcc with an rc1 kernel, last year's xorg release (great if you want to avoid the intel mess), and kde built straight from svn trunk AND have this whole smorgasbord managed by the package manager? With Gentoo, no problem. Other distros, well you can hook into other repos to upgrade parts, but those other repos might force you to upgrade other parts of your stack, and before you know it you might as well be running rawhide or sid.

As for CFLAGS? I haven't changed them from the defaults for several years now.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 20:28 UTC (Fri) by sgros (guest, #36440) [Link] (4 responses)

How this freedom to mix and match so many different components with so many parameters (i.e. compiler flags) helps with bug tracking? In other words, when you have a bug report, to correct the bug developer has to recreate your environment to be able to reproduce the bug. How Gentoo deals with this problem?

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 21:16 UTC (Fri) by yokem_55 (subscriber, #10498) [Link] (3 responses)

emerge --info (or its paludis equivalent) provides a pretty good summary of the build environment and is required 99% of the time when filing bug reports. Also the forums are a very helpful resource in diagnosing PEBCAK configuration problems.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 14:11 UTC (Sat) by sgros (guest, #36440) [Link] (2 responses)

This answered only a part of the question, namely bug reporting. But what about bug correcting, i.e. when you have to reproduce bug in order to correct it? And how much Gentoo gives back to the upstream projects?

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 21:29 UTC (Sun) by jengelh (guest, #33263) [Link]

They give back quite a lot.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 11:00 UTC (Mon) by mjthayer (guest, #39183) [Link]

Actually (as someone often on the upstream end of bug reports) I can see a massive positive benefit: testing under different configurations.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:51 UTC (Fri) by ledow (guest, #11753) [Link] (11 responses)

I don't think people ever really consider the customisability of Gentoo as the main factor in using it. I certainly wouldn't go looking at Gentoo if I needed to heavily customise a PC with certain features (or absence thereof).

The basic rule is roll your own, for most things, if you need that level of customisation (and very, very, very few people do). Why would you *want* to compile without a feature, for instance, (as opposed to just disabling it in the configuration) unless you're talking embedded applications? - and there are thousands of embedded distros and patches for those purposes that do a much better job than Gentoo ever could.

I don't see customisability as a valid reason that crosses the entire Gentoo userbase, and all the Gentoo users I know claim the speed gains are the main reason they use it (and some for the coolness factor of "it compiles itself!").

And then I point out the mathematics to the speed-freaks. Say that it saves you 1% of CPU *constantly*. The time and effort to configure and compile and then use that system (and I rarely hear of Gentoo systems running for years at a a time) is vastly outweighed by that initial compile. And the support issues. And the rare corner cases that knock the averages back down.

Most PC's *aren't* running at 100% CPU, and swapping to disk because of shortage of RAM all the time (if you are, you need a better fix than recompiling with -03!). You've actually sacrificed large chunks of CPU time in order to save tiny amounts in use when the processor rarely hits 100% anyway, or is bottlenecked by I/O rather than CPU or RAM.

In fact, most of the machines I manage (desktops, servers, personal PC's, etc.) hover around 5%-10% usage, averaged over a full year, unless I'm playing a game on them. The compile might be "dead" time that you weren't using the computer in anyway, but you are wasting so much time and effort in order to get 1% improvement (possibly, maybe, assuming everything is configured correctly and it compiles first time). Use that 1% of time to take a normal distro and pare it back a little, or optimise the SINGLE application that takes the most power (e.g. on a web server instance, maybe the Apache process, etc.). You'll save similar amounts of effort in much less time and with much, much less trouble.

Now these optimisations *might* get you that 1% on your frame rate in heavy games but now we've turned Gentoo into "go faster stripes", somewhere in the realm of "oxygen-free gold cables" but instead of audiophiles we're talking gamers (Linux is hardly renowned for being friendly to that community anyway!). Go buy another stick of RAM or overclock by a few percent and you could blow all those optimisations out of the water in seconds.

The trade-off isn't there, and Gentoo seems to only ever have been an interesting experiment with no actual, practical purpose. Otherwise people like Google would be using it to claw 1% off their power usage or get 1% faster queries. It's a toy, in my eyes. Interesting. Fun to mess with. Something to point at. But it is just a toy.

All the machines I manage run bog-standard kernels, with bog-standard compiled software for i586... we don't get performance issues, we don't have compatibility issues (Motherboard dead? Slap the drive into any Pentium or above machine and carry on) and everything just works fine. It also takes a little over ten minutes to port a complete image from one machine to one on an entirely different setup.

Seriously, where is the *application* for Gentoo?

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 20:20 UTC (Fri) by nix (subscriber, #2304) [Link] (3 responses)

What I find it valuable for is that you can arrange to have all the source
for your whole system, exactly as it's running, all *there* and greppable.
No need to pull down source packages, you can do audits for uses of things
across the whole installed set of packages at disk speed. That's worth a
*lot*.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 21:46 UTC (Fri) by mjg59 (subscriber, #23239) [Link]

You can do the same with the Fedora CVS tree without any real trouble. It's not significantly harder
with Debian-derived systems.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 13:07 UTC (Sat) by tzafrir (subscriber, #11501) [Link] (1 responses)

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 13:54 UTC (Sat) by nix (subscriber, #2304) [Link]

oo, that'll come in very useful. Thank you!

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 21:00 UTC (Fri) by flewellyn (subscriber, #5047) [Link]

I have been a Gentoo user for five years, and most of the Gentoo users I know do view customizability as the reason for using it. I wrote the comment I did based on that experience.

Why you then turned around and talked about speed gains, when I had just said they're not a factor, is beyond me.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 22:20 UTC (Fri) by rahvin (guest, #16953) [Link]

I disagree completely. I can't comment on why other users use Gentoo but when I used it (and I've had a machine that uses Gentoo for 7 years now that up until a few months ago was my primary router/firewall/dsl modem/general server for my home) was because I could configure anything and the package selection dwarfed any other distribution. I use some rather low user base software on my Gentoo machine because there were ebuilds in the emerge system for them.

Every single software package you can imagine is in their "ports" system. In my experience for small user base software Gentoo is the only distribution that has automatic install packages. When I stopped using it as my primary system (because they were making to many changes for me to keep up with in the unstable branch) they had introduced flags on thousands of packages that would trigger different options. Only want mysql support configured into every package instead of mysql and postgres? There is a flag for that. Don't want QT support in any package? There is a flag for that. The customization ability of Gentoo is unsurpassed. You can ensure packages have support for options and no support for others so users can't use unapproved software because the features won't be compiled in and libraries won't be installed.

Maybe it's not a big deal to have hundreds of different libraries and package options turned on in a generic binary package but the ability to limit that results in smaller binaries and a better system (and hopefully more stable) IMO. God forbid the system ever gets cracked, but I don't want said cracker to have an easy time of it with pre-built support for libraries and packages I don't use. That and the system was very easy to manage as long as you didn't ignore it for 2 years (the reason I dropped it as my primary firewall, that and power considerations). All it takes is to administer is a once a month cron job with "emerge --update world" then logging in the next day and doing "etc-update" to check for configuration changes in the new packages and restarting processes that have updated configurations or altered binaries.

As I said, Gentoo is a system that requires administration time monthly. My new firewall/home server was put in to reduce power costs (it's a mini-itx low power system, actually doesn't have a PSU, just a max 100watt power brick and 12v plug) and I decided to use Debian because it requires a LOT less administration time because they go to extreme effort to reduce or eliminate configuration changes in the stable branch and the stable branch is supported a very long time which is ideal for someone like me that no longer has time to maintain an active system monthly.

Gentoo is the system you want if you want a tightly controlled system. In fact if you run hundreds of systems Gentoo would be easier to manage than most distributions as you can build your own binary "ports" library and ensure each system has only the software it needs with no extra fluff such as unused support for features or other software and no libraries that aren't used. IMO it's all those extra features in binary packages that isn't used that causes system instability (rare) or program's to crash (not so rare). Most distributions compile their packages to support every single feature and cross support for other packages under the sun that 90% of people don't need. Ebuilds are also trivial to make (the reason Gentoo's ebuild library is so large) and explained in a few pages. RPM has 200 page books to explain it and I tried once to understand how it works and failed (put about the same time into it as I did to understand how ebuilds work)

Gentoo has it's uses, people that deride it IMO don't fully understand it's advantages.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 22:22 UTC (Fri) by marduk (subscriber, #3831) [Link] (3 responses)

You are both right and wrong in some of your comments.

First of all, I pretty much use Gentoo because it's easily customizable. It's easy with Gentoo. Before that I was a Slackware user. I would just install the minimal Slackware and for everything else I'd compile it myself into /usr/local because what Slackware had was either missing, too old or was missing a feature or another or just didn't do what *I* wanted it to. Gentoo gives you more options out-of-the-box but also makes it easy to go beyond what they provide (and not have to wait for someone else to do it for you). But not everyone wants/benefits from this and so obviously Gentoo is not for everyone. But to say there is no benefit or that the benefit isn't used is erroneous.

Secondly I do agree with you that Gentoo *is* kinda like a toy. Some people like to tinker. I'm a tinkerer. For some people a computer is just a utility. For others it's a hobby. I prefer Gentoo because for me Gentoo puts the "fun" back in computing (and Linux especially).

As far as optimizations are concerned, I don't optimize for speed, because I have fast computers and I don't do a lot of things that require a lot of CPU. Memory, however is different. I do use another binary distribution that uses a *lot* more RAM and swaps a heck of a lot more than my similarly configured Gentoo box that's running pretty much the same software. Now I don't know exactly why. I haven't looked into it that much truthfully. But my guess is that the apps in the binary distro is just linked to everything under the sun and it consumes memory, which is a needed "optimization" for me. Especially because I work/test things in virtual machines. But even simple desktop-like stuff takes much more memory. E.g. top shows that console-kit-daemon, which is a root-run daemon, takes up nearly 13x more DATA memory on my binary distro. These are single-user desktops that are similarly configured, but for any given process it uses *much* less memory on Gentoo. It all adds up, and before you know it you are in swapland.

And when other people ask me questions about Gentoo, it's usually of the type "how do I get Gentoo to do X" variety, not "How to I make Gentoo run faster so i can post some benchmark". Most of the things these people want to do are things that would be much more difficult to do in a binary-based distribution, which is what I assume brought them to Gentoo. And, to be honest, a few times I've wonder *why* these people want to do these things, but I guess they're people like me in that they like to have things the way *they* want them and not necessarily the way it was given to them.

As far as the "application" of Gentoo, that seems like you are asking for a business need. I don't have one. But Gentoo isn't about business. It's about individuals.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 5, 2009 12:35 UTC (Thu) by golding (guest, #32795) [Link] (2 responses)

Ditto, with two additions.

1) I came across Gentoo nearly 9 years ago when I needed some documentation no other distro had. I decided to change to Gentoo on that alone. Documentation in Gentoo is supreme!

2) In time I discovered I could take out all packages and libraries I didn't need or want. I know of of no other distro (except LFS, is that a distro?) where you can remove in total either Java or Emacs. Emacs was the bane of my life, I didn't like it and didn't want it on MY machine. Same with Java. My Gentoo has neither package in any form on it.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 5, 2009 14:16 UTC (Thu) by anselm (subscriber, #2796) [Link] (1 responses)

The standard installation of Debian GNU/Linux contains neither Java nor Emacs, so there's nothing to remove.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 5, 2009 18:34 UTC (Thu) by nix (subscriber, #2304) [Link]

Also, both Java and Emacs's problem is that they are insufficiently
integrated into the rest of the system: they're in their own little worlds
and barely realise that Unix is out there. So removing them is relatively
trivial. (Emacs in particular. There are elisp packages that depend on it,
but fundamentally it's for users to interact with, so it's not as if
removing it should lead to half your desktop being zapped because some
critical library depended on Emacs...)

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 8, 2009 21:22 UTC (Sun) by mrdoghead (guest, #61360) [Link]

Actually, I've only ever heard people cite control and customization as reasons for using Gentoo and never have I seen performance benchmarks given consideration outside the odd magazine article. People who focus on the compilation issue and potential speed benefits in consequence tend to be Gentoo detractors, as it seems to play out again here. For my control-freak part, souce-based distributions are all about control, customization, and exclusion of as much horrifying backdoored and inscrutible and braindead software as possible as easily as it can be done. Gentoo counts among the pioneering projects that aim at giving computer owners a real say in what and how their machines run.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 19:56 UTC (Fri) by Klavs (guest, #10563) [Link] (1 responses)

Agreed. For me, using Gentoo (when I once did) was never about trying to squeeze an extra few percent of performance out - frankly who cares?

Gentoo is like the BSD's (with their ports), but with a much better tool for managing the ports.

I don't understand why nobody thinks BSD ports is about performance, when they appearently think Gentoo is ?

The shops that use Gentoo for operations are, in my opinion/experience, the ones that would have used BSD otherwise, or would have a large set of packages of their own making, meaning they'd end up with having build and maintaining almost their own distribution anyways.

In many larger shops, it's almost impossible/hugely impractical to stay with what the distributor choose at the point of release, and much "cheaper" to build a few "modifications" to your distribution of choice, than running too many different distributions, which usually have other problems instead.

Either packages are missing, the versions available doesn't support some feature the developer wants/needs, some bugs bug you, and they are fixed upstream in a later version etc.

And when doing that, Gentoo makes it very easy to build your own packages - instead of learning the deb/rpm package formats.

It takes work to maintain your own distribution - also if you use Gentoo, but for some the pros, outweights the cons.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 30, 2009 20:27 UTC (Fri) by Tomasu (guest, #39889) [Link]

Who cares? Last time I installed linux on my mini-itx (C3-2 Nemiah) box, video playback was on average used 20% less cpu. Went from 60% or higher to 40%, on plain xvid/divx videos using mplayer. The entire system was compiled with -march=c3-2 and -Os. They made a HUGE difference imo.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 0:03 UTC (Sat) by etrusco (guest, #4227) [Link]

Since nobody yet wrote a comment with the word "pointless", I'll do it ;-)
Alright, it's not completely pointless: it clearly demonstrates that most packages should be compiled with -Os! Next they could measure battery time with -Os and -O3 modes :-)

Other than that, it just shows that GTK version or default build options in Gentoo have much better performance than Ubuntu's and that kernel and/or nvidia driver tested in Gentoo perform a little better than Ubuntu's; these deserve some investigation. None of these issues are mentioned in the article, tough; instead, the differences are credited to the CFLAGS (at least they used the same compiler version!), which is at very odds.

Gentoo Is Not About Performance

Posted Oct 31, 2009 0:03 UTC (Sat) by hathawsh (guest, #11289) [Link] (8 responses)

The ability to tweak compiler flags is nothing but a distraction from Gentoo's real benefits. To me, Gentoo is about giving users the maximum possible power to solve bugs. There is a whole class of issues that Portage can solve more easily than a binary distribution.

Gentoo lets me eliminate buggy components instead of working around them. For example, on a Gentoo desktop I've been maintaining for 5+ years, I disabled support for OSS, aRts, and ESD, so that all applications will use ALSA directly with hardware mixing. That simple change solved most audio problems at once, saving me hours of research. By contrast, all 7 of the Ubuntu desktop computers I manage have ongoing audio problems. (Now it looks like I should try OSS 4 as a replacement for ALSA. I am confident Gentoo will let me do that easily.)

Not long ago, on that same desktop, I wanted to upgrade KDE, while downgrading CUPS, because I determined that the newer version of KDE would solve some bugs, while the older version of CUPS would solve other bugs. The Debian/RPM way would be to make my own CUPS package, but then I'd have to maintain that package, which could easily consume hours of my time on a regular basis. The Gentoo way solved this problem much more elegantly: I specified the range of versions of CUPS I want in a configuration file, then Gentoo respected that choice for all future upgrades.

I've been running Ubuntu on my laptop for the past year. In retrospect, I think that might not have been the right choice, because I have spent too much time working out bugs that I could have solved by simply upgrading or downgrading individual packages. Karmic is definitely looking better than Intrepid or Jaunty, so I'll hold out for a while, but if I have many more day-long sessions working out some nasty bug, I'm going to jump back to the comfort of Gentoo.

OTOH, the 6 family desktops running Ubuntu will never run Gentoo. Gentoo is great for computers I use daily, but it's terrible for all the other computers. The 2-5 year Ubuntu stable cycle is just about right for everyone else, even if that means they have persistent minor issues.

Gentoo Is Not About Performance

Posted Oct 31, 2009 1:00 UTC (Sat) by kev009 (guest, #43906) [Link] (2 responses)

People, thank Gentoo users the next time you install software on your binary distro.

We are the ultimate GCC and binutils testsuite, not to mention all of the build and test suites of various core and extra packages.

As others pointed out, GCC optimizations aren't the crux of Gentoo. My favorite part is only building with the USE flags of the options I care about. This means smaller code size, less attack vector, and choice of libraries (i.e. gnutls vs openssl, cairo?, gtk vs qt, xcb vs xlib?). The other primary advantage is the rolling release, which is also a feature of Arch Linux.

If this doesn't float your boat, use Fedora... but at least acknowledge all the work and testing that Gentoo users and devs perform.

Gentoo Is Not About Performance

Posted Oct 31, 2009 14:03 UTC (Sat) by sgros (guest, #36440) [Link]

But he doesn't say he's helping to find and correct bugs, he finds Gentoo great because he can avoid bugs by selecting different (presumably) older components.

Gentoo Is Not About Performance

Posted Oct 31, 2009 18:16 UTC (Sat) by Cato (guest, #7643) [Link]

The other great thing about Gentoo is the wiki - it has extremely detailed HOWTO pages on almost every topic you can imagine, and these are useful for almost all other distros. As an Ubuntu user, I'm very glad Gentoo exists!

Gentoo Is Not About Performance

Posted Oct 31, 2009 7:01 UTC (Sat) by michich (guest, #17902) [Link] (4 responses)

I have spent too much time working out bugs that I could have solved by simply upgrading or downgrading individual packages.
Reverting to an old version of a package does not solve bugs. It's still just a workaround.

Gentoo Is Not About Performance

Posted Nov 1, 2009 10:03 UTC (Sun) by dambacher (subscriber, #1710) [Link] (3 responses)

Yes, they are workarounds, but that's why I use gento on my __servers__ exclusively:
* You can upgrade single packages if they have bugs/security flaws.
* You can downgrade to a working version if the latest is not working for you
* You can stay on the version that is best for you
* You can add modifications if needed.

Gentoo Is Not About Performance

Posted Nov 5, 2009 18:49 UTC (Thu) by vonbrand (subscriber, #4458) [Link] (2 responses)

Let's take them one by one...

  • You can build your own packages for all distributions I know about, so this isn't any kind of advantage
  • See above.
  • See above
  • See above

There is no advantage whatsoever here. There is just one *huge* disadvantage from building everything with tweaked configuration and environment: You are the only person in the world with that exact software. If something breaks, you are totally on your own. And for me that one alone by far outweighs anything else.

If you factor in the comment above that you need to babysit the system constantly, it is just a time drain. I've other things to worry about, thank you.

Gentoo Is Not About Performance

Posted Nov 5, 2009 19:26 UTC (Thu) by hathawsh (guest, #11289) [Link] (1 responses)

I disagree:

1. Building packages for binary distributions is time consuming. I have built .debs and .rpms and have always ended up regretting the time I spent on it. By contrast, Gentoo's automated package building saves a lot of time.

2. I find bugs that are apparently unique to me in Ubuntu and Debian a lot more often than I find such bugs in Gentoo. Why? I don't know. Maybe Ubuntu/Debian users are more prone to suffer in silence, while the Gentoo community communicates more, digs in, and solves it.

3. What babysitting? Yes, you have to keep up with the rolling upgrades, which is the main reason Gentoo is not good for everyone, but the rolling upgrades are very beneficial for certain purposes.

Gentoo Is Not About Performance

Posted Nov 9, 2009 2:14 UTC (Mon) by vonbrand (subscriber, #4458) [Link]

  1. I don't see the difference here, sorry. You get the new source ball, fix compilation problems, look if some configuration changed (or has to be redone), tweak any changed flags, ... The time spent actually creating the package is miniscule in comparison.
  2. Good for you! But I really doubt very it much that you see more bugs in $RANDOM_DISTRO than in DIY compiling from fresh out of the oven sources. I do see more random fallout from the (few!) packages I do follow upstream than from the (several thousand) packages from Fedora. I just don't blame the distribution for them... and I guess you don't either.
  3. Yes, exactly that babysitting.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 1:30 UTC (Sat) by csigler (subscriber, #1224) [Link] (6 responses)

Wow. I thought the "Gentoo is for r1c3r5" meme was played out by the end of 2006 *chuckle*

I used Debian faithfully for my personal workstation and server for 9 or 10 years. The introduction of "testing" back in the old days kept me from switching much earlier. I supported mostly Red Hat and Mandrake ("Get off my lawn!") at work.

I switched to Gentoo about 3 years ago and haven't looked back (although there was one short bumpy patch). I left Debian because I kept having dependency problems installing cutting-edge versions which I needed of some apps, and testing just wasn't keeping up with my requirements.

Every distribution has its own learning curve, and I'd dare to say that Gentoo's is a little higher than others (esp. Ubuntu). In addition, Gentoo configuration is different from other distributions, so you'll be learning some new stuff to get things working the way you want. But the advantages to me have been that:

- Community support and bugtracking is pretty good, so I can get help or find out how to fix things.
- Once I understood things better, I could fix my own problems.
- There are dependency problems, but they're easy to understand and resolve in almost every case.
- It Just Works(TM).

Just my 2 cents.

Clemmitt

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 4:10 UTC (Sat) by Holmes1869 (guest, #42043) [Link] (5 responses)

I agree completely. Mandrake/Mandriva user since 2001. Switched to Gentoo when I built my new (cause I knew compiling would be brutal ;) dual processor Opteron back in April 2006, and haven't even been tempted to look back. The learning curve is HUGE, but I learned a TON about Linux in general, which was my main motivation for switching. I feel that all the hand-holding of Mandrake kept me blind to some of the more ugly/beautiful things about raw GNU/Linux.

Enough of that. Anyway, after 3.5 years, why am I so happy with it? I'm running the latest versions of KDE, X, and the kernel, but I never had to really "upgrade". It's much more time-consuming, but it's great to be using the latest software through tons of incremental upgrades over many years, instead of a possibly disruptive large one.

Not surprised that Gentoo did better overall on the benchmarks. I don't use it for the speed, but I've never noticed any speed hiccups either.

Back to Debian

Posted Nov 1, 2009 23:45 UTC (Sun) by man_ls (guest, #15091) [Link]

Not that anyone should particularly care, but my story is quite different: I was unfaithful to Debian when I tried Gentoo for a while (partly looking for performance for some 3D work I was doing at the time, partly out of curiosity). But it served me well as I soon got bored: my usual "apt-get update" + "apt-get upgrade" routine that took 2 minutes become an annoying "emerge world" which took anything from 30 min to several hours. After the third time recompiling OpenOffice.org (just for the fun of it, I guess) I went back to Debian and haven't looked back since.

Actually I tried OpenSuse for a while and would like an excuse to install Fedora or CentOS. But I always go back to Debian. There is something magic in being a sysadmin with so little effort: on some of my machines I run stable and have automated security upgrades, and it works without a hitch.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 13:43 UTC (Mon) by Tuxie (guest, #47191) [Link] (1 responses)

I was a Gentoo user for 7 years (since before v1.0) but I switched to Arch about a year ago and I haven't looked back. Arch has most things I liked with Gentoo but uses binary packages by default and AUR, its community repository (which is source-based like portage) is generally more up-to-date and better maintained than Gentoo has been in the last years.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 5, 2009 4:31 UTC (Thu) by roy.hu (guest, #61386) [Link]

I totally agree that Arch Linux hit the sweet spot between binary-based
distros and source-based distros.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 15:38 UTC (Mon) by jackb (guest, #41909) [Link]

I switched to Gentoo somewhere around 2001-2002 because it was more user
friendly than Linux From Scratch.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 21:19 UTC (Mon) by Felix.Braun (guest, #3032) [Link]

I'd like to second that.

Gentoo is about being able to tweak every component in your system to your heart's content (including but in no way limited to CFLAGS). Why would you want to do that? Well for me it was because I'm interested in knowing how things work. I have learned a whole lot about Linux systems in general. I acknowledge that some people are quite happy that they don't need that kind of knowledge. But it interested me and Gentoo makes it fun and easy not to lose your way in the details.

However, I did find some bugs in GTK+ that appearently were triggered by my choice of CFLAGS as other people weren't able (nor willing) to reproduce them. So yes, Gentoo should be seen as a valuable resource for testing combinations of weird configure-time options.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 14:39 UTC (Sat) by ldarby (guest, #41318) [Link] (3 responses)

Question: I use Slackware, and modify a lot of source code, everything from emacs to kpdf, Slackware doesn't make this difficult, or particularly easy, it just stays out of my way. Would Gentoo make this easier? Is there any built-in tracking of local source modifications across version upgrades, or would they just get clobbered on the next upgrade?

Thanks

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Oct 31, 2009 20:29 UTC (Sat) by csigler (subscriber, #1224) [Link]

> Is there any built-in tracking of local source modifications
> across version upgrades, or would they just get clobbered
> on the next upgrade?

The "source code tree" for a Gentoo box is installed under /usr/portage. Any changes you make there to patch/modify/upgrade any package will get clobbered when the tree is re-synced. Your local packages and mods are generally installed under /usr/local/portage. By adding a single line to /etc/make.conf, you can tell the portage package management system to look there as well as the default location.

Then, you can manage any local packages any way you want under /usr/local/portage. You can keep them under a SCM system, or just manage things by hand. The normal way to feed your mods into portage so they are built and installed is to extract the "diff -u" patches which need to be applied to the distributed source code.

Once you have your patches to the original .tar.bz2 dist file, you copy them into the "files" subdirectory below where the .ebuild file for the package lives. (The .ebuild files are a special type of script that tells portage how to unpack, patch, build, test, and install any program from its source code.) Then edit the .ebuild file in question and add an "epatch ${FILESDIR}/filename.patch" instruction so the code gets patched before building.

I've simplified things a bit. You need to learn where to put the "epatch" instruction within the .ebuild, for example. But that's essentially how to manage a local package that portage doesn't provide, or to take a package in portage that doesn't work the way you want it to and patch it up and install it locally so it does.

Clemmitt

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 1, 2009 9:57 UTC (Sun) by dambacher (subscriber, #1710) [Link]

To answer your quesstions in short:
They get clobbered - unless you do it the gentoo way...

Gentoo installs patched packages from its own "ebuild" information.
If you upgrade, it will drop your previous package and install a new one.
You can modify this behaviour in multiple ways, of course.

You can manually interfere within the unpack and compile process to add some patches, but they will go away next time you build the package.

If you want to change a package on your own, you have to copy its ebuild file and add your patches/modifications there. you may want to create your own "overlay" directory tree for your ebuilds. Then you can share your tree with others. That's the gentoo way.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 15:32 UTC (Mon) by jackb (guest, #41909) [Link]

Like the other two comments mentioned you can maintain your own ebuilds, but
with newer versions of portage this is no longer necessary.

Any time you install a package portage will look in the /etc/portage/patches
and look for a directory that matches the package you are installing
(example: /etc/portage/patches/sys-apps/glibc). If the directory exists it
will apply all patches found in that directory after it unpacks the source
code.

Obviously it's your responsibility to make sure the patchs apply cleanly.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 2, 2009 9:44 UTC (Mon) by eduperez (guest, #11232) [Link] (1 responses)

I do not quite get why this article about GCC optimizations has (again) derived into a war between Gentoo and the rest of the world. Could someone please explain to me how these compiler optimizations (or lack of them) cannot be applied to the build process of any other distro? Thanks.

Gentoo Optimizations Benchmarked (Linux Magazine)

Posted Nov 5, 2009 20:49 UTC (Thu) by dlang (guest, #313) [Link]

they could, but realisticly only by the ditro maintainers, which makes it extremely hard for anyone else to test their impact.

gentoo makes it pretty easy to test various options yourself.


Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds