3 ms·
> if you have 4 KB-sector disks then you should probably use a physical block size granularity of 4 KB for your ZFS pool rather than 512 bytes According to All
by 5e92cb50239222b 3y ago
> if you have 4 KB-sector disks then you should probably use a physical block size granularity of 4 KB for your ZFS pool rather than 512 bytes
According to Allan Jude (OpenZFS & FreeBSD developer), you should never use 512-byte recordsize even on an HDD with 512-byte sectors. Always start from 4 KiBs, probably even from 8.
https://klarasystems.com/articles/tuning-recordsize-in-openzfs https://klarasystems.com/articles/tuning-recordsize-in-openz...
- someplaceguy 3y ago> you should never use 512-byte recordsize even on an HDD with 512-byte sectors I think you meant to refer to the pool's sector size (i.e. "ashift" property) rather than the recordsize. I agree, but I wouldn't say "never", as that's too strong a word. It would be useful to use a 512-byte ZFS pool sector size even when the HDD uses 4K sectors if you care a lot about disk space efficiency but don't care at all about performance or HDD wear (for example, if you plan to use a ZFS pool almost exclusively read-only). That said, I would also recommend a 4K pool sector size in almost all cases, as HDD space is cheap.
- rincebrain 3y agoI don't think that post is saying that. I think that post is warning you that it's immutable once done. If you want to be more flexible in the future and can't be sure you won't need to use 4kn/512e disks at some point, yes, use 4kn (or with all SSD storage it gets even messier). But using 512b can be a significant gain on space efficiency for some people.