Live data from Hacker News

The State of ZFS on Linux

clusterhq.com

41–50 of 125 posts

Re: The State of ZFS on Linux

#41
I love ZFS, and I love working with Linux, but I can't help but worry about using ZFS on Linux. Without the needed support from the kernel side, I don't see how it can be useful for production. I can see using it on personal workstations, but for any situation where data loss is critical, you just won't see any uptake. Because of the licensing, ZFS can never be anything more than a second-class citizen on Linux.

That said, I run a FreeBSD ZFS file server just to host NFS that is exported over to a Linux cluster. At least on FreeBSD, there is first-class integration of ZFS into the OS. (I used to also maintain a Sun cluster that had a Solaris ZFS storage server that exported NFS over to Linux nodes, which is where I first got a taste for ZFS).

So, I guess my main question is: In what use cases is ZFS on Linux so useful when native FreeBSD/ZFS support exists?

I'm not saying it can't be done - I just don't understand why.

Re: The State of ZFS on Linux

#42
post #35

Earlier quoted context omitted.

Debian is the last major Linux distribution where it is not easy to do / on ZFS. It might be possible to implement a module for Debian's initramfs generator in ZoL upstream. I suggest filing an issue to inquire about this possibility: https://github.com/zfsonlinux/zfs/issues/new

They have it for Ubuntu, but Ubuntu and Debian have somewhat diverged on how it is done. It is not a big issue for me on this build, but if I wanted to do large scale file servers and didn't want to stash a USB dongle in the box for root, it would be useful. Although, I guess I could use FreeBSD if I didn't need KVM and/or Xen....

There is bhyve now...

Re: The State of ZFS on Linux

#43
post #41

I love ZFS, and I love working with Linux, but I can't help but worry about using ZFS on Linux. Without the needed support from the kernel side, I don't see how it can be useful for production. I can see using it on personal workstations, but for any situation where data loss is critical, you just won't see any uptake. Because of the licensing, ZFS can never be anything more than a second-class citizen on Linux. That…

  Without the needed support from the kernel side
Can you clarify what you mean by that?

Re: The State of ZFS on Linux

#44

Earlier quoted context omitted.

It isn't solely a file server. I made it to take over Linux workstation duties from my workstation (which now runs Windows 8.1, which, tbh, really isn't nearly as bad as everyone says it is), and it runs VMs for clustered software testing and development. I export /home and /tank via Samba[1] to the now-Windows workstation (and sshfs for my OSX running MBP, which I may transition to Samba now) and get about 85% of Gi…

You need to tell the kernel if you need larger-than-default SO_SNDBUF/SO_RCVBUF, e.g. for 4 MByte (default is 128 kByte): sysctl -w net.core.rmem_max=4194304 sysctl -w net.core.wmem_max=4194304 Documentation: http://git.kernel.org/cgit/linux/kernel/git/stable/linux-sta...

The default seems to be 128kb for both, and that seems to be enough. It is already bigger than the buffers on most NIC.

Re: The State of ZFS on Linux

#45

Earlier quoted context omitted.

They have it for Ubuntu, but Ubuntu and Debian have somewhat diverged on how it is done. It is not a big issue for me on this build, but if I wanted to do large scale file servers and didn't want to stash a USB dongle in the box for root, it would be useful. Although, I guess I could use FreeBSD if I didn't need KVM and/or Xen....

There is bhyve now...

I've heard mixed reviews of that. It is probably not quite ready for production, but it will be interesting in the future.

Re: The State of ZFS on Linux

#47

I've used ZoL since it was created, and zfs-fuse before that. I ran it on my workstation for a few years (managing a 4x750gb RAID-Z (= ZFS's RAID-5 impl), with ext3 on mdadm RAID 1 2x400gb root), and then swapped to BTRFS for 2x2TB BTRFS native RAID 1 (which was Oracle's ZFS competitor that seems to be largely abandoned although I see commits in the kernel changelog periodically), and now back to ZFS on a dedicated f…

Can you speak more about why ZFS is better than BTRFS?

I'm not the op but I'm running ZoL on a small cluster with 200 HDDs and 50 machines. I've also tested btrfs.

Why is ZFS better (IMHO):

+ Tooling. The zpool and zfs commands are clear, easy to use and well documented. btrfs e.g. has no way to get a list of files with checksum problems. Also automounting and setting flexible mount points as well as the whole zfs get/set concept felt like a really concise way to configure all aspects easily.

+ Architecture. ZFS uses merkle hash trees with multiple copies spread over the disk (ditto blocks). This means that disk failures likely won't affect metadata and every possible disk problem is accounted for (except main memory). btrfs only uses crc32c and has 2 copies of the metadata tree on disk (but not spread over the disk afaik) or simple RAID1 in case of multiple disks. So in case of disk problems btrfs tends to corrupt faster. I've actually tested this and it's almost impossible to corrupt ZFS metadata even with hundreds of bad blocks. btrfs tends to switch faster to read-only mode with bad disks.

+ Compression: LZ4 is slightly better than LZO

+ L2ARC/ARC - easy to plug in a SSD cache. ARC is better than the pagecache for most workloads.

+ It's really fun to work with. A lot of good documentation. Dealing with btrfs felt very different...

+ RAIDZ(2-3) and copies=n for datasets. Both don't exist in btrfs (yet).

Reasons against ZoL:

- Memory. I've got out of memory errors because ARC memory is not freed fast enough. Also ZFS hogs a lot of memory. At least 750MB to 1GB kernel memory with several disks. btrfs needs far less. There is upcoming work to fix the ARC out of memory issues through.. it's on the roadmap from the developers.

- Stability. This also applies to btrfs but it's not as rock-solid as ext4. Especially with broken disks and usage of advanced features you'll run eventually into bugs. But the "normal" operations where 100% stable for me with ZoL.

- It's not native Linux. You have some Solaris Porting layer modules and integration into the Linux kernel is not as tight as you may like it to be. E.g. cgroups based io throttling was not possible, last time I looked. This may change in the future but it's work to integrate it and if e.g. the module does not not compile for a new kernel you are screwed.

- btrfs will be supported and be a default choice in 1-2 years in likely all major Linux enterprise distributions. SLES already made it the default. For most workloads ZFS is likely not worth it. At least it's tough to sell against a default option.

- rootfs on a ZoL volume is quite a lot of work and difficult to get working. But this is largely a distribution problem.

Re: The State of ZFS on Linux

#48
post #35

Earlier quoted context omitted.

Debian is the last major Linux distribution where it is not easy to do / on ZFS. It might be possible to implement a module for Debian's initramfs generator in ZoL upstream. I suggest filing an issue to inquire about this possibility: https://github.com/zfsonlinux/zfs/issues/new

They have it for Ubuntu, but Ubuntu and Debian have somewhat diverged on how it is done. It is not a big issue for me on this build, but if I wanted to do large scale file servers and didn't want to stash a USB dongle in the box for root, it would be useful. Although, I guess I could use FreeBSD if I didn't need KVM and/or Xen....

> I guess I could use FreeBSD if I didn't need KVM and/or Xen....

Have you looked at BHYVE?

Re: The State of ZFS on Linux

#50
Tried using ZFS in the earnest and got spooked, felt it was not production ready. Wanted to use ZFS for MongoDB on Amazon Linux (primarily for compression, but also for snapshot functionality for backups). Tried 0.6.2.

Ended up running into a situation where a snapshot delete hung and none of my ZFS commands were returning. The snapshot delete was not killable with kill -9. https://github.com/zfsonlinux/zfs/issues/1283

Also, under load encountered a kernel panic or a hang (I forget), turns out it's because the Amazon Linux kernel comes compiled with no preemption. It seems that "voluntary preemption" is the only setting that's reliable. https://github.com/zfsonlinux/zfs/issues/1620

That left a bad taste in my mouth. Might be worth trying out 0.6.3 again.

I am still leafing through the issues closed in 0.6.3, but based on what I see, 0.6.2 did not seem production-ready-enough for me:

https://github.com/zfsonlinux/zfs/issues?page=2&q=is%3Aissue...

Post reply on HN