From: Benjamin Davenport <ben@monkeysushi.net>
To: Liang Yang <multisyncfe991@hotmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Questions about the speed when MD-RAID array is being initialized.
Date: Fri, 11 May 2007 21:24:12 -0500 [thread overview]
Message-ID: <4645254C.6000802@monkeysushi.net> (raw)
In-Reply-To: <BAY125-DAV2F4ABCF54BCB7458BA3D7933A0@phx.gbl>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
When mdadm creates a raid5 array, it creates it in degraded mode. Then it kicks
in the last device and runs the rebuild code, which reads from the other n-1
disks and writes to the nth disk as appropriate to satisfy parity requirements.
This allows you to max out the write bandwidth on a single disk, and is the
quickest way to make the array consistent.
The speed reported by mdstat is the speed at which the array resync is
completing. That is, it is the speed at which new areas of the disk are being
brought into a consistent state. Because that speed is, absent other IO or high
CPU load or other constraint, limited by the write bandwidth of your disk,
that's what you're seeing. The speed decreases as you progress across the disk
because the disk's write speed decreases across the disk.
If you run iostat, you'll see that one of the raid's component disks is
sequentially writing and the others are sequentially reading, all at the same
speed (modulo a small amount of jitter caused by quantized timing). If you
think about the algorithm involved, there's no faster way to do it, despite your
initial gut feeling that an 8-disk array should be able to resync faster than that.
- -Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRSVMcsocGMHJ2H8RCt8mAKCYPDi6t0Zi4ZKxiJvWSg26L3vsoACfS3MD
J8JTSSL3AukSprVlpLTJr50=
=YZrE
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2007-05-12 2:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 17:04 "No such device" on --remove Benjamin Schieder
2007-05-08 18:22 ` Michael Tokarev
2007-05-09 11:42 ` Bernd Schubert
2007-05-09 21:23 ` Michael Tokarev
2007-05-10 5:28 ` Benjamin Schieder
2007-05-10 21:09 ` Questions about the speed when MD-RAID array is being initialized Liang Yang
2007-05-10 21:33 ` Justin Piszcz
2007-05-10 21:38 ` Liang Yang
2007-05-10 21:44 ` Justin Piszcz
2007-05-10 23:03 ` Robin Hill
2007-05-12 2:24 ` Benjamin Davenport [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=4645254C.6000802@monkeysushi.net \
--to=ben@monkeysushi.net \
--cc=linux-raid@vger.kernel.org \
--cc=multisyncfe991@hotmail.com \
/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).