On 10/09/2010 04:24, Bill Sommerfeld wrote:
C) Does zfs send zfs receive mean it will defrag?

Scores so far:
1 No
2 Yes

"maybe". If there is sufficient contiguous freespace in the destination
pool, files may be less fragmented.

But if you do incremental sends of multiple snapshots, you may well
replicate some or all the fragmentation on the origin (because snapshots
only copy the blocks that change, and receiving an incremental send does
the same).

And if the destination pool is short on space you may end up more
fragmented than the source.

There is yet more "it depends".

It depends on what you mean by fragmentation.

ZFS has "gang blocks", which are used when we need to store a block of size N but can't find a block that size but can make up that amount of storage from M smaller blocks that are available.

Because ZFS send|recv work at the DMU layer they know nothing about gang blocks, which are a ZIO layer concept. As such if your filesystem is heavily "fragmented" on the source because it uses gang blocks, that doesn't necessarily mean it will be using gang blocks at all or of the same size on the destination.

I very strongly recommend the original poster take a step back and ask "why are you even worried about fragmentation ?" "do you know you have a pool that is fragmented?" "is it actually causing you a performance problem?"

--
Darren J Moffat
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to