From: Neil Brown <nfbrown@novell.com>
To: Marco <jjletho67-diar@yahoo.it>
Cc: Roman Mamedov <roman@rm.pp.ru>, linux-raid@vger.kernel.org
Subject: Re: raid1 performance
Date: Mon, 26 Jul 2010 21:03:24 +1000 [thread overview]
Message-ID: <20100726210324.6a4077e6@notabene> (raw)
In-Reply-To: <23123.42111.qm@web28503.mail.ukl.yahoo.com>
On Mon, 26 Jul 2010 09:37:20 +0000 (GMT)
Marco <jjletho67-diar@yahoo.it> wrote:
>
>
> >> doing a simple performance tests i obtained some very unexpected results: if
> >> i issue hdparm -t /dev/md2 i obtain 61 - 65 MB/s while issuing the same test
> >> directly on the partitions which compose md2 (/dev/sda3 and /dev/sdb3) i
> >> obtain 84 - 87 MB/s. I didn't expect a so big difference between md2 and one
> >> of its member. What can cause this difference ?
> >
> >Maybe their read-ahead settings are different?
> >Check out "blockdev --getra /dev/md2", and compare that with the same
> >setting of the member disks. You can experiment with changing it by using
> >"--setra" as well.
>
> Hi Roman,
> thank you for your hint, I verified the read-ahead settings and they are the
> same for all the block devices involved in the test: the value is 256 for all
> /dev/sd?? and for all /dev/md?
> there should be something else which is influencing raid 1 performance.
> Have someone of you ever had a similar issue ?
>
Very odd.
I just tested my test hardware and get exactly the same 56 MB/sec both for
the RAID1 and the individual devices.
There is only one way that I can think of that the accesses going via RAID1
would be different from those going direct, and that is that the starting
offset might be different if you are using 1.x metadata.
I guess if you had those new 4K-sector devices that might make a difference,
but I wouldn't really expect it to.
For a sequential read like that, md/raid1 doesn't even do read-balancing, all
the reads go the the same device.
If you look at /proc/diskstats and particularly the 4th and 6th fields for
the device that you are interested in, and then take the differences for each
field between 'before' and 'after' running a test you will get
- the number of IO requests
- the number of sectors
that were serviced during that time. Taking a ratio will get you the number
of sectors per IO. Normally more is better.
I just tested 'sde' which gave 8.25 sectors per request - so most requests
were 4K.
md2 on the other hand gave 31.02, so many requests were 16K. That really
surprises me.
Looking at he 'queue' numbers in /sys/block/X/queue - some of which guide the
breaking up of pages into requests - all the md2 number are the same as sde
or smaller. So I'm currently rather confused.
It might be interesting to find out what the data offset is for your RAID1
(mdadm --examine will tell you if there is one), and compare the
request/sector numbers and see if they show anything.
NeilBrown
next prev parent reply other threads:[~2010-07-26 11:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-25 14:58 raid1 performance Marco
2010-07-25 15:19 ` Roman Mamedov
2010-07-26 9:37 ` Marco
2010-07-26 10:24 ` Keld Simonsen
2010-07-26 10:53 ` John Robinson
2010-07-26 11:30 ` Keld Simonsen
2010-07-27 16:10 ` Marco
2010-07-26 11:03 ` Neil Brown [this message]
2010-07-27 1:23 ` Leslie Rhorer
2010-07-27 16:10 ` Marco
2010-07-27 22:23 ` Neil Brown
2010-07-28 12:10 ` Marco
2010-07-28 12:24 ` Neil Brown
2010-07-31 15:21 ` Marco
2010-07-31 16:04 ` Keld Simonsen
-- strict thread matches above, loose matches on Subject: below --
2010-07-19 12:14 Marco
2004-04-21 5:57 RAID1: Performance Mike Mestnik
2002-04-30 12:23 raid1 performance Jaime Medrano
2002-04-30 12:38 ` Arjan van de Ven
2002-04-30 14:21 ` Kent Borg
2002-05-01 16:35 ` Jakob Østergaard
2002-05-01 17:01 ` Kent Borg
2002-05-01 17:16 ` Justin Cormack
2002-05-01 21:23 ` Bernd Eckenfels
2002-05-02 16:37 ` Jakob Østergaard
2002-06-29 0:01 ` Bernd Eckenfels
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=20100726210324.6a4077e6@notabene \
--to=nfbrown@novell.com \
--cc=jjletho67-diar@yahoo.it \
--cc=linux-raid@vger.kernel.org \
--cc=roman@rm.pp.ru \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.