How to add ZIL write and L2ARC read cache SSD devices in FreeNAS
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: https://your-freenas-server-ip-here/ https://192.168.2.13/ Click on Storage > Volume Manger:
You must select: Volume to extend (such as nixcraft). Select SSD from available disks:
To add read cache is 120GB
Click on 120GB disk + icon from available disks > select cache (L2ARC) from Volume layout > And set size:
To add write cache is 64GB
Click on 64GB disk + icon from available disks > select Log (ZIL) from Volume layout > And set size:
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.