From: Michael Evans <mjevans1983@gmail.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Bill Davidsen <davidsen@tmr.com>,
Kaushal Shriyan <kaushalshriyan@gmail.com>,
linux-raid@vger.kernel.org
Subject: Re: RAID5
Date: Fri, 23 Apr 2010 13:57:13 -0700 [thread overview]
Message-ID: <o2u4877c76c1004231357x649c5979ncd3e10ea8e6060d1@mail.gmail.com> (raw)
In-Reply-To: <4BD1AE0C.2040003@msgid.tls.msk.ru>
On Fri, Apr 23, 2010 at 7:26 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> Michael Evans wrote:
>> On Wed, Apr 21, 2010 at 6:32 AM, Bill Davidsen <davidsen@tmr.com> wrote:
> []
>>> I have some recent experience with this gained the hard way, by looking for
>>> a problem rather than curiousity. My experience with LVM on RAID is that, at
>>> least for RAID-5, write performance sucks. I created two partitions on each
>>> of three drives, and two raid-5 arrays using those partitions. Same block
>>> size, same tuning for stripe-cache, etc. I dropped an ext4 on on array, and
>>> LVM on the other, put ext4 on the LVM drive, and copied 500GB to each. LVM
>>> had a 50% performance penalty, took twice as long. Repeated with four drives
>>> (all I could spare) and found that the speed right on an array was roughly
>>> 3x slower with LVM.
>>>
>> This issues sounds very likely to be write barrier related. Were you
>> using an external journal on a write-barrier honoring device?
>
> This is most likely due to read-modify-write cycle which is present on
> lvm-on-raid[456] if the number of data drives is not a power of two.
> LVM requires the block size to be a power of two, so if you can't fit
> some number of LVM blocks on whole raid stripe size your write speed
> is expected to be ~3 times worse...
>
> Even creating partitions on such raid array is difficult.
>
> 'Hwell.
>
> Unfortunately very few people understand this.
>
> As of write barriers, it looks like either they already work
> (in 2.6.33) or will be (in 2.6.34) for whole raid5-lvm stack.
>
> /mjt
>
Even when write barriers are supported what will a typical transaction
look like?
Journal Flush
Data Flush
Journal Flush (maybe)
If the operations are small (which the journal ops should be) then
you're forced to wait for a read, and then make a write barrier after
it.
J.read(2 drives)
J.write(2 drives) -- Barrier
D.read(2 drives)
D.write(2 drives) -- Barrier
Then maybe
J.read(2 drives) (Hopefully cached, but could cross in to a new stripe...)
J.write(2 drives) -- Barrier
This is why an external journal on another device is a great idea.
Unfortunately what I really want is something like 512mb of battery
backed ram (at any vaguely modern speed) to split up as a journal
devices, but now everyone is selling SDDs which are broken for such
needs. Any ram drive units still being sold seem to be more along
data-center grade sizes.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-23 20:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 3:46 RAID5 Kaushal Shriyan
2010-04-19 4:21 ` RAID5 Michael Evans
2010-04-21 13:32 ` RAID5 Bill Davidsen
2010-04-21 19:43 ` RAID5 Michael Evans
2010-04-23 14:26 ` RAID5 Michael Tokarev
2010-04-23 14:57 ` RAID5 MRK
2010-04-23 20:57 ` Michael Evans [this message]
2010-04-24 1:47 ` RAID5 Mikael Abrahamsson
2010-04-24 3:34 ` RAID5 Michael Evans
2010-05-02 22:51 ` RAID5 Bill Davidsen
2010-05-03 5:51 ` RAID5 Luca Berra
2010-05-02 22:45 ` RAID5 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=o2u4877c76c1004231357x649c5979ncd3e10ea8e6060d1@mail.gmail.com \
--to=mjevans1983@gmail.com \
--cc=davidsen@tmr.com \
--cc=kaushalshriyan@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=mjt@tls.msk.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 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).