Slashdot Mirror


FreeBSD 7.0 Bests Linux In SMP Performance

cecom writes "After major improvements in SMP support in FreeBSD 7.0, benchmarks show it performing 15% better than the latest Linux kernels (PDF, see slides 17 to 19) on 8 CPUs under PostgreSQL and MySQL. While a couple of benchmarks are not conclusive evidence, it can be assumed that FreeBSD will once again be a serious performance contender. Some posters on LWN have noted that the level of Linux performance could be related to the Completely Fair Scheduler, which was merged into the 2.6.23 Linux kernel." Update: 03/06 21:32 GMT by KD : An anonymous reader sent in word that Linux kernel developer Nick Piggin reran the benchmark today and came to a different conclusion: In his benchmark Linux was faster than FreeBSD.

79 of 288 comments (clear)

  1. Well by morgan_greywolf · · Score: 5, Interesting

    I'd be interested to see results from pre-CFS kernels.

    Not that FreeBSD hasn't made major performance improvements.

    Also, I think that a database test isn't a complete picture. For example, some OSes like IRIX or Mac OS X perform very well on streaming of local video and audio, but I wouldn't benchmark Oracle or PostgreSQL on either.

    1. Re:Well by archen · · Score: 4, Interesting

      And I like the article summary stating that FreeBSD may now be considered "a serious performance contender". Like FreeBSD was 1000% slower than Linux? Most servers spend their time spinning their wheels anyway, generally I'd rather look at security, how it handles under load and other metrics than whatever "performance" is considered in this instance. Linux is good for some things, BSD for others.

      About the only really good news here is that MySQL performance is actually adequate. As MySQL has always been a dog (usable, but a dog) on FreeBSD, the general rule of thumb was that if you needed MySQL you should stick to Linux; all other factors being equal. So now at least we can get down to other factors that are important instead of one database that performs poorly on one system.

    2. Re:Well by Zpin · · Score: 5, Informative
      The linked PDF contains pre-CFS kernel benchmarks. Conclusion:

      The new CFS scheduler in 2.6.23 is "Completely Fair" ...to FreeBSD
    3. Re:Well by saleenS281 · · Score: 2, Insightful

      You also wouldn't run Oracle or PostgreSQL on them unless you wanted to lose your job. The test is a great test for linux vs. freebds, because it's the type of environment where they'd compete.

    4. Re:Well by calebt3 · · Score: 5, Funny

      Most servers spend their time spinning their wheels anyway And then along comes a /. article...
    5. Re:Well by SanityInAnarchy · · Score: 2, Funny

      Yep. Thanks, Linus, for dropping the pluggable schedulers in favor of The One Scheduler...

      --
      Don't thank God, thank a doctor!
    6. Re:Well by setagllib · · Score: 2, Informative

      CFS is a thread scheduler, CFQ is a disk IO scheduler. They are independent but can coexist (and in many modern distro releases, do so by default). Both seem to be focused on desktop user experience, although they're not exactly "bad" for servers either.

      --
      Sam ty sig.
  2. finally by Zashi · · Score: 2

    I can finally make full use of my quad-core toaster!

    That toast isn't going to serve itself!

    --
    Skiffy is Spiffy, but Ort is tort.
    1. Re:finally by BitZtream · · Score: 3, Funny

      Your comment would have been funny if we were talking about NetBSD. NetBSD is the one that runs on everything, including a toaster.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    2. Re:finally by UbuntuLinux · · Score: 5, Funny

      Hello. I don't believe you know me, but you might be able to help. I use Ubuntu Linux, and I am helping the daughter of a friend to install Linux onto her PC this evening. I have never really spoken to a girl before, and was thinking that maybe if I made a joke, it might break the ice. You are obviously excellent at humour, and I was wondering if you could give me some tips? For instance, it is inevitable that something will go wrong during the process, and I was thinking that maybe if I said something like 'this is almost as unreliable as my beard trimmers!' then it would demonstrate that I am a funny guy. Can you offer any kind of critique of this line, or offer any other advice?

    3. Re:finally by JK_the_Slacker · · Score: 3, Funny

      Depending on which SMP chip you're talking about, FreeBSD will now run 15% faster than Linux on your toaster.

      --
      I'm waiting for a "-1 somepeoplejustshouldn'tgetmodprivileges" meta-moderation.
  3. It's that year again! by n3tcat · · Score: 4, Funny

    Maybe now we can finally declare year of the linux desktop!

    Wait, what?

  4. Re:You don't have to be Kreskin by morgan_greywolf · · Score: 5, Funny

    Nothing against Linux, but it's hardly an apples to apples comparison. Exactly. I mean, who cares about performance on a dying OS? ;)
  5. Possibly by Malevolent+Tester · · Score: 3, Funny

    While a couple of benchmarks are not conclusive evidence, it can be assumed that FreeBSD will once again be a serious performance contender Right up until someone displays a crucifix, that is.
    --
    If you haven't made a developer cry, you've wasted a day.
    1. Re:Possibly by BitZtream · · Score: 4, Informative

      The beastie is not evil! Just because he has horns, a pitchfork and looks like the devil doesn't make him evil!

      You can tell by his smile. It doesn't look freakish or anything ... does it ...

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  6. Re:You don't have to be Kreskin by CastrTroy · · Score: 4, Insightful

    It probably has a lot to do with FreeBSD having a much more focused niche. FreeBSD is really tuned primarily for servers. You can use it on your desktop, but that's not really it's main purpose. Linux on the other hand, has really branched out. It has desktop distros, server distros, embedded distros, and probably a couple other areas I haven't thought of.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  7. BSD Desktops by parvenu74 · · Score: 2, Interesting

    Speaking of which: are there any "distros" out there ship a combination of FreeBSD and the latest Gnome desktop? I think that would be a better combination than Ubuntu's Debian+Gnome combo, personally.

    1. Re:BSD Desktops by BitZtream · · Score: 2, Interesting

      Yes, the only FreeBSD 'distro'. FreeBSD is not fragmented like the 100 and 1 Linux distros

      Download the FBSD isos, install the gnome packages. Not new enough, build from source using ports. While it probably doesn't include the absolutely latest Gnome, the FreeBSD people tend to appreciate stability over cutting edge features, so its probably going to be a little behind the bleeding edge, for something popular like gnome though, it should match up with the latest stable release within a very short period of time.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    2. Re:BSD Desktops by ninjaz · · Score: 3, Informative

      Yes, the only FreeBSD 'distro'. FreeBSD is not fragmented like the 100 and 1 Linux distros

      There are FreeBSD-based PC-BSD and DesktopBSD Both of them are using KDE, though.

    3. Re:BSD Desktops by Anonymous Coward · · Score: 5, Insightful

      FreeBSD is not fragmented like the 100 and 1 Linux distros

      I'm a FreeBSD fan, but what kind of logic is that? You pick one example out of a fragmented set, and compare it to an entire other set of operating systems.

      You act as if NetBSD, OpenBSD, DragonflyBSD, Darwin, etc, do not exist. Of course and item cannot be fragmented if if you define it's containing set as "itself". Makes about as much sense as:

      Ubuntu is not fragmented like the 100 and 1 BSD distros
    4. Re:BSD Desktops by Ed+Avis · · Score: 3, Informative

      You could try Debian GNU/kFreeBSD, though this is not really a distribution of the full FreeBSD system but just its kernel with a GNU userland.

      --
      -- Ed Avis ed@membled.com
    5. Re:BSD Desktops by BitZtream · · Score: 2, Insightful

      Of those you listed, Only DragonflyBSD and Darwin use a FreeBSD kernel, Darwin considerably modified, to the point that it might as well be counted on its own. You can not drop the FreeBSD kernel in any of them and have things work, except for Dragonfly, but even then it still requires (minor) modification.

      Compare/Contrast to Linux distributions. The kernel, assuming version matchs, is rather interchangable between the distros. Its the file system layout, the utilities included, and default configurations that define the 'distro'.

      With FreeBSD, all of the above is defined as 'FreeBSD'. DragonflyBSD is a fork it. As is PC-BSD and a couple of the even less known forks.

      Linux distros are 'the GNU/Linux kernel' and 'the utilities and userland tools required to make it usable'.

      Saying there are FreeBSD distros is like saying there are 'Slackware' distros, or some such variation. While I'm sure you could argue it, the meaning behind what we all consider it to be would be different than what people think of when its said.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    6. Re:BSD Desktops by ninjaz · · Score: 4, Informative

      No, those are forks. FreeBSD is not just a kernel like Linux. FreeBSD is the entire package. You don't have other distros, you have forks of the original.
      Well, both PC-BSD and DesktopBSD claim to not be forks. DesktopBSD explicitly identifies itself as a distribution of FreeBSD and PC-BSD says "PIF" (PC-BSD is FreeBSD). Here are the references: http://faqs.pcbsd.org/index.php?action=artikel&cat=14&id=304&artlang=en

      http://desktopbsd.net/wiki/doku.php?id=doc:faqs

      Of course, I appreciate the fact that FreeBSD's base is an integrated system which is maintained as a unit as opposed to Linux distributions which are sourced from multiple projects.

    7. Re:BSD Desktops by Sancho · · Score: 2, Informative
      We're getting into semantic Hell here.

      FreeBSD doesn't have distros because FreeBSD itself is very much like a distro. It's not a requirement from the FreeBSD team--rather, FreeBSD is a complete operating environment akin to a Linux distribution.

      There's nothing technically or legally preventing me from creating a new installer that uses the FreeBSD kernel and FreeBSD userland, with some modifications to the default packages installed. In fact, people have done just that. PFSense even calls it a distribution of FreeBSD.

      I think the main reason that more of them haven't cropped up is because they're just not all that necessary. Since FreeBSD comes with the ability to add third-party software in using a repository (extremely similar to Gentoo's Portage, as the Gentoo team based some of their design decisions on BSD ports), so there's not much to add. If you notice, the major Linux distros of times past largely differed in the software repository and default options for precompiled packages.

      especially as stupid license nazis stop us sharing code *shakes fist* Well, if it violates the license, I don't know what you want. *shrug*
    8. Re:BSD Desktops by sremick · · Score: 2, Informative

      Incorrect. Both track the main FreeBSD tree. Consider them "value add" packages of software and tweaks layered on top of the official FreeBSD. A fork would be traced to a single point in time with ever-growing divergence (think DragonflyBSD). Both DesktopBSD and PC-BSD include updated bases of the main FreeBSD with their own updates. For example, PC-BSD 1.0 was based on FreeBSD 6.0. The current version of PC-BSD, 1.4.1, is based on FreeBSD 6.3. PC-BSD 2.0 will be based on FreeBSD 7.0.

      In fact, a lot of the DesktopBSD components are available as an add-on in the Ports collection:
      http://www.freshports.org/sysutils/desktopbsd-tools/

    9. Re:BSD Desktops by Eivind+Eklund · · Score: 2, Insightful
      I would count both Darwin and DragonflyBSD as their own kernels; they are substantially modified.

      Eivind (ex/inactive FreeBSD kernel developer).

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  8. Re:Dual Core by morgan_greywolf · · Score: 3, Interesting

    Does this apply to single processor machines with dual cores or just multiple processors? Interesting point, but from the OS kernel's point-of-view a single-processor, dual-core machine looks exactly like a machine with two processors. So it runs the same code to support SMP whether we're talking single-processor dual-core or multiple processors.

    IOW, if there is a performance difference, I would expect it to show up exactly the same in both FreeBSD and Linux (as well as any other OS that supports SMP).
  9. Pre-emptable kernel? by Gothmolly · · Score: 2, Interesting

    Does FreeBSD have a pre-emptable kernel? One of the things Linux has really focused on lately is desktop interactive performance, so there may be performance tradeoffs vs. a kernel which can't pre-empt itself.

    --
    I want to delete my account but Slashdot doesn't allow it.
    1. Re:Pre-emptable kernel? by archen · · Score: 2, Interesting

      in the kernel config there is a preemption option which I believe is enabled in the default kernel. Generally you can turn this on and off, and use a different scheduler if you want to, but there isn't the myriad of options to tinker with in Linux. Since many don't bother switching from the defaults, and many others tend to choose wrong anyway, this might be a good thing.

  10. I look forward by Clover_Kicker · · Score: 5, Funny

    to the enlightening and respectful conversation this article will provoke.

    1. Re:I look forward by garett_spencley · · Score: 4, Funny

      Screw you!

      Wait, you forgot to mention ... you use BSD or Linux ?

  11. Re:You don't have to be Kreskin by oscartheduck · · Score: 3, Interesting

    You think so? I dunno, it seems to me that FreeBSD suits the desktop role really well; I use it for preference. Especially when you consider that the only OS with more packages is Debian, it makes sense that it can fit a desktop role extremely nicely.

    --
    How to use coral cache: http://slashdot.org.nyud.net:8090/~oscartheduck
  12. Re:Bad news for Linux? by BitZtream · · Score: 3, Insightful

    Benchmarks are almost but not completely useless. In this particular setup, FBSD 7.0 runs postgres doing some specific set of queries faster than Linux.

    Its a safe bet Linux will do some other set of things faster than FreeBSD does them, possibly even another specific set of PostgreSQL queries for that matter. Linux is definately more concerned with desktop app performance. I can say this safely because Linux actually cares about it, FreeBSD does not. Its there to serve, not run X. It will run X, and if they see a way to make performance better for the desktop apps AND the server apps, then it may go in the source tree. If its going to hurt the server side, don't bet on it.

    While I use FreeBSD for my servers because its got a clean filesystem layout and is designed to be a server OS, I'd be willing to bet that someone with deep knowledge of PostgreSQL on Linux could give it a run for its money by tweaking the kernel for server performance.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  13. In short, wow by MrNemesis · · Score: 4, Interesting

    Very, very nice scaling performance under PGSQL is evident in the PDF, and I've no reason to assume the benches aren't legit. I think part fo the reason that PG was traditionally slower than MySQL was that it did lots of complicated locking to provide better scalability across processors, whereas we see MySQL performance dropping off after we go to more than eight cores. I think this was the same philosophy Sun took with "Slowaris", which was also far more scalabe than Linux at the time the moniker was in widespread use.

    Still, I hope Linux can at least match this sort of superb scalability. CFS is fairly new, and I know there's optimisation work been done to it in .24 and .25, although it was a little sad to see the first iteration of CFS performing more poorly than its predecessor (and, if this is the case, I can see why Linus stonewalled CK's patches for so long, since they were mainly tested on desktop workloads). Are there any apples-to-apples comparisons out there that test various flavours and versions of Linux and BSD with a wide range of benchmarks? At the best review sites do a few benches with MySQL, and six months later everything has changed so it's incredibly difficult to do good performance comparisons.

    Even so, it's refreshing to see precious little of the "BSD fudged their benchmarks!" trollspeak in the LKML thread, and plenty of talk about how to make Linux better. Open source is hippy capitalism - it also needs healthy competition to keep it in check :)

    Offtopic: bug linked to in the LKML pointed me at this http://www.latencytop.org/ Sounds quite nifty

    --
    Moderation Total: -1 Troll, +3 Goat
    1. Re:In short, wow by A+beautiful+mind · · Score: 2, Informative

      Well, as someone who uses Pg with 100k unique user visits a day, Pg beats the crap out of Mysql if we're talking about anything else than very simple selects.

      If you need transactions, stored procedures, subqueries, complex queries with joins, multi-value insert, etc., then you'll get much better performance results with Postgresql >= 8.2 than with Mysql. 8.3 adds a nuce performance gain on 8.2 aswell, while the database is much more consistent than mysql is.

      I think this boils down to the philosophy: Postgresql strived/strives to be correct first and then fast, mysql strives to be fast and then they decided they'd like some correctness and ACID features. We can see how well that worked out.

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    2. Re:In short, wow by MrNemesis · · Score: 2, Informative

      Agree 100%. I've got to the stage where if I see something list MySQL support without Postgres support, I'm generally of the opinion they're not taking things seriously enough :) Postgres has been by DB of choice for about two years now, and I've yet to have it balls up on me, and speed has never been an issue - like you say, as soon as you start doing non-trivial stuff, Postgres utterly thrashes MySQL.

      --
      Moderation Total: -1 Troll, +3 Goat
  14. Re:You don't have to be Kreskin by CastrTroy · · Score: 3, Insightful

    How many of those packages are desktop packages? Seems like a odd metric to just compare the number of packages as to how well an OS is suited to the desktop.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  15. Kreskin sez by eclectro · · Score: 5, Funny

    Linux is actually better than BSD because you can roast marshmallows over the schedular flamewars.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
  16. Re:You don't have to be Kreskin by oscartheduck · · Score: 3, Interesting

    Well, I don't think I've ever installed any package from anything other than the ports system. Lots? I know I've installed everything from Gnome, XFCE and KDE, through OpenOffice and a bunch of stuff in between.

    You're right that mere numbers of packages is a weird metric, but what else can we offer? FreeBSD has great performance, and has everything necessary to be either a good server *or* a good desktop. It's much like Gentoo that way -- it doesn't focus on being either one or the other, it focuses on being a solid basis. What you put on top of that basis is your choice. It honestly seems to me that the distinction between server OS and desktop OS is its own entire discussion; if we can come to a good notion of what either means, we can reach a nice conclusion. If we take the current crop of Linux desktop OSes, though, I don't see any more integration between, say, Fedora and Gnome and FreeBSD and Gnome, or Ubuntu and Gnome and FreeBSD and Gnome.

    If I think about it, it does seem that Ubuntu starting with a GUI interface and letting you find the command line by yourself is more friendly to the average user; I haven't installed FreeBSD using anything other than minimal-install for so long that I don't know whether you can have a GUI start up by default. And FreeBSD's installer, whilst excellent for its audience, is less friendly to a first timer. If we take those metrics, the idea of "can I sit down and first time use it without documentation?" then a lot of the linux crop are friendlier, yeah. But the documentation *is* very hand-holdy, and very very thorough for FreeBSD. And nicely available online.

    --
    How to use coral cache: http://slashdot.org.nyud.net:8090/~oscartheduck
  17. Bogus PostgreSQL tests by greg1104 · · Score: 3, Interesting

    While I'm glad for FreeBSD they're showing good numbers again, their testing of PostgreSQL in this study is rather odd. The results are using the read-only tests from sysbench. You can see from its sourceforge page that sysbench is a MySQL benchmarking tool that has some rudimentary PostgreSQL support bolted on top. That particular code is so bad that the last time I checked, turning on the write OLTP tests deadlocked the PostgreSQL server, as it wasn't putting statements into transactions correctly (which of course the ancient MySQL versions this code targeted doesn't care about). As the sysbench tool hasn't been actively maintained in ages I doubt that has improved.

    The claimed "15% faster than linux" is pretty clear in the MySQL tests; the PostgreSQL ones have a weird dip in them but are in general much closer. I'd be comfortable if the result of this study was "FreeBSD 7 has been optimized to be 15% faster running MySQL than Linux", because that matches what they did (note the specific libpthread patch for example). But the fact that they used such an awful PostgreSQL benchmarking methodology leaves me hesitant to draw a broader conclusion than that based on their tests.

  18. Re:Dual Core by Fweeky · · Score: 2, Interesting

    Yes; Jeff Roberson, the author of FreeBSD's new ULE scheduler, wrote a bit about it on his blog a couple of months ago.

  19. I have Vista by StarKruzr · · Score: 4, Funny

    but I heard it wasn't compatible with Windows or labtops.

    Can you help? Sorry, I am not good with computers. :) I want to download the internet onto my labtop.

    --

    +++ATH0
    1. Re:I have Vista by MadMidnightBomber · · Score: 2, Funny

      wget -r http:/

      HTH, HAND, etc.

      --
      "It doesn't cost enough, and it makes too much sense."
  20. Linux ups the bar by argggh · · Score: 4, Informative
  21. Re:You don't have to be Kreskin by Klaus_1250 · · Score: 4, Insightful

    I dunno, it seems to me that FreeBSD suits the desktop role really well

    It does (I use it too) BUT only in specific environments. FreeBSD hardware support is not bad, but it is nowhere near as complete as that found in the various Linux distro's. My wireless keyboard + mouse is supported under any recent Linux distro, on FreeBSD, only the keyboard works (fixable with a unofficial ums.ko though). No support under FreeBSD for my DVB-C PCI card either.

    --
    It only takes one man to change the Wisdom of the Crowd to Tyranny of the Masses.
  22. Re:Dual Core by TeknoHog · · Score: 2, Informative

    Don't dual core CPUs share components (cache maybe?) that an aware OS can exploit for performance improvements?

    The same way an HT CPU shows up as 2 CPUs (with disasterous effects) unless the OS is away and can properly exploit it?

    Some dual cores share L2/3 cache, but not all. Another important factors are the shared connections to external world, such as memory. So I presume inter-CPU communication is faster, but external communication can be slower.

    That aside, HT is a hack which should not be compared to dual core systems at all. In fact, "dual core processor" is a rather silly marketing term, because it means "two processors on one piece of silicon". In other words, you could interpret the phrase "dual-core CPU" as "a CPU that contains two CPUs".

    --
    Escher was the first MC and Giger invented the HR department.
  23. Where does this leave dragonfly? by CarpetShark · · Score: 2, Interesting

    While I'm glad for FreeBSD they're showing good numbers again, their testing of PostgreSQL in this study is rather odd.


    Agreed, on both points. What I want to know though, is where this performance improvement, and 7.0 in general, leaves Dragonfly BSD... do they still feel that Dragonfly's choice to split off at 4x and start making radical changes is paying off? Is dragonfly making progress towards better performance, in general, or on particular workloads?

    I saw what Matt Dillon did back in Amiga days. I saw what Amigas themselves could do. If Amigas inspired Dragonfly towards a more lightweight model, I'd love to see that fork making more progress.
    1. Re:Where does this leave dragonfly? by renoX · · Score: 2, Informative

      The dev of Dragonfly BSD has switched its aim from being 'a better way to do SMP' to 'SSI clustering' so I doubt that Dragonfly BSD is going to compete with FreeBSD in SMP scalability anytime soon if ever.

  24. Re:Bad news for Linux? by Azarael · · Score: 4, Insightful

    The article is probably misleading (surprise, surprise), as the tuning documentation for PostgreSQL *states* that good IO performance has more of an impact than good CPU performance. Additionally, some other information I've read (search for postgres tuning/optimi(z|s)ation online) recommends FreeBSD because of its strong IO performance. I'll go out on a limb and assume that MySQL's performance attributes are similar.

    In my opinion, the article summary is a pretty big red herring because the SMP performance may not have a huge impact on the result.

  25. Re:Bad news for Linux? by atomic-penguin · · Score: 4, Insightful

    For one, CFQ is not supposed to be an optimized I/O scheduler for database loads. That's where the Deadline scheduler comes in. You wouldn't want a "Fair" scheduler on your database server, as you would end up putting the database in I/O wait to handle lower priority processes.

    --
    /^([Ss]ame [Bb]at (time, |channel.)){2}$/
  26. FreeBSD SMP threads + boehm-gc = totally broken by chrysalis · · Score: 3, Informative

    Cool, however it would be better if software working on Linux were also working on FreeBSD.

    boehm-gc is totally broken when using threads on FreeBSD SMP. And it's still totally broken on FreeBSD 7.

    The Neko virtual machine is in ports, but it's unuseable due to this, I don't even understand why it's in the ports tree. Was it ever tested before being imported?

    Just creating a thread:

    $loader.loadprim("std@thread_create", 2)(function(z) { $print(z) }, "OK");

    makes is crash with a corrupted stack. It works on every other operating system. It seems to work on an UP FreeBSD system, but on a FreeBSD 7 SMP system, it crashes, crashes, crashes.

    --
    {{.sig}}
    1. Re:FreeBSD SMP threads + boehm-gc = totally broken by Sancho · · Score: 2, Insightful

      Did you file a bug report and contact that port's maintainer?

  27. Some clarifications on my benchmarks by kkenn · · Score: 5, Informative

    Hi, I am the one who performed these benchmarks and I'd like to clarify a couple of things:

    * The point of this benchmark is not to unilaterally declare victory over Linux, but to point out that FreeBSD is once again competitive with it on modern high-end hardware and certain workloads. Of course, we are working on other workloads too, and currently perform better than Linux on other benchmarks, and still worse on others. There will no doubt be further friendly competition between the two OSes that will work to the benefit of both. Our message to the Linux developers is that they should not expect to get away with resting on their laurels :-)

    * I benchmarked both mysql and postgresql, and FreeBSD 7.0 performs better than all Linux kernels (at least up to 2.6.23) with both databases. Incidentally postgresql is much faster than mysql, contradicting common wisdom. Other fun facts are that mysql 5.0.51 has poorer scaling than 5.0.47, and 5.1.x has *much* worse performance and scaling than 5.0.47 on my tests.

    * I benchmarked several versions of Linux including 2.6.20.x, 2.6.22 and 2.6.23. 2.6.20.x has terrible performance http://people.freebsd.org/~kris/scaling/scaling.png. This graph is from Feb 2007 and the FreeBSD performance also improved after this point.

    * 2.6.22 (which is pre-CFS) mostly fixed this but still performs worse than FreeBSD http://people.freebsd.org/~kris/scaling/os-mysql.png. 2.6.23 included the new scheduler and was a major performance regression. I did not yet retest with 2.6.24, so maybe they have fixed CFS by now.

    * Contrary to some commenter's assertions that this is not a CPU benchmark, this benchmark is *extremely* sensitive to CPU performance and especially scheduling (in fact, as noted in the PDF, I/O performance is not a factor here). The scheduler really matters here, which is why Linux took a big hit when they switched to CFS (similarly, on FreeBSD the 4BSD scheduler performs much worse). Tuning the scheduler is critical to performance on this kind of workload. The other critical aspect is having a highly optimized kernel without concurrency bottlenecks. 2.6.20 fell over on kernel concurrency, and 2.6.23 fell over with the scheduler.

    Hope this helps to clarify things.

    1. Re:Some clarifications on my benchmarks by kkenn · · Score: 2, Interesting

      Why do you "expect" this? The ULE scheduler is also designed with interactive (e.g. desktop) performance in mind, so your expectation seems unmotivated by prior probability and more by a prejudice that Linux must be better :-)

  28. Hope you enjoyed a your 5 minutes in the spotlight by Lost+Found · · Score: 4, Informative
  29. Re:Dual Core by Wdomburg · · Score: 3, Interesting

    Have you ever looked at a block diagram of the predominant dual core designs? They're not simply "two processors on one piece of silicon". Both Intel and AMD used a shared cache design with a single connection to the system bus (FSB and HT, respectively). In the case of AMD, it also means a shared memory controller. It's a real difference with real performance and power implications, not a "silly marketing term".

    Now if you complained about Intel shoving two dies into a multi-chip package and calling that quad-core, I'd agree with you. All the reduced bandwidth of a shared connection to the FSB with none of shared cache! Sign me up!

  30. Re:You don't have to be Kreskin by peterpi · · Score: 3, Informative

    I would say that packages != programs.

    With a debian "package", I know exactly how to install it (the same way as all the others), and I know that there is a set version of that package that corresponds to, say, "Debian Sarge". I know that if I install it, it will pull along any libraries it needs, and that it won't break anything already on my system. I know it doesn't always work like that, but that's the idea. I think of a "package" as part of the distribution. Somebody has decided that it forms part of the distribution, and has hopefully tested it as such.

    A "program" is what Windows has so many of. But all bets are off when it comes to versioning, library dependencies, etc. Even how to install it. If you think of Windows as a "distribution", then it doesn't come with all that many packages at all. A Desktop environment, a browser, some photo and media tools. Mac OS X doesn't really fare all that much better. I love OS X to bits, but the first thing I did was install a third party program (firefox).

  31. Re:You don't have to be Kreskin by AJWM · · Score: 2, Funny

    only OS with more packages is Debian
    Whatever happened to Windows?


    Vista. That's a non-operating system.

    --
    -- Alastair
  32. Also noted in the FreeBSD 7.0 release announcement by bconway · · Score: 2, Interesting

    Here, and it applies to a significant number of other network servers.

    Dramatic improvements in performance and SMP scalability shown by various database and other benchmarks, in some cases showing peak performance improvements as high as 350% over FreeBSD 6.X under normal loads and 1500% at high loads. When compared with the best performing Linux kernel (2.6.22 or 2.6.24) performance is 15% better.

    http://people.freebsd.org/~kris/scaling/bind-pt.png

    Summary:

    * FreeBSD 7.0-R with 4BSD scheduler has close to ideal scaling on this test.

    * The drop above 6 threads is due to limitations within BIND.

    * Linux 2.6.24 has about 35% lower performance than FreeBSD, which is significantly at variance with the ISC results. It also doesn't scale above 3 CPUs.

    * 7.0 with ULE has a bug on this workload (actually to do with workloads involving high interrupt rates). It is fixed in 8.0.

    * Changes in progress to improve UDP performance do not help much with this particular workload (only about 5%), but with more scalable applications we see 30-40% improvement. e.g. NSD (ports/dns/nsd) is a much faster and more scalable DNS server than BIND (because it is better optimized for the smaller set of features it supports).

    --
    Interested in open source engine management for your Subaru?
  33. Re:You don't have to be Kreskin by darthflo · · Score: 2, Informative

    A package is a bundle of stuff that can be installed using your OS' package management facility. BSD's Ports, Gentoo's portage, Debian's apt (also used by Ubuntu). The "big two" commercial OSes don't really have an equivalent to that; Windows e.g. only lets you install some optional components using a unified frontend. Counting the number of packages is easily possible and done by the repository maintainers.
    A program is quite hard to define. A handwritten script could be considered a program by some, others may reserve the term for publicly available software. The number of programs is very hard to approximate and impossible to determine unless you chose an uncommon, restrictive definition and a point in time of which you possess all information.

    Nobody said Windows didn't have lots of programs and software available for it; probably more than any other OS family on the planet. It does not, however, have a central facility to classify and automatically install them from. (Cue jokes about IE + ActiveX doing a great job of auto-installing all the malware from MSFT's repository called "the intertubes").

  34. Re:You don't have to be Kreskin by nxsty · · Score: 5, Funny

    Why on earth do you think FreeBSD is a dying OS? '
    Because netcraft confirms it.
  35. Re:You don't have to be Kreskin by Smackheid · · Score: 2, Interesting

    It honestly seems to me that the distinction between server OS and desktop OS is its own entire discussion; if we can come to a good notion of what either means

    I don't think the desktop/server distinction means anything anymore, and for three reasons. One, cheap commodity hardware. Two, the literal glut of software. Apache too bloated? Use lighttpd. KDE overblown? Use fluxbox. And three is (open) standards (no sniggering in the back ,please.) When everything uses TCP/IP or XML or whatnot, interoperability increases exponentially.

    Simply put, we have power and flexibility at easy disposal. What you do with it is up to you.

    --
    Je me fous du passé
  36. eight? by dwater · · Score: 2, Interesting

    Is 8-way still considered SMP? I mean, 8-way is kind of consumer level now, isn't it? Even Apple produce 8-way machines SSI machines.

    Get it to scale on some serious SGI kit, for example, then we'll talk.

    --
    Max.
    1. Re:eight? by PitaBred · · Score: 2, Informative

      ...what? I think you don't know what "SMP" stands for. It has nothing to do with big iron vs. consumer kit, and everything to do with the processor configuration. And SSI means nothing unambiguous as far as I can tell, at least in relation to CPU's. Perhaps you can help? The serious SGI kit you reference really only has a difference in the CPU architecture... it should scale just as well on Itanic as well as it does on x86/x86-64.

      But I'm probably rising to a troll. Or an idiot. Or both.

  37. Re:You don't have to be Kreskin by Bert64 · · Score: 2, Interesting

    How about vmware? I dont think that runs on bsd either...
    Linux will run virtually everything bsd will (after a recompile)... And most linux apps will recompile for bsd, but bsd's linux emulation isn't perfect when it comes to precompiled linux apps...
    There's also hardware support, does bsd have drivers for modern ati videocards yet? I know the linux drivers suck, but its slightly better than nothing.

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  38. Re:Bad news for Linux? by MrNemesis · · Score: 2, Informative

    As t'other poster pointed out;
    CFS = Completely Fair Scheduling = CPU scheduler = what process gets how much of the CPU
    CFQ = Completely Fair Queuing = I/O scheduler = what process gets how much of the hard disc

    FWIW, on our database loads at least, I find that whilst deadline tends to give the lowest single transaction rate, CFQ gives better overall performance (i.e. more transactions served) over a given time period. Anyone tried the CFQ, deadline and no-op schedulers on a solid state disc yet?

    --
    Moderation Total: -1 Troll, +3 Goat
  39. Re:From TFA... by LizardKing · · Score: 3, Informative

    The article also describes a FreeBSD 7.0 pre-release from October last year. This still had debugging code turned on in the builds, as mentioned on the NetBSD lists when Andrew Doran was comparing NetBSD -current SMP performance.

  40. Seriously: who cares? by mcrbids · · Score: 4, Interesting

    Yes, I meant that: who cares?

    Nobody living outside their parents' basement is going switch from Linux to BSD for a 15% performance increase. Somebody already using BSD might upgrade if the latest BSD kernels and environment are significantly better than past environments, but 15% is so slight as to be basically undetectable in a real-world environment!

    My rule of thumb for upgrading equipment has been to not bother until we hit a full order of magnitude improvement. In other words, if 1) we can 10X the performance of a system AND 2) there have been complaints about performance, then the upgrade is probably worth it. Even then, the value is dubious. For example, in Postgres, (or any other database application) it's very typical to see 100x improvement simply by creating an index!

    Maybe this is good for frail BSD egos, who have been long bruised by the mindshare success of Linux over the more historic and "more free" BSD. So be it. But it's not performance that's kept me from using BSD, it's familiarity and the pain of switching. And that's also what kept me running it yesterday, will today, and tomorrow too.

    Don't get me wrong - I would hate to see BSD "die" in any meaningful way. The different cultures between Linux and BSD create a very rich, diverse environment where ideas can be tested, and the cross-feed of proven concepts and technologies (EG: Open SSH) benefits all involved!

    But the benefit of a 15% performance increase is almost never going to be sufficient reason to pick one computing technology over another!

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Seriously: who cares? by Pharmboy · · Score: 4, Interesting

      But the benefit of a 15% performance increase is almost never going to be sufficient reason to pick one computing technology over another!

      So if you are google, and your software will all 100% run with Linux or BSD, you don't see the idea that 15% better performance means the same work with 15% less machines means something? In certain cases, 15% can mean thousands or millions of dollars, all for changing to an operating system that will basically run on the exact same hardware and run the exact same software, after a recompile.

      No for most it isn't a big deal and may not make people CHANGE operating systems on existing hardware. We use both Linux and BSD, so it *might* make me consider BSD instead of Linux on the next new box. I'm likely not alone in this.

      --
      Tequila: It's not just for breakfast anymore!
    2. Re:Seriously: who cares? by mcrbids · · Score: 3, Insightful

      Compare 15% against Moore's law, and you find that it equates to a few weeks delay in the price-performance curve.

      If it takes more than a few weeks to make the switch, you've already lost your benefit, as well as the potential of destabilizing your administration of those systems. Backups have be revisited, since the file tree will have changed. Network monitors will have to be updated, and tested for compatibility changes. Little one-off scripts to solve problem X or Y in a hurry will break. Admins will have to be trained, and will make more mistakes for a while until they find out what not to do. Unforeseen wrinkles will inevitably appear, Etc... Etc... Etc...

      Worth it for Google? Not a chance!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    3. Re:Seriously: who cares? by Cal+Paterson · · Score: 2, Insightful

      Nobody living outside their parents' basement is going switch from Linux to BSD for a 15% performance increase. Somebody already using BSD might upgrade if the latest BSD kernels and environment are significantly better than past environments, but 15% is so slight as to be basically undetectable in a real-world environment!
      Obviously, it depends on cost:benefit, which is exactly why there is no rule of thumb. Blanket generalisations and "rules of thumb" are a bad way of making a decision for everyone that they don't need to make

      That isn't the important point though; the important point raised is that CFS might be less good than promised and that there's the accusation that Linus picked CFS over other projects because Ingo is in the in-crowd. I don't follow lkml, so I wouldn't know whether this is true.
  41. Re:You don't have to be Kreskin by Just+Some+Guy · · Score: 2, Interesting

    Whatever happened to Windows? Or does programs != packages?

    Funny you should mention that. If you rule out junk software like sparkly mouse cursors, Windows seems to have less software than any other major OS (given that most Unix software is already ported to OS X, or at least can be). I feel constricted every time I have to use a Windows box because none of the programs I want to use are installed, or even readily available. No, I'm not joking.

    --
    Dewey, what part of this looks like authorities should be involved?
  42. I did this once by SteveFoerster · · Score: 3, Informative

    I did this once. Your mod points are undone and lost.

    --
    Space game using normal deck of cards: http://BattleCards.org
  43. Re:You don't have to be Kreskin by Toby_Tyke · · Score: 2, Interesting

    I am so fed up of reading this. Yes, Linux has more drivers installed "out of the box" than windows. Big deal. Every single piece of hardware I have ever bought came with a CD that had drivers for windows. Yes, it's a bit of pain having to install them all manually after reinstalling the OS, but you only have to do it once. It's far more of a pain to find that you shiny new toy has no working drivers for Linux.

    I use Linux as my desktop OS, but I am no prepared to ignore it's shortcomings. From where I'm sitting right now I can see three devices that do not work with Linux. All of them have drivers for XP (not sure about vista).

    I see hardware support like this. If a driver exists for Linux, then the support is generally far better than windows. You plug it in, it works. If, however, your distro does not have a driver, then you are very probably shit out of luck. The device will either not work at all, or require hours of fiddling. Windows on the other hand, has virtually no "out of the box" support. Plug anything in and prepare to be met with yellow exclamation marks in the device manager. The difference is that unless it's some ancient or obscure bit of kit, it will either come with a driver disk or have a driver available on the manufactures web site. Every piece of hardware you could buy works with windows.*

    And since you asked:
    My PCLine webcam, my Nokia phone, and the USB modem my ISP gave me. Now to be fair, it might be possible to coax all of these devices into working if you know the correct incantations and rituals, but in every case they failed to work "out of the box".

    * Before someone replies to me with an example of a device that won't work in windows, allow me to qualify this. I'm referring to to desktop hardware, manufactured in the last, ooh, lets say seven years. I defy you to find anything on PC world's shelves that is not Windows XP compatible ( I have never used Vista, so in a break with Slashdot tradition, I'm not going to spout off about something I know nothing about). I'll bet you a months salary I can find something that won't work with Linux.

    --
    "I realise this is not a very popular opinion but it's the truth, and there for needs to be said" -Bill Hicks
  44. Re:Dual Core by AcidPenguin9873 · · Score: 2, Interesting

    Both Intel and AMD used a shared cache design with a single connection to the system bus (FSB and HT, respectively).

    In AMD's case, the shared cache sits on the other side of the fully-connected crossbar, which allows intra-core communication to happen without using HyperTransport at all. So yes, it's shared, but each core has its own "port" to it and can access it independently. Same deal for the Intel shared L2. The phrase "single connection to the system bus" is misleading because it implies a bottleneck where there (most times) isn't one.

    In the case of AMD, it also means a shared memory controller.

    The memory controller on Intel systems is shared as well. It's just sitting on a different chip, across the FSB.

    In fact, once you move to multi-socket, AMD systems generally have as many memory controllers as there are sockets, and with NUMA optimizations in modern OS's, it's likely that a core will only ever need the memory controller which it's closest to. In Intel systems, all cores on all sockets still share a single memory controller.

  45. Re:Dual Core by Wdomburg · · Score: 2, Informative

    You equated multi-core with multi-processor. I countered that it's fallacious to say that about both volume designs currently in the marketplace.

    Shared cache is hardly a necessity. The original Pentium D didn't have any. And (I misspoke, er typed) neither does the Athlon X2. It's just an option that makes sense when you're sharing silicon.

    Another differentiator is that multi-core designs can communicate at native clockspeed, rather than resorting to an interconnect. Hypertransport is fast, but shared silicon is faster.

    I wouldn't discount cache and interconnect as tangential aspects of a processor. If you look at any modern CPU the majority of the die size is going to be cache, and a significant portion of the power draw comes from the system interface.

    Even discounting the performance gains possible with shared resources and on-chip intercommunication and ignoring the power savings (note that quad core parts are hitting the same power envelope as quad core without drastic process changes) there's the simple matter of density. Producing a 1U rack server with eight discrete processor slots would be an engineering miracle, yet any white box operation will happily sell you a 1U rack server with dual four core processors.

  46. Re:You don't have to be Kreskin by mustpax · · Score: 2, Interesting

    The difference is in the real-time scheduling requirements that come with a GUI. Very minor delays in GUI rendering have very perceptible impact on the snappiness of a UI. Server workloads (DB, HTTPD or whatever) have less stringent real-time requirements. Throughput ends up mattering more as long as the latency is in a reasonable range.

  47. Re:You don't have to be Kreskin by pajor · · Score: 3, Insightful

    What metric? Desktop drivers.

    --
    Gnuyen
  48. Re:Dual Core diff; more so quad core by lpq · · Score: 2, Interesting

    A dual core is likely to be different from a dual processor machine. With Intel's Core2 Duo machines (am only using that processor because I know it's architecture, not because it's better or worse than anything else), both cores on a chip share the L2 cache. So a Dual Core Xeon with 8MB-L2 cache, shares the caches between the two cores and is not the same as 2 processors with each having 4MB of L2 cache. Besides the ability to have 1 Core use 8MB of the cache (presuming the 2nd core is forcibly halted and left idle), there are scheduling differences and differences in migration costs. Intel's 1st Quad core chips after the Core 2, were logically 2-Core2 Processors on the same chip. Each pair shared an L2 cache with their being a total of 2-L2 cache's on the one chip.

    In some ways, that quad arrangement is like a Dual-Socket motherboard that has a Core2 Duo in each socket. Migration costs between adjacent cores (if migration includes cache loading costs) would be considerably less than between the two separate processors.

    I believe the first Dual Core chips were similar to Dual processors machines in that each core had its own separate, fixed size cache. Logically -- one could achieve maximal resource usage on Processors with shared-caches, since whether your workload involved 1 active thread or multiple, the threads that are active can use all of the available core, whereas multi-core processors with each core having it's own separate cache will be limited to that cache even when other cores are idle.

    At the time the Core Duo came out, AMD chips seemed to mostly (?completely?) sport per-core cache's, so the Core duo was a jump forward. Which the Quad-Core2 based chips had fully shared L2 caches -- would have been a no-brainer to upgrade to a quad-core with 8M L2 from a dual-core with 8M, but the processors on the quad core chip would be limited to 4M, max/core (or per/pair), whereas the dual-core chips could use up to 8M cache.

    Of course the impact of cache size and whether it is sharable is totally dependent on what program(s) you are running, but local benchmarks between a 2GHz-8M-Core2Duo and a 3.2GHz-4M-Core2Duo showed the 2GHz beating out the 3.2GHz chip on small-medium problems with the 3.2GHZ chip taking the lead, only, in larger problems.

    Supposedly, the linux kernel scheduler (pre-CFQ), recognizes the increased costs of inter-Processor switching being higher than intra-processor switching, but I've been unable to verify this. It might require some manual configuration using "CPUsets", but don't know.

    FWIW, the new CFQ-cpu scheduler (which is different than the block-layer's CFQ Block-I/O scheduler) seemed awfully rushed into use as the "mainline" scheduler. I think it is because Linux has a "design choice" that it doesn't allow for modular CPU-schedulers as it does in the case of "block-i/o" (and USB I/I scheduling, and file systems, and choice of network layer, and partition type ...even partly with security (a hybrid model with some security being configurable, (LSM) and some designed not to be (the "standard", user-controlled Unix file-access bit checking isn't modularized). It's odd that CPU scheduling was thought to be a 1-size fits all model when virtually nothing else is). But because it isn't configurable, there was no way to make the CFQ cpu scheduler an optional, _testable_ scheduling module before it was chosen as the "one-and-only" model.