Slashdot Mirror


Benchmarks of Debian GNU/kFreeBSD vs. GNU/Linux

An anonymous reader writes "The Debian Squeeze release is going to be accompanied by a first-rate kFreeBSD port and now early benchmarks of this port have started coming out using daily install images. The Debian GNU/kFreeBSD project is marrying the FreeBSD kernel with a GNU userland and glibc while making most of the Debian repository packages available for kfreebsd-i386 and kfreebsd-amd64. The first Debian GNU/kFreeBSD benchmarks compare the performance of it to Debian GNU/Linux with the 2.6.30 kernel while the rest of the packages are the same. Results are shown for both i386 and x86_64 flavors. Debian GNU/kFreeBSD may be running well, but it has a lot of catching up to do in terms of speed against Linux."

20 of 143 comments (clear)

  1. Mod Article Flamebait by TheRaven64 · · Score: 5, Insightful
    Okay, so I only read the first couple of pages because it's Phoronix who have a history of inflamatory and misleading benchmarks, but from what I saw:
    • Sometimes Linux is faster.
    • Sometimes FreeBSD is faster.
    • Usually the difference between the two is smaller than the difference between IA32 and x86-64.
    • The tests were mostly either CPU- or I/O-bound, so there are lots of factors beyond the kernel that would affect the results.
    • Debian kFreeBSD uses an old FreeBSD kernel, not sure how old the Linux kernel is but it's probably not representative of the speed of recent releases of either kernel.
    --
    I am TheRaven on Soylent News
    1. Re:Mod Article Flamebait by Henk+Poley · · Score: 3, Informative

      Linux 2.6.30 is from Jun 9 2009. The latest patchset 2.6.30.10 though is from December 3rd.

    2. Re:Mod Article Flamebait by bark · · Score: 3, Insightful

      It's NOT testing freebsd. the article tests the Debian world running with FreeBSD

    3. Re:Mod Article Flamebait by TheRaven64 · · Score: 3, Insightful

      The benchmarks must be CPU or I/O bound... why should they benchmark sleeping apps?

      If they're I/O bound, userspace and kernelspace are both waiting for the drive. The layout of the files on disk will have more of an impact than the kernel. You are right that things should be CPU-bound, I should clarify that I meant userspace CPU bound. You want to benchmark things that are systemcall-heavy, like concurrent apps that use lots of synchronisation primitives.

      I really don't hope the last minute changes to the kernel, to do a big improve the system performance.

      FreeBSD development follows three branches. -CURRENT is where all of the latest stuff is. -STABLE is where stuff that has been tested a bit in -CURRENT goes. -RELEASE branches are where only bug fixes (no new features) go. The 8.x series began development as 8-CURRENT shortly after 7.0 was released (about two years ago). Some features were then back-ported to the 7-STABLE branch, but only those that could be moved without invasive changes that might affect system stability.

      8-RELEASE is the latest stable release and has had two years worth of new features on top of the one shipped with Debian, including, among other things:

      • Improvements to processor affinity and scalability in the scheduler.
      • A completely new USB stack.
      • A newer version of ZFS.
      • Improvements to the sound subsystem (now contains a full OSS 4 implementation, per-vchan volume control, a massively improved mixing algorithm, and other improvements)
      • A new NFS implementation, including NFSv4 support.
      • Network stack virtualisation for jails.

      It's not a matter of last minute changes, it's a matter of not getting the last two years of improvements. I know that Debian likes the stable-and-tested versions of things, but they don't seem to apply that policy to the Linux kernel.

      --
      I am TheRaven on Soylent News
  2. Phoronix by OverlordQ · · Score: 3, Interesting

    While they're really the only group that does a lot of linux benchmarking, I'd put a *large* grain of salt in their results.

    They have no problem blindly accepting something like this without investigating why it is so much faster and seeing if there's a problem with their testing.

    --
    Your hair look like poop, Bob! - Wanker.
  3. I just wanted to see if ... by sharkette66 · · Score: 3, Funny

    I don't use BSD, I just wanted to see if the "BSD is dying" troll still posted. It has been years, eh?

    It does also seem to me that the FreeBSDk thing is meant to make certain features available to developers, maybe be more reliable, and "faster, faster" isn't being sold as part of the bill of goods. Yet, the talk returns to speed, speed, speed.

    But what do I know... I work as a nurse. Although... I DO love a fast computer.

  4. Please educate me a bit. by santax · · Score: 3, Interesting

    As a long time debian user who also has to work with freebsd sometimes I don't get it. Why use freebsd with GNU apps, when you can just run freebsd? And why freebsd and not lets say, openbsd or netbsd? What is the advantage in using the freebsd-kernel instead of the linux-kernel? I have access to every linux app when I use freebsd and to be honest, if I knew my way around bsd as I do under debian I would probably switch. But I am missing the improvement for Debian here. Can someone please clear this up for me a bit?

    1. Re:Please educate me a bit. by eqisow · · Score: 4, Informative

      Why use freebsd with GNU apps, when you can just run freebsd? And why freebsd and not lets say, openbsd or netbsd?

      They actually have a NetBSD port as well as a Hurd port. They also have a nifty why NetBSD section. There doesn't seem to be a similar page for kFreeBSD, but I assume the reasons are similar.

    2. Re:Please educate me a bit. by vlm · · Score: 3, Informative

      Why use freebsd with GNU apps, when you can just run freebsd?

      Then you'd be stuck with freebsd apps instead of GNU apps.

      If you have a mighty herd of servers, desktops, and kiosks, all sharing various automation scripts, supporting both freebsd and GNU command line apps could be a pain, due to subtle differences in command line options, etc. Its possible to create a blizzard of "if then" to work around, but why bother.

      But I am missing the improvement for Debian here.

      Overall, none really. The way ports work on Debian, is if enough people volunteer to maintain a port, and they are successful, then we have a new port. Heck, that is the way everything works in the Debian project, if something meets a certain standard of excellence, its in, no matter if its a package, docs, artwork, shared VCS, human language translation, a network service, a mirror, or in this case, a port. Debian is thankfully not a deletionist stronghold like that dumpy embarrassment known as wikipedia.

      This link provides a one page summary of each attempted Debian port, successful and ... not so successful :

      http://www.debian.org/ports/

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    3. Re:Please educate me a bit. by vlm · · Score: 4, Informative

      but other than a gui I see no outstanding advantage over the FBSD package system

      As a gauge of relative activity level in each package system:

      The weekly list of UPDATED (and possibly NEW) BSD packages at

      http://www.freshports.org/ports-new.php?interval=week

      is roughly equal in size to the weekly list of NEW Debian packages at

      http://packages.debian.org/unstable/main/newpkg

      So, each week, there is about as much new stuff added to Debian as there is updated preexisting stuff in BSD.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    4. Re:Please educate me a bit. by TheRaven64 · · Score: 3, Informative

      The FreeBSD kernel gives you a few nice things. ZFS, DTrace, and a high-performance in-kernel sound system that eliminates the need to mess about with things like PulseAudio just to get half a dozen applications going 'bing' at the same time while another one plays music (although this got a lot of improvements in the FreeBSD 8 kernel, which isn't in Debian yet, as did ZFS). It also gives you the ULE scheduler, which has had several years of testing and refinement (unlike Linux's scheduler-of-the-week) and performs very well (was outperforming Linux by a large margin on 8+ cores, now they're pretty similar). It includes Jails, which are like chroot but with a complete environment inside so you can have a different IP, different users, and so on in a jail (and you can create them with a complete clone of a skeleton system almost instantly with ZFS clones).

      As to why you'd use Debian rather than FreeBSD, the big difference is glibc rather than BSD libc. When people talk about Linuxisms in code, they most often really mean GNUisms and the code depends on something weird in glibc, rather than on anything specific to the kernel. It will therefore work with glibc on kFreeBSD just as it would with glibc on Linux. You may also prefer the GNU userland utilities. Some people install these on FreeBSD anyway, but with Debian they are the default ones. This means that a few other common GNUisms (e.g. assuming that /bin/sh is bash and that POSIX utilities accept GNU arguments in shell scripts) will work.

      This means that it's easier to port crappy code (and there is a lot of it about) from GNU/Linux to GNU/kFreeBSD than to FreeBSD. I've written a bit about which bits are GNU and which bits are Linux before: most of what the user or developer interacts with is GNU.

      --
      I am TheRaven on Soylent News
  5. Re:Holy moley ! by DAldredge · · Score: 3, Insightful

    64-bit data structures can take up more space in the L1/L2/L3 caches which may cause code to run somewhat slower.

  6. Re:Holy moley ! by MBGMorden · · Score: 4, Informative

    As others have said, 64-bit programs take more memory to run. There's nothing inherently faster about 64-bit registers and operations unless you're dealing with integers that get that big (which in most everyday programs, they don't). What makes 64-bit faster isn't just "more bits", but optimizations. 32-bit code is typically compiled for the lowest common denominator: i386. However, x86-64 CPU's are guaranteed to be at least i686 compatible (you're also guaranteed up to a certain level of SSE compatibility and such). In that regard, it's the code optimization that we can rely on and not "more bits" (which due to extra memory usage, will typically make things SLOWER, not faster) to make things faster.

    However, not every app or test really benefits that much from i686 optimizations. For those that don't, and don't deal in larger numbers (AND that don't use so much memory that a 64-bit chip is needed to address it), 32-bit processors will typically be faster.

    As to stability, x86-64 is well past the "new" stage. The specification is 10 years old and processors based on it 7 years old - Linux support was almost immediate. Just how long does it take for you to consider it not bleeding edge anymore? :)

    --
    "People who think they know everything are very annoying to those of us who do."-Mark Twain
  7. Re:Holy moley ! by TheRaven64 · · Score: 4, Insightful

    On most architectures, 64-bit code is slower. Pointers are bigger, which means you need more memory bandwidth to load them and you use more cache holding them. On x86-64, the situation is confused by the fact that 64-bit means 'using Long mode,' as well as 'using 64-bit pointers'.

    Long mode gives you 64-bit registers (so you can store 64-bit values in a single register, rather than spread across two, doubling the number of 64-bit values you can store in registers), more registers, and a few other benefits like removing the 'must use EAX as the target' restriction on a lot of instructions (reducing the number of register-register moves, and decreasing instruction cache usage as a side effect). 64-bit pointers use more memory bandwidth and data cache.

    For best performance on x86-64, you want pointers to remain 32 bits, but still run in Long mode. The OS should make sure that everything is mapped below the 4GB line for the process. As far as I am aware, no operating systems actually support this mode of operation. Without that, for any process using less than 4GB of address space, you have some advantages and some disadvantages when running in 64-bit mode. Whether the advantages outweigh the disadvantages, or vice versa, depends on the code.

    --
    I am TheRaven on Soylent News
  8. Re:sigh by TheRaven64 · · Score: 3, Insightful

    The speed difference is a few percent. For most people, that's not noticeable. My kernel CPU usage stays well below 10% most of the time, even when the CPU is busy, so even a 50% difference in kernel performance wouldn't be particularly important. Much less important, for example, than things like ZFS, DTrace, a decent kernel sound system, and so on.

    --
    I am TheRaven on Soylent News
  9. Re:Holy moley ! by gmack · · Score: 4, Informative

    You missed out on the fact that there are more registers on 64 bit than the famously register starved 32 bit x86. More places to put things can't hurt even if your not dealing in 64 bit values.

    The problem with 64 bit is that a lot of code is still hand tuned to the maximum possible performance on 32 bit arches and in at least a couple of the cases listed in the benchmarks I wouldn't be shocked if there was some hand done assembler involved. I have also noticed GCC has some performance tweaks that work around the lack of registers on 32 bit that also tend to get enabled in 64 bit..

  10. Re:I've heard this...Unlikley. by ls671 · · Score: 3, Insightful

    > Because every 64-Bit CPU I've ever used always had more than twice as much L2 cache as 32-bit Systems.

    I am glad I am using 64 bits CPUs to run my 32 bits OSes then ;-)

    Well unless somehow, the "twice as much" doesn't get used with 32 bits OSes running...

    What do you think ?

    --
    Everything I write is lies, read between the lines.
  11. Re:Holy moley ! by Sillygates · · Score: 3, Interesting

    But on x86, you are only guaranteed 4 *real* general purpose registers. x86_64 increases this number. With a good compiler, the register allocator would use all of these, and you would have much fewer loads from main memory, which can take on the order of 75+ cpu cycles on a cache miss, or 5+ cycles on a cache hit.

    --
    I fear the Y2038 bug
  12. Why so ?!? by DrYak · · Score: 3, Informative

    No, not necessary.

    It's not because your CPU is running a 64bits OS that suddenly every data format has to be replaced with one using 64bit integers.
    It's not because your CPU is running a 32bits OS that you aren't allowed to manipulate anything bigger 32bits.

    The OS bittage has almost no impact on what data format can be used. Only how fast those format will be processed, and how many memory can easily be addressed in a straight-forward way.

    A 256 x 256 bitmap, RGBA, with 8bits per channel, will always take the same amount of memory wherever the OS is running 32bits or 64bits code. Only with a 64bits OS it will be much more easy to store more than 3GiB worth of textures.
    And even a 32bits OS can manipulate 1024bit data structures like crypto key (only a little bit slower, because the CPU internally won't be able to do 64bit operations).

    Also most OSes are LLP64 or LP64, meaning that the default "int" still is 32bits. Thus code recompiled in 64bits will tend to approximately use the same amount of data as original code in 32bits.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  13. This is a good thing by PhrstBrn · · Score: 3, Insightful

    I can see a really good usage case for this.

    You're a sysadmin, and you're running Debian almost exclusively. You have a large number of automation scripts that you use to do your job (security updates, auditing, provisioning, general maintenance, etc). All of them are expecting to run on Debian, because all you run is Debian. So you, as a sysadmin, decide you want to use ZFS somewhere.

    You have a few options:

    1) Run Solaris
    2) Run some derivative of BSD (FreeBSD, OpenBSD, NetBSD, etc)
    3) Run Debian w/ ZFS in Fuse
    4) Run Debian kFreeBSD

    Options 1 and 2 will most likely require you to tweak or rewrite a lot of your scripts. I shouldn't need to explain why option 3 is a bad idea. Since you're working with Debian userland, going with option 4 seems like it would be the path of least resistance. Seems pretty useful.