So what I still fail to understand is how this all applies to PVE.
My main problem is that I could not find out how a normal VM, lets say a Windows guest or a nginx webserver mostly writes.
Assuming these both mostly read/write 64k and PVE users mostly use mirror, here is how I would interpret the OpenZFS docs:
- sector alignment of guest FS is crucial
PVE GUI takes care of that.
- most of guest FSes use default block size of 4-8KB, so:
- Larger volblocksize can help with mostly sequential workloads and will gain a compression efficiency
To gain compression efficiency and ARC cache, 64k would be the best setting for a Windows guest or Linux nginx
- Smaller volblocksize can help with random workloads and minimize IO amplification, but will use more metadata (e.g. more small IOs will be generated by ZFS)
We could completly avoid that by adding an additional 16k disk to the guest, to store its 16k MySQL DB.
- and may have worse space efficiency (especially on RAIDZ and DRAID)
Mostly does not applies to PVE, because you guys strongly recommend mirror to begin with
- It’s meaningless to set volblocksize less than guest FS’s block size or ashift
Makes sense.
Do I have any thinking errors in the statements above?
If they are true, I think PVE could use 16k as the save default (user forget to put the DB on an additional disk, and for most DBs even does not need to), or go with a little bit risky default of 64k to get better performance and compression for most users. Maybe even set it accordingly to if the users has RAIDZ or mirror.