The second level of disk cache are SSD disks. This level is optional, and is easy to add or remove during live usage as there is no need to shut down the zpool. There are two different caches, one cache for reads, and one cache for writes.
- The read SSD cache is called L2ARC and is similar to Level 2 CPU cache. The L2ARC will also considerably speed up Deduplication, if the entire Dedup table can be cached in L2ARC. It can take several hours to fully populate the L2ARC (before it has decided which data is "hot", and should be cached). If the L2ARC device is lost, all reads will go out to the disks which slows down performance but nothing else will happen (no data will be lost).
- The write SSD cache is called the Log Device, and it is used by the ZIL (ZFS Intent Log). ZIL basically turns synchronous writes into asynchronous writes, which helps e.g. NFS or databases.[50] All data is written to the ZIL like a journal log, but only read after a crash. Thus, the ZIL data is normally never read. Every once in a while, the ZIL will flush the data to the zpool, this is called Transaction Group Commit. In case there is no separate log device added to the zpool, a part of the zpool will automatically be used as ZIL, thus there is always a ZIL on every zpool. It is important that the log device use a disk with low latency, for superior performance a disk consisting of battery backed up RAM, such as the ZeusRAM should be used. Because the log device is written to a lot, an SSD disk will eventually be worn out, but a RAM disk will not. If the log device is lost, it is possible to lose the latest writes, therefore the log device should be mirrored. In earlier versions of ZFS, loss of the log device could result in loss of the entire zpool, therefore one should upgrade ZFS if planning to use a separate log device.