
























Only few SSDs allow changing their emulated sector size (and out of those, some of them bug out if you do). This something you can consider doing if you're chasing the very last % of possible performance. Which is unlikely your use-case if you're not using NVME. It's not "wrong" to stick to the default the SSD was shipped with.
The 512 byte unit pretty much exists solely for compatibility with bios, partitioning, and the like. Most other storage layers use larger units anyway, that's also why alignment works on the partition level. If filesystems allocated data at random 512-byte offsets, then partition alignment would not help either.
You can set dm-crypt/LUKS to 4K sectors regardless. Just don't expect too much (if any) noticable performance benefits. Some embedded platforms may benefit significantly more than desktop PCs here. Unfortunately 'cryptsetup benchmark' does not cover 512- vs 4096-sector, you'll have to benchmark it yourself.
Note that 4K LUKS only works with aligned partition sizes. If the partition is not multiple of 4096-bytes large, then LUKS will reject the device outright. That's completely a software thing, just how it was designed in the kernel. Something to be aware of when creating/resizing partitions.
So the question is, how much faster would the SSD be when using 4096-emulation instead of 512-emulation, and in case of LUKS how much better would the crypto engine handle 4096 vs. 512 chunks. And does it even become noticable in your use-case?
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。