zfs on 4k sector disks
Dimitry Andric
dimitry at andric.com
Sat Feb 20 12:25:55 UTC 2010
On 2010-02-20 10:47, mailinglists wrote:
> This "Advanced Format" basically means the sectors size on disk is
> changed to 4k in stead of 512k.
Please note those disks still seem to expose 512B sectors to any OS; the
4kiB sectors are only used internally. And there seems to be no jumper
to "fix" this behaviour... Unaligned writes can cause multiple
read-write-modify operations, which are most likely bad for performance.
> I'm wondering if freeBSD 8.0 using ZFS raidz and drives like these will
> work properly, I've seen a lot of articles and postings about partitions
> not being properly aligned with the physical disk layout and suffering
> big performance hits. My question is; should I worry about these issues
> or does ZFS already align the data on a 4k border?
You can at least try to make sure your partitions are aligned to 4kiB.
This should be easy enough to do with e.g. gpart(8). I see no specific
alignment options in the zpool(1M) or zfs(1M) manpages, but there may
be some trick that I am not aware of. :)
With UFS, you might want to experiment with block and fragment sizes, to
see what is most optimal. For example, a block size of 32kiB and
fragment size of 4kiB, on a partition aligned to 4kiB.
More information about the freebsd-fs
mailing list