From: Peter Cordes <peter@cordes.ca>
To: xfs@oss.sgi.com
Subject: RAID5/6 writes
Date: Wed, 01 Oct 2008 14:52:37 -0300 [thread overview]
Message-ID: <20081001175237.GJ32037@cordes.ca> (raw)
[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]
I just had an idea for speeding up writes to parity-based RAIDs
(RAID4,5,6).[1] If XFS wants to write sectors 1,2,3, 5,6,7, but it
knows that block 4 is free space, it might be better to write sector 4
(with zeros, don't put uninitialized kernel memory on disk!). It's
probably only useful to do this if XFS has data in memory to prove
that the gap is not part of the filesystem. Doing extra reads
probably doesn't make sense except in very special cases. (e.g.
repeated writes to the same location with the same hole, so just one
read would let them all become full-block or even full-stripe writes.)
XFS knows (or should have been told by the admin with mkfs!) what the
stripe geometry is: block size and stripe width. So it could apply
this optimization only if it would make a write cover more whole
blocks or whole stripes.
[1] See http://www.acnc.com/04_01_05.html if you need a reminder of
what RAID level is what... It has good pictures and explanations. :)
I use RAID6 on a Dell PERC 6/e with 8 500GB SATA disks, and I'm still
tuning XFS for it... (I'll start another with some tuning questions...)
RAID5 write performance has the same limitations as RAID6, and more
people know about it, so... RAID5 is ok at sequential writes, but
non-full-stripe writes require reading the rest of the data for stripe
so the parity stripe(s) can be recalculated and rewritten. (typical
block size is 64kiB, and with a 7 disk RAID5, a full stripe is
64kiB*(7-1) = 384kiB.) Within a single 64kiB block, small scattered
writes are deadly: It's a read-modify-write (or write-read) because
the whole 64kiB is needed (along with the data from the other disks
with data in this stripe). HW RAID controllers have large e.g. 256MiB
caches so they can merge writes, and sometimes avoid the extra reads.
--
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@cor , des.ca)
"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BC
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 351 bytes --]
next reply other threads:[~2008-10-01 17:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-01 17:52 Peter Cordes [this message]
2008-10-01 19:36 ` RAID5/6 writes Andi Kleen
2008-10-01 20:13 ` Peter Cordes
2008-10-01 20:44 ` Andi Kleen
2008-10-01 21:01 ` Peter Cordes
2008-10-02 0:32 ` Dave Chinner
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=20081001175237.GJ32037@cordes.ca \
--to=peter@cordes.ca \
--cc=xfs@oss.sgi.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