Speeding up Linux disk encryption
summary
Benchmarks on a RAM-backed device isolate dm-crypt/LUKS overhead and show default code queues and thread hops cause up to ~7× slowdown versus raw device despite AES-NI hardware being able to do ~2 GB/s; a synchronous path is added (an XTS proxy and a runtime flag to bypass queues) that doubles throughput and collapses 99th‑percentile latency to near‑raw levels (200% throughput improvement). Works on x86 with hardware crypto; larger block sizes (>2 MB) can regress.
AI-written summary · about
chapters (16)
- 0:00Intro
- 2:52The storage stack
- 4:06Encryption at rest layers
- 5:15Storage hardware encryption
- 6:29Block layer encryption
- 11:22Device mapper in Linux
- 14:12Test setup: RAM-based encrypted disk
- 16:00Test storage stack
- 17:26Test setup: sequential reads
- 21:47Ask the community
- 23:38dm-crypt life of an encrypted BIO request
- 32:01dm-crypt things to reconsider
- 33:51dm-crypt removing queues
- 35:46xtsproxy crypto API module
- 36:58Test setup: sequential 10
- 40:16Cloudflare cache impact
