From: NeilBrown <neilb@suse.com>
To: Anthony Youngman <antlists@youngman.org.uk>,
Phil Turmel <philip@turmel.org>,
linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Wiki, raid 10, and my new system :-)
Date: Wed, 18 Oct 2017 08:01:59 +1100 [thread overview]
Message-ID: <878tg9jxo8.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <0c360057-f616-dcee-5f0a-59e12cb6ab43@youngman.org.uk>
[-- Attachment #1: Type: text/plain, Size: 2556 bytes --]
On Tue, Oct 17 2017, Anthony Youngman wrote:
> On 17/10/17 20:04, Phil Turmel wrote:
>> No, it is*wrong*. Writes in multiples of 4k and entirely within a
>> chunk are passes as-is to the devices. For mirrors, all affected
>> devices get a copy of the request. For parity raid, the 4k stripes
>> corresponding to those 4k blocks will be pulled into the stripe cache
>> for recalculation. Not whole chunk-size stripes. The stripe cache is
>> multiples of 4k, not multiples of the chunk size!
>>
>> Writes smaller than 4k, or not aligned to 4k, will generate a
>> read-modify-write cycle of the 4k block involved. Not the whole chunk.
>>
>> It is more accurate to say that a chunk may be the*largest* a request
>> can be before it is split between devices.
>
> Okay, I think I need to update my understanding on this ... :-)
>
> Let's say a chunk is 12K. That's three 4K blocks to drive 1, followed by
> three to drive 2 etc. Does that mean that each chunk is split across
> three stripes, or is the stripe all the 12K chunks one per drive?
RAID5 would not allow a 12K chunk size (must be power of 2) but RAID0
would. Not sure about RAID10.
I interpret "stripe" to mean "a set of chunks, one from each device".
So if you had a RAID10 with a 12K chunk size and 3 devices, then a
stripe would be 36K of space, 12K per device.
This is primarily an address-space mapping. Think of it as a function
from "array-address" to "device-index, device-address".
0 -> 0,0
512 -> 0,512
1024 -> 0,1024
....
3072 -> 1,0
3584 -> 1,512
....
No imagine that the application always sends 512 I/O requests. Each I/O
request is mapped through the above function and sent to the appropriate
device with the new address.
In practice, larger requests are allowed and the a split into
sub-requests if the function isn't contiguous for the whole range of a
particular request.
>
> In other words, does a stripe consist of one block per drive, or one
> chunk per drive?
One chunk per drive.
Note that inside the md/raid5 code the word "stripe" usually means one
PAGE per drive. This is an unfortunately historical accident. I
sometimes use the word "strip" (no 'e') to mean one page (or one block)
per device. A strip is not contiguous in the array address space. A
stripe is.
Thanks,
NeilBrown
>
> (I'll put a "sic" on that page then, just to point out it's a
> misunderstanding by the original author. As I said, I'd rather not mess
> around with the page now.)
>
> Cheers,
> Wol
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-10-17 21:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 13:54 Wiki, raid 10, and my new system :-) Wols Lists
2017-10-16 14:26 ` Reindl Harald
2017-10-17 0:33 ` NeilBrown
2017-10-17 18:32 ` Anthony Youngman
2017-10-17 19:04 ` Phil Turmel
2017-10-17 20:43 ` Anthony Youngman
2017-10-17 20:57 ` Phil Turmel
2017-10-17 21:01 ` NeilBrown [this message]
2017-10-17 20:14 ` NeilBrown
2017-10-17 0:42 ` NeilBrown
2017-10-20 0:55 ` Wols Lists
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=878tg9jxo8.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=antlists@youngman.org.uk \
--cc=linux-raid@vger.kernel.org \
--cc=philip@turmel.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).