From: Arno Wagner <email@example.com>
To: "Kristóf Csillag" <firstname.lastname@example.org>
Subject: Re: performance and threads
Date: Mon, 5 Sep 2022 17:09:29 +0200 [thread overview]
Message-ID: <20220905150929.GA3793@tansi.org> (raw)
encryption is not actually CPU bound for AES, as modern CPUs
do AES hardware. So it may appear the CPU is idle, but its
AES hardware is not.
At these speeds, the penalty you see is probably just memory
bandwidth limitations stemming from the copy that has to be
made when encrypting or decrypting. I would say these speeds
look as expected.
P.S.: I just leaned that signing with "Regards" basically means
"You are the worst!", so I am not using that anymore:
On Mon, Sep 05, 2022 at 05:52:06 CEST, Kristóf Csillag wrote:
> Dear all,
> I would like to ask you if what I am seeing is normal, or it's some
> configuration problem.
> Short summary: reading my encrypted is a lot slower than reading it
> raw, while the CPU is underutilized.
> Detailed version:
> I have a RAID1 device, consisting of two identical NVMe devices.
> On the top of the RAID device, I have LUKS encryption.
> These are the read speeds:
> - Raw device read: 2,3 GB/s
> - RAID device read: 2,3 GB/s
> - Reading from the encrypted device: 1,6 GB/s
> As you can see, there is a pretty serious performance penalty for the
> The cipher running is the default aes-xts-plain64 cipher.
> This is an AMD Ryzen 9 5900X 12-Core CPU, so I'm not sure what this is.
> What is even more interesting, is that the CPU doesn't seem to be all
> that busy during the reading. as far as I can tell, I only get 4
> threads of kworker / kcryptd, and their total system load is less than
> 100% (of 1 core.)
> So I'm getting the impression that even though decryption is a
> CPU-bound process, my CPU is still underutilized.
> Is this interpretation correct? If yes, is this to be expected, or am
> I doing something wrong? Can dm-crypt be configured to run the
> encryption on more CPU cores, with better performance?
> Thank you for your help:
> Kristof Csillag
> ps. I'm on kernel 5.19
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: email@example.com
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
next prev parent reply other threads:[~2022-09-05 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 3:52 performance and threads Kristóf Csillag
2022-09-05 6:34 ` Michael Kjörling
2022-09-05 15:09 ` Arno Wagner [this message]
2022-09-15 14:55 ` Milan Broz
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).