From: Bill Davidsen <davidsen@tmr.com>
To: Dan Williams <dan.j.williams@gmail.com>
Cc: James Ralston <qralston+ml.linux-raid@andrew.cmu.edu>,
linux-raid@vger.kernel.org
Subject: Re: raid5 software vs hardware: parity calculations?
Date: Sat, 13 Jan 2007 12:32:40 -0500 [thread overview]
Message-ID: <45A917B8.2060706@tmr.com> (raw)
In-Reply-To: <e9c3a7c20701130120o246f5cf1i8d364777123c50d8@mail.gmail.com>
Dan Williams wrote:
> On 1/12/07, James Ralston <qralston+ml.linux-raid@andrew.cmu.edu> wrote:
>> On 2007-01-12 at 09:39-08 dean gaudet <dean@arctic.org> wrote:
>>
>> > On Thu, 11 Jan 2007, James Ralston wrote:
>> >
>> > > I'm having a discussion with a coworker concerning the cost of
>> > > md's raid5 implementation versus hardware raid5 implementations.
>> > >
>> > > Specifically, he states:
>> > >
>> > > > The performance [of raid5 in hardware] is so much better with
>> > > > the write-back caching on the card and the offload of the
>> > > > parity, it seems to me that the minor increase in work of having
>> > > > to upgrade the firmware if there's a buggy one is a highly
>> > > > acceptable trade-off to the increased performance. The md
>> > > > driver still commits you to longer run queues since IO calls to
>> > > > disk, parity calculator and the subsequent kflushd operations
>> > > > are non-interruptible in the CPU. A RAID card with write-back
>> > > > cache releases the IO operation virtually instantaneously.
>> > >
>> > > It would seem that his comments have merit, as there appears to be
>> > > work underway to move stripe operations outside of the spinlock:
>> > >
>> > > http://lwn.net/Articles/184102/
>> > >
>> > > What I'm curious about is this: for real-world situations, how
>> > > much does this matter? In other words, how hard do you have to
>> > > push md raid5 before doing dedicated hardware raid5 becomes a real
>> > > win?
>> >
>> > hardware with battery backed write cache is going to beat the
>> > software at small write traffic latency essentially all the time but
>> > it's got nothing to do with the parity computation.
>>
>> I'm not convinced that's true.
> No, it's true. md implements a write-through cache to ensure that
> data reaches the disk.
>
>> What my coworker is arguing is that md
>> raid5 code spinlocks while it is performing this sequence of
>> operations:
>>
>> 1. executing the write
> not performed under the lock
>> 2. reading the blocks necessary for recalculating the parity
> not performed under the lock
>> 3. recalculating the parity
>> 4. updating the parity block
>>
>> My [admittedly cursory] read of the code, coupled with the link above,
>> leads me to believe that my coworker is correct, which is why I was
>> for trolling for [informed] opinions about how much of a performance
>> hit the spinlock causes.
>>
> The spinlock is not a source of performance loss, the reason for
> moving parity calculations outside the lock is to maximize the benefit
> of using asynchronous xor+copy engines.
>
> The hardware vs software raid trade-offs are well documented here:
> http://linux.yyz.us/why-software-raid.html
There have been several recent threads on the list regarding software
RAID-5 performance. The reference might be updated to reflect the poor
write performance of RAID-5 until/unless significant tuning is done.
Read that as tuning obscure parameters and throwing a lot of memory into
stripe cache. The reasons for hardware RAID should include "performance
of RAID-5 writes is usually much better than software RAID-5 with
default tuning.
--
bill davidsen <davidsen@tmr.com>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
next prev parent reply other threads:[~2007-01-13 17:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 22:44 raid5 software vs hardware: parity calculations? James Ralston
2007-01-12 17:39 ` dean gaudet
2007-01-12 20:34 ` James Ralston
2007-01-13 9:20 ` Dan Williams
2007-01-13 17:32 ` Bill Davidsen [this message]
2007-01-13 23:23 ` Robin Bowes
2007-01-14 3:16 ` dean gaudet
2007-01-15 11:48 ` Michael Tokarev
2007-01-15 15:29 ` Bill Davidsen
2007-01-15 16:22 ` Robin Bowes
2007-01-15 17:37 ` Bill Davidsen
2007-01-15 21:25 ` dean gaudet
2007-01-15 21:32 ` Gordon Henderson
2007-01-16 0:35 ` berk walker
2007-01-16 0:48 ` dean gaudet
2007-01-16 3:41 ` Mr. James W. Laferriere
2007-01-16 4:16 ` dean gaudet
2007-01-16 5:06 ` 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=45A917B8.2060706@tmr.com \
--to=davidsen@tmr.com \
--cc=dan.j.williams@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=qralston+ml.linux-raid@andrew.cmu.edu \
/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.