From: Michael Tokarev <mjt@tls.msk.ru>
To: Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: raid10: unfair disk load?
Date: Fri, 21 Dec 2007 14:53:38 +0300 [thread overview]
Message-ID: <476BA942.40406@msgid.tls.msk.ru> (raw)
In-Reply-To: <476BA4FD.6080401@msgid.tls.msk.ru>
Michael Tokarev wrote:
> I just noticed that with Linux software RAID10, disk
> usage isn't equal at all, that is, most reads are
> done from the first part of mirror(s) only.
>
> Attached (disk-hour.png) is a little graph demonstrating
> this (please don't blame me for poor choice of colors and
> the like - this stuff is in works right now, it's a first
> rrd graph I produced :). There's a 14-drive RAID10 array
> and 2 more drives. In the graph it's clearly visible that
> there are 3 "kinds" of load for drives, because graphs for
> individual drives are stacked on each other forming 3 sets.
> One set (the 2 remaining drives) isn't interesting, but the
> 2 "main" ones (with many individual lines) are interesting.
Ok, looks like vger.kernel.org dislikes png attachments.
I wont represent graphs as ascii-art, and it's really not
necessary -- see below.
> The 7 drives with higher utilization receives almost all
> reads - the second half of the array only gets reads
> sometimes. And all 14 drives - obviously - receives
> all writes.
>
> So the picture (modulo that "sometimes" above which is
> too small to take into account) is like - writes are
> going to all drives, while reads are done from the
> first half of each pair only.
>
> Also attached are two graphs for individual drives,
> one is from first half of the array (diskrq-sdb-hour.png),
> which receives almost all reads (other disks looks
> pretty much the same), and from the second half
> (diskrq-sdl-hour.png), which receives very few
> reads. The graphs shows number of disk transactions
> per second, separately for reads and writes.
Here's a typical line from iostat -x:
Dev: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sdb 0,32 0,03 22,16 5,84 2054,79 163,74 79,21 0,20 7,29 4,33 12,12
sdk 0,38 0,03 6,28 5,84 716,61 163,74 72,66 0,15 12,29 5,55 6,72
where sdb and sdk are two halfs of the same raid1 part
of a raid10 array - i.e., the content of the two are
identical. As shown, write requests are the same for
the two, but read requests mostly goes to sdb (the
first half), and very little to sdk (the second half).
> Should raid10 balance reads too, maybe in a way similar
> to what raid1 does?
>
> The kernel is 2.6.23 but very similar behavior is
> shown by earlier kernels as well. Raid10 stripe
> size is 256Mb, but again it doesn't really matter
> other sizes behave the same here.
The amount of data is quite large and it is laid out
and accessed pretty much randomly (it's a database
server), so in theory, even with some optimizations
like raid1 does (route request to a drive with "nearest"
head position), the read request distribution should
be basically the same.
Thanks!
/mjt
next parent reply other threads:[~2007-12-21 11:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <476BA4FD.6080401@msgid.tls.msk.ru>
2007-12-21 11:53 ` Michael Tokarev [this message]
2007-12-21 16:49 ` raid10: unfair disk load? Janek Kozicki
2007-12-21 20:56 ` Michael Tokarev
2007-12-22 12:05 ` Janek Kozicki
2007-12-22 13:04 ` Jon Nelson
[not found] ` <beb6123c0712222034g68743afv31c644ff4dd9aaff@mail.gmail.com>
2007-12-23 12:36 ` Michael Tokarev
[not found] ` <beb6123c0712230521r2a8a43aboe097fc2fc943c3ae@mail.gmail.com>
2007-12-23 14:23 ` Jon Nelson
2007-12-23 19:22 ` Richard Scobie
2007-12-25 20:18 ` Bill Davidsen
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=476BA942.40406@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--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).