linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: waxhead <waxhead@dirtcellar.net>
To: Anand Jain <anand.jain@oracle.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: BTRFS subvolume RAID level
Date: Tue, 3 Dec 2019 21:31:58 +0100	[thread overview]
Message-ID: <5297ba43-366f-241c-1934-783686a058c8@dirtcellar.net> (raw)
In-Reply-To: <422a04ba-2e63-f951-7097-19ecc7a88c53@oracle.com>



Anand Jain wrote:
> 
> 
> On 12/3/19 7:27 AM, waxhead wrote:
>>
>>
>> Anand Jain wrote:
>>>
>>>> I imagine that RAIDc4 for example could potentially give a grotesque 
>>>> speed increase for parallel read operations once BTRFS learns to 
>>>> distribute reads to the device with the least waitqueue / fastest 
>>>> devices.
>>>
>>>   That exactly was the objective of the Readmirror patch in the ML.
>>>   It proposed a framework to change the readmirror policy as needed.
>>>
>>> Thanks, Anand
>>
>> Indeed. If I remember correctly your patch allowed for deterministic 
>> reading from certain devices.
>   It provides a framework to configure the readmirror policies. And the
>   policies can be based on io-depth, pid, or manual for heterogeneous
>   devices with different latency.
> 
>> As just a regular btrfs user the problem I see with this is that you 
>> loose a "potential free scrub" that *might* otherwise happen from 
>> often read data. On the other hand that is what manual scrubbing is 
>> for anyway.
> 
>   Ha ha.
> 
>   When it comes to data and its reliability and availability we need
>   guarantee and only deterministic approach can provide it.
> 
Uhm , what I meant was that if someone sets a readmirror policy to read 
from the fastest devices in for example RAID1 and a copy exists on both 
a harddrive, and a SSD device and reads are served from the fastest 
drive (SSD) then you will never get a "accidental" read on the harddrive 
and therefore making scrubbing absolutely necessary (which it actually 
is anyway).

In other words for sloppy sysadmins, if you read data often then the 
hottest data is likely to have both copies read. If you set a policy 
that prefer to always read from SSD's it could happen that the poor 
harddrive is never "checked".

>   What you are asking for is to route the particular block to
>   the device which was not read before so to avoid scrubbing or to
>   make scrubbing more intelligent to scrub only old never read blocks
>   - this will be challenging we need to keep history of block and the
>   device it used for read - most likely a scope for the bpf based
>   external tools but definitely not with in kernel. With in kernel
>   we can create readmirror like framework so that external tool can
>   achieve it.

 From what I remember from my prevous post (I am too lazy to look it up) 
I was hoping that subvolumes could be assigned or "prioritized" to 
certain devices e.g. device groups. Which means that you could put all 
SSD's of a certain speed in one group, all harddrives in another group 
and NVMe storage devices in yet another group. Or you could put all 
devices on a certain JBOD controller board on it's own group. That way 
BTRFS could have prioritized to store certain subvolumes on a certain 
group and/or even allowing to migrate (balance) to antoher group. If you 
run out of space you can always distribute across other groups and to 
magic things there ;)

Not that I have anything against the readmirror policy , but I think 
this approach would be a lot more ideal.

> 
> 
> Thanks, Anand

  reply	other threads:[~2019-12-03 20:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 22:48 BTRFS subvolume RAID level waxhead
2019-11-29  0:44 ` Qu Wenruo
2019-12-02 10:48 ` Anand Jain
2019-12-02 23:27   ` waxhead
2019-12-03  1:30     ` Anand Jain
2019-12-03 20:31       ` waxhead [this message]
2019-12-05 12:10         ` Anand Jain

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=5297ba43-366f-241c-1934-783686a058c8@dirtcellar.net \
    --to=waxhead@dirtcellar.net \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).