Date: Mon, 12 Jul 2010 05:47:46 -0700 From: Jeremy Chadwick <freebsd@jdc.parodius.com> To: S M <zw_uk@hotmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: zfs on 4k sector disks Message-ID: <20100712124746.GA9328@icarus.home.lan> In-Reply-To: <BAY150-w17E6D86F6878B0E22F7CBD83B80@phx.gbl> References: <BAY150-w17E6D86F6878B0E22F7CBD83B80@phx.gbl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 12, 2010 at 12:25:02PM +0000, S M wrote: > > I found that playing with either: > > (sysctl) vfs.zfs.txg.write_limit_override > > or > > (boot/loader.conf) vfs.zfs.txg.timeout=5 > (boot/loader.conf) vfs.zfs.txg.synctime=5 > > Helped with the write problem. What seems to happen is that zfs' calculations go slightly wrong if you have a lot of RAM and therefore zfs buffers too much, forcing so many writes that you lose all read IO for a few seconds.... This has little to do with 4KB sector disks, as it applies to 512-byte sector disks too. Some references: http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007343.html http://lists.freebsd.org/pipermail/freebsd-fs/2009-December/007355.html The values chosen (in your case, "5") greatly depend on the model and type of hard disk used. I stress the word "greatly". Others reading this mail should take that into consideration. The default values (meaning out-of-the-box) for these tunables is as follows (taken from RELENG_8's source as of a few minutes ago). I'm also including what source files were used to verify said claims. For a description of what these do, see sysctl -d. vfs.zfs.txg.synctime = 5 - src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c - src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c vfs.zfs.txg.timeout = 30 - src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c vfs.zfs.txg.write_limit_override = 0 - src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c - src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c The defaults may vary per person, based on what source branch/tag they use (ex. RELENG_8 vs. RELENG_8_0 vs. RELENG_7) and what build date your kernel is (since what's in /usr/src might not match the running kernel). To see if these values have changed over time (e.g. in an older release they may have been different), one should refer to cvsweb or equivalent. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100712124746.GA9328>