linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linux Raid Study <linuxraid.study@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: Robin Hill <robin@robinhill.me.uk>, linux-raid@vger.kernel.org
Subject: Re: iostat with raid device...
Date: Mon, 11 Apr 2011 18:57:34 -0700	[thread overview]
Message-ID: <BANLkTinFxHPuCgxERGc88W2KmZkzU_GF9Q@mail.gmail.com> (raw)
In-Reply-To: <20110411201808.47cd19d5@notabene.brown>

If I use --assume-clean in mdadm, I see performance is 10-15% lower as
compared to the case wherein this option is not specified. When I run
without --assume_clean, I wait until mdadm prints "recovery_done" and
then run IO benchmarks...

Is perf drop expected?

Thanks.

On Mon, Apr 11, 2011 at 3:18 AM, NeilBrown <neilb@suse.de> wrote:
> On Mon, 11 Apr 2011 10:53:55 +0100 Robin Hill <robin@robinhill.me.uk> wrote:
>
>> On Mon Apr 11, 2011 at 02:36:50AM -0700, Linux Raid Study wrote:
>> > On Mon, Apr 11, 2011 at 2:25 AM, Robin Hill <robin@robinhill.me.uk> wrote:
>> > > On Mon Apr 11, 2011 at 01:32:34 -0700, Linux Raid Study wrote:
>> > >> On Sat, Apr 9, 2011 at 1:50 AM, Robin Hill <robin@robinhill.me.uk> wrote:
>> > >> > On Fri Apr 08, 2011 at 05:40:46PM -0700, Linux Raid Study wrote:
>> > >> >
>> > >> >> What I'm not sure of is if the device is newly formatted, would raid
>> > >> >> recovery happen? What else could explain difference in the first run
>> > >> >> of IO benchmark?
>> > >> >>
>> > >> > When an array is first created, it's created in a degraded state - this
>> > >> > is the simplest way to make it available to the user instantly. The
>> > >> > final drive(s) are then automatically rebuilt, calculating the
>> > >> > parity/data information as normal for recovering a drive.
>> > >> >
>> > >> Thanks. So, the uneven (unequal) distribution of Wrtie/Sec numbers in
>> > >> the iostat output are ok...is that correct?
>> > >>
>> > > If it hadn't completed the initial recovery, yes.  If it _had_ completed
>> > > the initial recovery then I'd expect writes to be balanced (barring
>> > > any differences in hardware).
>> > >
>> > The initial recovery should normally be done during first few minutes
>> > .... this is a newly formatted disk so there isn't any user data
>> > there. So, if I run the IO benchmark after say 3-4 min of doing, I
>> > should be ok?
>> >
>> > mdam --create /dev/md0 --raid5....
>> > mount /dev/md0 /mnt/raid
>> > mkfs.ext4 /mnt/raid
>> >
>> > ...wait 3-4 min
>> >
>> > run IO benchmark...
>> >
>> > Am I correct?
>> >
>> No, depending on the size of the drives, the initial recovery can take
>> hours or even days. For RAID5 with N drives, it needs to read the
>> entirity of (N-1) drives, and write the entirity of the remaining drive
>> (whether there's any data or not, the initial state of the drives is
>> unknown so parity data has to be calculated for the entire array).
>>
>> Check /proc/mdstat and wait until the array has completed resync before
>> running any benchmarks.
>
> or run
>  mdadm --wait /dev/md0
>
> or create the array with --assume-clean.  But if the array is raid5, don't
> trust the data if a device fails:  use this only for testing.
>
> NeilBrown
>
>
>>
>> Cheers,
>>     Robin
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-04-12  1:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 19:55 iostat with raid device Linux Raid Study
2011-04-08 22:05 ` Roberto Spadim
2011-04-08 22:10   ` Linux Raid Study
2011-04-08 23:46 ` NeilBrown
2011-04-09  0:40   ` Linux Raid Study
2011-04-09  8:50     ` Robin Hill
2011-04-11  8:32       ` Linux Raid Study
2011-04-11  9:25         ` Robin Hill
2011-04-11  9:36           ` Linux Raid Study
2011-04-11  9:53             ` Robin Hill
2011-04-11 10:18               ` NeilBrown
2011-04-12  1:57                 ` Linux Raid Study [this message]
2011-04-12  2:51                   ` NeilBrown
2011-04-12 19:36                     ` Linux Raid Study
2011-04-13 18:21                       ` Linux Raid Study
2011-04-13 21:00                         ` NeilBrown

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=BANLkTinFxHPuCgxERGc88W2KmZkzU_GF9Q@mail.gmail.com \
    --to=linuxraid.study@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=robin@robinhill.me.uk \
    /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).