Slashdot Mirror


Running ZFS Natively On Linux Slower Than Btrfs

An anonymous reader writes "It's been known that ZFS is coming to Linux in the form of a native kernel module done by the Lawrence Livermore National Laboratory and KQ Infotech. The ZFS module is still in closed testing on KQ infotech's side (but LLNL's ZFS code is publicly available), and now Phoronix has tried out the ZFS file-system on Linux and carried out some tests. ZFS on Linux via this native module is much faster than using ZFS-FUSE, but the Solaris file-system in most areas is not nearly as fast as EXT4, Btrfs, or XFS."

23 of 235 comments (clear)

  1. First post! by halfaperson · · Score: 5, Funny

    Using BTRFS :)

    --
    Jesus had a UNIX beard.
  2. Using a first beta slower than stable? Wha?!?!? by tysonedwards · · Score: 4, Insightful

    Who would have thought that a first-release Beta kernel module would not run as fast or be as reliable as the stable implementation for other operating systems, or the stables on Linux?

    --
    Thirty four characters live here.
  3. Re:They Why ZFS? by klingens · · Score: 5, Insightful

    ext2 is faster than ext3, simply because it does less. ZFS has many, many features most other FS don't have but they do come at a price.

  4. Re:They Why ZFS? by Rakshasa+Taisab · · Score: 4, Insightful

    I can write the fastest file system around, assuming you don't put much weight on the whole 'being able to read the data back' thingie.

    --
    - These characters were randomly selected.
  5. Re:They Why ZFS? by outZider · · Score: 3, Insightful

    So, because ext3 implementations on other OSes are slow, that means ext3 is slow? Got it.

    Try running ZFS on FreeBSD, or better yet, on the original OS: Solaris.

    --
    - oZ
    // i am here.
  6. Doomed to failure by license conflict by mattdm · · Score: 4, Interesting

    OpenAFS, which still today provides features unavailable in any other production-ready network filesystem, is a nightmare to use in the real world because of its lack of integration with the mainline kernel. It's licensed under the "IPL", which like the CDDL is free-software/open source but not GPL compatible.

    ZFS is very cool, but this approach is doomed to fail. It's much better to devote resources to getting our native filesystems up to speed -- or, ha, into convincing Oracle to relicense.

    Personally, I was pretty sure Sun was going to go with relicensing under the GPLv3, which gives strong patent protection and would have put them in the hilarious position of being more-FSF free software than Linux. But with Oracle trying to squeeze the monetary blood from every last shred of good that came from Sun, who knows what's gonna happen.

  7. Different ZFS distros by hoggoth · · Score: 3, Informative

    I was confused as to what versions of ZFS were available on which distros so I made a chart that lists the different distros and which version of ZFS they support:

    http://petertheobald.blogspot.com/2010/11/101-zfs-capable-operating-systems.html

    Hope it's helpful...

    --
    - For the complete works of Shakespeare: cat /dev/random (may take some time)
  8. Re:They Why ZFS? by Cwix · · Score: 3, Insightful

    What features does ZFS have that ext4 doesnt? Its a simple question, but you had to act like an ass. Good job.

    If I have a bicycle that I ride everywhere, and never seen nor heard of a car. I would not know what a car could do for me, would I? SO if someone comes along and says, Hey cars are cool, they are just a little more expensive. I would ask something like.. What features does a car have over a bicycle.

    --
    You are entitled to your own opinions, not your own facts.
  9. Re:That's not a solaris filesystem by datapharmer · · Score: 3, Funny

    You can save your stuff in /dev/null quite fast too!

    I know! It is friggin crazy fast. I've been using it for backups for years. Even with terrabytes of data I've never managed to fill it up or slow it down!

    --
    Get a web developer
  10. Btrfs naming convention by digitaldc · · Score: 3, Funny

    Couldn't they name the file system something better than butterface?

    --
    He who knows best knows how little he knows. - Thomas Jefferson
  11. Re:They Why ZFS? by caseih · · Score: 5, Interesting

    ZFS is, until BtrFS hits truly enterprise stable, the only FS for large disks, in my opinion. I currently run ZFS on about 10 TB. I never worry about a corrupt file system, never have to fsck it. And snapshots are cheap and fast. I shapshot the entire 10 TB array in about 30 minutes (about 2000 file systems). Then I back up from the snapshot. In other areas of the disk I do hourly snapshotting. Indeed snapshots are the kill feature for me for ZFS. LVM has snapshots, true, but they are not quick or convenient compared to ZFS. In LVM I can only snapshot to unused space in the volume set. With ZFS you can snapshot as long as you have free space. The integration of volume management and the file system may break a lot of people's ideas of clear separation between layers, but from the admin's point of view it is really nice.

    We'll ditch ZFS and Solaris once BtrFS is ready. BtrFS is close, though; should work well for things like home servers, so try it out if you have a large MythTV system.

  12. Re:They Why ZFS? by daha · · Score: 5, Informative

    Which of the ZFS features most impact its performance?

    Compression enabled by default can't help (available in btrfs).

    Checksum for all blocks probably doesn't help, but definitely helps detect corrupt data/corruption (available in btrfs).

    Forcing any file that requires more than a single block to use a tree of block pointers probably doesn't help. The dnode only has one block pointer and the block pointer can only point to a single block (no extents). On the plus side, the block size can vary between 512 bytes and 64 KiB per object, so slack space is kept low. If more than a single block is necessary it creates a tree of block pointers. Each block pointer is 128 bytes in size, so the tree can get deep fairly quick.

    Three copies of almost all file system structures (such as inodes, but called dnodes in ZFS) by default can't help (which are compressed of course).

  13. Re:They Why ZFS? by Anonymous Coward · · Score: 5, Insightful

    Snapshots.
    And I don't just mean any snapshots.
    Done right, like in ZFS, they are fast.
    Faster than BSD's UFS snapshots, faster than using LVM's fs-agnostic snapshots. For people who need them, they're great.

  14. Checksums - 1 feature ZFS has that Ext4 doesn't by yup2000 · · Score: 4, Informative

    hmmm, well the most obvious feature that ZFS has that Ext4 does not is check summing.

    That feature is one reason why ZFS is better (it will tell you if your disk is going bad, and if you have a raid setup, it will go get the good data for you). However, this is also one reason why ZFS is slower... it spends time making sure your data is safe and that it always gives you the correct bits from your disk.

    That single feature is why I run FreeBSD (looking forward to kFreeBSD/debian!) on my file server in a mirrored raid configuration. Yes, it is "slower", but I still pull data off that server at over 50MB/sec on my home gigabit lan! The specs on that server aren't great either... 2GB ram, and an old 1.6GHZ single core sempron.

  15. Not bad news by wonkavader · · Score: 4, Interesting

    It's still under development. But it's already pretty competitive, doing reasonably well in many tests.

    And then there's this (on the last page) "Ending out our tests we had the PostMark test where the performance of the ZFS Linux kernel module done by KQ Infotech and the Lawrence Livermore National Laboratories was slaughtered. The disk transaction performance for ZFS on this native Linux kernel module was even worse than using ZFS-FUSE and was almost at half the speed of this test when run under the OpenSolaris-based OpenIndiana distribution."

    Ok, maybe someone can disabuse me of a misconception that I have, but: There's no reason that ZFS in the kernel should be slower than a FUSE version. That means there's something wrong. If they figure out what's wrong and fix it, that could very likely affect the results in some or all of the other tests.

    ZFS isn't done yet, and it already looks like it might be worth the trade-off for the features ZFS provides. And performance might get somewhat better. This article is good news (though that final benchmark is distressing, especially when you look at the ZFS running on OpenSolaris).

    It says: "When KQ Infotech releases these ZFS packages to the public in January and rebases them against a later version of ZFS/Zpool, we will publish more benchmarks."

    and I'm looking forward to that new article.

  16. Re:They Why ZFS? by tlhIngan · · Score: 4, Interesting

    The main reason to use ZFS over the other ones, even in cases where the features are the same is that ZFS is more widely available. Admittedly, it's far from universal, but right now it's officially supported in more than one OS. I'm not aware of a filesystem that provides similar functionality to ZFS which is more widely available.

    Actually, I've run into this problem, not with ZFS (haven't used it), but with other filesystems, on Linux only. It seems not all filesystems are truly endian-aware, so moving a USB disk created on a big-endian system and moving it to a little endian system results in a non-working filesystem. Had to actually go and use that system to mount the disk.

    Somewhat annoying if you want to pull a RAID array our of a Linux-running big-endian system in the hopes that you can recover the data... only to find out it was using XFS or other non-endian-friendly FS and basically not be able to get at the data...

  17. Re:They Why ZFS? by Maquis196 · · Score: 5, Informative

    zpool status

    That's the command you are looking for. The zfs-fuse lists disks by id which means if you go into /dev/disks/by-id/ and do a ls -al you'll see which devices they are linked to.

    It is done this way to make it easier in Linux, in BSD/Solaris the disks are by gpt name (well they were for me) so this keeps it sane.

    Hope it helps.
    Maq

  18. For ZFS, speed is a secondary goal by pedantic+bore · · Score: 3, Insightful

    Picking on ZFS for being slow when ported to a different OS and running on atypical hardware is like criticizing Stephen Hawking for being a poor juggler. It's focussing on the wrong thing. The goals of ZFS are, in no particular order:
    - Scalability to enormous numbers of devices
    - Highly assured data integrity via checksumming
    - Fault tolerance via redundancy
    - Manageability/usability features (i.e., snapshots) that conventional file systems simply don't have
    Oh, and if it's fast, well, that's gravy.

    --
    Am I part of the core demographic for Swedish Fish?
  19. Re:They Why ZFS? by Jeff+DeMaagd · · Score: 3, Insightful

    Thanks for replying like a jerk, that really helps us all out. Nobody is going to simply transition to a new way of doing things just because it's new, they need to know what they'll get from the new way that makes the transition worthwhile.

  20. Re:I'm using btrfs on my home partition. by Hatta · · Score: 3, Insightful

    BTRFS can probably never be shipped with any other major OS other than linux

    It's not BTRFS's fault that other operating systems use licenses with more restrictions than Linux.

    --
    Give me Classic Slashdot or give me death!
  21. Re:They Why ZFS? by cbhacking · · Score: 4, Informative

    Um... WTF? Compression is a performance *improvement* and a massive one, at that. The trivial cost in CPU time is offset by the massive reduction in IO time, which is more expensive by far. This has been true since 2000 or even earlier. Modern multi-core CPUs just take the CPU penalty from negligible to nonexistent. Unless your CPU cores are all running at 100%, and possibly even if they are, compression will improve performance.

    Note that this is true on a wide variety of filesystems; it's nothing special to these particular ones. Hell, NTFS has had built-in compression for a decade or more. You can improve performance on a Windows system by right-clicking the C: drive and selecting Properties -> Compress this drive. You can do it from the command line using

    compact.exe /C /S:C:\ /A

    This will compress all files in or under the root of the C drive, including hidden or system files (requires admin, of course) and marks all the directories so that any files written to them will also get compressed.

    --
    There's no place I could be, since I've found Serenity...
  22. Re:They Why ZFS? by sjames · · Score: 3, Insightful

    Unless, of course, the files you're storing are already compressed, in that case it's just a pure loss. As with many things, what's "best" is strongly dependent on what you want to do with it.

  23. Re:They Why ZFS? by Dhalka226 · · Score: 3, Informative

    Half of which's results will be one discussion forum or another where people who are not smug asses thoughtfully took a moment to answer a person's question.

    You had time to post this self-important drivel, surely you have time to answer the question as well -- but you elected for the drivel. And you think that somehow says something about the people asking the question rather than about you?