linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Jakob Oestergaard <jakob@unthought.net>
Cc: Neil Brown <neilb@cse.unsw.edu.au>, linux-raid@vger.kernel.org
Subject: Re: RAID-6
Date: Wed, 13 Nov 2002 09:33:27 -0800	[thread overview]
Message-ID: <3DD28CE7.6090704@zytor.com> (raw)
In-Reply-To: 20021113122957.GE22407@unthought.net

Jakob Oestergaard wrote:
>>
>>When doing sequential writes, a small chunk size means you are more
>>likely to fill up a whole stripe before data is flushed to disk, so it
>>is very possible that you wont need to pre-read parity at all.  With a
>>larger chunksize, it is more likely that you will have to write, and
>>possibly read, the parity block several times.
> 
> Except if one worked on 4k sub-chunks - right  ?   :)
> 

No.  You probably want to look at the difference between RAID-3 and 
RAID-4 (RAID-5 being basically RAID-4 twisted around in a rotating pattern.)

> 
> So, by making a big chunk-sized array, and having it work on 4k
> sub-chunks for writes, was some idea I had which I felt would just give
> the best scenario in both cases.
> 
> Am I smoking crack, or ?  ;)
> 

No, you're confusing RAID-3 and RAID-4/5.  In RAID-3, sequential blocks 
are organized as:

	DISKS ------------------------------------>
	 0	 1	 2	 3	PARITY
	 4	 5	 6	 7	PARITY
	 8	 9	10	11	PARITY
	12	13	14	15	PARITY

... whereas in RAID-4 with a chunk size of four blocks it's:

	DISKS ------------------------------------>
	 0	 4	 8	12	PARITY
	 1	 5	 9	13	PARITY
	 2	 6	10	14	PARITY
	 3	 7	11	15	PARITY

If you only write blocks 0-3 you *have* to read in the 12 data blocks 
and write out all 4 parity blocks, whereas in RAID-3 you can get away 
with only writing 5 blocks.  [Well, technically you could also do a 
read-modify-write on the parity, since parity is linear.  This would 
greatly complicate the code.]

Therefore, for small sequential writes chunking is *inherently* a lose, 
and there isn't much you can do about it.

	-hpa



  reply	other threads:[~2002-11-13 17:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-11 18:52 RAID-6 H. Peter Anvin
2002-11-11 21:06 ` RAID-6 Derek Vadala
2002-11-11 22:44 ` RAID-6 Mr. James W. Laferriere
2002-11-11 23:05   ` RAID-6 H. Peter Anvin
2002-11-12 16:22 ` RAID-6 Jakob Oestergaard
2002-11-12 16:30   ` RAID-6 H. Peter Anvin
2002-11-12 19:01     ` RAID-6 H. Peter Anvin
2002-11-12 19:37   ` RAID-6 Neil Brown
2002-11-13  2:13     ` RAID-6 Jakob Oestergaard
2002-11-13  3:33       ` RAID-6 Neil Brown
2002-11-13 12:29         ` RAID-6 Jakob Oestergaard
2002-11-13 17:33           ` H. Peter Anvin [this message]
2002-11-13 18:07             ` RAID-6 Peter L. Ashford
2002-11-13 22:50             ` RAID-6 Neil Brown
2002-11-13 18:42           ` RAID-6 Peter L. Ashford
2002-11-13 22:48           ` RAID-6 Neil Brown
     [not found] <Pine.GSO.4.30.0211111138080.15590-100000@multivac.sdsc.edu>
2002-11-11 19:47 ` RAID-6 H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2005-11-13  9:05 Raid-6 Rebuild question Brad Campbell
2005-11-13 10:05 ` Neil Brown
2005-11-16 17:54   ` RAID-6 Bill Davidsen
2005-11-16 20:39     ` RAID-6 Dan Stromberg
2005-12-29 18:29       ` RAID-6 H. Peter Anvin

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=3DD28CE7.6090704@zytor.com \
    --to=hpa@zytor.com \
    --cc=jakob@unthought.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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).