Hello,
I’m working on getting a system set up using TrueNAS and ZFS for storage and some virtualization tasks.
My ZFS configuration consists of:
- 6x 16TB WD Gold HDDs in RAID-Z2 for storage
- 1x 1TB WD Black SN850X for L2ARC
- 1x 1TB WD Black SN850X for SLOG
ZFS settings:
- Compression: lz4
- Deduplication: off
- Sync: see below
Note 1: I know that it’s not optimal to have a single SLOG drive, and that it should be mirrored, but I want to get a proof of concept that this system will work at all before I deal with fixing that.
Note 2: I know that a SLOG is not a write cache, but I’m going to use that terminology anyway.
The problem I’m having is storage performance.
Running fio in a VM, I get around 100~200 write IOPS.
Changing the sync settings for the dataset makes no difference, I’ve tried standard, always, and disabled, and it doesn’t appear to have any impact.
I previously had the storage pool configured with no SLOG and got ~10,000 IOPS average with sync=disabled, because the writes were being cached in memory, but then the memory cache has to be committed to storage every ~5 seconds (if I understand correctly). The user experience of storage grinding to a halt every 5 seconds is pretty bad, so I decided to reconfigure some drives and add a dedicated SLOG device.
I thought that adding a SLOG device would let me write near the write performance of the SLOG device, but instead adding a SLOG made everything slower.
Looking at the TrueNAS disk usage report, the SLOG device doesn’t look like it’s being used at all. Writes appear to be being sent directly to the HDDs, without being cached at all, in memory or on the SLOG. The noise coming from those drives during a fio run is awful.
My understanding is that there should be a way for ZFS to be configured such that write operations are written to the ZIL on the SLOG, and then reported to the application as being finished, which should effectively give me the write performance of SLOG device. What I really don’t understand is that I get worse performance with a SLOG while at the same time I get no utilization on the SLOG.
The goal is to have performance that’s acceptable for a modern graphical desktop user. It doesn’t have to be for the entire pool, just for a few select VMs that won’t be storing super critical data.
If anyone has any suggestions, I’d be happy to try them as I’m running out of ideas here.