getting to 4K disk blocks in ZFS

Pete French petefrench at ingresso.co.uk
Thu Sep 11 10:46:54 UTC 2014


> There is no problem, if ashift covers more than 1 sector, except
> that you waste some space.  If ashift=12 is used with 512 byte
> sectors, then all writes will be to 8 consecutive sectors.  There
> is no read-modify-write as in the opposite case (ashift=9 with 4K
> sectors).

But what if one of those 8 writes fails ? ZFS understands that
part of a write can fail then ? or does it think of it as 8 separate
writes ?

> But the amount of wasted space can be quite substantial.  I have
> read reports of some 8% less usable space with ashift=12 compared
> to ashift=9, for an empty ZFS file system.  And with lots of small
> files, this will become worse, once the file system is filled.

Yes, I have migrated a lot of filesystems over to 4k, and there is quite
a lot of extra space taken up by the same amount of data - even wth
lz4 compression enabled, which I do on most systems. However the extra
performance is well worth it.

Only reason I am asking is that I am thinking of migrating a zpool
which only has one 4k drive in it, plsy 3 512byte ones. Just want to make
sure that it is not a bad idea to do this.

-pete.


More information about the freebsd-stable mailing list