Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Sep 2010 10:23:55 -0500 (CDT)
From:      Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: what happens to pool if ZIL dies on ZFS v14
Message-ID:  <alpine.GSO.2.01.1009181007131.12887@freddy.simplesystems.org>
In-Reply-To: <20100917163732.GA59537@icarus.home.lan>
References:  <AANLkTi=vYVG300nhMjkcLju=kQhBdPJDqyaXR0mG84%2Bp@mail.gmail.com> <4C9385B0.2080909@shatow.net> <AANLkTin0LwQz%2BWi5cBOcHuVqyOz3%2BfFR7YC_=f2L5CyX@mail.gmail.com> <AANLkTinbPK1rNK5hg=t7N=sqFLuh8sNrZT9DFC_ppXWF@mail.gmail.com> <20100917161847.GA58503@icarus.home.lan> <AANLkTi=NX6koyj_xmadrTw8OvgCATPA=EQnTPmAxNGpo@mail.gmail.com> <20100917163732.GA59537@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 17 Sep 2010, Jeremy Chadwick wrote:
>>
>> This (dead ZIL == dead pool) only applies to separate log (slog) devices.
>
> I was under the impression ZFS still managed to utilise the ZIL when a
> pool didn't have any "log" devices associated with it (possibly some
> sort of statically-allocated amount of RAM?)

To clarify, the ZIL (ZFS Intent Log) is a non-volatile log of pending 
(uncomitted) synchronous write requests.  ZFS always has one.  A 
synchronous write does not return until the data is at least written 
into the ZIL.  If you "disable ZIL" then you are pretending that 
synchronous writes were immediately written (even when they were not). 
This will not endanger your pool, but recently requested synchronous 
writes may be lost (just as recent asyncronous writes may be lost) if 
the system loses power, or spontaneously reboots.

By default, ZFS will buffer up to 30 seconds of writes (async + sync) 
and in fact zfs writes are coherent so that synchronous writes are 
treated the same as asynchronous writes.  The only difference is that 
when a synchronous write completes, it is cleared from the ZIL.  The 
ZIL is used to replay buffered synchronous writes which did not 
complete prior to a system crash or unexpected reboot.

The 30 seconds of buffering only occurs on systems with a very large 
amount of RAM and/or a relatively slow write rate.  Otherwise, zfs 
will write data much more often.  If a system has limited RAM, then it 
will also buffer less data in the ZIL since it needs to write more 
often.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.2.01.1009181007131.12887>