what happens to pool if ZIL dies on ZFS v14

Freddie Cash fjwcash at gmail.com
Fri Sep 17 17:10:00 UTC 2010


On Fri, Sep 17, 2010 at 9:47 AM, Gil Vidals <gvidals at gmail.com> wrote:
> First, let me say that I'm receiving excellent input from the FreeBSD
> community. I'm new to FreeBSD and ZFS and this mailing list has been very
> helpful.
>
> I'm running ZFSv14 on FreeBSD 8.1 AMD64 with 8GB of DDR3 RAM with two SSDs -
> one for the ZIL and the other for the L2ARC cache.
>
> zambia# zpool iostat -v 1 1
>                     capacity     operations    bandwidth
> pool               used  avail   read  write   read  write
> ----------------  -----  -----  -----  -----  -----  -----
> tank              6.57G   921G      0     11   116K   438K
>  mirror          6.57G   921G      0      5   116K   229K
>    label/disk1       -      -      0      3  57.9K   229K
>    label/disk2       -      -      0      3  57.8K   229K
>  label/zilcache   136K  59.5G      0      6     17   209K
> cache                 -      -      -      -      -      -
>  label/l2cache   59.6G  8.50K      0      0  31.5K  48.9K
> ----------------  -----  -----  -----  -----  -----  -----
>
> Observing the ZIL Cache, I see it being used very sparingly. And now that I
> know the SSD slog must be mirrored in ZFS < v19, I think the best course of
> action (assuming I'm not buying more equipment) is to mirror the ZIL SSD and
> abandon the L2ARC altogether. Won't RAM be used for L2ARC instead?

The ZIL is only used for synchronous writes, and does not need to be
very large.  I forget the formula for determining the exact size of a
ZIL (something along the lines of the max amount of data you can write
in 30 seconds), but it's rarely more than 4 GB and usually in the 1-2
GB range.

If possible, you'd be better off rebuilding your pool like so:
  mirror disk1 and disk2
  slice both SSDs into two:  4-8 GB for ZIL, rest for L2ARC
  mirror zilcache1 zilcache2
  add l2cache1 l2cache2 (don't mirror them)

That way, you have a mirrored ZIL, and double the L2ARC.  However,
since it takes around 270 bytes of RAM for every object in the L2ARC,
you'll want to make sure you have lots of RAM to manage it (or,
possibly, make 3 slices on the SSDs and use the third for swap?).

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-fs mailing list