14 ms·
OK, I'm curious: why are people shoehorning the filesystem to fit the OS rather than carefully picking the OS that makes the most sense for the application it's
by ComputerGuru 9y ago
OK, I'm curious: why are people shoehorning the filesystem to fit the OS rather than carefully picking the OS that makes the most sense for the application it's being used for?
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?)
- detaro 9y agoI'm curious in what way ZoL is "shoehorned to fit the OS"? Sure, a port adds potential for error, but is the technical difference between the interfaces so large?
- ComputerGuru 9y agoThe ZoL code is not the shoehorning, it's the fact that you're doing so via a community effort to go around the official stance of the kernel developers who've explicitly opted to not support this FS at this time; meaning you're missing out on all the normal development and QA processes and the benefits thereof. There's real value in having the the actual OS community designing the filesystem as well, their experience cannot be discounted. 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.
- bdonlan 9y agoThe kernel developers would probably accept zfs if they could. The main blocker is a license incompatibility issue, which is worked around by distributing zfs in source code form.
- ComputerGuru 9y agoIt's not about whether they could if they would. It's that they didn't, and therefore the things they'd have done if they would have didn't come to pass. 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.
- justinjlynn 9y agoThe Linux Kernel project doesn't own the Linux Kernel developers; those that wish to contribute to ZFS on Linux will do so and those that do not wish to will not. Things aren't quite so black and white in the open source world. Just because something isn't in Linus's tree doesn't mean it doesn't get testing and communication doesn't happen. In fact, because it's designed as a module and we have the DKMS infrastructure, being out of mainline really isn't as big an issue as it might have been in the past for distribution. There are disadvantages surely, but keeping up, taking advantage of interested talent and being in the know aren't really huge examples of them -- especially for an established project like ZFS on Linux. EDIT: I would also like to explicitly point out the false equivocation to which I am responding. The idea that the Linux Kernel project ignoring the code because it has an incompatible license is, in any way, equivalent to the Linux Kernel Project maintainers choosing to not "throw their weight" behind a piece of code by mainlining it -- essentially that they are rejecting it due to lack of technical merit -- is specious at best and deliberately instils fear, uncertainty and doubt at worst.
- simonvdv 9y agoDo you know what development and QA processes are in place for in kernel filesystems and how that compares to ZoL's development and QA process?
- michaelmrose 9y agoZfs isn't the original home of zfs so I'm unclear how using the freebsd port is more recommended at this point than the linux port.
- jlgaddis 9y ago(I think you meant "FreeBSD isn't the ...")? 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.
- michaelmrose 9y agoI don't care how you capitalize it. 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.
- jlgaddis 9y agoI tend to make use of lots of datasets on my machines, including in and under /var (e.g., /var, /var/backups, /var/cache, /var/log, /var/mail, /var/spool, /var/tmp, and probably a few others I'm forgetting) and some hosts have multiple pools as well. 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.
- brendangregg 9y agoMost small shops don't have the expertise -- or appetite to develop it -- to do an OS and kernel comparison in depth. Larger shops like Netflix do (and Facebook, etc). So if you want a detailed answer by a systems/kernel engineering team who have spent weeks studying it, you need to ask a larger shop. 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.
- ComputerGuru 9y agoNo, you misunderstood me. I am not arguing for FreeBSD everywhere or Linux everywhere. To the contrary. 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.
- tjoff 9y agoProblem is, Linux does not have any decent general purpose filesystem. That is why people risk their data using an untested hack.
- 9y ago
- unixhero 9y agoBecause Linux is absolutely awesome. Zfs can be made to work, shoehorned in your parlance, and then you have the best filesystem on the very best of operating systems.
- cturner 9y agoWhat are the angles that make Linux so compelling to you? For example, I am a linux user since mid 90s. But recently I have been doing a lot of programming with an emphasis on IO. From what I am seeing both bsd (through kevent) and windows (through completion sockets) offer far better APIs for complex IO handling. The lack of a consistent IO API in Linux is making me wonder why is has so much momentum. (Drivers are pretty important, and Linux does tend to be strong here.)
- unixhero 9y agoI am not a low level developer so I cannot discuss that merit with you. 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
- rhinoceraptor 9y agoI think Linux is cursed by its development model. There is no way for a single, complete change set to be landed in Linux. So you get features like btrfs or lxc which are horribly broken at the start, and then asymptotically approach stability and security.
- boomboomsubban 9y ago
- benchaney 9y ago> OK, I'm curious: why are people shoehorning the filesystem to fit the OS rather than carefully picking the OS that makes the most sense for the application it's being used for? 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.
- simcop2387 9y agoIn my car of using it hardware support. Freebsd just chokes on the data controller in using and solaris and it's flavors didn't even detect it. Along with that freebsd doesn't yet support the virtualization tech that I need to give real pcie hardware to a VM.
- crest 9y agoThe bhyve hypervisor does support PCI-e passthrough.
- simcop2387 9y agoNot VGA passthrough though, which is needed for doing most ML and gaming tasks.
- X86BSD 9y agoDo you just buy pre made boxes? Im curious because I have never put boxes in service I did not spec and put together myself. For exactly this reason. You want to make sure the HW is supported by your OS. I didn't think anyone just grabbed a box and tried to install multiple OS'es on it to see which worked. That seems genuinely like a poor idea and way to do things.
- simcop2387 9y agoNo, I built this myself and the hardware is supported on my OS of choice. I tried FreeBSD on it recently to deal with an issue I had on ZFS (was related to a bug in ZoL during bad hardware failure).
- mfukar 9y agoMy naive first reaction would be: because something up the stack is Linux-specific (or X-, or Y-specific).
- ewwhite 9y agoIn every ZFS on Linux discussion, there's a question like this. The short answer is that nobody really wants to be forced to run FreeBSD just for ZFS... 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.
- phil21 9y agoI run all 3 in various forms these days - Illumos, freebsd, ZoL - honestly ZoL is where I'm most excited about the future. 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.
- Filligree 9y agoBecause NixOS doesn't have a FreeBSD equivalent.
- datenwolf 9y agoBecause sometimes you're stuck to that small intersection where only a particular OS is supported by a particular technology. Case in point: CUDA. There's no support for CUDA for OSs other than Windows and Linux. And there's no support for ZFS in whatever form on Windows. If you want to do GPU computing using programs written in CUDA and keep the data on ZFS then you're essentially stuck to Linux + zfsonlinux and you have to deal with it.
- lmm 9y agoRunning a mixture of OSes comes with its own costs too. Having every machine running the same OS (and ideally the same version) can make a lot of things much easier, e.g. no more prod/stag-only bugs that aren't reproducible on dev machines.
- kurtisc 9y agoHow does porting ZFS to Linux differ from the "porting"-via-rewrite of the Unix tools?