From: Miquel van Smoorenburg <mikevs@xs4all.net>
To: stan@hardwarefreak.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: O_DIRECT to md raid 6 is slow
Date: Thu, 16 Aug 2012 23:50:02 +0200 [thread overview]
Message-ID: <502D6B0A.6090508@xs4all.net> (raw)
In-Reply-To: <502CD3F8.70001@hardwarefreak.com>
On 16-08-12 1:05 PM, Stan Hoeppner wrote:
> On 8/15/2012 6:07 PM, Miquel van Smoorenburg wrote:
>> Ehrm no. If you modify, say, a 4K block on a RAID5 array, you just have
>> to read that 4K block, and the corresponding 4K block on the
>> parity drive, recalculate parity, and write back 4K of data and 4K
>> of parity. (read|read) modify (write|write). You do not have to
>> do I/O in chunksize, ehm, chunks, and you do not have to rmw all disks.
>
> See: http://www.spinics.net/lists/xfs/msg12627.html
>
> Dave usually knows what he's talking about, and I didn't see Neil nor
> anyone else correcting him on his description of md RMW behavior.
Well he's wrong, or you're interpreting it incorrectly.
I did a simple test:
* created a 1G partition on 3 seperate disks
* created a md raid5 array with 512K chunksize:
mdadm -C /dev/md0 -l 5 -c $((1024*512)) -n 3 /dev/sdb1 /dev/sdc1
/dev/sdd1
* ran disk monitoring using 'iostat -k 5 /dev/sdb1 /dev/sdc1 /dev/sdd1'
* wrote a single 4K block:
dd if=/dev/zero bs=4K count=1 oflag=direct seek=30 of=/dev/md0
Output from iostat over the period in which the 4K write was done. Look
at kB read and kB written:
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb1 0.60 0.00 1.60 0 8
sdc1 0.60 0.80 0.80 4 4
sdd1 0.60 0.00 1.60 0 8
As you can see, a single 4K read, and a few writes. You see a few blocks
more written that you'd expect because the superblock is updated too.
Mike.
next prev parent reply other threads:[~2012-08-16 22:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 0:49 Andy Lutomirski
2012-08-15 1:07 ` kedacomkernel
2012-08-15 1:12 ` Andy Lutomirski
2012-08-15 1:23 ` kedacomkernel
2012-08-15 11:50 ` John Robinson
2012-08-15 17:57 ` Andy Lutomirski
2012-08-15 22:00 ` Stan Hoeppner
2012-08-15 22:10 ` Andy Lutomirski
2012-08-15 23:50 ` Stan Hoeppner
2012-08-16 1:08 ` Andy Lutomirski
2012-08-16 6:41 ` Roman Mamedov
2012-08-15 23:07 ` Miquel van Smoorenburg
2012-08-16 11:05 ` Stan Hoeppner
2012-08-16 21:50 ` Miquel van Smoorenburg [this message]
2012-08-17 7:31 ` Stan Hoeppner
2012-08-17 11:16 ` Miquel van Smoorenburg
[not found] ` <502F237D.6060806@hardwarefreak.com>
[not found] ` <502F698C.9010507@msgid.tls.msk.ru>
[not found] ` <50305AB9.5080302@hardwarefreak.com>
[not found] ` <5030F1C6.90205@hesbynett.no>
2012-08-19 23:34 ` Stan Hoeppner
2012-08-20 0:01 ` NeilBrown
2012-08-20 7:47 ` David Brown
2012-08-21 14:51 ` Miquel van Smoorenburg
2012-08-22 3:59 ` Stan Hoeppner
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=502D6B0A.6090508@xs4all.net \
--to=mikevs@xs4all.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stan@hardwarefreak.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
Powered by JetHome