Showing posts from March, 2011

Adjusting ZFS resilvering speed

There are two kernel parameters that can be adjusted if ZFS resilvering speed is too slow/fast:

zfs_resilver_delay /* number of ticks to delay resilver */


zfs_resilver_min_time_ms /* min millisecs to resilver per txg */

In some cases the values can be too low or two high (e.g. when using Mirroring vs. RAIDZ).

A boost could be:

# echo zfs_resilver_delay/W0|mdb -kw # echo zfs_resilver_min_time_ms/W0t3000|mdb -kw

whereas a handbrake is e.g.:

# echo zfs_resilver_delay/W2|mdb -kw # echo zfs_resilver_min_time_ms/W0t300|mdb -kw

Disclaimer: Use at your own risk. Do not try on production systems without contacting support first.

Useful Dtrace One-Liners....

Finding write operations for a process. Especially when writing to a NFS share...

# dtrace -n 'fsinfo:::write /execname == "execname"/ \   { printf("%s", args[0]->fi_pathname) }'

Finding the top userland stacks for a process

# dtrace -n 'syscall:::entry /execname == "execname"/ \
  { @[ustack()] = count();}'

Finding the same for a certain system call

# dtrace -n 'syscall::mmap:entry /execname == "execname"/ \
  { @[ustack()] = count();}'

New ZFS Appliances...