linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Christopher Chen <muffaleta@gmail.com>
Cc: Kasper Sandberg <postmaster@metanurb.dk>, linux-raid@vger.kernel.org
Subject: Re: raid10 layout for 2xSSDs
Date: Tue, 17 Nov 2009 05:46:25 +0100	[thread overview]
Message-ID: <87pr7hlpwe.fsf@frosties.localdomain> (raw)
In-Reply-To: <7bc80d500911160808o4ca4d335gdeeb50fff61b2149@mail.gmail.com> (Christopher Chen's message of "Mon, 16 Nov 2009 08:08:49 -0800")

Christopher Chen <muffaleta@gmail.com> writes:

> On Mon, Nov 16, 2009 at 6:29 AM, Kasper Sandberg <postmaster@metanurb.dk> wrote:
>> Hello.
>>
>> I've been wanting to create a raid10 array of two SSDs, and I am
>> currently considering the layout.
>>
>> As i understand it, near layout is similar to raid1, and will only
>> provide a speedup if theres 2 reads at the same time, not a single
>> sequential read.
>>
>> so the choice is really between far and offset. As i see it, the
>> difference is, that offset tries to reduce the seeking for writing
>> compared to far, but that if you dont consider the seeking penalty,
>> average sequential write speed across the entire array should be roughly
>> the same with offset and far, with offset perhaps being a tad more
>> "stable", is this a correct assumption? if it is, that would mean offset
>> provides a higher "garantueed" speed than far, but with a lower maximum
>> speed.
>
> Do you plan to have more than two devices in the array? Raid 10 isn't
> magic. If you don't have more than do devices, I suppose your seek
> time might be half for reads (and higher for writes), but you won't be
> able to do any striping.
>
> I'm a bit confused as to the number of people popping in recently
> wanting to run raid 10 on two disk "arrays".
>
> cc

I think you are missing the fact that linux has a special raid10
module. This is not just a raid0 over raid1 (or raid1 over raid0).
The raid10 module is much more flexible and allows to have X copies of
the data on Y disks (for any X <= Y) in different layouts.

The layouts are like this (for 2 copies on 2 disks):

near (same as raid1):

Disk A: 0 1 2 3 4 5 6 7 8 9
Disk B: 0 1 2 3 4 5 6 7 8 9 

offset:

Disk A: 0 1 2 3 4 5 6 7 8 9
Disk B: 1 0 3 2 5 4 7 6 9 8

far:

Disk A: 0 2 4 6 8 1 3 5 7 9
Disk B: 1 3 5 7 9 0 2 4 6 8

In the case of offset and far copies you can see that the data is
striped like in raid0 and the raid10 module will read data from
multiple drives in parallel even with a single stream.

In raid10 far mode the read will also (afaik, not 100% sure) always
come from the first half of the disk. With rotational disks that is
usualy the faster part. So you not only get double the read speed from
striping but also more speed from the disks itself. For example my
disk does 80MB/s at the start, 60MB/s in the middle and 40MB/s at the
end. Reads will only use the 80-60MB/s range now. Jupey.

MfG
        Goswin

      parent reply	other threads:[~2009-11-17  4:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 14:29 raid10 layout for 2xSSDs Kasper Sandberg
2009-11-16 15:26 ` Goswin von Brederlow
2009-11-16 16:13   ` Keld Jørn Simonsen
2009-11-17  4:34     ` Goswin von Brederlow
2009-11-17 15:05       ` Kasper Sandberg
2009-11-16 16:31   ` Robin Hill
2009-11-16 16:38     ` Christopher Chen
2009-11-16 16:52       ` Robin Hill
2009-11-17  4:36     ` Goswin von Brederlow
2009-11-16 16:08 ` Christopher Chen
2009-11-16 21:02   ` Kasper Sandberg
2009-11-16 21:19     ` Majed B.
2009-11-16 21:33       ` Kasper Sandberg
2009-11-17  4:46   ` Goswin von Brederlow [this message]

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=87pr7hlpwe.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=muffaleta@gmail.com \
    --cc=postmaster@metanurb.dk \
    /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).