8 Nerd-Its - +

Gentoo on a Multi-Core i7 System: Fast + Bleeding Edge

Page_white_text an academic article by Mark A. McBride (markmcb), published on 30 July 2009
tagged as gentoo, linux, pentium, multicore, and computing
other nerds have left 4 comments below

2_article_2906_thumb_gentoo

Gentoo Linux allows users to highly customize every installed program to tightly match hardware and usage needs.

Some time ago in the late 2002 timeframe, I downloaded a copy of Gentoo Linux and installed it on an old Dell laptop that was excess hardware I was trying to put to good use. Gentoo was cool because it compiled all of your software using custom “flags” that you specify. This meant that your software was highly optimized to match both your hardware and your utilization of it. If you were just running a web server, you could easily ensure hundreds of packages didn’t get installed. Aside from package avoidance, you could ensure that what you did install wasn’t bloated with support compiled in for features that would never be used. In theory, Gentoo was every geek’s dream.

There was one big catch: compiling takes time. To compile something like Firefox could take the good part of an hour. If you’re not familiar with compiling code, here’s the simple version: someone writes code, you compile it to “binary” files that work on certain hardware, and then you execute/use it. Most people just download binary files and are happy. This method is painless and only takes as long as you need to download the files. However, these binary files have been compiled to work on all sorts of hardware and to be compatible with all sorts of software, i.e., there’s overhead compiled in. For your average user, you’ll never notice the difference. But for a geek, having a light footprint that does exactly what you need and nothing more is not only interesting, but sometimes desirable.

2_article_2906_thumb_fedora-logo

Fedora allows users to install pre-compiled binary packages, which varies greatly from Gentoo’s compile-everything approach.

Despite its strengths, I personally gave up on Gentoo around 2004 when I decided it was just too slow to use. Every time I wanted to install or tweak something, I’d end up starting an install process at night and check it in the morning to see if all had gone well. It became a tad annoying and I eventually switched to Fedora for all of my Linux needs. Fedora uses binary packages, but when I wanted something it was immediately available (and in a known stable form, which is nice too, but I won’t get into stability). While this is quick and easy, it was by far more difficult to keep up with the “bleeding edge” of software. In distributions like Fedora you rely on distribution managers to say when it’s smart to upgrade, whereas in Gentoo you can easily tell the system to get the latest versions of software available. Again, while Fedora is more stable, it can be a hinderance when you really want the latest/greatest.

So recently I decided I wanted to be able to store all of my DVDs digitally and have plenty of storage room and processor power for virtualization. I grabbed 5x 1TB drives, built a 4 disk RAID 5 system with 1 disk for the OS, and plugged it into a new Intel Core i7 with 4 cores (8 threads) of power and 6GB of RAM. Moreover, I wanted to use a lot of the newest software that I had been reading about. Given that I had a lot of power and a desire to move back to the bleeding edge, I thought I’d give Gentoo another shot.

2_article_2906_thumb_gentoo_compile_vnc_fedora

Mac OS X with a Terminal [left] connection to Gentoo recompiling the “system” set of packages. XFCE [right] running on Gentoo (viewed in Mac OS X’s Screen Sharing application via xtightvnc) with Handbrake ripping a Tron DVD, Fedora 11 booting, and the System Monitor showing on the desktop.

In the screen shot above, I’m recompiling what Gentoo calls the “system” packages. It’s basically the collection of programs necessary to run the system. As you can see, there are 130 programs in my system set, which includes big items like the Perl and Python languages and monsterous system libraries like glibc. On my old machine this was definitely an overnight task. On this new system, it took 94 minutes to rebuild everything in my system set. Even more impressive, it took that amount of time while I was ripping DVDs (like Tron!) and playing around with Fedora in a virtual machine (that I intend to set up as a test bed for OmniNerd development). 94 minutes!!!1 If you’ve got no frame of reference, you’re probably underwhelmed. But if you’ve compiled code in the past, you know why I’m excited. And if you’re curious, movie ripping takes about 15 minutes on average using Handbrake to encode H.264 and 70% continuous quality. Not too shabby.

All of that said, you’re not going to recompile your system every day. On a more practical note, to rebuild Firefox 3.5.1 took 70 seconds (again, while doing other stuff). It’s the small, routine tasks like these that I think used to get under my skin before. When I want a new version of something, I want it now, not tomorrow. With Gentoo on this hardware, the wait is definitely in the reasonable range, i.e., I can handle a minute as it’d take me that long to download and install a binary file.

So, while I don’t claim to be a Linux or hardware expert, I do know what fast is. On a new system, even the Gentoo method of compile everything is fast. Given the speed, I think I’m going to keep it for my base/host OS and use virtualization to support any specific needs I have from other operating systems. If you made the choice I did 5 years ago to ditch Gentoo for something faster and you’ve got newer hardware at your disposal, I suggest you give it another chance. I think you’ll be pleasantly surprised.

Notes

1 Obviously 94 minutes is based on my exact system hardware and the system packages I have installed. Despite the fact that your system will certainly vary, the key point is that in an hour and a half you can have a 100% bleeding edge system fully customized to your needs. Good luck getting that in that little time with any other OS.

Similarly tagged OmniNerd content:

Information This article was edited after publication by the author on 31 Jul 2009. View changes.
Thread parent sort order:
Thread verbosity:
4 Nerd-Its - +
Drooling on Hardware ... by VnutZ :: NR10

My inner nerd is more intrigued by the hardware you’re talking about. What exactly did you buy? Did this replace your Mac Tower?

And of course, knowing me, I’m wondering what the benchmark is on that thing from BOINC.

2 Nerd-Its - +
FF3.5 compiling time by Anonymous :: NR0

Does the FF3.5 compiling time include its dependency?

OmniNerd Article Propagation

The Showcase

Nerd-Its   Nerd Trends   Last Ten  

  1. Continuing the discussion in I Refuse to Embrace Ignorance
  2. RE: Why wouldn't it be a religion? in Scientology: We've had it with you
  3. RE: The Pots should stop calling the Kettles black... in God before Country in the Military
  4. RE: Discussing Book of Mormon anachronisms in God before Country in the Military
  5. RE: Where to start learning, and government support of religion in Scientology: We've had it with you
  6. RE: Hurt Locker Blows Hard -- but not as hard as Green Zone in Hurt Locker vs Reality
  7. RE: Just Because It's Unexplainable Doesn't Mean Divine :) in Catholic Exorcist Points Finger at Vatican
  8. RE: The Pots should stop calling the Kettles black... in God before Country in the Military
  9. RE: Just Because It's Unexplainable Doesn't Mean Divine :) in Catholic Exorcist Points Finger at Vatican
  10. RE: The Pots should stop calling the Kettles black... in God before Country in the Military

What is OmniNerd?

Omninerd_icon Welcome! OmniNerd's content is generated by nerds like you. Learn more.

Voting Booth

Winter Olympic sports?

33 votes, 12 comments