10 ms·
Bringing Bcachefs to Linux Mainline
- acd 5y agoNice lots of good features! Seems like cache hard disk on ssd, filesystem snapshots. Lopks like it can replace/complement ZFS, Btrfs
- viraptor 5y agoProbably won't replace zfs, but if the recovery / failure handling story is better than btrfs, maybe we'll see that one replaced. They're going to be fairly similar in features and concepts.
- supern00b 5y agowhy do you think that it won't replace zfs? it has all the features that zfs have
- viraptor 5y agoIf it just has all the features zfs has and none of the years of stability that zfs has... why would any current user (who is by definition ok with the licence) take the effort to switch? What's the extra benefit that zfs currently doesn't provide?
- wokkel 5y agoMemory usage: zfs is still not neatly integrated and requires a big chunk of memory to operate efficiently.
- MailNerd 5y agoBig chunk of memory - that's not the case except if you are using deduplication. I have it running fine on a 4GB machine (10TB mirrored volume) without any issues.
- viraptor 5y agoWhat I believe gp was referring to was that zfs uses different caching system that the main system. Specifically arc vs page cache do almost the same job, but are separate and may fight for resources. Discussed in a few places, but here's an example with some behaviour summary https://www.reddit.com/r/zfs/comments/o8xqzb/zfs_on_linux_can_page_cache_demand_cause_arc/ https://www.reddit.com/r/zfs/comments/o8xqzb/zfs_on_linux_ca...
- cesarb 5y agoJust being in the mainstream kernel, instead of an out-of-tree module, already gives a couple of benefits. The code will always be kept up-to-date with the internal kernel API, so you won't have a situation where the kernel is updated but the out-of-tree module fails to compile due to an API change. And if you're running a signed kernel (for SecureBoot), you don't need to have a complex setup to add an extra key and sign the module whenever it's rebuilt. Also, as others have mentioned, being in-tree means it's better integrated with the rest of the kernel; this includes making changes to core kernel code when they could help the module.
- 2pEXgD0fZ5cF 5y ago> What's the extra benefit that zfs currently doesn't provide? Not being at the mercy of a company like Oracle is a huge plus in many ways. A huge plus for future development and risk-free adoption. I use ZFS on a server of mine, but I am one of those paranoid people that would switch just to get away from a project that could be hamstringed at any moment if Oracle has one of its episodes again. ZFS (hopefully) never finding its way into the mainline kernel is kind of a meta-disadvantage.
- cyphar 5y agoOpenZFS is the primary place where ZFS development happens and it's not managed by Oracle.
- 2pEXgD0fZ5cF 5y agoYes that I am aware of, my fear is Oracle going on a legal rampage, not direct mismanagement.
- mekster 5y agoWhat are they going to do about it? They can't just relicense OpenZFS. The only attack vector is suing Ubuntu for distributing zfs because Canonical's lawyers think that's fine but even then, you're still free to use it by adding it to the system yourself like any other distribution is doing. Running a new filesystem is far more dangerous than your theoretical legal concerns.
- viraptor 5y agoThey can go after end users if they manage to find a business angle where they can start charging for the system. "But that's silly, Oracle wouldn't be bothered by small businesses, right?" https://www.reddit.com/r/sysadmin/comments/d1ttzp/oracle_is_going_after_companies_using_virtualbox/ https://www.reddit.com/r/sysadmin/comments/d1ttzp/oracle_is_...
- 5y ago
- kzrdude 4y agoBecause right now it "has no features" because it's not really widely available. No installation, no features. The proof of the pudding is in the actual shipping and installing and using it. :)
- nwmcsween 5y agoZFS would probably take ages to merge unless there is a simple mapping of spl -> native Linux interfaces.
- folli 5y agoCan someone explain to me (a bloody layman) what the advantages/differences are over a traditional file system ext3?
- justinlloyd 5y agoCoW (copy-on-write), deduplication of data blocks, replicas (RAID equivalent), file system snapshots and multiple, tiered caching layers, plus several other features. On a sidenote, I integrated bcachefs as a vmx driver into VMWare ESXi for a CI/CD build server a few years back. The build system ran in VMs and on containers, but the non-essential target directories sat on bcachefs volumes with the caching layer directed first at RAM, then at SSD, then finally at the HDD. Managing all the Unity3D and Unreal caches was amazingly fast across dozens of different SKUs of what the same project. From my project write-up on my LinkedIn: Bcache-like caching layer for VMWare ESXi Reduce latency and read/write delay even if using SSD as your storage. Written in C and inserting itself as a storage tier into VMWare ESXi to handle read & write storage requests this caching system accelerates all accesses to the underlying backing store. Can work in both write-back and write-through caching modes. (Native C kernel device driver)
- nwellinghoff 5y agoCool stuff, do you have a more detailed write up of this? I am interested in learning more!
- pitaj 5y agoDoes bcachefs support something like raidz2?
- attentive 5y agochecksums, compress, encrypt, snapshots etc. It's a long list. It's better to compare with btrfs
- formerly_proven 5y agoThere's a ton of features, but really the most important one is that CoW filesystems tend to extend checksum protection to the actual data you're storing on them. Journaling filesystems generally only protect themselves and not the data.
- deaddabe 5y agoSee also this other thread about the bcachefs user manual : bcachefs: Principles of Operation [pdf] - https://news.ycombinator.com/item?id=31419120 https://news.ycombinator.com/item?id=31419120
- sleepycatgirl 5y agoMainline within next 6 months? Man, that would be pretty exciting. I will probably wait longer, but always glad to hear about development of bcachefs :D
- tpetry 5y agoHaving it stable in mainline in 3-4 would also be a big achievement. The filesystem part in Linux is kind of stagnating: * ZFS will forever be problematic because of licensing reasons * BTRFS stability is widely untrusted after their problems many years ago * ext4 and xfs don't have data checksumming * To get the same benefits of ZFS you currently need to stack a lot of device mapper plugins
- pabs3 5y agoThere is a potential legal solution for ZFS, but it requires help from Oracle: https://news.ycombinator.com/item?id=31420769 https://news.ycombinator.com/item?id=31420769 Apparently the incompatibility wasn't even intentional when Sun wrote CDDLv1.
- bubblethink 5y agoSparc, Solaris, and various zfs based products that Oracle sells still have a shelf life of a decade, give or take. There is little reason for them to do anything.
- pabs3 5y agoSomeone on LWN seems to think that Solaris/SPARC are essentially EOL already for Oracle and the scales are tipping towards having ZFS in Linux mainline. https://lwn.net/Articles/894956/ https://lwn.net/Articles/894956/
- sleepycatgirl 5y agoYeah, I use ZFS, and with some distros its... quite painful to get root-on-zfs, On the other hand, I use NixOS, and ZFS is nearly as easy to set up as any other filesystem, and afterwards its just bliss.
- intsunny 5y agoBefore all the ZFS people chime in: Some of us will NEVER accept ZFS's licensing. The ability to remain absolutely vigilant in regards to licensing immensely helped IBM during the SCO v. IBM debacle in regards to the JFS file system. We have learned this E-X-A-C-T lesson before. Additionally, since the code originates from Oracle, many of us progress from being vigilant to outright paranoid. Oracle has never been forgiving, warm, soft, nor cuddly. Hell, even Torvalds himself wants Larry Ellison to personally sign off on ever including ZFS into the Linux kernel [0] [0] https://www.phoronix.com/scan.php?page=news_item&px=Linus-Says-No-To-ZFS-Linux https://www.phoronix.com/scan.php?page=news_item&px=Linus-Sa...
- chalst 5y agoGiven Oracle's track record, I advise extreme caution on behalf of the mainline kernel with respect to code that Oracle could claim to have developed. I'm less sympathetic to sour grapes about ZFS. Kernel developers including Torvalds have made false negative remarks about ZFS vs Btrfs; the SFC deployed implausible legal theories made veiled threats against Ubuntu for maintaining a patch to Linux at their own risk allowing OpenZFS to be used.
- deleted 5y ago[deleted]
- pabs3 5y agoOracle could easily fix the ZFS licensing situation by releasing CDDLv2 resolving the GPL incompatibility. Then via the CDDLv1 auto-upgrade clause, most of OpenZFS could be made compatible with the GPL. Some parts would have to be relicensed to no longer opt out of the auto-upgrade clause or rewritten from scratch to enable the auto-upgrade clause. All other CDDLv1+ software would be made GPL compatible at the same time. After that OpenZFS could be included in Linux. Some more discussion about that on LWN. Does anyone know someone at Oracle that could get the ball rolling on CDDLv2? https://lwn.net/Articles/894901/ https://lwn.net/Articles/894901/
- orra 5y agoIn the absence of Oracle playing ball, I wonder how (in)feasible it would be to relicence the code of other contributors, then build on that. OpenSSL recently went through a such a relicening and rewriting project. It took years, alas.
- wongarsu 5y agoThe article has a great example of how competition is healthy even in the open source space, with the Btrfs authors wanting Bcachefs merged into Linux Mainline. A lot of people that got burned with Btrfs will use Bcachefs instead when it lands in mainline, but having both in the kernel will make it much easier to get kernel interface changes and tooling that benefits both Btrfs and Bcachefs.
- winter_blue 5y ago> A lot of people that got burned with Btrfs How did they get burned? (I'm thinking of switching to Btrfs on my personal laptop (running Arch), mainly for the snapshots, subvolumes, checksums+deduplication, etc.)
- techdragon 5y agoSince Btrfs was arguably available in the kernel too soon. Some people who should have avoided a new filesystem for lots of reasons ranging from missing features that were in the plan but not implemented yet or in the earliest days not yet stable... many of these early experimenters developed and fostered a vocal belief that Btrfs was "bad" (there's too much to sum up honestly, you could write an entire decent length blog post on the history of Btrfs, its reception and its criticism) and this group has taken a long time to accept that Btrfs may be ok now. Theres still people with the perception that its not as good or ready enough and should not be used.
- blueflow 5y agoFrom the bcachefs homepage: > We prioritize robustness and reliability over features and hype: we make every effort to ensure you won't lose data. This is exactly what btrfs failed at, this is not just an issue with the code itself, but also with the developers. Why should i trust feature-oriented developers with writing my infrastructure code, where reliability and robustness are top priority?
- viraptor 5y agoAll this, but also two specific cases: There's a list of features and readiness at https://btrfs.wiki.kernel.org/index.php/Status https://btrfs.wiki.kernel.org/index.php/Status - there were people who didn't check it and used unstable features and experienced issues. This is partially on the project for not making it more explicit. The second is that there are people who read that, see the unstable raid5/6, and are vocal about btrfs being overall broken / not ready rather than accepting that feature just not being available yet.
- dark-star 5y agoI admit it took me longer than it should to notice that this is not about some "BCA chefs" but rather "B-Cache-FS" ... and I quite closely follow Linux filesystems... Writing it as BCacheFS would have helped, but CamelCase is not very popular these days it seems
- curt15 5y agoHow well does bcachefs handle VM or DB workloads? Those have always btrfs's achilles heel unless you disable copy-on-write and checksumming, whereas zfs handles them pretty well if you set the recordsize correctly.
- viraptor 5y agoJust a reminder that the project is crowd funded and you can help with the development: https://www.patreon.com/bcachefs https://www.patreon.com/bcachefs
- Beldin 5y agoFor anyone else wondering what bca-chefs are: it's b-cache-fs.
- deleted 5y ago[deleted]
- pmarreck 5y agoCool. Now let's get ZFS in there since its licensing conflicts aren't actually a danger.
- aidenn0 5y agoSPL is a complete no-go for getting ZFS in.
- pmarreck 4y agoyou mean CDDL? Empty threats are void, IMHO. Might take a bit of bravery to step over the fence, but if no one comes after you after a certain amount of time has passed, the fence is effectively not there. Ubuntu already did that work, though, so...
- aidenn0 4y agoNo, I mean SPL[1]. The linux devs definitely don't want a proliferation of porting interfaces mucking up the kernel tree, so unless the OpenZFS devs want to work on a Linux specific port, I don't see ZFS getting mainlined regardless of the licensing issue. CDDL certainly doesn't help to make this happen though. Also "Empty threats are void" is a silly stance to take; betting that nobody who will own copyright to code in the CDDL is going to sue anytime in the next 80ish years would be dumb even ignoring the fact that Oracle owns copyright to at least some of that code right now, and they are quite litigious. 1: https://github.com/openzfs/spl https://github.com/openzfs/spl
- pmarreck 4y agoDidn't know about the SPL thing; interesting. So what's Ubuntu doing, just dealing with packaging it on their end? > betting that nobody who will own copyright to code in the CDDL is going to sue anytime in the next 80ish years would be dumb even ignoring the fact that Oracle owns copyright to at least some of that code right now, and they are quite litigious. When I wrote this, I was under the impression that US law more or less required copyrights to be regularly defended in order to maintain any "legal weight", but on Googling, it seems that while the awards in a case where a copyright was undefended until some significant time had passed, were lesser, it was still quite defensible. So I guess, fuck, that kind of sucks in a way, because it incentivizes patent trolling/hoarding/squatting, but it also makes it possible for someone without significant financial backing to benefit from a patent without having to afford good and regular legal defense. That's one hell of a damn tradeoff. A possibly better system would perhaps be one similar to what happens in the music biz in which a company takes a cut of any wins or profits by providing someone substantial legal representation in the defense of their copyrighted works.