How to add ZIL write and L2ARC read cache SSD devices in FreeNAS

Posted on in Categories , , , last updated June 24, 2017

How do I add the write cache called the ZIL and read cache called L2ARC to my my zroot volume? How do I extend my existing zroot volume with ZIL and L2ARC ssd disks of FreNSA server?

ZFS is a file system and logical volume manager originally designed by Sun Microsystems. ZFS used by Solaris, FreeBSD, FreeNAS, Linux and other FOSS based projects. To improve performance of ZFS you can configure ZFS to use read and write caching devices. Usually SSD are used as effective caching devices on production Network-attached storage (NAS) or production Unix/Linux/FreeBSD servers.

More on ZIL

The ZIL is an acronym for ZFS Intent Log. A ZIL act as a write cache. It stores all of the data and later flushed as a transnational write. You can see benefit of a ZIL with a database server such as Oracle, MariaDB/MySQL, PostgreSQL. File server such as NFS and block-level access to storage devices such as iSCSI. If possible configure ZILs using a mirrored disk. Otherwise use some sort of power protection such as APC UPS for FreeNAS server.

More on L2ARC

The L2ARC is an acronym for Level 2 Adjustable Replacement Cache. A L2ARC act as a read cache. You can frequently cache accessed data in RAM using ARC caches. The idea is basic. You must access data from RAM instead of going to your software RAID. As you store more and more data on your server, the percent of data that can store in the cache gets less and less. To solve this problem, one can use the L2ARC. Usually faster SSD used to improve performance. L2ARC act as an extension of the ARC cache.

Configure ZIP and L2ARC in FreeNAS

Open your web-admin panel by typing the URL in a web browser:

Click on Storage > Volume Manger:

Fig.01: FreeNAS web interface
Fig.01: FreeNAS web interface

You must select: Volume to extend (such as nixcraft). Select SSD from available disks:
Fig.01:  Write cache is 64GB and the read cache is 120GB
Fig.01: Write cache is 64GB and the read cache is 120GB

To add read cache is 120GB

Click on 120GB disk + icon from available disks > select cache (L2ARC) from Volume layout > And set size:

Fig.03: Setting L2ARC SSD
Fig.03: Setting L2ARC SSD

To add write cache is 64GB

Click on 64GB disk + icon from available disks > select Log (ZIL) from Volume layout > And set size:

Fig.04: Setting ZIL SSD
Fig.04: Setting ZIL SSD

Finally click on the Extend Volume button.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment