Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Operating Systems Software BSD Linux

FreeBSD 7.0 Bests Linux In SMP Performance 288

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.
This discussion has been archived. No new comments can be posted.

FreeBSD 7.0 Bests Linux In SMP Performance

Comments Filter:
  • Re:Possibly (Score:5, Informative)

    by BitZtream ( 692029 ) on Thursday March 06, 2008 @10:06AM (#22662394)
    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 ...
  • Re:BSD Desktops (Score:4, Informative)

    by ninjaz ( 1202 ) on Thursday March 06, 2008 @10:28AM (#22662596)

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

    There are FreeBSD-based PC-BSD [pcbsd.org] and DesktopBSD [desktopbsd.net] Both of them are using KDE, though.

  • Re:Well (Score:5, Informative)

    by Zpin ( 921535 ) on Thursday March 06, 2008 @10:28AM (#22662598)
    The linked PDF contains pre-CFS kernel benchmarks. Conclusion:

    The new CFS scheduler in 2.6.23 is "Completely Fair" ...to FreeBSD
  • Linux ups the bar (Score:4, Informative)

    by argggh ( 1251840 ) on Thursday March 06, 2008 @10:37AM (#22662722)
  • by A nonymous Coward ( 7548 ) * on Thursday March 06, 2008 @10:38AM (#22662726)
    Post a comment. When faced with the two incompatibilities, slashcode keeps the comment and tosses the mods, presumably because comments might have attracted subcomments and thus be impossible to remove.

    This assumes that youare still within the time frame of modability. I don't know what happens if you have used all your modpoints; does that automatically end your modability time slot?
  • Re:BSD Desktops (Score:4, Informative)

    by Ed Avis ( 5917 ) <ed@membled.com> on Thursday March 06, 2008 @10:39AM (#22662746) Homepage
    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.
  • Re:Dual Core (Score:3, Informative)

    by TeknoHog ( 164938 ) on Thursday March 06, 2008 @10:40AM (#22662762) Homepage Journal

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

  • by chrysalis ( 50680 ) on Thursday March 06, 2008 @11:02AM (#22662958) Homepage
    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.
  • Re:BSD Desktops (Score:2, Informative)

    by BitZtream ( 692029 ) on Thursday March 06, 2008 @11:08AM (#22663012)
    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.
  • by kkenn ( 83190 ) on Thursday March 06, 2008 @11:11AM (#22663042)
    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 [freebsd.org]. 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 [freebsd.org]. 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.
  • by Lost+Found ( 844289 ) on Thursday March 06, 2008 @11:15AM (#22663092)
    Looks like it didn't last for long:

    http://www.kernel.org/pub/linux/kernel/people/npiggin/sysbench/ [kernel.org]
  • Re:Well (Score:1, Informative)

    by Anonymous Coward on Thursday March 06, 2008 @11:17AM (#22663130)
    You don't need to test pre-CFS kernels...here you can find a linux vs freebsd benchmark where linux tops freebsd: http://www.kernel.org/pub/linux/kernel/people/npiggin/sysbench/ [kernel.org]
  • by peterpi ( 585134 ) on Thursday March 06, 2008 @11:25AM (#22663244)
    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).
  • by renoX ( 11677 ) on Thursday March 06, 2008 @11:29AM (#22663274)
    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.
  • by darthflo ( 1095225 ) on Thursday March 06, 2008 @11:35AM (#22663330)
    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").
  • Re:BSD Desktops (Score:5, Informative)

    by ninjaz ( 1202 ) on Thursday March 06, 2008 @12:19PM (#22663844)

    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: [pcbsd.org]http://faqs.pcbsd.org/index.php?action=artikel&cat=14&id=304&artlang=en [pcbsd.org]

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

    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.

  • Re:BSD Desktops (Score:3, Informative)

    by Sancho ( 17056 ) on Thursday March 06, 2008 @12:31PM (#22664010) Homepage
    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 [desktopbsd.net] have [pcbsd.org] done [pfsense.com] 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*
  • by MrNemesis ( 587188 ) on Thursday March 06, 2008 @12:32PM (#22664022) Homepage Journal
    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?
  • Re:From TFA... (Score:4, Informative)

    by LizardKing ( 5245 ) on Thursday March 06, 2008 @12:37PM (#22664100)

    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.

  • Re:BSD Desktops (Score:3, Informative)

    by sremick ( 91371 ) on Thursday March 06, 2008 @12:53PM (#22664354)
    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/ [freshports.org]

  • I did this once (Score:3, Informative)

    by SteveFoerster ( 136027 ) <steveNO@SPAMstevefoerster.com> on Thursday March 06, 2008 @01:18PM (#22664676) Homepage
    I did this once. Your mod points are undone and lost.
  • Re:In short, wow (Score:3, Informative)

    by A beautiful mind ( 821714 ) on Thursday March 06, 2008 @02:04PM (#22665360)
    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.
  • Re:In short, wow (Score:3, Informative)

    by MrNemesis ( 587188 ) on Thursday March 06, 2008 @02:10PM (#22665458) Homepage Journal
    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.
  • Re:eight? (Score:3, Informative)

    by PitaBred ( 632671 ) <slashdot@pitabre d . d y n d n s .org> on Thursday March 06, 2008 @02:11PM (#22665490) Homepage
    ...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 [thefreedictionary.com] 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.
  • Re:Dual Core (Score:3, Informative)

    by Wdomburg ( 141264 ) on Thursday March 06, 2008 @02:54PM (#22666078)
    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.
  • Re:Well (Score:3, Informative)

    by setagllib ( 753300 ) on Thursday March 06, 2008 @05:21PM (#22668452)
    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.

Living on Earth may be expensive, but it includes an annual free trip around the Sun.

Working...