linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stan Hoeppner <stan@hardwarefreak.com>
To: Mark Knecht <markknecht@gmail.com>
Cc: Roy Sigurd Karlsbakk <roy@karlsbakk.net>,
	Jeff Johnson <jeff.johnson@aeoncomputing.com>,
	Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: Possible to change chunk size on RAID-1 without re-init or destructive result?
Date: Wed, 27 Mar 2013 17:08:29 -0500	[thread overview]
Message-ID: <51536DDD.5010800@hardwarefreak.com> (raw)
In-Reply-To: <CAK2H+ecbcH-dqM6OAcip68-NkRf8w3eDC7ZCx0-QGteKURXvpw@mail.gmail.com>

On 3/27/2013 4:06 PM, Mark Knecht wrote:

> All that said, I still don't really know if I was starting over today
> how to choose a new chunk size. That still eludes me. I've sort of
> decided that's one of those things that make you guys pros and me just
> a user. :-)

Chunk size is mostly dictated by your workload IO patterns, and the
number and latency of your spindles.  If you're doing mostly small
random IOs, or mixed IOs, metadata heavy workloads, you typically want a
small chunk size, especially if the array is parity (5/6).  RMW is the
performance killer here so you want to minimize--a small chunk size does
this.  If you're doing mostly large streaming writes then you want a
larger chunk size to improve IO efficiency in the elevator and the
drive's write caches, command queuing, etc.  The filesystem you use, and
how it arranges inodes/extents across sectors, can play a role as well.

When in doubt, use a small chunk size.  The reason is this:  a large
chunk can drive small random IO performance into the dirt if you're
using parity or really low RPM low IOPS drives, but a small chunk will
not have anywhere close to the same negative impact on large streaming IO.

A 5 drive RE4 RAID6 array with a 16KB chunk, 48KB stripe, is about as
small as you'd want to go.  It's optimal for small random IO, but it's
probably a bit too small for a mixed workload, and definitely too small
for streaming.  With only 3 slow spindles, a 32KB or even 64KB chunk may
be more optimal, yielding a 96KB or 192KB stripe.  This depends, again,
on your workload(s).  If most of your write IOs are between 48-96KB then
use a 16KB chunk.  If most are between 96-192KB use a 32KB chunk.  If
between 192-384KB then use a 64KB chunk, and so on.

If you're using SSDs the game changes quite a bit as neither random IO
nor RMW latency is an issue.  With SSD, when in doubt, use a large chunk
size, preferably equal to the erase block size, or a power of 2 fraction
of it.

-- 
Stan


  reply	other threads:[~2013-03-27 22:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27  5:30 Possible to change chunk size on RAID-1 without re-init or destructive result? Jeff Johnson
2013-03-27  5:56 ` Mikael Abrahamsson
2013-03-27  6:02 ` Roman Mamedov
2013-03-27 16:01 ` Roy Sigurd Karlsbakk
2013-03-27 16:23   ` Jeff Johnson
2013-03-27 16:44     ` Roman Mamedov
2013-03-27 19:36     ` Stan Hoeppner
2013-03-27 19:11   ` Stan Hoeppner
2013-03-27 19:23     ` Mark Knecht
2013-03-27 20:10       ` Stan Hoeppner
2013-03-27 21:06         ` Mark Knecht
2013-03-27 22:08           ` Stan Hoeppner [this message]
2013-03-27 22:18             ` Mark Knecht
2013-03-31 15:56               ` Stan Hoeppner
2013-03-31 17:15                 ` Mark Knecht
2013-03-31 17:41                   ` Stan Hoeppner
2013-03-31 17:56                     ` Mark Knecht
2013-04-01  0:28                       ` Stan Hoeppner
2013-04-01 16:46                         ` Mark Knecht
2013-04-02  1:15                           ` Brad Campbell

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=51536DDD.5010800@hardwarefreak.com \
    --to=stan@hardwarefreak.com \
    --cc=jeff.johnson@aeoncomputing.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=markknecht@gmail.com \
    --cc=roy@karlsbakk.net \
    /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).