ZFS ZFS Fragmentation

Hi,

I know this gets over done, but I think I have an interesting case study. I've done a little reading and understand that the reported FRAG number is more about free space fragmentation and is not generally a concern. The only "fix" I can find for high fragmentation is to copy the data off, recreate the pool and copy back.

I have just created a brand new pool and done nothing but zfs send/receive three filesystems onto it and I have:

Code:
# zpool list jbod
NAME   SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
jbod  7.25T  6.71T   549G    55%         -    92%  1.00x  ONLINE  -

I know it's way too full and I will be moving quite a bit off it, but the FRAG increased quite quickly as I filled the pool. It was at 40% FRAG when only 80% full.

Is this expected behavior?
 
Unfortunately this is well known to happen with ZFS. IIRC you can proactively add a separate log (ZIL) device to a new pool before copying the data over to it to somewhat mitigate it. I can't comment on how well this works however as I only have a few small pools with no log devices. Someone else may have more insight.

Edit: This is a blog post I had bookmarked a while a back on this subject. You may or may not find it useful.
 
Back
Top