From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Martin Steigerwald <martin@lichtvoll.de>,
Hugo Mills <hugo@carfax.org.uk>,
Zia Nayamuth <zedestructor@gmail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: FYIO: A rant about btrfs
Date: Fri, 18 Sep 2015 09:06:02 -0400 [thread overview]
Message-ID: <55FC0C3A.9080702@gmail.com> (raw)
In-Reply-To: <5147353.qIsJnOkqhM@merkaba>
[-- Attachment #1: Type: text/plain, Size: 2882 bytes --]
On 2015-09-17 11:57, Martin Steigerwald wrote:
> Am Mittwoch, 16. September 2015, 23:29:30 CEST schrieb Hugo Mills:
>>> but even then having write-barriers
>>> turned off is still not as safe as having them turned on. Most of
>>> the time when I've tried testing with 'nobarrier' (not just on BTRFS
>>> but on ext* as well), I had just as many issues with data loss when
>>> the system crashed as when it (simlated via killing the virtual
>>> machine) lost power. Both journaling and COW filesystems need to
>>> ensure ordering of certain write operations to be able to maintain
>>> consistency. For example, the new/updated data blocks need to be on
>>> disk before the metadata is updated to point to them, otherwise you
>>> database can end up corrupted.
>>
>> Indeed. The barriers are an ordering condition. The FS relies on
>> (i.e. *requires*) that ordering condition, in order to be truly
>> consistent. Running with "nobarrier" is a very strong signal that you
>> really don't care about the data on the FS.
>>
>> This is not a case of me simply believing that because I've been
>> using btrfs for so long that I've got used to the peculiarities. The
>> first time I heard about the nobarrier option, something like 6 years
>> ago when I was first using btrfs, I thought "that's got to be a really
>> silly idea". Any complex data structure, like a filesystem, is going
>> to rely on some kind of ordering guarantees, somewhere in its
>> structure. (The ordering might be strict, with a global clock, or
>> barrier-based, or lattice-like, as for example a vector clock, but
>> there's going to be _some_ concept of order). nobarrier allows the FS
>> to ignore those guarantees, and even without knowing anything about
>> the FS at all, doing so is a big red DANGER flag.
>
> Official recommendation for XFS differs from that:
>
> Q. Should barriers be enabled with storage which has a persistent write
> cache?
>
> Many hardware RAID have a persistent write cache which preserves it across
> power failure, interface resets, system crashes, etc. Using write barriers in
> this instance is not recommended and will in fact lower performance.
> Therefore, it is recommended to turn off the barrier support and mount the
> filesystem with "nobarrier", assuming your RAID controller is infallible and
> not resetting randomly like some common ones do. But take care about the hard
> disk write cache, which should be off.
>
> http://xfs.org/index.php/
> XFS_FAQ#Q._Should_barriers_be_enabled_with_storage_which_has_a_persistent_write_cache.
> 3F
There's a difference there still, XFS isn't quite as dependent on
ordering as BTRFS is, and they're also giving some other strict
rquirements (hard-disk write-cache being off (which I see a rather large
number of people ignore), and a high-end RAID controller).
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
next prev parent reply other threads:[~2015-09-18 13:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 14:43 FYIO: A rant about btrfs M G Berberich
2015-09-16 15:20 ` Austin S Hemmelgarn
2015-09-16 16:25 ` Zia Nayamuth
2015-09-16 19:08 ` Austin S Hemmelgarn
2015-09-16 23:29 ` Hugo Mills
2015-09-17 15:57 ` Martin Steigerwald
2015-09-18 13:06 ` Austin S Hemmelgarn [this message]
2015-09-16 16:45 ` Martin Tippmann
2015-09-16 19:21 ` Austin S Hemmelgarn
2015-09-16 23:31 ` Hugo Mills
2015-09-17 11:31 ` Austin S Hemmelgarn
2015-09-17 14:52 ` Aneurin Price
2015-09-18 13:10 ` Austin S Hemmelgarn
2015-09-24 16:38 ` Aneurin Price
2015-09-17 2:07 ` Rich Freeman
2015-09-16 16:53 ` Vincent Olivier
[not found] ` <A4269DC6-6CD6-4E8C-B3C9-5F5DDBE86911@up4.com>
2015-09-16 18:22 ` Austin S Hemmelgarn
2015-09-16 19:04 ` Vincent Olivier
2015-09-16 19:36 ` Austin S Hemmelgarn
2015-09-16 22:08 ` Zygo Blaxell
2015-09-18 0:34 ` Duncan
2015-09-18 13:12 ` Austin S Hemmelgarn
2015-09-16 22:25 ` Duncan
2015-09-23 20:39 ` Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55FC0C3A.9080702@gmail.com \
--to=ahferroin7@gmail.com \
--cc=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=martin@lichtvoll.de \
--cc=zedestructor@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).