linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Nikolaus Jeremic <jeremic@informatik.uni-rostock.de>,
	linux-raid@vger.kernel.org
Subject: Re: RAID 6 reads all remaining chunks in a stripe when a single chunk is rewritten
Date: Tue, 17 Dec 2013 08:39:16 -0500	[thread overview]
Message-ID: <52B05404.7010806@turmel.org> (raw)
In-Reply-To: <52B02A08.4090007@informatik.uni-rostock.de>

On 12/17/2013 05:40 AM, Nikolaus Jeremic wrote:
> Hi,
> 
> I've did some Linux MD RAID 5 and 6 random write performance tests with
> fio 2.1.2 (Flexible I/O tester) under Linux 3.12.4. However, the results
> for RAID 6 show that writes to a single chunk in a stripe (chunk size is
> 64 KB) result in more than 3 reads in case of more than 6 drives (tested
> with 7, 8, and 9 drives) in the array (see fio statistics below). It
> seems like that in the event of updating one data chunk in a stripe, all
> of the remaining data chunks are read.
> 
> By the way, in case of RAID 5 and 5 or more drives, the remaining chunks
> seem not to be read when updating a single chunk in a stripe.

This is not a bug.  When writing to a small part of a stripe, the parity
must be recomputed for the whole stripe, causing MD to read the rest of
the stripe.

However, it is mathematically possible to compute the new parity given
the new data, old data, and the old parity.  This is a simple
computation for raid5 and this shortcut has been implemented.

The similar shortcut computation for raid6 has been discussed, but
no-one has provided a patch.  (It is not so simple.)  I suspect a patch
would be welcome. :-)

HTH,

Phil

  parent reply	other threads:[~2013-12-17 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 10:40 RAID 6 reads all remaining chunks in a stripe when a single chunk is rewritten Nikolaus Jeremic
2013-12-17 13:02 ` Stan Hoeppner
2013-12-17 13:39 ` Phil Turmel [this message]
2013-12-17 13:51 ` Peter Grandi

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=52B05404.7010806@turmel.org \
    --to=philip@turmel.org \
    --cc=jeremic@informatik.uni-rostock.de \
    --cc=linux-raid@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).