Slashdot Mirror


Byte Benchmarks Various Linux Trees

urbanjunkie writes: "Moshe Bar has an interesting article, essentially benchmarking the standard kernel (with aa VM) against the -ac kernel (with Rik's VM)." He also raises some very interesting points about how patches (and entire development trees) interact.

33 of 269 comments (clear)

  1. Interesting conclusion... by NOT-2-QUICK · · Score: 3, Interesting
    The author came to the quite informed conclusion of:
    I prefer the 2.4.17 or 2.4.18pre2aa for my heavy-duty servers. The reverse-mapping patch by Rik, however, has great promise once it has stabilized. Finally, the Red Hat 2.4.9 is a very good kernel, fast and reliable.

    While I personally may not have agreed with this synopsis prior to reading the article (and am still not completely sold...), there are certainly some interesting facts and figures to ponder the next time you reload your system or update your kernel...
    --
    Beer is proof that God loves us and wants us to be happy. -- Benjamin Franklin
    1. Re:Interesting conclusion... by peripatetic_bum · · Score: 3, Interesting

      What a nice article and it seems to come at a time just then everyone is talking about "Fork this and Fork that" that in fact this is exactly what is needed in this healthy debate.

      I think perhaps that we should start having "kernel" races if you will, and we could have various categories (ie, I/O races, Stress test races) in which the various trees would compete and by-and-by the best kernel trees would become known.

      Please, I would like to hear your comments!

      --

      Sigs are dangerous coy things

    2. Re:Interesting conclusion... by utdpenguin · · Score: 5, Funny
      >>I think perhaps that we should start having "kernel" races



      Correct me if IM wrong, but dont races in the kernel cuase horrible security problems?? And who would decide the race conditions?

      --
      In Soviet Russia you dant have to put up with these crappy jokes
    3. Re:Interesting conclusion... by Rik+van+Riel · · Score: 5, Interesting
      What a nice article and it seems to come at a time just then everyone is talking about "Fork this and Fork that" that in fact this is exactly what is needed in this healthy debate.
      Indeed, forks are (IMHO) the best way of doing development. Doing your development in the main kernel will just lead to contradictory code being integrated and the code never working quite right because it's missing fixes (guess why RH's 2.4.9 runs faster ... it does have the fixes).

      One minor nitpick though ... I never released an -rmap VM against 2.4.18-pre3, the latest is still against 2.4.17. I suspect that the crashes Moshe saw are due to some change in 2.4.18-pre3 conflicting with the -rmap VM patch, especially since rmap-11c has survived the kernel torture lab at RH. ;)

  2. [ot] So what's the best kernel to get right now? by wrinkledshirt · · Score: 4, Interesting

    Sorry for the dumb, offtopic questions.

    I'm sitting at home with my fresh install of RH 7.1 and I'm wondering what kernel to upgrade it to. Any suggestions? Is there a stable one in there somewhere that I should go with? Should I stick with the default kernel that's on their now?

    If I'm regularly compiling new programs using gcc or g++, is it safe to go from one tree to another, as long as they're all 2.4.x, or what? Do I need to recompile with a new kernel? Or is that a red herring?

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

  3. Red Hat 2.4.9 is a very good kernel, fast...WHY? by srw · · Score: 4, Interesting

    Can anyone explain this? Was the stock 2.4.9 faster and more reliable than our current stable kernel? If there are stability and speed patches in the RH kernel, why haven't they been adopted in the standard kernel? How close is RHs 2.4.9 to Alan Cox's kernel? I'm assuming he has a strong influence on RHs kernel.

  4. Riels rmap is nice...... by CDWert · · Score: 3, Informative

    The rmap patch is nice.....

    It makes a big difference on loading the hell out of my woefully under memoried workstation at work. My home machine, used mostly for surfing has seen a dramatic imporvment in free memory and is no longer swappin , it has 512 meg, so it really shouldnt swap too much, but was constantly with the stock redhat kernel, as well as 2.4.17 plain vanilla, trhe 2.4.18 -rpma12a has been ROCK solid.

    On my server however with 256 megs , the stock redhat roll has done nicley with the minimal load its under.

    I am a little leary about using the rmap in prouction as of yet, it seems to be killing things each nigh, (no shit) that dont drop with 2.4.17 or 2.4.9

    I would like to see an option at configure to select a VM, I think the preemptive added would be fun too, I know its a pain because of the way it all intergrates to the other code, but thats my desire, it seems to be alot of other peoples desire as well, its funny how I bitched and moaned about the Riel VM , that was in the kernel prior to AA's , but since then and all the patching that was done I think Riels would give it a run for its money .....

    --
    Sig went tro...aahemmm.....fishing........
    1. Re:Riels rmap is nice...... by Rik+van+Riel · · Score: 5, Insightful

      I am a little leary about using the rmap in prouction as of yet, it seems to be killing things each nigh, (no shit) that dont drop with 2.4.17 or 2.4.9


      Interesting. I've not managed to run into bugs like that on my computers here, so you must be running a very different workload to trigger such a bug.

      Would you have the time to help me debug this problem and is it still happening with the latest rmap VM ?

  5. Re:Red Hat 2.4.9 is a very good kernel, fast...WHY by keeg · · Score: 5, Informative

    2.4.9 was the last official kernel from linus which used Rik van Riel's VM which was introduced in 2.3.x. (The switch to Andrea Arcangelis VM occured in 2.4.9->2.4.10) Alan Cox and Red Hat used this in their kernels, and the Red Hat kernel was heavily patched with the patches from Rik van Riel which Linus "reportedly" dropped (among other things). The Red Hat kernel is also _very_ well tested, as all their kernels are. You might not like their distro, but their kernels are usually among the more stable.

  6. Re:hmm by DeadeyeFlint · · Score: 3, Informative

    If you have RedHat use up2date, with Debian use apt-get.

  7. Re:Red Hat 2.4.9 is a very good kernel, fast...WHY by Rik+van+Riel · · Score: 4, Interesting

    Thanks to Alan Cox, Red Hat (and most Linux distributions) do have the patches for my VM that Linus didn't have the time for.

  8. Stable kernel? by sitturat · · Score: 4, Interesting

    It is hard to believe that all this is going on with what is meant to be a stable kernel version, ie 2.4.x

    So far the VM has been replaced twice, and now the rmap patch is apparently going to be added despite the fact that "something is seriously messed up in the reverse-map implementation".

    Have they saved any experimental code for the 2.5.x kernels, or will that now be stable?

    1. Re:Stable kernel? by Rik+van+Riel · · Score: 5, Informative
      It is hard to believe that all this is going on with what is meant to be a stable kernel version, ie 2.4.x

      So far the VM has been replaced twice, and now the rmap patch is apparently going to be added despite the fact that "something is seriously messed up in the reverse-map implementation".

      Ummmm, -rmap is still under development. If there are any plans to put it into 2.4.x, people sure haven't told me about them. ;)))

      (and personally, I'd prefer to keep -rmap separate for quite a while more ... development is much more efficient in a fork)

  9. Re:Red Hat 2.4.9 is a very good kernel, fast...WHY by LunaticLeo · · Score: 3, Informative

    There was no stock 2.4.9 in the test; only RedHat's highly modified 2.4.9.

    RH 2.4.9 is a lot like the ac kernels. Mainly because, Alan runs that part of the RH distro. But, there are many concerns that RedHat addresses. They work with corperate customers and partners (like Oracle) to make sure the kernel they ship is as stable and fast as they can get it. So the RH kernel does diverge from the "plain" AC kernel.

    Of course they submit all their patches back to Linus. But Linus just hasn't been keeping up with them. Linux accepts patches based on three factors: his previous experience with the developer submitting the patch, the "correctness" of the patch, and the phase of the moon. And the phase of the moon is the dominant factor, because even Alan Cox complains that Linus won't accept his patches.

    So the RH kernel is excellent because Alan Cox, RedHat, and RedHat's corperate partners make sure the kernel is fully fleshed out. This is the kind of vetting that Linus doesn't do.

    "If it compiles it is Good, if it boots it is Perfect!" -Linus Torvals.

    --
    -- I am not a fanatic, I am a true believer.
  10. Why use an unstable patch? by Hagmonk · · Score: 3, Informative
    Most of those 'forks' are going to be maintained by kernel hackers to marshall patches for eventual inclusion in Linus' tree. I wouldn't put them anywhere near a production server.

    There are various patches like the Robert Love's preempt patch which might be considered production quality. And perhaps some collections of production quality patches exist out there. But I wouldn't say -ac or -dj are in that category.

    Or any of the patches marked 'preXYZ'. They're 'pre' for a reason you know. I'd be thrashing them on test servers, then giving feedback to the maintainer of that series. Let the maintainer declare them stable first.

    You'll find in environments ambivalent to Linux that you really need to prove its stability to management first. Trying a new whiz bang kernel can have unforeseen side effects, in meetings that you'll never be invited to; and whose outcome you will only learn when it's too late to change it. "We let Bill convert server X to Linux and then it corrupted the filesystem. Clearly Linux carries more business risk than expected."

    --
    Ash OS durbatulk, ash OS gimbatul, ash OS thrakatulk, agh burzum-ishi krimpatul! Uzg-MS-ishi amal fauthut burgulli.
  11. Why is this funny? by megaduck · · Score: 5, Insightful

    C'mon guys. Show a little open-mindedness. One of the things I really missed from the Windows world when I switched to Linux was the "Windows Update" feature. Want to install the latest security or feature patches? Click a check box and hit "install". No dependencies, no patch conflicts, no esoteric config options, it just worked. Admittedly Ximian's Red Carpet comes close, but it's still a little quirky sometimes.

    I know there will always be those people who want to manually tweak their kernel (god bless 'em!). There's a lot of us, though, that don't want to deal with it. I'd rather have one-click shopping for all of my patch needs so that I can spend more time writing code or playing Quake. MS understands this. Apple understands this. Why doesn't the Linux community understand?

    --
    This .sig for rent.
  12. Re:[ot] So what's the best kernel to get right now by JediTrainer · · Score: 4, Informative

    If you're using a fresh install, stop now.

    You should use RH 7.2 instead. It comes with kernel 2.4.7 or something, but can (and should) be upgraded to RedHat's kernel 2.4.9 via up2date. The RedHat kernel is quite stable and fast.

    --

    You can accomplish anything you set your mind to. The impossible just takes a little longer.
  13. It's about the uptime, stupid! by Mullen · · Score: 5, Insightful

    A major problem with alot of linux admins is shown in the article. It's not about how fast your kernel is, especially when it comes to a 2 second difference in 50 seconds of computing time, but how long your machine will stay up.

    If a user compiles 35 gigs of code on a 6 processor box and it takes 5 minutes longer, he is not going to complain. If he compiles 35 gigs of code on a 6 processor box and it crashes half-way through the compile, your going to here it from your boss.

    Benchmarking kernels is plain pointless. Take a machine for each kernel, put it under real load and tell me how many times it crashes in 100 days, and I will you which kernel I want to use.

    --
    Linux O Muerte!
  14. Do you think the BSD projects reflect this? by twilight30 · · Score: 4, Insightful

    I take your points about forking, but as a counter-example I'd think about the BSDs instead. They all operate under the same license, all forks from roughly the same code base.

    The advantage here is that with three BSDs you have three separately-tuned operating systems that attack different problems very well, yet maintain a certain level of commonality and compatibility.

    Call me a starry-eyed optimist, but my exposure to this open source fad started with the Wired article in the autumn of 1997. In it the writer painted a picture of a 'computing epic', one collectively started and maintained. I still think that metaphor is accurate and useful.

    --
    ========================================
    Death will come, and will have your eyes
    -- Pavese
  15. Re:If you support forks so much... by Rik+van+Riel · · Score: 5, Informative
    Nice troll ... ;)

    My -rmap VM is a patch against marcelo's standard 2.4 kernel, because that is the thing people have. It just doesn't make sense to release patches against kernels nobody has.

    Also note that -rmap replaces pretty much all parts from the -aa VM I don't agree with, while at the same time integrating some parts from the -aa VM that I do like.

  16. Number of crashes in 100 days? by alexhmit01 · · Score: 3, Interesting

    It's good to see that Slashdot users still don't use computers for anything... I'm not looking for a system with better uptime than Win95, and that seems to be all you guys want.

    I can't have multiple crashes in 100 days. If you are doing real load, spend real money, get real systems.

    Don't build machines with your screw driver, get QA'd servers. Don't roll your own kernel, let Redhat test it.

    These types of tests are useful as commentary and recommendations for what people should do in the development process.

  17. Hopefully Someone Has an Answer... by jschmerge · · Score: 3, Interesting

    Since I've seen posts from at least one kernel developer in response to the attached story, I figured that this might be a good place to ask the following question:

    A little while ago, I wrote an application that uses an incredible amount of memory... A very space inefficient implementation of Eratosthenes' Sieve. In essence, what the algorithm does is cycle through the entire contents of memory sequentially many, many times (not a completely correct description). What I found with the following three kernel versions:

    • 2.4.4
    • 2.4.8
    • 2.4.17
    is that any time the program's footprint exceeded the physical ammount of available memory, performance degraded exponentially. I found this to be very suprising, considering that I was only exceeding the physical 1024 Megs of memory by less than 10 Megs. About the only difference between the three kernels I listed above is that the 2.4.17 kernel would kill of memory intensive processes a lot quicker than the other 2 versions.

    My question for the Kernel gods out there is as follows: are there any stable 2.4.x kernel releases out there that would handle this type of stress without the performance degradation that I've experienced with these kernels?

    1. Re:Hopefully Someone Has an Answer... by Spy+Hunter · · Score: 3, Insightful
      If you're using a program that cycles through all available memory + 10Mb, of COURSE it will be slow! The VM can't squeeze 1044 Mb of data in 1024 Mb of RAM, no matter what ugly hacks it uses, and as soon as it needs more memory than it has, it has to hit the disk. As soon as you start hitting the disk, you get horrible performance decreases because your program is stalled until the data can be read from disk (which is orders of magnitude slower than RAM).

      The reason VMs usually work well is because most programs don't actively use all the memory they allocate at once, so the VM swaps out the memory that isn't being used. If your program uses all the memory it allocates, the VM has no choice but to use the slow disk to store some of it. No magic VM will solve your troubles.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
  18. Don't understand Moshe's conclusion by DaveWood · · Score: 4, Interesting

    Under the section "Allocation and Swapping Results," I assume larger numbers are higher times and therefore worse. By the numbers, 2.4.18pre2aa (the Arcangeli kernel) seems to be the fastest overall, due to the 5th run (I would consider it the common case) results. Yet Moshe says:

    "From the above figures it seems that the old van Riel VM is somewhat faster (considerably faster in the case of 2.4.9) than the new Arcangeli VM..."

    Is my math wrong? The RVR VM in 2.4.9 is ever so slightly faster on the 2nd run and slower on the 5th, and the slowest of all is the newer one in 2.4.18pre3rmap. What's my mistake?

    Moshe's politely indicating that van Riel was an ass when asked for comments; we can conclude either that Moshe didn't have a proper recent RMAP kernel to test with (as a result), or that the recent RMAP kernels are hit and miss.

    From looking at van Riel's comments here, he vehemently believes his kernel is perfect and Moshe just got it wrong... The problem is that lots of people seem to "get it wrong" with that VM, including Linus... Overall in Rik I get the sense of an aggressive person who may have trouble admitting mistakes or accepting failure; not good traits in a programmer, since it's humility and communication skills which can often be the critical factors in a team programming effort... and lack of them can cause exactly the kinds of problems we've observed.

    1. Re:Don't understand Moshe's conclusion by Anonymous Coward · · Score: 3, Insightful

      From looking at van Riel's comments here, he vehemently believes his kernel is perfect and Moshe just got it wrong... The problem is that lots of people seem to "get it wrong" with that VM, including Linus... Overall in Rik I get the sense of an aggressive person who may have trouble admitting mistakes or accepting failure; not good traits in a programmer, since it's humility and communication skills which can often be the critical factors in a team programming effort... and lack of them can cause exactly the kinds of problems we've observed.

      ehh... when i think "top rank" open-source programmer, I think: Theo de Raadt (his early work on netbsd/sun alone is brilliance), RMS (GCC, emacs, etc), Jordan Hubbard (of FreeBSD fame), Linus Torvalds, Alan Cox, etc.

      Of that group, Only Jordan and Alan strike me as having "humility and communications skills." Linus is often curt, sometimes cordial, and sometimes very rude. Theo is almost always rude. One look at RMS' TCL outburst and 'communications skills' obviously don't belong in the same sentance with that guy. I'm not trying to troll or flame here, I'm just saying that expecting open source (or Free Software, whatever floats your boat) programmers who run insanely popular projects and who get treated like gods whenever they show up in Slashdot (ooh.. it's Alan, +5 - not that he doesn't usually deserve it), at a Con, or on IRC or something... expecting these guys to have normal-sized human egos is asking a lot. It's clearly asking too much of most of them.

      also please note that i'm not slotting rick in next to AC, Linus and John... yet. Just making a comparison.

  19. Re:what's the point? by Arandir · · Score: 3, Offtopic

    I'm using FreeBSD as a desktop OS at home and as a workstation at work. It's simply great!

    There are only two advantages I see to Linux that makes it a better "desktop" OS. First, they put DRI in the kernel. They're working on this now for FreeBSD, but there's a lot of resistance to keep userland stuff out of kernelland. If all you care about is running games, then FreeBSD is not it. Go get a PS2 or an XBox.

    Second, the popularity of Linux gives it a greater pool of developers to draw from. So Linux gets new device drivers faster. But you still will *not* get Linux shoehorned into this week's premium super buy at CompUSA. With Linux you have to wait around three months to get a driver for brand new hardware. With FreeBSD you have to wait about six months. If you buy computers more often than once every six months, stick with Linux. As for myself, I had no problems with FreeBSD on a stock Dell Optiplex GX240.

    In terms of desktop software, don't worry a bit about it. They're the same on both platforms. Identical. Staroffice, GNOME, KDE, Xmms, Gimp, Mozilla, etc.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  20. why didn't author measure page faults? by brer_rabbit · · Score: 4, Informative
    I've asked this before when people do benchmarks and I'll post it again: why don't these authors measure page faults? Measuring the total time the process runs is good, but if you can measure how many page faults occured you'd be providing a lot more infomation.

    So how do you measure page faults? Be sure your kernel is configured with "BSD process accounting". Then use a shell like tcsh. The man page of tcsh describes the "time" variable, you can set it to report the number of major/minor page faults that occured during the lifetime of the process.

    I did my own unscientific test back in November. I ran 32 simultaneous instances of mpg123 on a just-booted machine. Among other things I measured the number of page faults. The results for the then-current kernels I had were:

    kernel: 2.2.20 2.4.8 2.4.12
    mean elapsed time: 88.6 86.5 88.4
    mean page faults: 7833 7285 8990

    those number are the means of the 32 values from each process. Anyway, you get the idea.

  21. This is nearly impossible to measure by roystgnr · · Score: 3, Interesting

    If you see a Linux kernel crash, it is either hardware failure or a kernel failure. Since hardware failures (especially RAM and power supply) can be imposssible to repeat, the only way to prove that it is a kernel failure is to find the kernel bug. If you find the kernel bug, then the bug gets fixed, and suddenly your crash data is for an obsolete kernel.

    You could try to take a statistical run at it, of course, but I suspect the number of machines required to give meaningful results would be on the order of Google's farm.

  22. I thought about it some more... by nusuth · · Score: 3, Interesting
    You should do something like starting with a large J (K*J comparable to but not exceeding total memory size) and read K*J pages without any preaccessing. E.g read values at offsets N,N+K,N+2K,...,N+KJ, then continue normal processing until you reach N+KJ. Repeat procedure with new N=N+KJ. This way you hint the VM that these pages are active, and should not be swapped out. K should be selected as large as possible, not exceeding a page boundary. Too large K will make fail to mark some pages as active, too small K will consume unnecessary processing time while hinting.

    If everything goes according well, your kernel should swap out and swap in exactly M amount of memory for each preaccesing pass, where M is the amount of data that does not fit in the main memory. So if you have total memory T, total data T+M and K*J size prefetch, total swapped data per whole process would be M*(T+M)/(K*J).

    --

    Gentlemen, you can't fight in here, this is the War Room!

  23. Kernel Test Suites Article by goingware · · Score: 4, Informative
    Some of the test suites in Using Test Suites to Validate the Linux Kernel might be good for benchmarking.

    Yes, I post the link to this here all the time, I think it's useful to people.

    --
    -- Could you use my software consulting serv
  24. Rik van Riel Chat by sfrenchie · · Score: 4, Funny

    Wow! Reading this story at +5 is like seeing Rik van Riel have a conversation with himself!

    --

    "The scientist describes what is; The engineer creates what never was." - Theodore von Karman
  25. server this, server that by paulbd · · Score: 3, Interesting

    it seems that the vast majority of commentary here all assumes that a linux machine is run as a server, or at best, some kind of generic desktop machine. while linux may be very good at running servers, and may be capable of acting as a good generic desktop machine, some of us are interested in it for much more specific tasks such as realtime audio processing, editing, synthesis and recording. we care about those extra 2 seconds spent in the VM code during a benchmark. we care about all the extra paging that goes on with some designs. we care about the internal operation of the buffer cache and how it affects attainable peak i/o performance because we stream, and when i say stream, i'm not talking about measly HTTP numbers, i'm talking about 64-128 streams of 24 or 32 bit 96khZ audio data. stop assuming that a top-end linux box is a server, please.

  26. picking nits by darkonc · · Score: 3, Insightful
    As a reader from Australia noted in an e-mail to me, "evolution is by definition an undirected process with natural selection." You might, however, argue that there is undoubtedly some direction in the Linux kernel development. ....

    I'm going to disagree with this notion of evolution. Evolution is not undirected. The current environment gives a good deal of direction to the sorts of evolution that occurs. For example: evolution appropriate to tropical beaches is unlikely to occur in the arctic tundra.

    Similarly, Evolution in the Linux world is also mostly in reaction to environmental needs. Where the difference in randomness comes is that the mutations that lead to biological evolution are generally random in nature -- but environment and statistics choose which mutations lead to enhanced viability.

    For Linux, patches are generally in direct response to specific needs. The nature of these changes are directed by nature but generally random in form -- ranging from the icky to the elegant. Fork maintainers like Torvalds and Cox are more like the social interactions which can shift the survivability of an otherwise brilliant mutation/patch. Although this social rejectin will deeply affect survivability, an especially bright change can still give a survivabillity edge that makes up for the rejection

    This is really the pleasant aspect of the Linux community; exactly those people who are busy and sought after by many journalists and hackers are also those who take time to answer questions with enthusiasm and a very positive attitude. Thank you Andrea, thank you Alan.

    This is something of a chicken and egg proposition. Those people "who take time to answer questions with enthusiasm and a very positive attitude" are precisely those who will likely be sought out by Journalists and others. I mean -- come on! Are you going to take your question to someone who regularly beats into submission anybody who comes to them with (what they consider) a non-profound queston?

    Journalists, especially often need their question answered today , and can't be bothered to wait for someone who berates them for half an hour for asking a straightforward question -- especially if they then forget what the origina question was (no known anectdote comes to my mind).

    --
    Sometimes boldness is in fashion. Sometimes only the brave will be bold.