1

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

1

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .