Score:1

Disable read/write workqueue for Ubuntu Full-Disk-Encryption

gp flag

I am currently trying to set up multiple devices with Ubuntu (20.04.5 LTS) and the drive must be encrypted, so I used LUKS during the installation. (I checked "Use LVM with the new Ubuntu installation" + "Encrypt the new Ubuntu installation for Security" in the process)

However, the encrypted drive is much slower (as expected), but I read this article about the possibility to speed up dm-crypt I/O operations, using two flags no_read_workqueue and no_write_workqueue (last paragraph). FYI: I am using a NVMe SSD. The patch has been merged into the Linux Kernel 5.9 and onwards, I have 5.14, so it should be available for me. How can I enable this by default?

I have already changed the /etc/crypttab file by adding the flags:

nvme0123abcdef-etc UUID=123abcdef-etc none luks,discard,no-write-workqueue,no-read-workqueue

That hasn't changed the speed at all.

I tried to set the default flags:

cryptsetup --perf-no_read_workqueue --perf-no_write_workqueue --persistent refresh root

then I will get an error: --perf-no_read_workqueue: unknown option

Furthermore the flags are not shown when I use cryptsetup luksDump /dev/sdaX | grep Flags -> (This shows "none") or dmsetup table -> (This shows allow_discards)

FYI: I used this Wikipage for infos: https://wiki.archlinux.org/title/Dm-crypt/Specialties

jp flag
Duplicate: https://unix.stackexchange.com/questions/724104/disable-read-write-workqueue-for-ubuntu-full-disk-encryption/745158#745158
Score:1
jp flag

The problem is most likely that your cryptsetup package is too old. Support for these performance flags were added in version 2.3.4 (see release notes), but Ubuntu 20.04 only provides version 2.2.2 (see Ubuntu packages).

So your best bet is probably to upgrade to a newer distro.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.