From: Alasdair G Kergon <agk@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Mike Snitzer <msnitzer@redhat.com>,
dm-devel@redhat.com, Andi Kleen <andi@firstfloor.org>,
dm-crypt@saout.de, Milan Broz <gmazyland@gmail.com>,
linux-kernel@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>,
Christian Schmidt <schmidt@digadd.de>
Subject: Re: [dm-devel] dm-crypt performance
Date: Tue, 26 Mar 2013 12:27:13 +0000 [thread overview]
Message-ID: <20130326122713.GC27610@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1303252051520.9745@file.rdu.redhat.com>
[Adding dm-crypt + linux-kernel]
On Mon, Mar 25, 2013 at 11:47:22PM -0400, Mikulas Patocka wrote:
> I performed some dm-crypt performance tests as Mike suggested.
>
> It turns out that unbound workqueue performance has improved somewhere
> between kernel 3.2 (when I made the dm-crypt patches) and 3.8, so the
> patches for hand-built dispatch are no longer needed.
>
> For RAID-0 composed of two disks with total throughput 260MB/s, the
> unbound workqueue performs as well as the hand-built dispatch (both
> sustain the 260MB/s transfer rate).
>
> For ramdisk, unbound workqueue performs better than hand-built dispatch
> (620MB/s vs 400MB/s). Unbound workqueue with the patch that Mike suggested
> (git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git) improves
> performance slighlty on ramdisk compared to 3.8 (700MB/s vs. 620MB/s).
>
>
>
> However, there is still the problem with request ordering. Milan found out
> that under some circumstances parallel dm-crypt has worse performance than
> the previous dm-crypt code. I found out that this is not caused by
> deficiencies in the code that distributes work to individual processors.
> Performance drop is caused by the fact that distributing write bios to
> multiple processors causes the encryption to finish out of order and the
> I/O scheduler is unable to merge these out-of-order bios.
>
> The deadline and noop schedulers perform better (only 50% slowdown
> compared to old dm-crypt), CFQ performs very badly (8 times slowdown).
>
>
> If I sort the requests in dm-crypt to come out in the same order as they
> were received, there is no longer any slowdown, the new crypt performs as
> well as the old crypt, but the last time I submitted the patches, people
> objected to sorting requests in dm-crypt, saying that the I/O scheduler
> should sort them. But it doesn't. This problem still persists in the
> current kernels.
>
>
> For best performance we could use the unbound workqueue implementation
> with request sorting, if people don't object to the request sorting being
> done in dm-crypt.
On Tue, Mar 26, 2013 at 02:52:29AM -0400, Christoph Hellwig wrote:
> FYI, XFS also does it's own request ordering for the metadata buffers,
> because it knows the needed ordering and has a bigger view than than
> than especially CFQ. You at least have precedence in a widely used
> subsystem for this code.
So please post this updated version of the patches for a wider group of
people to try out.
Alasdair
next prev parent reply other threads:[~2013-03-26 12:27 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 3:47 dm-crypt performance Mikulas Patocka
2013-03-26 6:52 ` Christoph Hellwig
2013-03-26 12:27 ` Alasdair G Kergon [this message]
2013-03-26 20:05 ` [dm-devel] " Milan Broz
2013-03-26 20:28 ` Mike Snitzer
2013-03-26 20:58 ` Milan Broz
2013-03-28 18:53 ` Tejun Heo
2013-03-28 19:33 ` Vivek Goyal
2013-03-28 19:44 ` Tejun Heo
2013-03-28 20:38 ` Vivek Goyal
2013-03-28 20:45 ` Tejun Heo
2013-04-09 17:51 ` dm-crypt parallelization patches Mikulas Patocka
2013-04-09 17:57 ` Tejun Heo
2013-04-09 18:08 ` Mikulas Patocka
2013-04-09 18:10 ` Tejun Heo
2013-04-09 18:42 ` Vivek Goyal
2013-04-09 18:57 ` Tejun Heo
2013-04-09 19:13 ` Vivek Goyal
2013-04-09 19:42 ` Mikulas Patocka
2013-04-09 19:52 ` Tejun Heo
2013-04-09 20:32 ` Mikulas Patocka
2013-04-09 21:02 ` Tejun Heo
2013-04-09 21:03 ` Tejun Heo
2013-04-09 21:07 ` Vivek Goyal
2013-04-09 21:18 ` Mikulas Patocka
2013-04-10 19:24 ` Vivek Goyal
2013-04-10 23:42 ` [PATCH] make dm and dm-crypt forward cgroup context (was: dm-crypt parallelization patches) Mikulas Patocka
2013-04-10 23:50 ` Tejun Heo
2013-04-11 19:49 ` [PATCH v2] " Mikulas Patocka
2013-04-11 19:52 ` Tejun Heo
2013-04-11 20:00 ` Tejun Heo
2013-04-12 0:06 ` Mikulas Patocka
2013-04-12 0:22 ` Tejun Heo
2013-04-12 5:59 ` [PATCH v2] make dm and dm-crypt forward cgroup context Milan Broz
2013-04-12 18:17 ` [PATCH v2] make dm and dm-crypt forward cgroup context (was: dm-crypt parallelization patches) Mikulas Patocka
2013-04-12 18:01 ` Mikulas Patocka
2013-04-12 18:29 ` Tejun Heo
2013-04-15 13:02 ` Mikulas Patocka
2013-04-16 17:24 ` Tejun Heo
2013-04-16 19:41 ` Mikulas Patocka
2013-04-18 16:47 ` Mike Snitzer
2013-04-18 17:03 ` Tejun Heo
2013-05-22 18:50 ` Mike Snitzer
2013-05-22 19:48 ` Tejun Heo
2013-04-09 18:36 ` dm-crypt parallelization patches Vivek Goyal
[not found] ` <5151FF82.6090405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-09 18:08 ` [dm-devel] dm-crypt performance Mikulas Patocka
2013-04-09 18:59 ` [dm-crypt] " Milan Broz
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=20130326122713.GC27610@agk-dp.fab.redhat.com \
--to=agk@redhat.com \
--cc=andi@firstfloor.org \
--cc=dm-crypt@saout.de \
--cc=dm-devel@redhat.com \
--cc=gmazyland@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=msnitzer@redhat.com \
--cc=schmidt@digadd.de \
/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).