Online shop EN wiki View View source History Create account Log in Dm-crypt Performance Jump to navigation Jump to search Main Page > Server Software > Linux The dm-crypt module provides transparent block-level data encryption under Linux. Since dm-crypt works independently of applications and file systems, it can be easily used in many areas. In this short article we show how to increase the performance of dm-crypt from Linux kernel 5.9 onwards. Contents 1 dm-crypt in the Linux storage stack 2 Performance improvements of Kernel 5.9 3 Linux Kernel Patch 3.1 Confirmation test with Samsung PM1735 dm-crypt in the Linux storage stack The Linux Storage Stack Diagram shows the structure of the storage stack of the Linux kernel. dm-crypt is shown in the "Device Mapper" area (blue). dm-crypt works as a device mapper target. The Linux Storage Stack Diagram shows at which level dm-crypt is used. Performance improvements of Kernel 5.9 Ignat Korchagin (Technical Lead at Cloudfare) describes in an extensive blog article performance bottlenecks he encountered when using dm-crypt. As a result, he has written a Linux kernel patch that has found its way into Linux kernel 5.9 in a slightly modified form. Detailed information about the performance optimizations can be found in the blog article: Speeding up Linux disk encryption (blog.cloudflare.com, 20.03.2020) Linux Kernel Patch The patch was included in Linux kernel version 5.9: dm crypt: add flags to optionally bypass kcryptd workqueues (git.kernel.org, 20.07.2020) With the patch the following additional flags are available for configuration: DM_CRYPT_NO_READ_WORKQUEUE DM_CRYPT_NO_WRITE_WORKQUEUE Confirmation test with Samsung PM1735 In a customer scenario we could confirm the dm-crypt performance improvement. In the affected system with Samsung PM1735 (MZPLJ3T2HBJR-00007) and Debian 10 (Linux kernel 4.19) a performance drop was detectable. An update to Debian 11 (Linux kernel 5.10) fixed the problem. Author: Werner Fischer Werner Fischer, working in the Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay. Share via Facebook Share via Twitter Share via Mail Printable version Related articles Install logwatch Show article Perform a SSD Secure Erase Show article Upgrade Intel Data Center Manager Show article Category: Linux ► Server Hardware ► Server Software ► Storage ► Virtualization ► Focus Topics ► Network+Accessories ► Archive Tools What links here Related changes Special pages Printable version Permanent link Page information In other languages Deutsch Thomas-Krenn is a synomnym for servers made in Germany. We assemble and deliver in Europe within 24 hours. Configure your server individually at www.thomas-krenn.com. Subscribe to the Thomas-Krenn newsletter now Thomas-Krenn.AG on Facebook Thomas-Krenn.AG on Twitter Thomas-Krenn.AG on YouTube Thomas-Krenn.AG on LinkedIn Thomas-Krenn.AG on Xing Thomas-Krenn.AG on Instagram This page was last edited on 30 August 2021, at 15:33. This page has been accessed 503 times. Privacy policy About Thomas-Krenn-Wiki Disclaimers