by ComputerGuru · 9y ago · 0 comments
We originally ran OpenSolaris _just for ZFS_. Then we switched to FreeBSD when OpenSolaris/OpenIndiana dead-ended. We had a production server running PHP and we were sick of PHP5, so we switched to Linux because HHVM on FreeBSD was a joke. PHP 7 came out and obviated HHVM (from a performance perspective), and so our latest PHP deployments are back on FreeBSD.
If your data is valuable to you (and presumably it is and that's why you're looking at ZFS), why are you not on FreeBSD in the first place?
Same story with ASP.NET - tried deploying on Mono way back before .NET Core was even an idea and realized the futility of it and switched a server farm to Windows _because it just wasn't worth it._ PHP on Windows? Same story - not production ready, move to Linux.
(This isn't to disparage ZfsOnLinux, which I think is a great effort and laudable if only for home user purposes. Instead, this is a question for sysadmins on HN who are using ZoL.. .why?)
I'm one of those people. I'm on the Perf and OS team at Netflix. We're very familiar with FreeBSD -- we use it on our CDN. We're also very familiar with Linux -- we use it on our cloud. We're very familiar with a lot of other OSes too (Windows, AIX, Solaris, HP-UX, etc).
So why don't we use BSD everywhere, or Linux everywhere? There's no single reason -- it's many reasons -- and it's serious engineering time to document them all and do the topic justice. I'd like to, but I don't have that time right now.
But I wanted to point this out because I do see it commonly asked, and it sounds like a question that can be answered simply, but isn't. You're asking for engineering work, even to just summarize all the factors. I've written up an explanation of why not Solaris before on HN, since that's easy. But Linux vs FreeBSD is much more work, since they are both compelling options.
I'm saying use whatever filesystem Linux provides when you need to use Linux. And use whatever operating system provides native support for ZFS when you need to use ZFS.
We're using ZFS on FreeBSD to do our data storage, ASP.NET on Windows to run our business logic, and PHP under FreeBSD where PHP is required (previously HHVM on Linux because HHVM was the requirement). I'm saying pick the right OS for the right job.
I'm saying figure out your priority with stability in mind.
ZFS is a must when managing big data. It's nice to have otherwise. Decide which factor is the "must" in your case, and if it's ZFS, don't use Linux.
We're now using btrfs too.
What's your technical beef with ZFS on Linux anyway?
To be honest I do agree with him. I find FreeBSD to be close enough to Linux that any backend engineer or operator worth their salt should be able to swap between the two platforms. Nearly all the same tools that are available on Linux are available on FreeBSD, plus a few tools of it's own. I'm not advocating FreeBSD everywhere though - Linux has it's strengths too which would make it a better platform in other domains. But sometimes it feels like people turn to ZoL without even considering FreeBSD - which is a real pity as FreeBSD + ZFS is a dream to administrate. It's a lot easier than people expect and by not even entertaining the idea of FreeBSD I think they're missing an opportunity.
This is all ideal world scenario stuff though. I do appreciate there are often other factors that complicate the decision making. Sometimes even political rather than technological factors.
In terms of using FreeBSD, I generally work in small (~6 person) sysadmin teams running hundreds of servers. There's already a lot of software and OSes to maintain and not a hell of a lot of time to do it, if we can cut out some of the complexity (making sure provisioning tools work on FreeBSD etc.) by just running as much stuff on Linux as possible then our jobs and lives become easier.
That is why people risk their data using an untested hack.
If you ever have the time, that would be an awesome read. I find the differences between operating systems fascinating, and rarely done justice as people overlook the subtleties for a "Just use <<insert favourite tribe>>" approach.
Because the filesystem isn't the only feature of the OS that matters, and people often have more than one requirement. There are technical reasons to choose linux that have nothing to do with ext or xfs, and there are nontechnical reasons also. Just because someone has chosen linux doesn't mean they don't value their data.
Also consider hardware support, mindshare and the flexibility/need to use more of the OS than just the filesystem.
I began with ZFS on Solaris, then Nexenta... then jumped to ZFS on Linux in 2012. FreeBSD was a non-starter because my hardware platform (HPE ProLiant) was poorly supported under FreeBSD. That killed it as an option.
I am seeing long standing stability/availability bugs finally getting fixed within the ZoL project - often times being fixes to OpenZFS upstream, fixing bugs that certainly "felt" like the same thing on those other platforms.
There are zero platforms I entirely trust to survive every conceivable drive failure, I've had production outages using every combination of hardware and OS possible due to bugs both in the OpenZFS stack itself, as well as underlying OS issues on all platforms.
At this point I think it's choose which OS you're most comfortable with, the ZFS bits are getting really close to on par.
And there are many reasons to want to run a linux kernel with ZFS - not just "preference" related.
This isn't just applicable to Linux; we have a strict policy on using only in-kernel filesystems on FreeBSD as well after some poor experiences (_in production_) with aufs-esque ports to FreeBSD. They all look shiny and nice on the outside, and even stress test OK, but when you release them to the masses that's when the shit hits the fan and you realize they're just not designed to the same specifications as the rest of the OS components.
I'm saying it didn't matter why. Just that at the end of the day, the kernel team isn't opting their weight behind this, and that should factor in to the decision.
If you have ever written a kernel module out of tree then tried to upgrade the kernel version you know this pain.
ZFS was shipped on FreeBSD in 7.0 -- about a decade ago. That's 10 years of development, testing, QA, and use in production.
Canonical just recently began providing kernel modules for ZFS. It appears as if Red Hat may never include support for ZFS and -- unless some changes happen WRT licensing -- it will almost certainly never be part of the Linux kernel.
I've had "ZFS on root" setups on my laptops and workstations on Ubuntu (previously) and Arch Linux (currently) and have several servers using ZFS on FreeBSD. Initial installation and setup of ZFS is a major pain in the ass on Linux, compared to FreeBSD -- especially when dealing with anything more complicated than a single ZFS pool on a single disk.
On funtoo/gentoo/arch basically any distro where the installation is manual zfs is exceptionally simple to set up. This stage took me about 30 seconds to figure out having never used zfs.
On any rolling release you could easily be using the same setup for the next decade or more simply duplicating an existing setup to a new machine periodically.
A small amount of work up front seems like a good trade for never having to do so again.
I never had any issues with this on FreeBSD. Linux, however, was another story. Installation would go smoothly and without incident but I'd run into issues immediately upon first boot. I spent many hours trying to figure out what/where the problem was and it turned out to be race conditions with systemd and filesystems/partitions being mounted. (At the time, I had a few years experience with ZFS and had installed who-knows-how-many servers using ZFS exclusively, yet I had never had any issues with this. Of course, none of those servers were infected by systemd either.)
Now that I'm aware of the issues I can work around them. If you just want a single pool on a single disk and a minimal number of datasets, you'll probably be fine -- you're right, that's a cinch to set up. Like I said, however, don't be surprised if you have problems when trying to do anything more complicated than that.
Zfs can be made to work, shoehorned in your parlance, and then you have the best filesystem on the very best of operating systems.
I too started mid 90s with Linux. Walnut creek cdroms anyone?
I believe Linux merits stands on it's own feet and I don't want to have to write an essay about everything that is awesome about Linux.
- kernel dev speed
- the disruptive gplv2 linux kernel license
- kernel breadth of drivers
- great hardware support
- kernel subsystems available
- container technology in particular lxc
- scalability
- openness
- now - zfs - with encryption support!
- strace
- kvm
- size of community
- size of pool of corporate backed devs
- great great wm's
- great userland tools
- bedrock distributions like Debian
- distributions pushing the envelope like Arch
- The Arch Wiki
The biggest points you could probably win an argument on is:
1) hardware support: but that's less of an issue with servers anyway. Plus ironically I've had more issues installing Debian onto HP Proliants than FreeBSD due Debian's strict policy on non-free drivers.
2) size of community: but then what's the signal to noise ratio in the Linux community of actual helpful, knowledgeable engineers vs that of FreeBSD or any other POSIX-like platform? Linux does have a significantly bigger community but I've found that does result in significantly more misinformation being published too.
A genuine, non-trolling and non-elitist question: have you actually tried any other POSIX-like platform aside Linux? I'm not saying you should need to since you're clearly happy with Linux, but since the points you praise Linux can be applied to a number of platforms outside of Linux as well it does sound like you're making assumptions that those points are exclusive to Linux as they are why you're describing Linux as the best OS out there.