All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: for.poige+linux@gmail.com
Cc: linux-raid@vger.kernel.org
Subject: Re: Hi! Why having LSR's chunk size 2^n limitation?
Date: Wed, 19 Jan 2011 06:44:57 +1100	[thread overview]
Message-ID: <20110119064457.5ab8bdd0@notabene.brown> (raw)
In-Reply-To: <AANLkTi=Nk_4vNH5BpHj5fMJxOaSAGjuiSD8agbACdzaQ@mail.gmail.com>

On Tue, 18 Jan 2011 22:59:07 +0700 Igor Podlesny <for.poige+linux@gmail.com>
wrote:

>    I had experience of using FreeBSD's vinum (another software RAID).
> Its author, Greg Lehey, stated in vinum's manual: "... A good
> guideline for stripe size is between 256 kB and 512 kB.  Avoid powers
> of 2, however: they tend to cause all superblocks to be placed on the
> first subdisk. ..."
> 
>    Meanwhile, with LSR we're given exactly 2^n choices, for e. g.,
> neither 768 KiB, nor 387 KiB won't go: "mdadm: invalid chunk/rounding
> value: 387".
> 
>    So, why... ($Subj) and how complex would it be to abolish this
> restriction? I think this could be a key to performance increase.
> 
>    P. S. Thanks a ton for LSR, Neil, BTW. :-)
> 

1/ The rationale given by Greg for non-power-of-two chunk sizes is not so
 relevant for Linux I think.  The more common filesystems  can be told that
 the device is a RAID and can deliberately offset the extra super blocks so
 they don't all end up on the one device.

2/ Power-off-two is required simply because it was easier to code.  The
  restriction was dropped for RAID0 a year or more ago.  The restriction 
  could be dropped for RAID4/5/6 and RAID10 relatively easily.  It would just
  require a thorough code review and changing a few 'mask' and 'shift'
  operations to divisions.

3/ You are welcome.

NeilBrown



  parent reply	other threads:[~2011-01-18 19:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 15:59 Hi! Why having LSR's chunk size 2^n limitation? Igor Podlesny
2011-01-18 16:46 ` Roberto Spadim
2011-01-18 16:48   ` Roberto Spadim
2011-01-18 16:53     ` Igor Podlesny
2011-01-18 16:59       ` Roberto Spadim
2011-01-18 17:06         ` Roberto Spadim
2011-01-18 17:11 ` John Robinson
2011-01-18 17:22   ` Roberto Spadim
2011-01-18 17:23   ` Igor Podlesny
2011-01-18 18:05     ` John Robinson
2011-01-18 18:24       ` Igor Podlesny
2011-01-18 18:53         ` Roberto Spadim
2011-01-18 19:44 ` NeilBrown [this message]
2011-01-18 20:20   ` Roberto Spadim
2011-01-19  7:41   ` Igor Podlesny
2011-01-19  9:32     ` NeilBrown
2011-01-19  9:34       ` Igor Podlesny

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=20110119064457.5ab8bdd0@notabene.brown \
    --to=neilb@suse.de \
    --cc=for.poige+linux@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.