Slashdot Mirror


Linux Kernel Performance How Will 2.6 Measure Up?

An anonymous reader writes "This story offers some interesting performance comparisons between the latest stable Linux kernels (2.4.x) and the latest development Linux kernels (2.5.x), comparing performance on both a single processor and dual processors. These numbers help validate that the upcoming 2.6 kernel will outperform the current 2.4 kernel, at least in some instances..."

32 of 177 comments (clear)

  1. Compile time speedups by IamTheRealMike · · Score: 5, Interesting
    The thing I'm most looking forward to is the better scheduling under heavy disk load. This'll hopefully make Linux a lot more responsive when compiling software, at the moment my machine can get bogged down and jerky when doing this.

    Of course, the real solution would be to not need to compile software (plug plug :)

    1. Re:Compile time speedups by sTeF · · Score: 5, Insightful

      why don't you use hparm -X?? -d1 /dev/hd?
      that'll enable ata??/dma features. and everything will be much faster...

    2. Re:Compile time speedups by Anonymous Coward · · Score: 3, Interesting

      Amazing, I've been running FreeBSD since 2.8 and I've never had an unresponsive system even while doing a build world; I guess the 2.4 kernel is alot worse than imagined.
      Hopefully it will be solved for you Linux guys in 2.6.

    3. Re:Compile time speedups by pkplex · · Score: 4, Interesting

      Yep.

      I first tried FreeBSD about a month ago, and thats exactly what I noticed about FreeBSD. Smooooooooth.

      For example in Linux ( 2.2.x and 2.4.18+ ) I found that when something demanding was going on ( like building mozilla, kernel, or such like ), all X11 became all choppy ( Mouse stuttered, typing lagged in bursts ).

      Not so with FreeBSD. Many times ive had GnomeICQ hit a bug and use 100% cpu, but I was unaware of this until days later when looking at top.

      A few days ago I installed FreeBSD onto my p100, with 64Mb of ram. Playing around, I ran many many dnetc's by having thousands of 'nohup ./dnetc &' lines in a file and executing it.

      At a load of 350 the p100 box was still very happy to do what I told it, and with very suprising responsivness. However, once the load got up to 450, my ssh connection to the box was terminated, and I had to restart sshd locally. Which is fair enough, I guess.. one will run out of swap and ram sooner or a later.

      I can recall doing this same dnetc thiwith slackware, running 2.4.something, and after a short while at load 50, I started getting seg faults every time I ran a command.

      Untill Linux shurgs off huge loads effortlessly and in a stable manner like FreeBSD does, its not going to live in my boxen :)

      Tux needs to get fit and learn how to balance on one leg properly :)

    4. Re:Compile time speedups by IamTheRealMike · · Score: 5, Informative
      One problem I ran into was what libraries you could expect to be installed on any given platform. Sure, there's the LSB, but does the LSB specify a base set of packages that make up a desktop or a server?

      Nope, you're right, but autopackage can figure out what libraries are present and retrieve (assuming they've been packaged) the libraries from a DNS style distributed network, apt style.

      My aim was a little different from yours though. I was going for complete binary packaging from beginning to end. No source building, as automated ./configure; make; make install;s tend to make distro specific code.

      Hmmm, how did you get the impression that autopackage is source based? A .package is a binary package from end to end, the user doesn't need to compile anything.

      All I provided was an archive format and a self extracting gui or command line installer that totaled under 50k of overhead

      We're using a similar idea except the scripting language and front end code is external and installed-on-demand when you run a .package file if it's not already present to minimize package file bloat.

      Maybe I should start it back up. It's not like I have much else going on lately. hmm...

      If you're interested in the problem, please take a close look at autopackage first, feel free to hop onto IRC (freenode#autopackage) and talk to us first. We're normally around in the evenings GMT (both the core developers are in europe). It'd be a shame to duplicate effort when our projects sound so similar.

    5. Re:Compile time speedups by Bios_Hakr · · Score: 5, Informative

      I know Mandrake has done this for a while. I think RedHat does the same. I can't remember with Gentoo, but I did try some hdparm flags and didn't notice any real change.

      Basicly, do 'hdparm /dev/hd[x]' and look at the output. It will tell you which modes are in use for the current drive. Then do 'hdparm /dev/hd[x] -t' and see how fast your drive is running. Look at different optimize flags and test after each to find the best settings.

      You can even use it to test cdroms and RAID arrays. Just remember that when you optimize an array, you want to optimize each disk (/dev/hd[x], not /dev/md[x]) seperately, but test the array as a whole.

      One other note, the '-t' flag, like most synthetic tests, may not show the best settings for the drive. A lot of times a timed kernel compile (or my new fav test, a mozilla 1.0 compile) will reveal benifits, or detraction, not shown in a synthetic benchmark.

      --
      I'd rather you do it wrong, than for me to have to do it at all.
    6. Re:Compile time speedups by Uggy · · Score: 3, Informative

      Maybe you should try
      nice -n 19 make && nice -n 19 make install

      No responsive problems AND your computer uses all those spare cycles while you are doing other things.

      I do this all the time and desktop responsiveness doesn't bog down at all. Kernel doesn't take much longer to compile either.

      --
      Toddlers are the stormtroopers of the Lord of Entropy.
    7. Re:Compile time speedups by jovlinger · · Score: 3, Informative

      yes!

      It sucks, but that is your fault. no, hear me out, this isn't one of those "so fix it" rants:

      I've been building my own kernel since 1.2.13 days. I've [until recently] never built a crap kernel (sometimes left things out I wanted in, like sound, but it always worked smoothly, even under load).

      I recently tried to roll my own 2.4.{7,18} kernels under RH 7.2, and it did exactly what you describe. The slightest bit of IO concurrent with load would stutter up the entire system.

      However, redhat's kernels (based on the same version) would NOT have this problem. Smooth as astroglide on a banana peel.

      So the conclusion is that the kernel broke sometime during the 2.4 task-switcher/vm mapper debacle, but not in a "no longer works" sense, but rather in that deep wizardry is neeeded to build a "good" kernel. Obviously you and I forgot to check the "do not fuck up" box.(*)

      I would totally go for *BSD, but a clean RH install works ok, and I judge the overhead of applying updates to keep the system secure less than a complete OS shift and learning to administer a new not-quite-the-same system.

      (*)The first instance of the "do not fuck up" box was found on the LaserWriter driver for System 7.x: if you unchecked download fonts, then _nothing_ would come out, otherwise it worked like a charm. Likewise, acrobat reader has an "avoid Level-1 PS like the plague" option that allows you to print what appears on screen even when it contains greek letters.

      The problem is that each configuration dialog has this box hidden as something else, but it is always there, somewhere.

    8. Re:Compile time speedups by chabotc · · Score: 4, Informative

      What often helps a lot, is adding a -u1 (unmask irq). From the man page:
      "A setting of 1 permits the driver to unmask other interrupts during processing of a disk interrupt, which greatly improves Linux's responsiveness"

  2. Quick question by Anonymous Coward · · Score: 5, Interesting

    What is the weakest specced machine that anyone here is getting productive/useful work with Linux done on? Do people use Linux on 468s at 12mhz? P75s? Just curious.

    1. Re:Quick question by Anonymous Coward · · Score: 5, Funny

      What is the weakest specced machine that anyone here is getting productive/useful work with Linux done on? Do people use Linux on 468s at 12mhz? P75s? Just curious.

      I am currently using a dual Athlon MP 2400 system with 4 GB RAM and a 10-drive RAID setup. I find performance acceptable, although I am looking to upgrade from my circa 1983 Hercules MGA card sometime soon...while the onscreen text is clean and crisp, I have found the preview of Doom III to be virtually unplayable.

    2. Re:Quick question by BadDoggie · · Score: 5, Insightful
      486 or P75? Sure. Mail server. Firewall. File server. News server. Burner. CD library.

      Hell, a P75 works fine as a Windows NT4 PDC for a small network and can also handle low-to-medium file serving for around 20 users at the same time.

      Then there's the idea of using Linux network client stations, as in "How to create a Linux-based network of computers for peanuts", to which this site linked more than a year ago. This system can even make use of 386s -- I've already tried it. True, performance is a bit slack, but just how much power do you really need to write documents? A network-based 386 (or one running Slack 2.x) with Abiword or maybe pico/vi/emacs (some people do actually like those) works just fine.

      woof.

    3. Re:Quick question by KjetilK · · Score: 3, Informative

      I remember using a 386 20MHz running X and Netscape and lots of stuff back in 1995, when I worked for the student union. It wasn't fast but we could work on it. Eventually, we whined about it and got a new box.

      --
      Employee of Inrupt, Project Release Manager and Community Manager for Solid
    4. Re:Quick question by RealAlaskan · · Score: 3, Informative
      What is the weakest specced machine that anyone here is getting productive/useful work with Linux done on?

      I have a 486 (75 MHz, I think) laptop, with 12 MB RAM. It runs Debian Woody with X11 and the Blackbox window manager. I was using it yesterday to read slashdot and debianplanet. I was using the Dillo browser. Performance was slow, but tolerable. If I want to use emacs, I kill X, or else it starts swapping.

      The real holdup for speed is the lack of RAM, rather than the anemic processor, but as long as I'm careful about how many processes I have going, it's fast enough. The holdup for usability is the small, 640x480 screen, and that's more a matter of it being an old laptop than being old.

      It's interesting to notice that this little box could run Win3.1, but isn't a speed demon with that either. Win3.1, of course, is old and single-tasking and insecure and nothing modern runs on it. Putting a modern, proprietary OS on this sort of old hardware is probably out of the question.

      Based on this, I think that any Pentium with a lot of RAM (more than 64 MB) would be just peachy for email/websurfing. Any Pentium with >32MB should be useable, if set up sensibly.

  3. It may be faster... by cperciva · · Score: 4, Interesting

    but will it corrupt my filesystem?

    Performance is important, certainly, but I think some people (*cough* overclockers *cough*) assign it a bit too much importance.

  4. SMP by e8johan · · Score: 4, Informative

    It looks like the new kernel better utilizes multiple CPUs. This is a great thing. Linux needs better support for SMP systems if it is going to play with the big kids in the high-end server market. (I know, Linux is partially there).

  5. Will 2.6 make servers... by Negatyfus · · Score: 3, Funny

    more resistant to the /. effect?

  6. BSD? by pkplex · · Score: 4, Interesting

    I wonder how well it compares to the BSD kernels, in both performance and stability?

    1. Re:BSD? by Cid+Highwind · · Score: 3, Funny

      Which isn't really fair IMHO, since most of the time it's not "Linux"'s fault for whatever is being bashed at the time.

      Score: -1, Bad Pun

      --
      0 1 - just my two bits
    2. Re:BSD? by Daniel+Phillips · · Score: 5, Insightful

      Whenever I see posts that say "*BSD is better than Linux", most of the time they are referring to some userland aspect of *BSD compared to some GNU/Linux distro, and not "Linux" the kernel itself. Which isn't really fair IMHO, since most of the time it's not "Linux"'s fault for whatever is being bashed at the time.

      Not exactly right. There's no question it was very much Linux's fault for having a less than totally robust virtual memory manager for a number of years. In the push to add features such as memory above 4 gigabytes, stability in corner case and swap performance kind of got left behind. This has been corrected in Linux 2.5 with the new reverse-mapped VM, which sacrifices a little raw speed in such things as process forking (look closely at the benchmarks and notice 2.5 is slightly slower in Con's "process load" benchmarks) and mallocing, in return for far better and more predictable swapping performance. Plus, the new VM provides a better base for new developments you'll see in the next series, such as active memory defragmentation. Over time, we're likely to win back the slight performance losses in (certain areas of) the 2.5 vm, and then some. In the meantime, there's no question that 2.5 is the smoothest running Linux kernel ever.

      BSD continues to edge out Linux in some areas, notably NFS server performance. It used to be, BSD had a lot more advantages over Linux than it does now (the BSD developers are darn good). But in the end, Linux offers a much broader range of hardware support and has way more programmers working on it, so slowly but surely is catching up and surpassing in the few areas where BSD still has the edge. If I had to speculate about why Linux gets the massive herds of programmers, I'd say it's because of the license - many volunteer programmers prefer the GPL because of the legal guarantee that their work will remain open and not end up fading away because it had to compete against some heavily-funded proprietary product based on their own code. However, it's clear there are enough top-flight programmers to whom such considerations are unimportant to keep the BSDs not only alive, but vibrant.

      See here for a look at some of the nice features BSD, and some ideas for the future. In case anybody thinks the much-talked-about rivalry between Linux and BSD is some kind of war, it isn't. BSD and Linux people often work together, there is a lot of cross-pollination, and the prevailing attitude is one of mutual respect. At the end of the day, it's worth noting that, technically speaking, the closest rival to Linux in the operating system space is another open source project.

      --
      Have you got your LWN subscription yet?
    3. Re:BSD? by Foresto · · Score: 3, Insightful

      "The complete OS+tools should be called GNU/Linux (as RMS insists)."


      Hogwash. Adding "GNU/" when communicating on the subject of Linux does absolutely nothing to improve communication. It's well known that GNU tools are used with every common distribution of Linux. Prepending additional letters and symbols to the word "linux" needlessly complicates communication. I'll consider doing it when non-GNU tools become common enough with Linux distros to cause an ambiguity.
  7. Re:It's faster. by Lebannen · · Score: 5, Funny

    Linux marketing through Slashdot? Hehehe... next we'll have microsoft and intel buying banner space... Oh...

    --
    Diplomacy is the art of saying "nice doggie" whilst looking for a rock
  8. Re:Sorry to Intrude here, but... by Xpilot · · Score: 5, Insightful

    The whole point of Linux development is to , explore strange new algorithms, seek out new drivers and new filesytems, to boldly code where on one has coded before :)

    As with all experimental endeavours, you do sometimes get better results, sometimes worse, but from those mistakes lessons are learned and better methods are devised.

    It's not about "marketing". It never was.

    --
    "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
  9. SMP is overrated by g4dget · · Score: 3, Interesting
    Yes, there is some market segment that really swears by SMP. But beyond dual processor machines, the hardware cost and engineering complexity grow disproportionately with the number of processors. Most of the SMP market is driven by companies facing excessive software license costs for multiple machines, or by companies that can't figure out how to get their current architecture ported to a cheaper distributed system.

    When it comes down to it, you only get cost-effective scalability by using distributed systems or clustering. In fact, for really large systems, it's the only possible way at all.

    Something like OpenMosix should really be a standard part of the Linux kernel already, as should other support for simplifying clustering, distributed computing, communications, and distributed shared memory. Distributed systems and clustering is the future, not SMP.

    1. Re:SMP is overrated by oliverthered · · Score: 3, Insightful

      Your missing out:
      Latency, Mosix is just too un-responsive compaired to an SMP option.
      Time, The more people that buy SMP boxes the better they will get, the MHz wars and Windows killed of home SMP if Intel had invested in SMP design instead of MHz then there'd be cheeper cooler SMP machines out there.

      --
      thank God the internet isn't a human right.
    2. Re:SMP is overrated by Daniel+Phillips · · Score: 3, Insightful

      When it comes down to it, you only get cost-effective scalability by using distributed systems or clustering. In fact, for really large systems, it's the only possible way at all.

      Three years ago you would have been right, but today the cheapest way to (nearly) double your computing power is to put in a dual processor board. I.e., the day of the home dual-processor has arrived. For example, you can now get a dual processor Athlon board for $200, and in spite of what the docs say, you can put $50 processors in it instead of the $500 big brothers AMD recommends.

      It's only a matter of time before you start seeing 3D games that can take advantage of dual processor configurations. In fact, they already can in the sense that if a single-threaded game can load up one processor 100% and your box still remains entirely responsive for other applications. That is, you can play Return to Castle Wolfenstein at the same time you run a compile.

      --
      Have you got your LWN subscription yet?
  10. People in glasshouses shouldn't throw stones by marm · · Score: 5, Interesting

    Amazing, I've been running FreeBSD since 2.8 and I've never had an unresponsive system even while doing a build world; I guess the 2.4 kernel is alot worse than imagined.

    This is, by and large, the fault of the scheduler, largely unchanged in 10 years and described by Linus, even whilst he wrote it, as a 'hack'. However, it worked, and Linus, being the extremely sensible and conservative maintainer that he is, kept it until recently - process schedulers are difficult things to get right, and their performance is crucial to the performance of the kernel as a whole. Not to mention that for the tasks that Linux has been used for historically, primarily low-volume server tasks on low-end hardware, it isn't really a bottleneck.

    Still, the scheduler has been gutted and rewritten for 2.6 by Ingo Molnar - the now somewhat-famous O(1) scheduler, which performs much more fairly under load, and dispenses with almost all of the strange pauses and scheduling glitches under load. Current vendor kernels based on 2.4 (Red Hat's and SuSE's at least, I think) have had the O(1) scheduler backported to them as well. In fact, if you're running near enough any current 2.4 kernel other than mainline, you get the O(1) scheduler and your share of scheduling fairness.

    The new scheduler is also a fundamental basis for Linux 2.6's new NPTL 1:1 threading, which has so far proved spectacularly (record-breakingly?) fast. Hmm, on second thoughts, perhaps I probably shouldn't mention threads and FreeBSD in the same post. I mean, isn't this the same FreeBSD that's still waiting for a single half-decent pthread implementation? Oh well, better hope 5.0 is out soon...

  11. Re:Sorry to Intrude here, but... by Simon+Kongshoj · · Score: 3, Insightful

    cheer!

    Why does it seem that so many people in the current Linux community *think* that it's about marketing and money, though? *sigh*

    --
    Six sick .sigs, the Number of the Beast!
  12. Re:Sorry to Intrude here, but... by xanadu-xtroot.com · · Score: 3, Insightful

    people in the current Linux community *think* that it's about marketing

    Because a lot of the new-comers have been beat-up with Billy G's ugly-stick for so many years. That's all they know. Marketing ploys and false hype.

    monkeyboy anyone?

    --
    I'm not a prophet or a stone-age man,
    I'm just a mortal with potential of a super man.
  13. Re:Sorry to Intrude here, but... by Simon+Kongshoj · · Score: 3, Insightful

    I'm afraid part of it might be because of the Linux community itself, though.

    After RedHat and VA made it big, way back when, a certain amount of "make money fast!" thinking crept into the Linux community. It started seeping into our news and other "internal" communications too (I mean /., Newsforge, Linux e-zines and that sort of stuff, not the lkml) -- people started focusing more on how one could use Linux and open-source to make profit rather on technological issues. The line between hacker and marketer seemed to be breaking down. A O(1) scheduler is all fine and dandy, but how can my favourite business use it to make more money?

    Perhaps I'm seeing something that isn't there -- I hope I am -- but seriously folks, am I the only one who have noticed such a switch of focus? I read the articles at NewsForge about the last LinuxWorld Expo, Roblimo seemed to agree that the old bunch of long-haired hackers in sandals had largely been replaced with business reps -- and to add insult to injury, Microsoft was present.

    My fear is that Linux will end up becoming as sterile and dead as other "rebellious" technological (or otherwise) ventures tend to become when they're subjected to corporate clutches. Greed kills.

    --
    Six sick .sigs, the Number of the Beast!
  14. A contrary viewpoint by Magnus+Pym · · Score: 3, Informative

    OK, I have had it up to here with all this FreeBSD worship. After putting up with this for a long time from one of my good friends who happens to be a BSD bigot, I made the mistake of wiping out my Mandrake 8.2 and installing freeBSD on my box.

    After a few months of that, I am back back in Mandrake 9.0 with relief and no regrets. Why?

    1) I found that, for the things that I do, FreeBSD offered no advantages at all. Performance and stability was no better than Mandrake 8.2. In fact, under heavy loads, my experience is that Linux 2.4.x is much better. (I run lots of octave math simulations and lots of fortran number crunching programs, often several at a time. )

    2) For people used to working with linux, there are lots of annoyances to working with FreeBSD. I missed the convenience of RPMS. Many of my favorite programs did not compile properly.

    3) When pitch came to shove, my friend had no suggestions as to why the FreeBSD install did not perform as well as linux, except to tell me that I must be mistaken in how well the linux install performed! Duh!

    Now, maybe under some circumstances, it is probably true that FreeBSD does outperform linux. But I could not care less. For the work I do (mostly on the desktop, running simulations, running mozilla and xine), linux is demonstrably a better system than FreeBSD.

    Magnus.

  15. Re:It Should Be About Marketing And Money by Simon+Kongshoj · · Score: 3, Insightful
    'ey mon,
    You wrote:
    Isn't corporate acceptance one of the key points of OSS, especially Linux?

    Open-Source, perhaps. The concept of Open-Source was devised specifically to sell Free Software to the suits. However, Linux is as much Free Software (which is about freedom, and keeping you in control of your computer) as it is about Open Source, so whether it all boils down to corporate acceptance is completely up to the community. Linus didn't write Linux to sell it to corporations, he wrote it because it was fun. I'm not saying that corporate acceptance is intrinsically a bad thing (it isn't), I'm just saying that a lot of people seem to be forgetting about the whole aspect of having fun, when faced with cold cash.

    Surprise -- since Free Software is about freedom, I think it's also about freedom from corporations and the marketplace (well-knowing that even suggesting such vile satanism is sure to get me modded far into /dev/null). It's OK that they use the software our community creates -- freedom is all about not taking that right away from anyone, including them -- but we shouldn't be spending our voluntary programming time sucking up to them for money. The vision of a Linux that is completely "de-geekified" that we sometimes hear about may be attractive to suits, but it sure sounds sterile and boring to me.

    But there's also the crusade out there to *prove* to "them" that Linux can hack it in the enterprise, that it stacks up against Solaris and Windows NT. Space in server rooms is at a premium, and it's a victory for open source whenever a rack slot gets filled with a linux or bsd box.

    Against Microsoft, I completely agree. Microsoft are bent on our destruction, so yeah, we definitely have to fight them. Against Sun, though? I'm not too keen on Sun and their proprietary software, but seriously, one of the things I liked about Linux (and the BSDs) was how it was a free community-driven effort rather than a market contender like the rest. We're not a competitor, we're an alternative. As an old Amiga nut, I was attracted to this aspect because not being a market contender means traditional market methods won't be able to bring us down. It may slow corporate acceptance, but it won't stop the kernel hackers, or the other volunteers working on projects that they work on because they're fun. I think that such a community will be far harder for Microsoft to kill than a bunch of corporate ass-kissers (not that we are corporate ass-kissers, I just think that there is an increasing tendency towards that sad fate), because they're far better at dealing with corporate opposition than community opposition. This is why Linux got them to shit their pants in the first place. Unfortunately, we can already see how all our "selling Linux to suits" efforts have gotten some suits to make the association "Linux == dotcom fad == stupid business models == cash loss".

    The marketplace is a democracy, and every dollar is a vote.

    The marketplace is, by definition, a plutocracy. Who has more power in the marketplace, you or Bill Gates? If every dollar is a vote, how can it be democratic, considering the very uneven distribution of "votes"?

    .......I think I've run out of things to say about this subject too, interesting as it may be. :.)

    --
    Six sick .sigs, the Number of the Beast!