Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Mar 2014 14:00:03 -0700
From:      Freddie Cash <fjwcash@gmail.com>
To:        Dmitry Morozovsky <marck@rinet.ru>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: zfs l2arc warmup
Message-ID:  <CAOjFWZ7h5080%2BzEvSfzxgENwP%2BPXEXKPXdEDHAtbx5RAxxWT0g@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1403290032070.60856@woozle.rinet.ru>
References:  <CAFfb-hpi20062%2BHCrSVhey1hVk9TAcOZAWgHSAP93RSov3sx4A@mail.gmail.com> <CALfReydi_29L5tVe1P-aiFnm_0T4JJt72Z1zKouuj8cjHLKhnw@mail.gmail.com> <CAFfb-hpZos5-d3xo8snU1aVER5u=dSFRx-B-oqjFRTkT83w0Kg@mail.gmail.com> <20140328005911.GA30665@neutralgood.org> <CAFfb-hr=wR6nxqL%2B4tn-y2eQEw4n_g7rZoK9rRLnm_Ldcm1TZQ@mail.gmail.com> <alpine.BSF.2.00.1403290032070.60856@woozle.rinet.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 28, 2014 at 1:40 PM, Dmitry Morozovsky <marck@rinet.ru> wrote:

> On Fri, 28 Mar 2014, Joar Jegleim wrote:
>
> [snip most of]
>
> > > Have you measured to see if, or do you otherwise know for sure, that
> you
> > > really do need a ZIL? I suggest not adding a ZIL unless you are certa=
in
> > > you need it.
> > Yes, I only recently realized that too, and I'm really not sure if a
> > zil is required.
> > Some small portion of files (som hundre MB's) are served over nfs from
> > the same server, if I understand it right a zil will help for nfs
> > stuff (?) , but I'm not sure if it's any gain of having a zil today.
> > On the other hand, a zil doesn't have to be big, I can simply buy a
> > 128GB ssd which are cheap today .
>
> Please don't forget that, unlike L2ARC, if you lost ZIL during sync write=
,
> you're effectively lost the pool.
>

=E2=80=8BNope.  Not even close.

The ZIL is only ever read at boot time.  If you lose the ZIL between the
time the data is written to the ZIL and the time the async write of the
data is actually done to the pool ... and the server is rebooted at that
time, then you get an error message at pool import.

You can then force the import of the pool, losing any *data* in the ZIL,
but nothing else.

It used to be (back in the pre-ZFSv=E2=80=8B13-ish days) that if you lost t=
he ZIL
while there was data in it that wasn't yet written to the pool, the pool
would fault and be gone.  Hence the rule-of-thumb to always mirror the ZIL.

Around ZFSv14-ish, the ability to import a pool with a missing ZIL was
added.

Remember the flow of data in ZFS:
  async write request --> TXG --> disk
  sync write request --> ZIL
               \--> TXG --> disk

All sync writes are written to the pool as part of a normal async TXG after
its written sync to the ZIL.  And the ZIL is only ever read during pool
import.

=E2=80=8B[Note, I'm not a ZFS developer so some of the above may not be 100=
%
accurate, but the gist of it is.]=E2=80=8B

--=20
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ7h5080%2BzEvSfzxgENwP%2BPXEXKPXdEDHAtbx5RAxxWT0g>