Live data from Hacker News

Linux 5.10 BTRFS performance regression

reddit.com

191–200 of 202 posts

Re: Linux 5.10 BTRFS performance regression

#191
post #182

Earlier quoted context omitted.

Even for home use I'm not sure I could recommend them. From experience using them in servers, I'd site a handful of problems: + Raid 5 requires BBWC + Raid 6 requires licensing + HPE requires a support contract to download most firmware + When used in servers, they report non-hp drives as being in a constant fault state.

> BBWC why wouldn't you use it if you have it? > Raid 6 requires licensing Keys are out there and can be googled, in any case you probably don't need RAID 6 or any extra features for personal use > HPE requires a support contract to download most firmware Um, firmware for this card is on the page I linked, free as in beer > When used in servers, they report non-hp drives as being in a constant fault state I wouldn't…

I mentioned the BBWC because the first few links I found to buy the card didn't include it.

Nice to see firmware available - in 2014 HP started requiring support contracts or warranties to download firmware updates for the servers which really turned me off them. I didn't realise RAID firmware wasn't included in that (for some reason iLO firmware isn't either, but I think that's probably because it includes OSS). For this reason alone I'd avoid HP on principal.

I'm hoping one day I can find a reasonably cheap RAID card that still supports using hte BBWC in JBOD mode...

Re: Linux 5.10 BTRFS performance regression

#192
post #177

Earlier quoted context omitted.

It really can't be bit flipping on disk. First off, the checksum would catch it. Second, the file is compressed, so flipping a bit turns it into complete garbage. Third, BAM uses a length-prefixed coding in several places. A flipped bit in any length field would mess up the decoding. Those bits could still flip in memory, which isn't BTRFS's fault. That's still unlikely, because you'd typically get segfaults, not sil…

:D Currently not using btrfs by the way. But you are positive that BAM files should be self consistent? And when would you catch a bitflip then? What would it look like in a compressed file lake BAM? A much larger effect than just a cigar length mismatch supposedly?

Oy vey, veering off topic, but whatever...

BAM is a sequence of zlib-compressed blocks. Each of them has a checksum, and any corruption gets past it with probability 2^-32. Any sane software will give you an error. When in doubt, just decompress the stupid file using gunzip or zcat, those will verify the checksum. Don't guess, check.

But if you insist on using software that just ignores the checksum (I think, not even samtools, which segfaults(!) on misspelled file names(!) is that awful), all bets are off. Decompressing a corrupted file yields nonsense that doesn't even have the same length as the original data. BAM would also quickly get out of sync, and subsequent records would contain complete nonsense. You'd know if you saw that.

However...

> you are positive that BAM files should be self consistent?

That is a loaded question. In addition to being syntactically correct, BAM files should maintain a few variants that are hard to check. They rearely do. BWA(!) produces inconsistent BAM files, and I've seen many, many scripts in the wild that produce complete bullshit that only happens to work in a very specific setting. Like I said, you're probably using some awful software.

Re: Linux 5.10 BTRFS performance regression

#193
post #146

Earlier quoted context omitted.

Back to ext4 because btrfs had crazy bugs? ext4 had at least two critical data corruption bugs in the past 5 years in stable kernels (personal anecdote: one ruined the root filesystem on a server that I used, after which I stopped using ext4).

> ext4 had at least two critical data corruption bugs in the past 5 years in stable kernels No it hadn't. Those bugs were lower in the stack in block layer.

Yes, it did. Here's the fix for one of the ext4 corruption bugs: https://lwn.net/Articles/645722/ (see also https://lwn.net/Articles/645720/).

The one you're referring to is https://lwn.net/Articles/774440/ which is a different bug.

I should add that as a user, what matters to me is the reliability of my data. If a bug exists outside of fs/ext4 in the kernel but affects only ext4 and not other filesystems (such as https://www.phoronix.com/scan.php?page=news_item&px=MTIxNDQ which was caused by an ext4-related commit, and similar others in prior years), this makes ext4 unreliable for me.

Re: Linux 5.10 BTRFS performance regression

#194

Earlier quoted context omitted.

> until a distributed (multiple machines) equivalent of ZFS comes along. Ceph?

That's exactly what they want. It's got all the checksummed replication features that makes zfs awesome and it's pretty rock solid. It's even pretty resilient to dumb mistakes from the admin (ahem). Unfortunately ceph is primarily developed for folks running massive petabyte scale clusters, so setting up a home lab micro-cluster is still a fair bit more difficult than it needs to be, even with the new cephadm stuff.…

I work (well, until January) for a company that specializes in Ceph support. And it is depressing to see how many customers have crashing OSDs or MDSs, or unexplainabe memory overuse problems. It looks much worse than btrfs. I don't want this at home. But, to be fair, for every distributed storage system (even as simple as DRBD), there is be a person who had extremely negative experience with it.

Re: Linux 5.10 BTRFS performance regression

#195
post #193

Earlier quoted context omitted.

> ext4 had at least two critical data corruption bugs in the past 5 years in stable kernels No it hadn't. Those bugs were lower in the stack in block layer.

Yes, it did. Here's the fix for one of the ext4 corruption bugs: https://lwn.net/Articles/645722/ (see also https://lwn.net/Articles/645720/ ). The one you're referring to is https://lwn.net/Articles/774440/ which is a different bug. I should add that as a user, what matters to me is the reliability of my data. If a bug exists outside of fs/ext4 in the kernel but affects only ext4 and not other filesystems (such as h…

You claimed there were two critical data corruption bugs in the past 5 years, one which was debunked as a not ext4 bug and the other one you linked is from April 2015, which happened more than 5 years ago.

> which was caused by an ext4-related commit

Now that's blatantly wrong. It wasn't caused by an ext4-related commit. The commit to blame was scheduler code in the block layer. Nothing filesystem specific.

Re: Linux 5.10 BTRFS performance regression

#196
post #178

Earlier quoted context omitted.

> Why does btrfs have those issues compared to other filesystems? Why? There are several reasons, but if you go right back to the beginning, there's a single reason which caused all the other problems: they started coding before they had finished the design. All of the other problems are fallout from that. Changing the design and the implementation to fix bugs after the initial implementation was done. Introducing mo…

Can you tell how such evaluation on a design is done? Is some kind of formal verification, analysis or rather experimentation to figure out its properties normal? Thank you for your input!

I wasn't involved so can't personally provide details of how this was done at Sun. Most of my knowledge comes from listening to talks and reading books on ZFS.

For work I'm involved in relating to safety-critical systems, we use the V-model for concepts, requirements, design and implementation, with extensive validation and verification activities at each level. Tools are used to manage all of the requirements, design details and implementation details and link them all together in a manner which aims to require self-consistency at all levels. When done correctly, this means that the person writing the code does not need to be particularly creative at this stage: the structure is completely detailed by the formal design. But it does require significant up-front effort to carefully consider and nail down the design to this level of detail. But it does avoid the need to continually revise and adapt an incomplete or bad design in a never-ending implementation phase.

This approach is definitely not for everyone, and there are many things one can criticise about it. But if you are willing to bear the financial cost and time costs of doing that detailed design work up front, the cost of implementation will be much lower and the product quality will be much greater. There is a lot to be said for not madly mashing keys and churning out code without thinking about the big picture, and Btrfs is a case study in what not to do.

Re: Linux 5.10 BTRFS performance regression

#197
post #196

Earlier quoted context omitted.

Can you tell how such evaluation on a design is done? Is some kind of formal verification, analysis or rather experimentation to figure out its properties normal? Thank you for your input!

I wasn't involved so can't personally provide details of how this was done at Sun. Most of my knowledge comes from listening to talks and reading books on ZFS. For work I'm involved in relating to safety-critical systems, we use the V-model for concepts, requirements, design and implementation, with extensive validation and verification activities at each level. Tools are used to manage all of the requirements, desig…

The V-model is interesting. I'm a student and kinda new to the different development models.

How to decide whether such meticulous design is necessary or not? In hindsight Btrfs may have benefited, but how to decide when to and when not to in the future?

I would also be interested to know what tools are used for this. The ones I looked at seemed quite dated.. :-)

Thank you for answering! This is very interesting to learn about

Re: Linux 5.10 BTRFS performance regression

#198
post #196

Earlier quoted context omitted.

I wasn't involved so can't personally provide details of how this was done at Sun. Most of my knowledge comes from listening to talks and reading books on ZFS. For work I'm involved in relating to safety-critical systems, we use the V-model for concepts, requirements, design and implementation, with extensive validation and verification activities at each level. Tools are used to manage all of the requirements, desig…

The V-model is interesting. I'm a student and kinda new to the different development models. How to decide whether such meticulous design is necessary or not? In hindsight Btrfs may have benefited, but how to decide when to and when not to in the future? I would also be interested to know what tools are used for this. The ones I looked at seemed quite dated.. :-) Thank you for answering! This is very interesting to l…

This is just my own personal take on things; I'd definitely recommend reading up on the differences between Waterfall, Agile and the V-model (and Spiral model). Note that you'll see it said that the V-model is based upon Waterfall, which is somewhat true, but it's not necessarily incompatible with Agile. You can combine the two and go all the way down and back up the "V" in sprints or "product increments", but you do need the resources to do all the revalidation and reverification at all levels each time, and this can be costly (this is effectively what the Spiral model is).

In terms of deciding if meticulous up-front design is necessary (again my own take), it depends upon the consequences of failure in the requirements, specifications, design and/or implementation. A random webapp doesn't really have much in the way of consequences other than a bit of annoyance and inconvenience. A safety-critical system can physically harm one or multiple people. Examples: car braking systems, insulin pumps, medical diagnostics, medical instruments, elevator safety controls, avionics etc. It also depends upon how feasible it is to upgrade in the field. A webapp can be updated and reloaded trivially. An embedded application in a hardware device is not trivial to upgrade, especially when it's safety-critical and has to be revalidated for the specific hardware revision.

For filesystems the safety aspect will relate to maintaining the integrity of the data you have entrusted to its care. Computer software and operating systems can have all sorts of silly bugs, but filesystem data integrity is one place where safety is sacrosanct. We set a high bar in our expectation for filesystems, not unreasonably, and after suffering from multiple dataloss incidents with Btrfs, it's clear their work did not meet our expectations. We're not even going into the performance problems here, just the data integrity aspects.

I can't say anything about the tools I use in my company. There are specialist proprietary tools available to help with some of the requirements and specifications management. I will say this: the tools themselves aren't really that important, they are just aids for convenience. The regulatory bodies don't care what tools you use. The important part is the process, of having detailed review at every level before proceeding to the next, and the same again when it comes to validation and verification activities.

Often open source projects limit themselves to some level of unit testing and integration testing, which is fine. But the coverage and quality of that testing may leave some room for improvement. It's clear that Btrfs didn't really test the failure and recovery codepaths properly during its development. Where was the individual unit testing and integration test case coverage for each failure scenario? Where the V-model goes above and beyond this is in the testing of the basic requirements and high-level concepts themselves. You've got to check that the fundamental premises the software implementation is based upon are sound and consistent.

Re: Linux 5.10 BTRFS performance regression

#199
post #192

Earlier quoted context omitted.

:D Currently not using btrfs by the way. But you are positive that BAM files should be self consistent? And when would you catch a bitflip then? What would it look like in a compressed file lake BAM? A much larger effect than just a cigar length mismatch supposedly?

Oy vey, veering off topic, but whatever... BAM is a sequence of zlib-compressed blocks. Each of them has a checksum, and any corruption gets past it with probability 2^-32. Any sane software will give you an error. When in doubt, just decompress the stupid file using gunzip or zcat, those will verify the checksum. Don't guess, check. But if you insist on using software that just ignores the checksum (I think, not eve…

Thank you very much, this is very helpful!

Re: Linux 5.10 BTRFS performance regression

#200
post #91

I work with TBs of genomics data and I am at this point pretty convinced that some of that data changes on-disk. Every now and then. It's very weird. Recently I heard an interview (on one of the Jupiter broadcasting shows) about how btrfs is exposing errors of underlying hardware using their checksumming features, I had a bit of an Aha! moment. The files in question (BAM files) have a sort of checksumming built in (c…

btrfs has eaten 100% of the data I have stored on it. 0/10 would not suggest. ZFS has similar features and has eaten 0% of the data I have stored on it. would suggest.

n=1 is n=None ;)
Post reply on HN