ZIL
also: ZFS Intent Log, SLOG
ZIL stands for ZFS Intent Log, a write-ahead log in ZFS that records pending changes to ensure data durability and consistency even if the system crashes before data is committed to the main storage pool.
The ZFS Intent Log (ZIL) is a critical component of the ZFS filesystem that acts as a temporary staging area for write operations. When data is written to a ZFS pool, it is first recorded in the ZIL before being asynchronously written to the main filesystem, ensuring that no data is lost even if the system crashes mid-operation.
The ZIL is typically stored on the same disks as the main pool, but can be placed on dedicated fast storage (like SSDs) called a SLOG (separate log device) to dramatically improve write performance for workloads with frequent synchronous writes. Without a separate log device, the ZIL shares I/O bandwidth with data storage.
When ZFS crashes and recovers, it replays the ZIL to restore any pending transactions that weren't yet written to the main pool. This provides atomic write semantics—transactions either fully complete or roll back, never leaving the filesystem in a corrupted intermediate state. Applications that require guaranteed write ordering, such as databases, benefit significantly from ZIL's protection.