ZFS write stalls (starving reads) and tuning zfs_write_limit_override

Nikolay Denev ndenev at gmail.com
Fri Feb 19 07:42:39 UTC 2010


Hi,

I'm experiencing a problem mentioned numerous times in the OpenSolaris mailing lists,
and that is IO stalls while ZFS commits the current TXG, which starves all other IO.

One of the solutions proposed there was to tune the zfs_write_limit_override tunable,
so the maximum TXG size could be smaller than the default (that I think is auto-calculated from
the available system memory)

It seems that this is also available on FreeBSD but the tunable in question was not declared
az FreeBSD TUNABLE/SYSCTL, so I just went and added the following lines :

  SYSCTL_DECL(_vfs_zfs);
  TUNABLE_ULONG("vfs.zfs.write_limit_override", &zfs_write_limit_override);
  SYSCTL_ULONG(_vfs_zfs, OID_AUTO, zfs_write_limit_override, CTLFLAG_RW, &zfs_write_limit_override, 0,
      "Override maximum TXG size");

to src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c at line 50

With this tunable I'm now able to throttle/limit the write bursts and this gives me a smoother
iSCSI writes as opposed to the 5 sec periodic drops to zero IOPS/MBs from before.


--
Regards,
Nikolay Denev






More information about the freebsd-fs mailing list