Slashdot Mirror


Benchmarking the Scalability of BSD and Linux

Fefe writes "I recently did some benchmarks for a talk about scalable network programming I held at Linux Kongress 2003. The benchmark results turned out to be surprising enough to present them on their own. This ought to end those pesky flame wars about whose IP stack or memory management scales better. Or maybe not."

30 of 433 comments (clear)

  1. FreeBSD may be dying but it's fast! by seanadams.com · · Score: 4, Interesting

    Can anyone explain the discontinuities in the FreeBSD plots? Intuitively I would guess that something is breaking at high load, rather than getting miraculously faster. The author suggests that a clever optimization is kicking in, but I wonder if his tests were actually ensuring that the calls succeed.

    Also watch out as you read the graphs - just to keep you on your toes, he changes the colors in every one!

    1. Re:FreeBSD may be dying but it's fast! by zcat_NZ · · Score: 2, Funny

      Can anyone explain the discontinuities in the FreeBSD plots?

      I would have thought that was obvious.. .. BSD is dying. :)

      --
      455fe10422ca29c4933f95052b792ab2
    2. Re:FreeBSD may be dying but it's fast! by Almost-Retired · · Score: 2, Informative

      I'm not so sure its dying, but forked it certainly is. Go checkout whats going on in the "dragonflyBSD" camp. Most of the posts have been by Prof Matt Dillon, an experienced coder who came up thru the amiga ranks, writing the popular DICE C compiler for it many years ago.

      What he has to say so far tells me that his version of BSD will both scale very well AND work great in the SMP dept. The process locks that slow down linux in SMP versions and prevent its doing x amount of work for each processor added are being done away with by Matt by subbing a job isolation scheme that assures each job runs on its own cpu rather than handing each call off to a freshly assigned one.

      He seems to think it will scale a lot better with far fewer halts for cache flushing and reloads. What I've read so far would seem to make sense. He claims its already more stable and faster than FreeBSD in any version 4.8, which he used for the fork base. First release target is next year.

      No, I don't think BSD is dying, just doing an end run to a higher place in the performance pack a year from now.

      --
      Cheers, Gene

    3. Re:FreeBSD may be dying but it's fast! by __aafkqj3628 · · Score: 4, Informative

      Can anyone explain the discontinuities in the FreeBSD plots?

      Well, the drop-offs of FreeBSD in a couple of the graphs can be explained by him not reading the docs.

    4. Re:FreeBSD may be dying but it's fast! by moderators_are_w*nke · · Score: 2, Informative

      I think 5.1-CURRENT is absolutely a fair comparison with Linux 2.6-test7. Both are the almost finished code for the next stable release.

      Maybe you wouldn't run either of them right now, but a few months down the line, these will be what everyone is using.

      --
      "XML is like violence. If it doesn't solve your problem, use more." - Anonymous Coward
    5. Re:FreeBSD may be dying but it's fast! by WindBourne · · Score: 2, Interesting

      The process locks that slow down linux in SMP versions and prevent its doing x amount of work for each processor added are being done away with by Matt by subbing a job isolation scheme that assures each job runs on its own cpu rather than handing each call off to a freshly assigned one.
      If I understand what you wrote, that approach will work well for something with near static process creation. However, if you are constantly forking and having the number of processes/threads being created at rapid rates, it will actually be slower and utilize the resources poorly. Basically, you allocate a process to a CPU based on current loads and then it stays on the CPU. Nice and easy. But assume that you fork 5 processes. These are distributed between the 2 processors. But then 2 exit. That leaves 3 running. If they were allocated on the first CPU, that would mean that the 2'nd gets no utilitization. Linux has locks, but now, they are minimized. Yeah, it sux to create these, but when trying to create a 1000 processes/threads and utilize the 8-16 CPU's that will be used in the near future, the Linux approach will scale dramatically better.
      The real trick is not to move back to the old job approach of mainframes (which is roughly what you describe), but to lower the costs of using all the resources. I think that 2.6 has done just that. In addition, it allows for nice scaling on 1024 CPUs.

      --
      I prefer the "u" in honour as it seems to be missing these days.
  2. Got Mirror? by Anonymous Coward · · Score: 2, Funny

    Apparently the webserver with the results didn't scale so well. It's /.ed already.

  3. Open Source Software clearly superior by jgardn · · Score: 4, Interesting

    The winner in this case is Open Source software.

    The article is very fair and very well thought out. It is almost like reading a research paper. It looks like he is inviting criticism, insight, and corrections, rather than trying to force the experiments into a pre-determined outcome.

    Such a thing is not possible in the proprietary world. Any study done on proprietary software has to be tainted with opinion and the experiments must be skewed. Read the EULAs. Some EULAs won't even allow you to publish the results of such tests.

    Open Source software, of the BSD kind and the GPL kind, has totally changed the way we think about and work with software. One day, we will be able to scientifically determine what software we need to suit our needs. We will know ahead of time exactly what limits and what capabilities each piece of software has. IT managers will be able to sort through real facts based on real research, rather than a bunch of shallow articles and biased reports. Software will survive on its merits alone.

    The whole industry is going to benefit by this, in a large, large way. The question one day will no longer be "Microsoft or Linux?" but "Which Open Source software should we use, and why?"

    --
    The radical sect of Islam would either see you dead or "reverted" to Islam.
    1. Re:Open Source Software clearly superior by presroi · · Score: 2, Insightful

      Please have a look at the topic again.

      "Open Source Software clearly superior"

      superior to what? I missed the point only half as much as you did, at least it appears to me so.

    2. Re:Open Source Software clearly superior by Anonymous Coward · · Score: 2, Insightful

      Oh yeah. And he didn't test unstable versions of Linux like 2.6. Oh shit, he did! You're an idiot!

    3. Re:Open Source Software clearly superior by dbarclay10 · · Score: 2, Interesting

      "superier to what? I missed the point only half as much as you did, at least it it appears to me so."

      In the context, FOSS is superior to closed-source software whose EULA forbids the publishing of benchmarks.

      For instance, in this case the published benchmarks show a number of tasks that OpenBSD is very poorly-suited for. Last guy *I* knew who tried to publish similar benchmarks about Oracle compared to MS SQL Server got cease-and-desisted by the Oracle folk.

      Cappice? :)

      --

      Barclay family motto:
      Aut agere aut mori.
      (Either action or death.)
  4. Don't miss to notice the recursion... by presroi · · Score: 2, Interesting

    Topic of this paper is

    "Scalable Network Programming
    Or: The Quest For A Good Web Server (That Survives Slashdot)"


    What a coincidence!

    By the way, fnord web server has at least once survived one slashdotting-event. 4 seconds of googleing result in this comment which should have let to a stream of visitors.

    I hope fefe will publish the numbers of visitors and the behavior of its web server as soon as possible.

  5. Theo is going to be pissed.... by gid-goo · · Score: 4, Funny

    Who wants to start taking bets on when Theo takes the bait.

    1. Re:Theo is going to be pissed.... by LordHunter317 · · Score: 2, Insightful

      I'm personally glad that ports to things like vaxen and 68k macintoys are dying. Why waste time maintaining code for systems that are the computer equivalent of a beta VCR?
      It helps ensure your codebase is more portable. By porting to "Dead" architectures (meaning ones that aren't going to change), you have a constant target that allows you to work out bugs in your codebase (possibly for all architectures) and ensure that it works correctly.
      Furthermore, if someone is really dedicated to an "dead" platform, it may result in faster code overall, as they may start working on optimizing portions of the codebase for increased performance.

    2. Re:Theo is going to be pissed.... by Predius · · Score: 2, Interesting

      See the url above. Those 'dead' architectures that noone's using, the very fact that they ARE maintained demonstrates someone is using them enough to keep it working. Myself, I push a 386 and a SE/30. Both are more than fast enough for my purposes.

      Many people don't have the luxury of grabbing a P4 or Opteron as there whims demand. Supporting older hardware also does not slow an OS down. If done properly, it forces you to think about how to do things RIGHT so you don't eat unnecessary cpu cycles.

  6. I'm probably going to regret this... by Pathwalker · · Score: 2, Informative

    I have a complete copy (graphs and all) here.

  7. Very interesting comment about GNU libc by njdj · · Score: 2, Insightful

    I hope RMS reads the slides. They're in German at the link I used, so here's a translation of slide 13 which is page 14 of the PDF file:

    "The memory required for an empty process is shockingly large on current Linux systems. However, this is not the fault of Linux, it's the fault of GNU libc.

    GNU libc leads all libc implementations by a large margin in bloat and waste of memory. One day it got so painful that I wrote my own libc. With this, a static binary of 'Hello world' took only 300 bytes..."

    I've long suspected that FSF stands for Fat Software Foundation.

    (He doesn't say, but I assume his home-brew libc was a subset, otherwise we'd all want it).

    1. Re:Very interesting comment about GNU libc by CaptnMArk · · Score: 2, Insightful

      Rich libraries are no problem (asuming PIC code)

      The problem is overhead code that needs to be ran at startup and static variables in the libraries which require fixups in the loader.

  8. My benchmarks. by Black+Parrot · · Score: 3, Funny


    I took three computers out in my rowboat, a Windows system, a Linux system, and a BSD system, and threw them overboard to see what would happen.

    The Windows system sank like a rock, the Linux system bobbed back to the surface, and the BSD system rose to the sky, to be greated by a chorus of angels.

    Then I woke up, so I don't know what the angels were singing.

    --
    Sheesh, evil *and* a jerk. -- Jade
  9. Wrong FreeBSD version used by Anonymous Coward · · Score: 2, Informative
    From the 5.1-RELEASE notes:

    Experimental 1:1 and M:N thread libraries...
    Experimental Name Service Switch infrastructure...
    Experimental support ...

    Although stability is greatly improved and many bugs have been fixed, FreeBSD 5.1 might not be suitable for ...

    So this guy grabs a beta version of a new tree in freebsd, and runs it against stable netbsd, openbsd and linux? Eh? Did he even compile his own kernel and take out all the debugging information in the released kernel? Did he turn off the debug info in the kernel config, on by default? I kinda doubt it somehow... If he knew enough to do that, he'd know that 5.1 has NOT been tagged stable.

    Most freebsd users will look at this study and laugh. But people who don't know anything about freebsd (perhaps that includes the author?) might get the wrong idea. The study needs to be redone using the -stable tree, not the debug-riddled 5.1-RELEASE.
  10. Security by dmiller · · Score: 3, Informative

    Not sabotage, security. In case you don't know: itojun is the guy between all the BSD's IPv6 support, and has been very active in the standarisation process.

  11. FreeBSD-5!? by __aafkqj3628 · · Score: 2, Insightful

    I'm wondering, if he was going to be doing a scalability test, why didn't he test the version of FreeBSD that is actually reccomended for production (4.8)?
    He had the time to test the stable and devel versions of the linux kernel, but only the new technology version of freebsd?

  12. Re:Best benchmark I've ever seen by bo0ork · · Score: 2
    I'm not an OpenBSD dev member, but I am someone who started out with Linux (Redhat 5), trying some distros (SuSE, Mandrake, slackware), before moving to FreeBSD and then to OpenBSD, where I've stayed. I prefer the stability and security to performance and features. But then, I have no need to serve 100.000 hits per minute off a 386, nor do I need to support all the latest hardware and whizbang features.

    The reviewer does sound a bit biased towards Linux. In the same way Bill sounds a bit biased towards Microsoft.

    --
    Does everything include nothing?
  13. Nothing new here by chrysalis · · Score: 4, Insightful

    There's no need for such a very technical benchmark.

    Regular usage of various operating systems on the same host makes it obvious.

    When it comes to speed and features (or bloat), Linux is more efficient than FreeBSD, NetBSD and OpenBSD. This is especially significant in SMP environments.

    Linux users are always talking about the just-released experimental patches that will help their system to get 0.1% faster, or the most aggressive flags to optimize their Gentoo system.

    BSD users just advocate their system with the generic word "robust".

    Nowadays, stability is not really the key. Every Linux or BSD free operating system has basically the same stability. The software is the same, with the same bugs. The package system have equivalents (Debian works on NetBSD, Gentoo works a lot like BSD ports, etc) and support for common hardware is almost identical.

    The reason to choose one OS over another is often more political than technical. People tend to use FreeBSD just to try "something else". People tend to use Linux because the Mandrake/RedHat/Conectiva/SuSE installers are beautiful or because Gentoo is fashion and a good way to learn what Unices are made of.

    But if this is just to use common software like Apache and Qmail there's no real difference except speed. If this is what you need, Linux is definitely the best choice nowadays, especially since 2.6 kernels are almost ready for production use.

    For other needs, your mileage may vary.

    For instance I love OpenBSD for development. The compiler and the libc have very handy features to automatically detect bogus code. And the man pages are also excellent, with helpful hints.

    For firewalls and trafic shaping, I wouldn't use anything but *BSD because of PF. PF is really the best thing in *BSD systems IMHO. The firewall is very easy to configure yet extremely powerful and fast. And I was fond of Iptables before.

    For bridging and transparent firewalls, I would also use BSD because it seems to work better than Linux in this area.

    In fact it's just like the girl of your dreams. Everyone's always looking for the perfect operating system that will perfectly fit all needs, but it just doesn't exist.

    --
    {{.sig}}
  14. Re:What IPv6 "sabotage" did OpenBSD do? by __past__ · · Score: 4, Informative
    Oh and the read-only sysctl problem for FreeBSD that he mentions was probably due to securelevel's being on (meaning you can't modify kernel variables).
    Nope, kern.maxproc is really read-only in a running system even in securelevel -1. You have to set it in /boot/loader.conf (which doesn't seem to be prominently documented anywhere, so not finding it is nothing to blame fefe for).
  15. Improving the graphs by hey! · · Score: 2, Interesting


    Also watch out as you read the graphs - just to keep you on your toes, he changes the colors in every one!


    The author should use a graphing technique Edward Tufte calls "small multiples". In that you lay out a series of thumbmails of the each graph series. The eye can quickly scan down the thumbmails and get a rough feeling for how each series compares.

    This would avoid the problem where graphs overlay each other and with the inconsistency between graphs in the plotting conventions.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  16. Re:Why the hell fbsd 5.1? by molnarcs · · Score: 5, Informative

    I knew when I read the post that this would lead to another FreeBSD v. Linux flamewar, despite the author's claims of 'hoping' to end those.

    I don't think using 5.1-CURRENT is a problem, but the way the benchmark results were layed out was begging for a flamewar. As I explained earlier the results are not as bad as either linux fanatics, or FreeBSD fanatics would have it. It would have been simple to avoid such flamewar (or am I too optimistic?) by doing two things:

    Explain the status of both (linux 2.6 and FreeBSD 5.1) development branches - as I have outlined in my earlier post. If you take into consideration what I have written above, than you would have realized that results for FreeBSD are not that bad, in fact, they are excellent.

    Include results for 4.8 - or 4.9 rc3 (but I would be happier with just the production release) in the test, just as 2.4 was included on the linux side.

    To sum up: I believe that these benchmarks confirms what I thought for a long time: FBSD 5.1 development is on par with Linux 2.6. Perhaps this was the reason for his last "Or may be not" remark.

  17. open BSD, slowliness by lunardude · · Score: 2, Interesting

    In The article, The author mentions that he finds "unacceptable", or embarassing, a few things about openbsd, mainly concerning it's general speed and scalability.

    ALthought not beeing an expert in bsd nor in linux, maybe i'm rong, but isn't OpenBSD made to be secure, and not the fastest operatin system ( additionally, comparing oragnges to apples, by testing release/current/stable, wasn't the best way of comparing those OSes) ????

    By implementing a few feature in the OpenBSD stack and Kernell, I guess that the devellopers are delibetatelly sacrifying performance in order to get an Os less vulnerable to DOS and other vulnerabilities

    It owuld be interesting to compare the same OSes in a security test to find out which OS is more secure, if speed and scalability isn't the only issue in a OS...

  18. I seriously question the author's objectivity by zamurai · · Score: 2, Interesting

    Felix is more than opinionated about Linux vs. BSD. Check the qmail mailing list archives for his rants with BSD users about filesystem and other performance issues. In particular, he's had a number of run-ins with those on the list who use OpenBSD--the one he labels a `stinker'.

  19. Real point: they show improvement by iabervon · · Score: 2, Interesting

    The interesting point is that all of these operating systems seem to be getting faster. It seems to come down to how many recent developments have been integrated into the version being tested, not any inherent differences between operating systems. This is, of course, as it should be: the source for all of these operating systems is available, and there are even frequently papers describing the techniques. If a technique is, in fact, better, it should eventually be adopted by all of them, and so your results will depend on how much has been adopted in the version you're testing.

    It is encouraging to see that all of these developers are competing with the real opponent, which is not each other or even Microsoft, but the slashdot effect. After all, the goal should not be simply to be better than the others, but to be sufficient for the user's purpose, which is not hampered but rather assisted by sharing all of your tricks. It can sometimes seem like there are endless wars between Linux and BSD, but, behind the scenes, the sides actually share information. Never as much as they'd like, but always more than people think.