linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Aaron Sowry <aaron@cendio.se>
Cc: linux-raid@vger.kernel.org
Subject: Re: RAID10 Performance
Date: Wed, 2 Mar 2011 22:16:02 +1100	[thread overview]
Message-ID: <20110302221602.52961e88@notabene.brown> (raw)
In-Reply-To: <4D6E04E7.6060605@cendio.se>

[-- Attachment #1: Type: text/plain, Size: 3105 bytes --]



On Wed, 02 Mar 2011 09:50:47 +0100 Aaron Sowry <aaron@cendio.se> wrote:

> Hello,
> 
> I have been testing different RAID configurations on a 2-disk setup, and
> have a couple of questions regarding performance. The information I have
> found online so far seems to contradict itself fairly regularly so I was
> hoping for a more coherent answer :)
> 
> 1) As I understand it, a RAID10 'near' configuration using two disks is
> essentially equivalent to a RAID1 configuration. Is this correct?

"equivalent" in that the data is stored in the same places.  However as
different code is used to access it, performances could be different.

> 
> 2) Does md RAID1 support 'striped' reads? If not, is RAID1 read
> performance in any way related to the number of disks in the array?

Not sure exactly what you mean by "striped" reads.  There is no concept of a
stripe in RAID1.
A single sequential read will tend to read from just one device.
Random reads will tend to use all devices.

> 
> 3) From what I have read so far, a RAID10 'far' configuration on 2 disks
> provides increased read performance over an equivalent 'near'
> configuration, however I am struggling to understand exactly why. I
> understand the difference between the 'near' and 'far' configurations,
> but not *why* this should provide any speed increases. What am I missing?

A sequential read on raid10-far2 will read from both devices in parallel
(once read-ahead kicks in or large enough reads are submitted).  So a single
sequential read from a RAID10-far2 should be (nearly) twice as fast as a
single sequential read from a RAID1 - as twice as many drives are used.

> 
> 4) I have performed a(n admittedly fairly basic) benchmark on the same
> system under two different configurations - RAID10,n2 and RAID10,f2
> using tiobench with default settings. In short, the results showed a
> significant speed increase for single-threaded sequential reads (83Mb/s
> vs 166MB/s), some increase for single-threaded random reads (1.85Mb/s vs
> 2.25Mb/s), but a decrease for every other metric, including
> multi-threaded sequential and random reads. I was expecting write
> performance to decrease slightly under RAID10,f2 compared to RAID10,n2,
> but am slightly confused about the multi-threaded read performance. Is
> it my expectations or my testing that needs to be reviewed?

If the  random reads are smaller than the chunk size and suitably aligned,
then you should get much the same performance - f2 might be a bit faster
because it always reads from the 'faster' region of the device.

If the random reads are larger than the chunk size, then each read will hit
both disks in f2, but only one disk in n2, so f2 will have more contention.

Writes (sequential or random) are certainly slower with f2 as the head keeps
seeking from one half of the device to the other.  Large chunk sizes will
reduce this a little.

What chunk size did you use?  What block size for random IO?
Do the results change as you vary these sizes?

NeilBrown


> 
> Cheers,
> Aaron
> 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2011-03-02 11:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02  8:50 RAID10 Performance Aaron Sowry
2011-03-02 11:16 ` NeilBrown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-03-02  9:04 Aaron Sowry
2011-03-02  9:24 ` Robin Hill
2011-03-02 10:14   ` Keld Jørn Simonsen
2011-03-02 14:42 ` Mark Knecht
2011-03-02 14:47   ` Mathias Burén
2011-03-02 15:02 ` Mario 'BitKoenig' Holbe
2012-07-26 14:16 Adam Goryachev
2012-07-27  7:07 ` Stan Hoeppner
2012-07-27 13:02   ` Adam Goryachev
2012-07-27 18:29     ` Stan Hoeppner
2012-07-28  6:36       ` Adam Goryachev
2012-07-28 15:33         ` Stan Hoeppner
2012-08-08  3:49           ` Adam Goryachev
2012-08-08 16:59             ` Stan Hoeppner
2012-08-08 17:14               ` Roberto Spadim
2012-08-09  1:00               ` Adam Goryachev
2012-08-09 22:37                 ` Stan Hoeppner
2012-07-27 12:05 ` Phil Turmel

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=20110302221602.52961e88@notabene.brown \
    --to=neilb@suse.de \
    --cc=aaron@cendio.se \
    --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).