All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Remi Gauvin <remi@georgianit.com>,
	MegaBrutal <megabrutal@gmail.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS and databases
Date: Thu, 2 Aug 2018 15:07:25 +0800	[thread overview]
Message-ID: <46d12c3f-9756-99be-a99c-75af5acc3296@gmx.com> (raw)
In-Reply-To: <8b5d3277-1afc-9b10-2960-f9fd4396e2e1@georgianit.com>


[-- Attachment #1.1: Type: text/plain, Size: 1497 bytes --]



On 2018年08月01日 22:33, Remi Gauvin wrote:
> On 2018-07-31 11:45 PM, MegaBrutal wrote:
> 
>> I know that with nodatacow, I take away most of the benefits of BTRFS
>> (those are actually hurting database performance – the exact CoW
>> nature that is elsewhere a blessing, with databases it's a drawback).
>> But are there any advantages of still sticking to BTRFS for a database
>> albeit CoW is disabled, or should I just return to the old and
>> reliable ext4 for those applications?
>>
> 
> Be very careful about nodatacow and btrfs 'raid'.  BTRFS has no data
> synching mechanism for raid,

Not completely the case though.
Discussed in another thread, for nodatacow/nodatasum case we indeed
don't have any anyway to keep data correct.

But for RAID1 datacow or metadata case, it should not be case.
For tree block, we have generation/first_key/level check done when
searching tree blocks.
And for scrub, we also have generation check, so in theory we could
recovery such problem during scrub.

For data, since we have cow (along with csum), it should be no problem
to recover.

And since datacow is used, transaction on each device should be atomic,
thus we should be able to handle one-time device out-of-sync case.
(For multiple out-of-sync events, we don't have any good way though).

Or did I miss something from previous discussion?

Thanks,
Qu

> so if your mirrors end up different
> somehow, your Array is going to be inconsistent.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-08-02  8:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  3:45 BTRFS and databases MegaBrutal
2018-08-01  8:48 ` Duncan
2018-08-01  8:56 ` Hugo Mills
2018-08-02  9:16   ` Martin Steigerwald
2018-08-02 10:15     ` ein
2018-08-02 10:35     ` Andrei Borzenkov
2018-08-02 10:42       ` Martin Steigerwald
2018-08-02 10:53       ` Qu Wenruo
2018-08-01  8:59 ` Mike Fleetwood
2018-08-01 11:21 ` Adam Borowski
2018-08-01 12:19 ` Austin S. Hemmelgarn
2018-08-01 14:33 ` Remi Gauvin
2018-08-02  7:07   ` Qu Wenruo [this message]
2018-08-02 12:32     ` Remi Gauvin
2018-08-02  7:02 ` Qu Wenruo
2018-08-02 10:45   ` Andrei Borzenkov
2018-08-02 10:56     ` Qu Wenruo
2018-08-02 12:27       ` Austin S. Hemmelgarn
2018-08-02 13:14         ` Martin Raiber

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=46d12c3f-9756-99be-a99c-75af5acc3296@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=megabrutal@gmail.com \
    --cc=remi@georgianit.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.