All of lore.kernel.org
 help / color / mirror / Atom feed
From: waxhead <waxhead@dirtcellar.net>
To: Hugo Mills <hugo@carfax.org.uk>,
	dsterba@suse.cz, Roman Mamedov <rm@romanrm.net>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: allow degenerate raid0/raid10
Date: Sat, 24 Jul 2021 13:49:30 +0200	[thread overview]
Message-ID: <374aeb6a-80ed-431c-46c8-79917c787cd4@dirtcellar.net> (raw)
In-Reply-To: <20210724112421.GB992@savella.carfax.org.uk>



Hugo Mills wrote:
> On Sat, Jul 24, 2021 at 01:04:19PM +0200, waxhead wrote:
>> David Sterba wrote:
>>
>>> Maybe it's still too new so nobody is used to it and we've always had
>>> problems with the raid naming scheme anyway.
>>
>> Some years ago (2018) there was some talk about a new naming scheme
>> https://marc.info/?l=linux-btrfs&m=136286324417767
>>
>> While technically spot on I found Hugo's naming scheme difficult. It was
>> based on this idea:
>> numCOPIESnumSTRIPESnumPARITY
>>
>> 1CmS1P = Raid5 or 1 copy, max stripes, 1 parity.
>>
>> I also do not agree with the use of 'copy'. The Oxford dictionary defines
>> 'copy' as "a thing that is made to be the same as something else, especially
>> a document or a work of art"
>>
>> And while some might argue that copying something on disk from memory makes
>> it a copy, it ceases to be a copy once the memory contents is erased. I
>> therefore think that replicas is a far better terminology.
>>
>> I earlier suggested Rnum.Snum.Pnum as a naming scheme which I think is far
>> more readable so if I may dare to be as bold....
>>
>> SINGLE  = R0.S0.P0 (no replicas, no stripes (any device), no parity)
>> DUP     = R1.S1.P0 (1 replica, 1 stripe (one device), no parity)
>> RAID0   = R0.Sm.P0 (no replicas, max stripes, no parity)
>> RAID1   = R1.S0.P0 (1 replica, no stripes (any device), no parity)
>> RAID1c2 = R2.S0.P0 (2 replicas, no stripes (any device), no parity)
>> RAID1c3 = R3.S0.P0 (3 replicas, no stripes (any device), no parity)
>> RAID10  = R1.Sm.P0 (1 replica, max stripes, no parity)
>> RAID5   = R0.Sm.P1 (no replicas, max stripes, 1 parity)
>> RAID5   = R0.Sm.P2 (no replicas, max stripes, 2 parity)
>>
>> This (or Hugo's) type of naming scheme would also easily allow add more
>> exotic configuration such as S5 e.g. stripe over 5 devices in a 10 device
>> storage system which could increase throughput for certain workloads
>> (because it leaves half the storage devices "free" for other jobs)
>> A variant of RAID5 behaving like RAID10 would simply be R1.Sm.P1. Easy
>> peasy...  And just for the record , the old RAID terminology should of
>> course work for compatibility reasons, but ideally should not be advertised
>> at all.
>>
>> Sorry for completely derailing the topic, but I felt it was important to
>> bring up (and I admit to be overenthusiastic about it). :)
> 
>     I'd go along with that scheme, with one minor modification -- make
> the leading letters lower-case. The choice of lower-case letters in my
> original scheme was deliberate, as it breaks up the sequence and is
> much easier to pick out the most important parts (the numbers) from
> the mere positional markers (the letters).
> 
>     Also, the "M" (caps, because it's equivalent to the large numbers)
> in stripes wasn't for "max", but simply the conventional mathematical
> "m" -- some number acting as a limit to a counter (as in, "we have n
> copies with m stripes and p parity stripes").
> 
>     Hugo.
> 
Agree. Lowercase r0.s0.p0 / r1.sM.p2 is more readable indeed.
I insist on the dots between for separators as this would make possibly 
future fantasy things such as rmin-max e.g. r2-4.sM.p0 more readable.

(in my fantasy world: r2-6 would mean 6 replicas where all can 
automatically be deleted except 2 if the filesystem runs low on space. 
Would make parallel read potentially super fast as long as there is 
plenty of free space on the filesystem plus increase redundancy. Free 
space is wasted space (just like with memory so it might as well be used 
for something useful)

  reply	other threads:[~2021-07-24 11:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 19:29 [PATCH] btrfs: allow degenerate raid0/raid10 David Sterba
2021-07-22 22:51 ` Qu Wenruo
2021-07-23 14:08   ` David Sterba
2021-07-23 17:27     ` Roman Mamedov
2021-07-23 19:21       ` David Sterba
2021-07-24 11:04         ` waxhead
2021-07-24 11:24           ` Hugo Mills
2021-07-24 11:49             ` waxhead [this message]
2021-07-24 11:55               ` Hugo Mills
2021-07-24 12:07                 ` waxhead
2021-07-24 12:30           ` Hugo Mills
2021-07-24 13:54             ` Forza
2021-07-24 21:15               ` Zygo Blaxell
2021-07-24 22:25             ` waxhead
2021-07-23 22:35     ` Qu Wenruo
2021-07-24 21:31   ` Zygo Blaxell

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=374aeb6a-80ed-431c-46c8-79917c787cd4@dirtcellar.net \
    --to=waxhead@dirtcellar.net \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=rm@romanrm.net \
    /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.