Slashdot Mirror


Kernel Benchmarks

kitplane01 writes: "Three students and a professor from Northern Michigan University spent the semester benchmarking a bunch of Linux kernels, from 2.0.1 to 2.4.0. Many functions improved in speed, but some did not. Total lines of code have tripled, and are on an exponential growth curve. Read their results here."

53 of 136 comments (clear)

  1. Nice graphwork by Anonymous Coward · · Score: 3

    http://euclid.nmu.edu/~benchmark/null_call.gif

    This shows why computer guys are not scientists. My first year phys chem prof would tear his own arm off and beat you to death with it if you gave him a graph that looked that ugly.

    The Excel defaults may be ugly, but you can change them.

  2. GCC optimizations and benchmarking by Anonymous Coward · · Score: 5
    One problem with benchmarking is the optimizations settings for GCC. GCC is very sensitive to the proper choice of optimizations. Several years ago I did an extensive test of GCC using the Byte benchmark suite. I experimented with the various optimizations settings. The most important were the settings of -malign-jumps -malign-loops and -malign-functions. These flags each take a numerical argument representing a power of 2 on which the object will be aligned.

    Thus "0" indicates byte alignment, "1" word (16 bit) alignment, "2" doubleword (32 bit), "3" quadword (64 bit), and "4" paragraph (128 bit). The other optimization of interest is the "-O" setting. Here arguments can take the value of 0, 1, 2, or higher. Personally, I found that -O2 was not necessarily the best setting, although it seems very common to find it set to that in Makefiles. I found using -O1 and tuning the alignment optimizations by hand provided better results.

    My findings by benchmarking all the combinations of settings were that for a Cyrix 5x86, optimal alignment values were lower numerically lower than might be expected. For example, close to optimal settings as I recall were:

    gcc -O1 -m386 -malign-jumps=1 -malign-functions=1 -malign-loops=1
    It wouldn't be a bad starting point for any Intel processor. On modern processors, it is more important to achieve high cache hits, which is thwarted by certain wrong optimizations such as aggressive loop unrolling and excessive alignment. One particular setting to avoid is -m486. It should be avoided for most processors other than a 486, because the 486 alignment requirements are less than optimal (i.e. tends to over-align) for both its predecessors and descendents. And if you don't need a debugging version of your code -fomit-frame-pointer is usually always useful as it frees up an extra general purpose register.
    1. Re:GCC optimizations and benchmarking by The+Famous+Brett+Wat · · Score: 5

      ...which just goes to prove that optimization is (justifiably, as it happens) much -maligned.

      --
      proof, n. A demonstration that a conclusion is implied by certain premises and axioms.
    2. Re:GCC optimizations and benchmarking by levendis · · Score: 2

      is this stuff documented anywhere? has anyone gone through and done a thourough analysis of when each gcc option is best used? doing so might be very beneficial for linux overall....

      ----

      --
      ---- I made the Kessel Run in under 11 parsecs.
  3. Some analysis comments by Trepidity · · Score: 2

    Except for the lines of code graph, I don't see how they justify fitting exponential curves to any of the other graphs. Since the resulting "exponential" curves that were fit are nearly straight lines there's really no basis for doing anything other than a linear fit.

    They note that this was all run on the same hardware, but all that means is that the results are valid *for* that hardware. Some of the drastic changes in some areas might be due to, for example, the replacement of a generic driver with a specific driver optimized for one of the pieces of hardware they used. Obviously this change wouldn't carry over to all other systems.

    All in all not bad though. It would've been nice to see some more rigorous data analysis though (the data analysis expected in a typical college freshman chemlab class is more extensive than this).

  4. Re:Signal handling - so what? by mangino · · Score: 2

    What about a web server using signal based on IO and a single process model handling quite a few connections? That can easily have thousands of signals per second.
    --
    Mike Mangino
    Sr. Software Engineer, SubmitOrder.com

    --
    Mike Mangino
    mmangino@acm.org
  5. I learned something by PD · · Score: 2

    I knew it was boring way up in Northern Michigan, but until now, I never imagined just how boring it actually is. I guess in Manitoba they must be benchmarking DOS calls in various MS operating systems. I guess it beats watching caribu mate.

    1. Re:I learned something by PD · · Score: 2

      Nothing beats when caribu mate.

      Except YOU maybe. heh heh.

  6. Re:Devices by PD · · Score: 2

    The performance that I care about is "do it work???" and the NE2000 cards give me no trouble at all. 3c509 cards are also sweet and trouble free.

  7. Re:Yeah, but... by PD · · Score: 4

    That's a lot of work just to print out a negative number on your screen...

  8. How to lie with statistics by MSG · · Score: 2

    Rule #4:
    One can have a graph of any shape that he wants by carefully choosing the axis'.

    1. Re:How to lie with statistics by Dwonis · · Score: 2
      P4 1.4G

      What is the 1.4G that you are referring to? 1.4GB HDD? 1.4Gbps Ethernet? 1.4GB RAM? 1.4GHz? $1400?

      Nothing's more confusing to the non-computer-"literate" people than having people like us talking ambiguously.
      ------

  9. features and drivers by josepha48 · · Score: 2
    It is not suprising though. Consider the number of driver and new features that have been introduced. As well as the S390 archetecture. There are numberous new drivers, as well as framebuffer, as well as better SMP. I am sure that there is more. It would be interesting if the kernel developers had a debug feature in there that if you build it with that on it would tell you the time of execution of each function (not sure if they do), similar to perl benchmark.

    I quote" Hardware compatibility is a large part of the growth."

    I don't want a lot, I just want it all!
    Flame away, I have a hose!

    --

    Only 'flamers' flame!

  10. silly graphs by rangek · · Score: 4

    Silly graphs is a pet peeve of mine. I hate it when my students give me graphs like these. Needless gridlines, unlabeled legends, connected dots, and poor statistical analysis.

    • I hate gridlines and they usually distract from the graph
    • what the fuck is "Series 1". For Christ sakes, take a minute and either delete the needless legend or at least overwrite the stupid defaults to make them meaningful
    • Connecting the dots means something. If you plot linux 2.1.1 and linux 2.1.14 and draw a line or someother curve between these points, you are telling me that if I pick up linux 2.1.7 it will lie on that curve. That is not a correct interpretation of this data.
    • Most of these graphs contain a curve labeled Expon or something (once again, great legend). Why exponential. Why not some polynomial or some other function. What is the error in the fit/correlation coefficient(s). Just tell me something that gives me a reason to believe that this curve means something.

    I also find it ironic that they used MS Excel (which they don't say they did, but it sure looks like it)...

  11. This benchmark was not that useful by cartman · · Score: 4

    First, the university benchmarking team simply ran lmbench (a free, popular, old kernel benchmarking utility) on a variety of kernels. Claiming that:

    Three students and a professor from Northern Michigan University spent the semester benchmarking a bunch of Linux kernels

    ...somewhat exaggerates this accomplishment

    Second, no data were presented on the main areas of the kernel that were improved. How is SMP performance in kernel space? Did the finer grained locks help? How is the performance from the threaded IP stack? Does it prevent IO blocking?

    THAT kind of information would have been interesting. They tested only things that the kernel has done forever.

    1. Re:This benchmark was not that useful by Baki · · Score: 3
      Another thing making this benchmark useless is that it only tests Linux performance under no-load conditions (i.e. the benchmark is the only thing that runs), it doesn't tell anything about scaleability and keeping up performance under heavy load.

      And that is exactly the point that Linux is often criticized for, compared to competitors (Solaris, FreeBSD): it may perform well under no- or light-load conditions, but it doesn't scale well. It would have been interesting to check whether this criticism is still valid for the 2.4 kernels.

    2. Re:This benchmark was not that useful by psyclone · · Score: 2

      I agree that the benchmark was not very useful, but it was still interesting. However, testing only the "basics" of the kernel enabled them to show a long-term trend over several kernel versions.

  12. Re:Quite limited really by Black+Parrot · · Score: 3
    > I definitely noticed a jump in performance between 2.2.16 and 2.4.0 so they must be missing something here.

    I use a "real world" benchmark (which of course might be completely irrelevant to you, however relevant it happens to be to me).

    Here are some recent observations regarding this specific benchmark, ranked in order of effect:
    • Changing BIOS memory setting from CAS 2 to CAS 3 : 3.7% speedup.
    • Changing to a different brand motherboard, and matching the original's BIOS settings as well as possible : 2.1% speedup.
    • Upgrading 2.4.3 to 2.4.4 : 1.1% speedup.
    • Running under kernel compiled as "Athlon" rather than "i686" : no substantial difference.
    Moreover, although I have not had time to test it, a well-informed friend tells me that using certain recent versions of gcc rather than certain older ones can give a whopping 30% slowdown, even using the same flags for compilation. (N.B. - He did not say "gcc is getting worse with time". He merely remarked re two specific versions, whose numbers escape me at the moment.)

    If performance tuning is your forte, then clearly you've got your work cut out for you.

    --
    --
    Sheesh, evil *and* a jerk. -- Jade
  13. Re:Yeah, but... by the+eric+conspiracy · · Score: 3

    Over three years it's still positive.

  14. Re:Yeah, but... by the+eric+conspiracy · · Score: 4

    Every evening I run a disk/memory intensive program that does a 3 year analysis of the US stock market. When moving from 2.2.x to 2.4.x I obtained a run time decrease from 270 to 190 seconds. This to me was a VERY impressive upgrade. The same code running on Win2000 takes 1300 seconds to run.

  15. Re:Yeah, but... by the+eric+conspiracy · · Score: 4

    It's the same code running on the same box - a dual P2 400 with 0.5 GB of RAM. No ifdefs. Programs are invoked from the command line. Relatively small results datasets are saved to files. Because of the size of the input dataset, and the crappy indexes the main performance determinant is the efficiency of disk i/o and buffering thereof.

    For this application the 2.4 kernel kicks butt up and down the street all day. YMMV.

  16. Another study: by MrClean · · Score: 3

    Annother more extensive linux evolution study is at:
    http://plg.uwaterloo.ca/~migod/papers/icsm00.pdf

  17. Re:We'll beat Microsoft yet! by Shelrem · · Score: 2

    Well, along those lines of what I want on a system, for Windows, throw in VC++ (which i'm sure is huge), perl, python, VB (instead of tcl/tk, shell scrtipting, fortran, and all the other misc language support many of us have), MSSQL, and Photoshop or Paint Shop Pro.

    (what I'd REALLY want on a Windows system is an X server and Cygwin, but for the sake of arguement, I'll leave that stuff out)

    I'm guessing we'd be approaching some huge numbers on both sides, and all I can really speculate is that I think Windows would have more overlapping functionality in its apps, but I can't say as for lines of code.

    Anyway, lines of code is not directly a measure of bloat. In my mind, bloat is lines of code divided by (functionality times stability times performance), but I realize that not everyone shares my view on that.

    Yeah.

    -ben.c

  18. Re:We'll beat Microsoft yet! by macpeep · · Score: 2

    Win2K may be 30 million lines of code but the Win2K *kernel* is tiny compared to that amount. The 30 million lines includes everything from the kernel, logging, user management, dialup tools, solitaire to the file manager. Don't compare apples to oranges.

  19. Re:This is off topic as hell but.... by QuantumG · · Score: 2

    The other side of the story is on their site.

    --
    How we know is more important than what we know.
  20. Re:Devices by CJ+Hooknose · · Score: 3
    What I wish is that hardware manufacturers would just use one standard interface, then only one driver for each device would be necessary. Impossible you say? Look at current modems, old sound cards (all sound blaster compatible), NE2000 network cards (I won't buy any other kinds) ATAPI CD-Roms....

    Yeah, right. The problem with this approach is that it leads to unnecessarily narrow definitions of functionality, and can prevent hardware manufacturers from doing things cheaper. Not only that, but the examples you chose are kind of screwy. "Current modems" without a qualifier implies the N+1 varieties of WinModems out there, which all do things differently. Many old sound cards did things their own way and had a small DOS TSR that provided SB compatability in software. The floppy, IDE, and ATAPI command sets, as well as the RS232 serial-port standards, are published and standardized, but these are properly communications protocols between devices, not the devices themselves. The PCI and ISA busses are, again, more like protocols to allow devices to communicate rather than devices themselves. I don't see too many non-PCI, non-ISA devices that plug into the insides of an x86.

    Non-x86 hardware platforms have it easier; one vendor like Apple/Sun/IBM says, "This is the list of hardware that works on our platform," and you use it. The multitude of hardware vendors for x86 boards and devices has led to a large amount of conflicting standards and weird, proprietary hardware. (If a vendor can save $0.10 per unit on a device by leaving out hardware functions which can be replicated by a kludged binary driver, they will. Think WinModems.) This approach has also made x86 hardware cheaper than the alternatives.

    Simply put, things will change and change quickly in hardware. Standards are a good idea, but they quickly become lowest-common-denominator, think "VGA".

    --
    Give a monkey a brain and he'll swear he's the center of the universe.
  21. Re:Quite limited really by Dwonis · · Score: 2

    I hope you aren't using 2.4.2. It was buggy and crashed a lot on my system (reiserfs may have been the problem).
    ------

  22. Re:We'll beat Microsoft yet! by Dwonis · · Score: 2

    Guns don't kill people. Bulletskill people.
    ------

  23. Re:Quite limited really by Dwonis · · Score: 2

    Obvious correction? Which correction is that? (What is CAS, anyway?)
    ------

  24. Re:Quite limited really by norton_I · · Score: 3

    2.4.0 has a dramatically improved mm system, most of the benefits of which don't show up on these tests, yet make a world of difference in real life.

  25. RAM, base mem & extended mem. by dizzy_p · · Score: 2

    Why the h*** does they list both RAM and a combination of base mem & extended mem on their 'resources' page. I would have mattered if they had tested MS-DOS 6.2, but not Linux!!

    --
    --larsw
  26. Re:We'll beat Microsoft yet! by lizrd · · Score: 3
    Don't compare apples to oranges.

    I've always wondered why people say that. I can make several valid comparasions between apples and oranges:

    • Oranges have a thicker skin than apples
    • Apples grow better in northern regions than oranges
    • Apples make a better pie than oranges
    • Orange juice is thicker than apple juice
    • Oranges have larger seeds than apples
    I could continue on like this for some time and I don't think that I would ever get around to mentioning either Linux or Win2k whilst comparing apples and oranges (Though, I might get around to mentioning OSX and British cell phone users if I were to keep at it long enough)

    ________________________
    --
    I don't want free as in beer. I just want free beer.
  27. Pretty sloppy presentation. by cananian · · Score: 3
    This was really a pretty sloppy writeup. The "performance note" from linus was linked a page too early, there were no convenient navigation links, and far too little effort was spent to identify the sources of the performance improvements identified. In addition, "capabilities" are blamed for what was really the result of a debugging-printk excess, and in at least one point "kernel 2.1.92" was blamed (a convenient culprit) when looking at the graph it is obvious that kernel 2.1.*32* was the outlier.

    I'm not impressed.

    --
    [ /. is too noisy already -- who needs a .sig? ]
  28. Three Students and a Professor by nihilogos · · Score: 2

    I rented that video last week. Very racy.

    --
    :wq
  29. Re:We'll beat Microsoft yet! by joto · · Score: 2
    In my mind, bloat is lines of code divided by (functionality times stability times performance), but I realize that not everyone shares my view on that.

    Interesting... I think I do!

    But there are still factors to consider. I think we at least need to multiply by the spaghetti ratio, but other factors, such as usefulness index, design cleanliness coeffecient and ugly hack quotient needs to be taken into account. :-)

    Oh well.

  30. Re:We'll beat Microsoft yet! by joto · · Score: 5
    So when will line count surpass Windows 2000?

    Depending on point of view, that has already happened long ago...

    To make the comparison meaningfull, you have to get systems of somewhat equal capacity. The linux kernel by itself is in no way comparable to Windows 2000.

    In addition we need various fileutilities, an accelerated X11-server (with Mesa/OpenGL, the video-extension, and antialiasing), one of Gnome/KDE (filemanager, basic desktop utilities, a simple texteditor, something akin to COM (which would be Bonobo or Kparts)), a working web-browser (Mozilla or Konqueror), some userfriendly utilities to replace the control-panel, a user-friendly email-client and newsreader, a simple webserver, basic networking utilities (Samba with a user-friendly network neighborhood browser, telnet, ftp, ping, ...), a good media-player (capable of playing at least wav, mp3, CD's, mpeg, avi, mov and preferably asf and wmf), minicom, a ppp-dialer, and probably quite a few other goodies I've forgotten to mention.

    If we put all this into a linux-distribution, I doubt we would do much better than W2k. But to make things even worse, that wouldn't make much of a linux-system. Most linux-users wouldn't be too happy without emacs, gcc with friends, perl, python, tcl/tk, and most of the common command-line utilities (sed, awk, find, etc...) (, and probably also apache, MySQL or PostgreSQL, gimp, etc...).

    Line-count? Well, guess what... Linux has become bloatware... Even more than what's produced in Redmond!

  31. Re:Devices by evilviper · · Score: 2

    You've just hit on the killer problem there. OS developers just take it for granted that they have to write drivers for every device out there. What I wish is that hardware manufacturers would just use one standard interface, then only one driver for each device would be necessary. Impossible you say? Look at current modems, old sound cards (all sound blaster compatible), NE2000 network cards (I won't buy any other kinds) ATAPI CD-Roms (all recent ones are) Floppy drives, and many more devices. If people would put their foot down an say 'I want compatibility' then driver problems under any device would be a distant memory, OSes would be far smaller, hardware would be truely interchangeable, and Windows wouldn't be the only option for those with exotic hardware.

    --
    Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  32. The most important 'benchmark' by big.ears · · Score: 3

    The most important benchmark they showed was their charts--ugly products of Microsoft Excel. Even though a lot has changed in those 4.5 years, its still easier to make your charts in windows.

    1. Re:The most important 'benchmark' by Canonymous+Howard · · Score: 2

      So what? Are you suggesting their conclusions are somehow invalid because they don't use a Linux-based system to draw charts?

      Reread his post. He's not suggesting anything of the sort. He's suggesting that a) many people still find it easier to use Windows than Linux, and b) that's a more important benchmark than speed.

  33. Re:Quite limited really by Salsaman · · Score: 2
    Yes it's so improved it won't even run Visual Age Java or Apache any more (at least on my machine).

  34. Very Poor 2.2 Page Fault Latancy by KidSock · · Score: 2


    According to this graph page fault latencies suck in kernel 2.2. Is this true? I think I'm running a 2.2.17 AC kernel though and if I'm just doing development and not causing swapping then it doesn't matter though right?

  35. We'll beat Microsoft yet! by Beowulfto · · Score: 3
    Total lines of code have tripled, and are on an exponential growth curve.

    So when will line count surpass Windows 2000?
    ----

    --
    There's no point in being grown up if you can't be childish sometimes. -- Dr. Who
  36. Re:Yeah, but... by j-pimp · · Score: 2

    If its the same code then it has nothing to do with his develpoment skills. Most calculations of that nature are done using programs that read input from a text file perform the calculation and dump it to the screen or another file. That should be completly portable with no #ifdef __POSIX. Now what could be to blame is the libraries that are being linked against.

    --
    --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
  37. MS Graph? by Fervent · · Score: 2

    Uh, maybe it's just me, but does anyone else think it's funny they used MS Graph (and presumably Excel) to draw the result graphs? You'd think they use StarOffice.

    --

    - I don't care if they globalize against free speech. All my best free thoughts are done in my head.

  38. Why I would mod you down by fons · · Score: 2

    Yesterday I modded some of these Michael related posts WAY down. Why?

    1. Because they are often insulting, and I don't like to read lame insults on my slashdot.
    If you make an offtopic comment about a delicate subject, it really doesn't help if you start insulting.
    Just state your opinion calmly and have respect for other people. If you'd post like that I would mod it up. (But sadly i wasted all my points modding you down yesterday :-)

    2. You also always post so mysteriously. Why? I still don't really understand what all the fuss is about. And that's also really irritating. So would you please explain thoroughly what the problem is. Only if we all know what the problem is can we solve it.

    So please post something abjective and insightful about this, so we can discuss and solve the whole thing. If you keep posting like this you will only get modded down > get frustrated > post more insults > ...

  39. Kernel Compilation for Performance by PSUdaemon · · Score: 2

    I've read that the Kernel Team has recomended use of egcs 1.1.2 as an alternative to gcc 2.95.2 for compiling the 2.4.0 kernel. How much affect does that have on the performance of an OS?

    Is it worth the trouble?

  40. Re:Linux Summarized Nicely by einhverfr · · Score: 2
    Awww....

    Then they are saying that it will take twice as long for Linux to tell my apps that I have ordered them killed.... (-1) so maybe that extra 1.5 microseconds might prevent a -9 switch.

    --

    LedgerSMB: Open source Accounting/ERP
  41. Page fault latency: in all of 2.2, or fixed? by rknop · · Score: 3

    One thing that I wonder about: that huge performance hit on the page fault latency shown in 2.2.6. Is it still there as of 2.2.19? Did the fix make its way back into the 2.2 series, or is it only fixed as of the later 2.3's and the 2.4 series? 2.2.6 is the only 2.2 in their study, so the study doesn't answer the question.

    -Rob

  42. Converging in the Cauchy sense. by refactored · · Score: 2
    The results give a feeling that linux is converging in the Cauchy sense.

    ie. There is not much fat to trim left...

    Therefore the next dramatic improvements if they are to come will not be from tweaking this part or that part of the kernel, but rather from implementing entirely new classes of functionality.

    ie. Linux has arrived. It's settled down, time for it to start exploring as yet unimagined new things to do instead of new ways to do old things.

    The future will be, umm, fun.

    This post is not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility.

  43. An on-going study would be really useful. by Lethyos · · Score: 3

    It would be nice to see updates to the data here as new versions of the kernel are released. For example, some users are not particularly concerned with newer versions of the kernel unless there are significant improvements. Consider this example: you're concerned mostly with performance aspects of the kernel. A new version is released that shows no improvement (or a decrease) in performance. No sense in upgrading immediately (of course, you may be one of those people who actually looks for and reports bugs) and you can wait until you see a downward trend in the graph before taking your time. There are other potential uses for "live" data such as this. I think it'd be nice if these guys would keep maintaining it. :)

    --
    Why bother.
  44. Quite limited really by Professor+J+Frink · · Score: 4
    Where are the results for IDE/SCSI transfer rates/latency?

    Where are the results for networking?

    I definitely noticed a jump in performance between 2.2.16 and 2.4.0 so they must be missing something here.

    They note the large increase in hardware support, but don't seem to realise that this new support and improved support has given Linux much more performance than their benchmarks might show.

    Maybe the improvements in X etc have helped but no real performance difference between 2.1.38 and 2.4.0? Put any such machines through real world work and you'll soon spot the difference...

    --
    "Don't get mad, get a monkey!"
  45. Re:Some Info on NMU by clydes+master · · Score: 2

    I am a senior at nmu. Maybe you should try to communicate with the professors and other students. I have had no problems with it. In fact, I am currently starting a research project with Dr. Appleton this summer pertaining to linux file systems. I say, if you don't like it here, leave.... now.

  46. More info on the growth of linux by migod · · Score: 2

    For those of you who were interested in the "exponential growth" issue, I did a much more detailed study on the growth of the Linux kernel that was published in the 2000 Intl Conference on Software Maintenance. I think it's very readable by non-academics. Comments welcome. -- MWG http://plg.uwaterloo.ca/~migod/papers/icsm00.pdf