Update: I rebuilt the VMs using Virtio SCSI, and performance again reached roughly double that of Virtio Block (matching the results seen when the drives were formatted with 512-byte blocks).
This indicates that switching the NVMe block size from 512 to 4096 has minimal impact, or at least an effect that is statistically negligible.
That seems reasonable to me, as modern NVMe controllers likely handle most of the complexity of managing the underlying physical page sizes internally (which are -- actually -- larger than 4K).
yes, but probably it mainly depends on controller. controller can inform you about optimal format. yours is ok with both (512e = 4kn = best).
example of difference from my system:
Code:
# nvme id-ns /dev/nvme3n1 -H | grep '^LBA Format'
LBA Format 0 : Metadata Size: 0 bytes - Data Size: 512 bytes - Relative Performance: 0x2 Good
LBA Format 1 : Metadata Size: 0 bytes - Data Size: 4096 bytes - Relative Performance: 0 Best (in use)
i think 4kn on all layers should be default goal in modern setup. it can have also slightly lower performance in some cases (as you tested different combinations).
file-system has (4x?) smaller inode table, fragmentation, hw alignment, compression advantage....
Last edited: