Linux RAID subsystem development
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: Odd IO traffic during raid5 reshape
Date: Mon, 22 Apr 2013 08:26:33 +1000	[thread overview]
Message-ID: <20130422082633.6430312c@notabene.brown> (raw)
In-Reply-To: <20130418184822.GB16749@frosties>

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

On Thu, 18 Apr 2013 20:48:22 +0200 Goswin von Brederlow <goswin-v-b@web.de>
wrote:

> Hi,
> 
> I'm currently upgrading a NAS system with new disks. Since I'm
> changing the filesystem type and due to a lack of enough SATA ports I
> have to do add one new disk at a time, copy data, shrink the old
> filesystem, remove an old disks and repeat. I've started with a 2 disk
> raid5, copied data, freed a 3rd SATA slot and added the 3rd new disk.
> 
> Now I'm reshaping the new raid5 from 2 disks to 3 disks:
> 
> md0 : active raid5 sdd1[3] sdc1[2] sda1[0]
>       3907015168 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
>       [==>..................]  reshape = 14.0% (547848840/3907015168) finish=1355.4min speed=41302K/sec
> 
> so far everything works fine. But the speed is rather low and the IO
> traffic is higher than I think it should be:
> 
> Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
> sda             604.33     81706.00     40904.73    4902360    2454284
> md0               0.00         0.00         0.00          0          0
> sdc             440.78     81839.40     40542.07    4910364    2432524
> sdd             509.72         0.00     40817.67          0    2449060
> 
> To reshape the kernel needs to read 1 data block from sda, 1 data
> block from sdc, compute the XOR of both blocks and write 2 data blocks
> + parity block back to the 3 disks. The kernel read 160MB/s, add
> 80MB/s parity and it should write 240MB/s (or 80MB/s per disk).
> Instead it only writes 120MB/s (40MB/s per disk), only half of what I
> expect.
> 
> So what is going on there? Is the kernel reading both data and parity
> blocks and verifying them?

The kernel is reading data and parity.  Maybe it doesn't need to, but unless
your chunks are very big (10s of megatabyes?) reading takes about as long as
seeking over, so it is unlikely to affect total time.

Reshape simple is not a fast operation, nowhere near as fast as resync.
It needs to
  - read a few stripes
  - seek backward to where that data now belong
  - write the data as slightly fewer stripes
  - update the metadata to record where the data now is.
  - repeat

So there is lots of seeking.  md/raid5 tries to avoid unnecessary seeking,
but quite a bit of it is necessary.

It looks to me like it is performing quite well.

NeilBrown

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

  reply	other threads:[~2013-04-21 22:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 18:48 Odd IO traffic during raid5 reshape Goswin von Brederlow
2013-04-21 22:26 ` NeilBrown [this message]
2013-04-22  9:00   ` Goswin von Brederlow

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=20130422082633.6430312c@notabene.brown \
    --to=neilb@suse.de \
    --cc=goswin-v-b@web.de \
    --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