Linux Performance: Different Distributions, Very Different Results

Posted by caitlyn on Mar 9, 2009 10:15 PM EDT
O'Reilly Broadcast; By Caitlyn Martin
Mail this story
Print this story

When I write reviews of various Linux distributions and describe differences in performance I almost invariably get a comment to the effect that all Linux distros are essentially the same: running the same kernel, the same libraries, the same filesystems. Performance should be essentially the same, right? The answer is a resounding no. The performance results of different distributions, even ones running the same kernel version, the same core libraries, and the same filesystem can be very, very different.

I see this issue debated on countless Linux forums often without a lot of facts. "It's faster for me" won't convince anyone and rightly so. In a discussion on LXer.com a user named herzeleid asked exactly the right question: "?I wonder why that is?" This little article grew out of my response.



Different distributions are better suited to different hardware. The most obvious example of this, both on the home desktop and in the corporate server room, are differences in processor architecture. For most desktop users this boils down to whether you are running a 32-bit CPU or a 64-bit CPU. (Dual and quad core machines are generally multiple 64-bit CPUs nowadays.) Yes, a 32-bit distribution will run just fine on a 64-bit machine and for most ordinary tasks there really won't be much if any difference in performance. For CPU intensive tasks that take full advantage of a 64-bit processor a 32-bit OS will not perform well. A friend of mine who is quite the artist does a lot of 3D graphics rendering. For her a 32-bit distro takes much longer to do the task than a native 64-bit distro. Anything involving a lot of number crunching will also suffer, as will high end multimedia tasks and high end games. A 64-bit distribution also can correctly address and utilize large amounts of RAM.



Differences in performance are most noticeable when a system is pushed to its limits. You see this happening all the time on a machine with modest specs. That includes everything from increasingly popular netbooks to older legacy hardware. In difficult economic times this applies to business as well as to home users. To cut costs I know of a number of businesses that now buy netbooks instead of conventional laptops. Many others are trying to get the most out of older hardware, some of it very old, to defer hardware purchases in this challenging economy. Linux is ideally suited to extending the life of older systems including systems that can't even meet the minimum specs for a current version of Windows. In these cases we are generally talking about 32-bit processors and 32-bit Linux distributions so processor architecture is not an issue. Performance differences among 32-bit distributions can be huge.



In the discussion on LXer.com I mentioned a user called azerthoth had this comment regarding the Ubuntu kernel:

?"There is also their kernel, those guys really need to explore how to load modules on demand. Last time I had my hands on an Ubuntu box I printed out the lsmod, stock it was 3 pages long."


Differences in how the kernel is built and compiled can make a big difference. So can the degree to which developers tune the kernel, the filesystems, and other aspects of the OS to the niche their distribution is trying to fill. The fact that O'Reilly has an entire book on UNIX/Linux System Performance Tuning makes it clear that there are a lot of aspects of the OS than can be tweaked for performance. Large distributions like Fedora, Ubuntu, SUSE, and Mandriva are one size fits all. Consequently they are optimized for none. In 2006 Fernando Apesteguia wrote an excellent article on how to optimize a Linux system for performance. All of the larger distributions can be optimized and performance can be greatly improved.



Many smaller or specialized distributions which target a specific part of the Linux user community rather than taking the one size fits all approach. The net result can be a much faster and sleeker system that is optimized right out of the virtual box if you choose the distribution that is right for you. Intel is taking this approach in their development of Moblin, a distribution optimized for netbooks using the Intel Atom series processors. A narrowly targeted distribution offers less technically inclined users the opportunity to enjoy enhanced performance without having to tinker with their systems.



On the desktop my regular readers know that I have been most impressed with Vector Linux and Wolvix, the two distributions that seem to do the best job of delivering a truly fast yet feature rich desktop experience even on hardware with very limited horsepower. Both distributions are aimed squarely at the home or small office desktop/laptop user and are not well suited to the server room. ?Vector Linux has some very smart developers who optimize the heck out of everything they can to produce a very fast desktop. They even rewrote the init scripts to speed booting a little bit. I know less about the Wolvix developers but they have to be doing similar things to achieve the results they reached with version 1.1.0. Both of these distributions are 32-bit Slackware derivatives. (A 64-bit version of Vector Linux is currently in alpha testing.)



?The way packages are built matters. Vector Linux builds for i586 and tunes for i686. It won't run on i486 hardware including AMD K5 based systems that might still be able to run a current build of Slackware. Other compiler flags/options do matter in some cases.

Some distros like Ubuntu load a lot of things by default that may not be needed. Yes, you can shut them off if you know what you're doing. How many users really don't know how to disable services and daemons they don't need? Slackware and many distributions derived from Slackware take the opposite approach: if a user needs something they can turn it on. Just start what most everyone needs by default. For example, some users have Windows systems they want to communicate with, sharing files and perhaps a printer. Others don't. Vector Linux 6.0 does not enable samba by default while many other distros do. The net result of choices like this is a faster out of box experience.

Slackware has a "keep it simple" philosophy. In Slackware things are left out that other distros generally include. For example, that Slackware doesn't implement PAM. Some fairly popular Slackware derivatives (i.e.: Zenwalk) include PAM but neither Vector Linux nor Wolvix do. Could the extra layer of security required for authentication make a difference, particularly on older hardware? Sure it could. The purpose of PAM is to allow for and manage different authentication methods on a network. On a single user system or in a small office old fashioned flat file password management is simplest and PAM isn't necessary. I certainly don't care about having PAM on an old laptop. For enterprise server security it's a must. This is one reason I do not consider Slackware appropriate for the enterprise server room. On the other hand, if you're optimizing for speed not having PAM may actually be helpful.

Speaking of security Slackware also doesn't include SELinux. Unless you work for a government agency or a security paranoid company/organization you probably don't care about this. It also adds overhead. In Fedora, for example, it's enabled by default.



It's a trade off between functionality and speed. Which is more important? It really depends on what you're trying to do, doesn't it? Some will argue that the Slackware keep it simple approach helps in terms of stability and reliability. I actually agree in principle though I'd say the folks at Red Hat have done a wonderful job with creating a stable OS with a whole lot of extra tools for the enterprise. It isn't particularly fast, though, particularly when compared to Slackware and some highly optimized Slackware derivatives like Vector Linux.



The bottom line is that there are many variables in how a distribution is built. Slackware starts out simple and fast without much cruft. The derivative distros can add on, tweak for a specific niche, etc... and get somewhat different results. Since I run a netbook and a couple of older systems I tend to prefer distributions that place performance over other considerations.

Full Story

  Nav
» Read more about: Story Type: Editorial, News Story; Groups: Kernel, Linux, Slackware

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.