All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: MegaBrutal <megabrutal@gmail.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS and databases
Date: Thu, 2 Aug 2018 18:56:25 +0800	[thread overview]
Message-ID: <4f670d3d-5586-5a34-d043-3015e180cb52@gmx.com> (raw)
In-Reply-To: <940C43FD-9710-4DAC-937E-6BE290A7A6F6@gmail.com>


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



On 2018年08月02日 18:45, Andrei Borzenkov wrote:
> 
> 
> Отправлено с iPhone
> 
>> 2 авг. 2018 г., в 10:02, Qu Wenruo <quwenruo.btrfs@gmx.com> написал(а):
>>
>>
>>
>>> On 2018年08月01日 11:45, MegaBrutal wrote:
>>> Hi all,
>>>
>>> I know it's a decade-old question, but I'd like to hear your thoughts
>>> of today. By now, I became a heavy BTRFS user. Almost everywhere I use
>>> BTRFS, except in situations when it is obvious there is no benefit
>>> (e.g. /var/log, /boot). At home, all my desktop, laptop and server
>>> computers are mainly running on BTRFS with only a few file systems on
>>> ext4. I even installed BTRFS in corporate productive systems (in those
>>> cases, the systems were mainly on ext4; but there were some specific
>>> file systems those exploited BTRFS features).
>>>
>>> But there is still one question that I can't get over: if you store a
>>> database (e.g. MySQL), would you prefer having a BTRFS volume mounted
>>> with nodatacow, or would you just simply use ext4?
>>>
>>> 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?
>>
>> Since I'm not a expert in database, so I can totally be wrong, but what
>> about completely disabling database write-ahead-log (WAL), and let
>> btrfs' data CoW to handle data consistency completely?
>>
> 
> This would make content of database after crash completely unpredictable, thus making it impossible to reliably roll back transaction.

Btrfs itself (with datacow) can ensure the fs is updated completely.

That's to say, even a crash happens, the content of the fs will be the
same state as previous btrfs transaction (btrfs sync).

Thus there is no need to rollback database transaction though.
(Unless database transaction is not sync to btrfs transaction)

Thanks,
Qu

> 
> 
>> If there is some concern about the commit interval, it could be tuned by
>> commit= mount option.
>>
>> It may either lead to super unexpected fast behavior, or some unknown
>> disaster. (And for latter, we at least could get some interesting
>> feedback and bugs to fix)
>>
>> Thanks,
>> Qu
>>
>>>
>>>
>>> Kind regards,
>>> MegaBrutal
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>


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

  reply	other threads:[~2018-08-02 12:47 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
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 [this message]
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=4f670d3d-5586-5a34-d043-3015e180cb52@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=arvidjaar@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=megabrutal@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 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.