linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid5 parity algorithm
@ 2003-02-27 21:39 Stephan van Hienen
  2003-02-27 21:56 ` Paul Clements
  2003-02-28  5:46 ` Peter L. Ashford
  0 siblings, 2 replies; 3+ messages in thread
From: Stephan van Hienen @ 2003-02-27 21:39 UTC (permalink / raw)
  To: linux-raid

Options are: left-asymmetric, left-symmetric, right-asymmetric,
right-symmetric, la,  ra,  ls,  rs.
The default is left-symmetric.

What is the difference between this ?
and why do i want to use anything else than the default ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: raid5 parity algorithm
  2003-02-27 21:39 raid5 parity algorithm Stephan van Hienen
@ 2003-02-27 21:56 ` Paul Clements
  2003-02-28  5:46 ` Peter L. Ashford
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Clements @ 2003-02-27 21:56 UTC (permalink / raw)
  To: Stephan van Hienen; +Cc: linux-raid

Stephan van Hienen wrote:
> 
> Options are: left-asymmetric, left-symmetric, right-asymmetric,
> right-symmetric, la,  ra,  ls,  rs.
> The default is left-symmetric.
> 
> What is the difference between this ?
> and why do i want to use anything else than the default ?


Hi Stephan,

I'm forwarding a message that I posted to linux-kernel a little while
back...someone else had asked some very similar questions...I hope this
helps...

--
Paul


---------- Forwarded message ----------
Date: Thu, 16 Jan 2003 14:47:16 -0500 (EST)
From: Paul Clements <kernel@steeleye.com>
Reply-To: Paul.Clements@steeleye.com
To: Ezra Nugroho <ezran@goshen.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: raid 5 algorithm docs

On 16 Jan 2003, Ezra Nugroho wrote:

> I don't know if linux-raid mailing list is still active, the archive
> sites look very old...

Yes, linux-raid is still alive and kicking...
it's at: linux-raid@vger.kernel.org
 
> Raidtab's man page tells about left/right (a)synchronous algorithm, but
> doesn't tell how they differ.

I haven't seen much documentation either, but here's what I got from 
looking at the code (BTW, the relevant section of code is 
raid5.c:raid5_compute_sector(), if you're curious):

Basically, the left/right refers to how the parity information is laid 
out and the symmetric/asymmetric refers to how the data is laid out. 

The "left" algorithms start with parity on the last disk, moving the 
parity one disk closer to the first disk for each stripe (wrapping 
as necessary). The "right" algorithms do just the opposite, starting 
with parity on the first disk, moving it one disk closer to the last 
disk for each stripe (wrapping as necessary).

The "asymmetric" algorithms place the data blocks for a given stripe in 
simple sequential order, skipping over the parity block as necessary
and always starting with the first data block of a stripe on the 
first disk. The "symmetric" algorithms differ from this in that they
do not always place the first block of a stripe on the first disk,
but continue to lay out the data blocks in sequential disk order,
simply wrapping back to the first disk when it's necessary.
So the symmetric algorithms tend to give better performance on large
sequential reads, for example, since the actual disk reads are 
evenly spread across all disks.

There's a pretty good diagram of the left-symmetric disk layout here: 
www.pdl.cmu.edu/PDL-FTP/Declustering/ASPLOS.ps (see figure 2-1)

-- 
Paul Clements
Paul.Clements@SteelEye.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: raid5 parity algorithm
  2003-02-27 21:39 raid5 parity algorithm Stephan van Hienen
  2003-02-27 21:56 ` Paul Clements
@ 2003-02-28  5:46 ` Peter L. Ashford
  1 sibling, 0 replies; 3+ messages in thread
From: Peter L. Ashford @ 2003-02-28  5:46 UTC (permalink / raw)
  To: Stephan van Hienen; +Cc: linux-raid

Stephan,

> Options are: left-asymmetric, left-symmetric, right-asymmetric,
> right-symmetric, la,  ra,  ls,  rs.
> The default is left-symmetric.
>
> What is the difference between this ?

Please see 'http://www.accs.com/p_and_p/RAID/LinuxRAID.html'.  This short
web page provides examples of what the different parity algorithms do to
the segment layout on the disks.  It's easier to read than the code.

> and why do i want to use anything else than the default ?

There exist situations where production applications would be run against
the array.  If speed is CRITICAL, you might want to benchmark the parity
algorithms.  The non-default parity algorithms are more likely to generate
a speedup when the I/O is random.

I hope this helps.
				Peter Ashford


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-02-28  5:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-27 21:39 raid5 parity algorithm Stephan van Hienen
2003-02-27 21:56 ` Paul Clements
2003-02-28  5:46 ` Peter L. Ashford

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).