3 ms·
ZFS encryption is much more space efficient than dmcrypt+unencrypted ZFS when combined with zstd compression. This is because it can do compress-then-encrypt in
by binwiederhier 1y ago
ZFS encryption is much more space efficient than dmcrypt+unencrypted ZFS when combined with zstd compression. This is because it can do compress-then-encrypt instead of encrypt-then-(not-really-)compress. It is also much much faster.
Source: I work for a backup company that uses ZFS a lot.
- zielmicha 1y agoCan you explain this in more detail? It doesn't seem true on a first glance. If you enable compression on ZFS that runs on top of dmcrypt volume, it will naturally happen before encryption (since dmcrypt is the lower layer). It's also unclear how it could be much faster, since dmcrypt generally is bottlenecked on AES-NI computation (https://blog.cloudflare.com/speeding-up-linux-disk-encryption/ https://blog.cloudflare.com/speeding-up-linux-disk-encryptio...), which ZFS has to do too.
- binwiederhier 1y agoOh my bad. I misread your comment. You are doing ZFS on top of dmcrypt, not dmcrypt images/volumes on top of ZFS.
- wkat4242 1y agoIt was my comment and yes indeed that's what I'm doing. Zfs on top of luks
- wkat4242 1y agoI don't use compression anyway. I don't like the way that the storage pool capacity becomes variable then.
- HumanOstrich 1y agoI don't understand. You don't like that some things compress better than others, saving a variable amount of space?
- heavyset_go 1y agoIt also saves on wear
- heavyset_go 1y agoUsing any file system that supports compression on top of LUKS does compression before encryption