ZFS extra space overhead for ashift=12 vs ashift=9 raidz2 pool?

Taylor j.freebsd-zfs at enone.net
Sat Mar 24 18:41:21 UTC 2012


Alex,

Thank you for your response. I'm not particularly concerned about the overhead of file fragmentation,
as most of the space will be take by fairly large files (10's of GiB). 

My original question concerned the amount of space reported available by zfs for a
freshly-created *empty* raidz2 filesystem.

To re-iterate, I find 2.79TiB  more space available with ashift=9 (49.62 TiB) vs ashift=12 (46.83TiB)
for a new 3.64TiB 16-disk raidz2 pool.

(I'd like to keep the 4K sector size, because in my limited performance testing I can write to the
the 4K sector size (ashift=12) array at ~271MiB/s vs ~228 MiB/s for the 512-byte sector size (ashift=9).)

Is this extra filesystem overhead expected for empty ashift=12 raidz2 pools? 
Is there anyway to reduce this overhead?

Cheers,

-Taylor


On Mar 24, 2012, at 9:42 AM, Alexander Leidinger wrote:

> On Fri, 23 Mar 2012 09:30:50 -0700 Taylor <j.freebsd-zfs at enone.net>
> wrote:
> 
>> I'm bringing up a new ZFS filesystem and have noticed something
>> strange with respect to the overhead from ZFS. When I create a raidz2
>> pool with 512-byte sectors (ashift=9), I have an overhead of 2.59%,
>> but when I create the zpool using 4k sectors (ashift=12), I have an
>> overhead of 8.06%. This amounts to a difference of 2.79TiB in my
>> particular application, which I'd like to avoid. :)
>> 
>> (Assuming I haven't done anything wrong. :) ) Is the extra overhead
>> for 4k sector (ashift=12) raidz2 pools expected? Is there any way to
>> reduce this?
> 
> This depends upon the data you write.
> 
> If your data is always a multiple of 4k, you will have probably less
> overhead (there is probably still overhead from ZFS metadata).
> 
> If your data is always only a multiple of 512 byte, you would have much
> less overhead on a ashift=9 FS than on a ashift=12 FS.
> 
> If the size of your data is random, and always less than 4k, you have
> more overhead than if the size of your data is random and always
> several GB big.
> 
> Bye,
> Alexander.
> 
> -- 
> http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
> http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137
> 



More information about the freebsd-fs mailing list