ZIL in ramdisk?

vinod8cu

Cadet
Joined
Jun 25, 2022
Messages
5
I am setting up a new TrueNAS on a Dell PowerEdge server having 256 GB RAM. The server is on UPS. Do I need to have a high endurance, low latency NVMe for ZIL? I can easily allocate 16 GB to create ramdisk. There can be no dev faster and more enduring than RAM. Do I really need to setup a ZIL for a UPS backed server?
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
If you use a ramdisk, you could just set sync disabled - your data will be at the same risk.
If you need a SLOG dev depends on your workload
 

vinod8cu

Cadet
Joined
Jun 25, 2022
Messages
5
How common it is to disable sync on UPS backed NAS servers? Is there any risk that I am overlooking?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
All ZFS pools have a ZIL, (ZFS Intent Log). It's use is based on synchronous writes & the "sync" setting of the dataset(s) or zVol(s). This is in-pool, thus, potentially slower than an external LOG device.

ZFS supports an external log device, SLOG, (Separate LOG), attached to the pool. Again, only used for sync. writes & if the "sync" setting says to use it. Special SATA SSDs with write through or power loss protection can be used. Though newer, faster NVMe are the current recommended choice, (again either write through or with power loss protection). This power loss protection has nothing to do with your UPS. It's just enough to make sure any write to SLOG device is written to stable media on power loss.

The UPS does NOT help if the server crashes due to software failure, or internal hardware failure. In that case, a RAM disk based SLOG is as useful as disabling "sync" writes. Just as @c77dk says.

SLOG(s) are NOT general purpose write caches, as they only give help to sync. writes. And only to temporarily store those sync. writes. SLOG(s) are basically write mostly, as the real data is already in RAM awaiting the ZFS transaction group to be written to the pool. After that ZFS transaction group is written, the SLOG entry is no longer needed, and is basically ignored, with it being eventually over-written. SLOG(s) generally need to be on a storage device that can handle a huge amount of writes, reliably.


What is your use case?


Most SLOG(s) use cases, are for NFS, VM volumes on NFS or iSCSI zVol(s). Since the last 2 are basically using foreign file systems inside ZFS, they can get corrupt easily if their writes are not completely preserved, and written in order. Thus, the need for "sync=standard", (the default), for those zVol(s) or Datasets.

If your use case is not VM storage or NFS, then their is no need for a SLOG.
 
Top