From: NeilBrown <neilb@suse.de>
To: CoolCold <coolthecold@gmail.com>
Cc: hochglanz@googlemail.com, hochglanz@gmail.com,
linux-raid@vger.kernel.org
Subject: Re: Device utilization with RAID-1
Date: Fri, 19 Aug 2011 10:31:35 +1000 [thread overview]
Message-ID: <20110819103135.5b6a3998@notabene.brown> (raw)
In-Reply-To: <CAGqmV7oDQ-LJVi04ZXx6b_hEdjJ6MNJBfoU-zLN5ZLohjygkXA@mail.gmail.com>
On Thu, 18 Aug 2011 17:44:19 +0400 CoolCold <coolthecold@gmail.com> wrote:
> On Thu, Aug 18, 2011 at 5:42 AM, NeilBrown <neilb@suse.de> wrote:
> > On Thu, 18 Aug 2011 02:26:17 +0200 Harald Nikolisin <hochglanz@gmail.com>
> > wrote:
> >
> >> hi,
> >>
> >> I didn't want to complain in general about SW RAID-1 performance. I
> >> simply think something is wrong with my setup and I have currently no
> >> idea how to improve.
> >>
> >> The basic questions (where I did not find an answer, neither in FAQ's
> >> nor in forum discussions) are.
> >> a) Is it normal that the hard drives show an permanent utilization
> >> (around 20%) without any noticeable actions on the computer?
> >
> > No. If the array is resyncing or recovering then you would expect
> > utilization for as many hours as it takes - but that would show
> > in /proc/mdstat.
> >
> >> b) Should (as long as no resync happens) the state of mdadm active or clean?
> >
> > If anything has been written to the device in the last 200msec (including
> > e.g. access time updates) then expect it to be 'active'.
> > If nothing has been written for 200msecc or more, then expect it to be clean.
> >
> > If you crash while it is active, a resync is needed.
> > If you crash while it is clean, no resync is needed.
> > If you don't crash at all .... that is best :-)
>
> I think this info should be wikified if not yet.
>
> btw, I've experimented a bit on my /boot array (it doesn't being
> updated, checked with iostat ), and:
> root@m2:~# for i in {1..5};do mdname="md0"; echo "iteration $i";
> (mdadm --detail /dev/$mdname|grep 'State ';cat
> /sys/block/$mdname/md/array_state;grep "$mdname :" /proc/mdstat);sleep
> 1;done
> iteration 1
> State : clean
> clean
> md0 : active raid1 sda1[0] sdb1[1]
> iteration 2
> State : clean
> clean
> md0 : active raid1 sda1[0] sdb1[1]
> iteration 3
> State : clean
> clean
> md0 : active raid1 sda1[0] sdb1[1]
> iteration 4
> State : clean
> clean
> md0 : active raid1 sda1[0] sdb1[1]
> iteration 5
> State : clean
> clean
> md0 : active raid1 sda1[0] sdb1[1]
>
> so, mdadm --detail & array_state shows array is "clean", while
> /proc/mdstat shows array is "active" (no reads/writes happen).
>
> Some value is lieing or being misunderdstanded by me...
In mdstat you have 'active' or 'inactive'. You cannot access an array at all
until it is active. If you are assembling an array bit by bit with "mdadm
-I", it will be inactive until all the devices appear. Then it will be
active.
In mdadm "State :" you have 'active' or 'clean'. as described above. It used
to be 'dirty' or 'clean' but people were confused by having 'dirty' arrays in
normal operation. So I changed it to 'active' and now it confuses a
different set of people. You just can't win can you :-)
NeilBrown
>
> >
> >
> >
> >>
> >> cheers,
> >> harald
> >>
> >> well, I have only 2 hard drives and no space for more..
> >>
> >> Am 16.08.2011 03:29, schrieb Roberto Spadim:
> >> > try raid10 far layout
> >> >
> >> > 2011/8/15 Harald Nikolisin <hochglanz@gmail.com
> >> > <mailto:hochglanz@gmail.com>>
> >> >
> >> > Since a long time I'm unhappy with the performance of my RAID-1 system.
> >> > Investigation with atop and iostat unveils that the disk utilization is
> >> > always on a certain level although nothing happens on the system. In the
> >> > case of reading or writing files the utilization boosts always to 100%
> >> > for a long time. Very ugly examples are "Firefox starting" or "zypper
> >> > updates".
> >> > That is snapshot of the output of iostat:
> >> >
> >> >
> >> > Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s
> >> > avgrq-sz avgqu-sz await svctm %util
> >> > sda 0,00 0,00 0,00 7,33 0,00 43,33
> >> > 5,91 0,33 43,18 33,32 24,43
> >> > sdb 0,00 0,00 0,00 7,33 0,00 43,33
> >> > 5,91 0,35 45,59 39,73 29,13
> >> > md0 0,00 0,00 0,00 0,67 0,00 5,33
> >> > 8,00 0,00 0,00 0,00 0,00
> >> > md1 0,00 0,00 0,00 0,33 0,00 5,33
> >> > 16,00 0,00 0,00 0,00 0,00
> >> > md2 0,00 0,00 0,00 0,33 0,00 1,00
> >> > 3,00 0,00 0,00 0,00 0,00
> >> > md3 0,00 0,00 0,00 0,00 0,00 0,00
> >> > 0,00 0,00 0,00 0,00 0,00
> >> > md4 0,00 0,00 0,00 0,00 0,00 0,00
> >> > 0,00 0,00 0,00 0,00 0,00
> >> > md5 0,00 0,00 0,00 0,33 0,00 0,67
> >> > 2,00 0,00 0,00 0,00 0,00
> >> >
> >> > I checked with mdadm if a resync happens or so, but this is not the
> >> > case. The state says "active" on all RAID devices - btw. what is the
> >> > difference to "clean" ?
> >> >
> >> > thanks for any hints,
> >> > harald
> >> > --
> >> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> >> > the body of a message to majordomo@vger.kernel.org
> >> > <mailto:majordomo@vger.kernel.org>
> >> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Roberto Spadim
> >> > Spadim Technology / SPAEmpresarial
> >>
> >>
> >> --
> >> 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
> >
> > --
> > 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
> >
>
>
>
--
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
next prev parent reply other threads:[~2011-08-19 0:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 0:26 Fwd: Re: Device utilization with RAID-1 Harald Nikolisin
2011-08-18 1:42 ` NeilBrown
2011-08-18 6:44 ` Stefan /*St0fF*/ Hübner
2011-08-18 13:44 ` CoolCold
2011-08-19 0:31 ` NeilBrown [this message]
2011-08-19 18:32 ` maurice
2011-08-20 3:13 ` John Robinson
-- strict thread matches above, loose matches on Subject: below --
2011-08-16 0:39 Harald Nikolisin
2011-08-16 1:30 ` Roberto Spadim
[not found] ` <CABYL=TqYhDSFTx9Bq6_AWZaYd+qtbd=tJyTHJUjXwYHH_qkQnQ@mail.gmail.com>
2011-08-16 17:25 ` Harald Nikolisin
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=20110819103135.5b6a3998@notabene.brown \
--to=neilb@suse.de \
--cc=coolthecold@gmail.com \
--cc=hochglanz@gmail.com \
--cc=hochglanz@googlemail.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 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).