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..."

16 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 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 :)

    3. 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.

    4. 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.
    5. 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. 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. 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 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?
  6. 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
  7. 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
  8. 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...