From: Milan Broz <gmazyland@gmail.com>
To: Phil Turmel <philip@turmel.org>
Cc: Christoph Anton Mitterer <calestyo@scientia.net>,
linux-raid@vger.kernel.org
Subject: Re: some general questions on RAID
Date: Sun, 07 Jul 2013 19:39:27 +0200 [thread overview]
Message-ID: <51D9A7CF.6000700@gmail.com> (raw)
In-Reply-To: <51D5F22C.70007@turmel.org>
On 07/05/2013 12:07 AM, Phil Turmel wrote:
> On 07/04/2013 02:30 PM, Christoph Anton Mitterer wrote:
>
>> 1) I plan to use dmcrypt and LUKS and had the following stacking in
>> mind:
>> physical devices -> MD -> dmcrypt -> LVM (with multiple LVs) ->
>> filesystems
>>
>> Basically I use LVM for partitioning here ;-)
>>
>> Are there any issues with that order? E.g. I've heard rumours that
>> dmcrypt on top of MD performs much worse than vice versa...
>
> Last time I checked, dmcrypt treated barriers as no-ops, so filesystems
> that rely on barriers for integrity can be scrambled. As such, where I
> mix LVM and dmcrypt, I do it selectively on top of each LV.
Hi,
Barriers (later replaced by flush/fua) works on dmcrypt, this is the first
commit implementing it
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=647c7db14ef9cacc4ccb3683e206b61f0de6dc2b
(dm core ensures that there is no IO processing before it submits FLUSH/FUA to dmcrypt,
so the implementation is so simple here)
All features based on flush/FUA works over dmcrypt now.
>
> I believe dmcrypt is single-threaded, too.
Since
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/md/dm-crypt.c?id=c029772125594e31eb1a5ad9e0913724ed9891f2
dmcrypt keeps IO running on the CPU core which submitted it.
So if you have multiple IOs submitted in parallel from *different* CPUs,
they are processed in parallel.
If you have MD over dmcrypt, this can cause problem that MD sumbits all IOs
with the same cpu context and dmcrypt cannot run it in parallel.
So with new kernel do not try put *multiple* dmcrypt mappings (per device or so)
below MD RAID - it will not improve performance, it will cause exact opposite
(everything will run on one core).
(Please note, this applies for kernel with patch above and later,
previously it was different. There were a lot of discussions about it,
some other patches which were never applied to mainline etc, see dmcrypt
and dm-devel list archive for more info...)
> If either or both of those issues have been corrected, I wouldn't expect
> the layering order to matter.
Block layer (including transparent mappings like dmcrypt) can
reorder requests. It is FS responsibility to handle ordering (if it is
important) though flush requests.
Milan
next prev parent reply other threads:[~2013-07-07 17:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 18:30 some general questions on RAID Christoph Anton Mitterer
2013-07-04 22:07 ` Phil Turmel
2013-07-04 23:34 ` Christoph Anton Mitterer
2013-07-08 4:48 ` NeilBrown
2013-07-06 1:33 ` Christoph Anton Mitterer
2013-07-06 8:52 ` Stan Hoeppner
2013-07-06 15:15 ` Christoph Anton Mitterer
2013-07-07 16:51 ` Stan Hoeppner
2013-07-07 17:39 ` Milan Broz [this message]
2013-07-07 18:01 ` Christoph Anton Mitterer
2013-07-07 18:50 ` Milan Broz
2013-07-07 20:51 ` Christoph Anton Mitterer
2013-07-08 5:40 ` Milan Broz
2013-07-08 4:53 ` NeilBrown
2013-07-08 5:25 ` Milan Broz
2013-07-05 1:13 ` Brad Campbell
2013-07-05 1:39 ` Sam Bingner
2013-07-05 3:06 ` Brad Campbell
2013-07-06 1:23 ` some general questions on RAID (OT) Christoph Anton Mitterer
2013-07-06 6:23 ` Sam Bingner
2013-07-06 15:11 ` Christoph Anton Mitterer
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=51D9A7CF.6000700@gmail.com \
--to=gmazyland@gmail.com \
--cc=calestyo@scientia.net \
--cc=linux-raid@vger.kernel.org \
--cc=philip@turmel.org \
/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).