From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] aes-xts-plain with aes_x86_64 makes my SSD 5x slower than my encrypted HD
Date: Mon, 23 Jul 2012 12:46:38 +0200 [thread overview]
Message-ID: <500D2B8E.3000908@redhat.com> (raw)
In-Reply-To: <20120723081407.GA872@tansi.org>
>> So those speeds are expected/believable, but I still don't know why
>> hdparm is so slow on /dev/mapper/cryptroot.
First, hdparm basically run 2M read in direct-io mode for test,
all IOs are sumbitted from one process.
AES-NI helps a lot and because it is prioritised in crypto api,
you usually using it without any additional config if hw supports it.
(Also I see some patches whit run XTS blocks in parallel on crypto api list.)
But that's not the problem you are seeing now. (I will explain it on recent
kernel code, note that RHEL5/6 have older code and dmcrypt behaves slightly
differently when processing requests.)
Current in-kernel dmcrypt code tries to keep IO processing on CPU which
submitted request. It means, that if one process generates all requests,
all requests are usually processed by one core where it is this process
scheduled not using other CPU cores.
(Saying usually because page cache can submit request on different cpu.)
So no wonder that you get slow operation - in dd/hdparm usually only
one cpu is processing the request. If CPU is fast enough, no problem.
If not you will see slowdown. AES-NI will speed up this on that cpu core,
but will not help run request in parallel on multi-core systems.
In real fs use case, more applications submitting io requests, you will
get much better throughput. Also if not using directio, page cache can help
and fs are usually more clever too (writes are usually better
in performance - try it).
I do not like this dmcrypt mode a we tried to fix it. There is a bunch of patches
from Mikulas Patocka which switches parallelization to use all available
cpus (if not limited by paramater).
In my tests it improved performance in some cases but not in all situations
(there were some slow downs which scares me).
(You can see patches here http://people.redhat.com/mpatocka/patches/kernel/dm-crypt-paralelizace/)
Unfortunately discussion stopped and device-mapper maintainer forgot about it.
Well, your mails apparently caused some head-ups here, so I'll try to return
to this. (Will post them to dm-devel directly this time.)
I think fast SSD case is exactly situation where it should help.
We eill need some testers though :)
(I have currently no fast SSD available for testing.)
Milan
next prev parent reply other threads:[~2012-07-23 10:46 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-22 19:07 [dm-crypt] aes-xts-plain with aes_x86_64 makes my SSD 5x slower than my encrypted HD Marc MERLIN
2012-07-22 19:47 ` Yves-Alexis Perez
2012-07-22 20:39 ` Marc MERLIN
2012-07-22 21:47 ` Arno Wagner
2012-07-23 6:07 ` Yves-Alexis Perez
2012-07-23 6:28 ` Marc MERLIN
2012-07-23 8:14 ` Arno Wagner
2012-07-23 10:46 ` Milan Broz [this message]
2012-07-23 11:09 ` Yves-Alexis Perez
2012-07-23 11:37 ` Milan Broz
2012-07-23 15:08 ` André Gall
2012-07-23 17:27 ` André Gall
2012-07-24 14:06 ` Heinz Diehl
2012-07-24 14:16 ` Milan Broz
2012-07-23 16:12 ` Marc MERLIN
2012-07-23 16:19 ` Yves-Alexis Perez
2012-07-23 17:54 ` Marc MERLIN
2012-07-23 19:26 ` Yves-Alexis Perez
2012-07-23 17:15 ` Milan Broz
2012-07-23 17:51 ` Marc MERLIN
2012-07-23 21:31 ` Milan Broz
2012-07-24 5:57 ` Marc MERLIN
2012-07-24 6:25 ` Heinz Diehl
2012-07-24 15:02 ` Marc MERLIN
2012-07-24 15:19 ` Milan Broz
2012-07-24 16:09 ` Marc MERLIN
2012-07-24 13:54 ` Milan Broz
[not found] ` <500E9099.8050501@redhat.com>
2012-07-24 14:27 ` Heinz Diehl
2012-07-24 14:58 ` Heinz Diehl
2012-07-24 15:38 ` Marc MERLIN
2012-07-24 16:48 ` Heinz Diehl
2012-07-24 6:11 ` Heinz Diehl
2012-07-22 21:55 ` Marc MERLIN
2012-07-22 20:22 ` Heinz Diehl
2012-08-12 12:49 ` Pasi Kärkkäinen
2012-08-16 7:43 ` Marc MERLIN
[not found] ` <502D1F96.3080905@andregall.de>
2012-08-16 17:57 ` Marc MERLIN
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=500D2B8E.3000908@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-crypt@saout.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 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.