After few hours with dtrace and source code browsing I found that in my space 
map there are no 128K blocks left. 
Try this on your ZFS. 
  dtrace -n fbt::metaslab_group_alloc:return'/arg1 == -1/{}

If you will get probes, then you also have the same problem.
Allocating from space map works like this:
1. metaslab_group_alloc want to allocate 128K block size
2. for (all metaslabs) {
   read space map and check 128K block size
   if no block then remove flag METASLAB_ACTIVE_MASK
}
3. unload maps for all metaslabs without METASLAB_ACTIVE_MASK

Thats is why spa_sync take so much time.

Now the workaround:
 zfs set recordsize=8K pool

Now the spa_sync functions takes 1-2 seconds, processor is idle, 
only few metaslabs space maps are loaded:
> 00000600103ee500::walk metaslab |::print struct metaslab ms_map.sm_loaded ! 
> grep -c "0x"
3

But now I have another question.
How 8k blocks will impact on performance ?
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to