ZFS configurations and options

Yes it improve sync writes. But this is not write cache. This is separate log device. Zfs does not have write cache. Cache it something when you firstly write Next sometimes read from cache. ZFS SLOG readed only when recovering after Power outage! Thats why this is not write cache!

Of course more productive will be move full db on ssd. And we finally waited for this.

Except that from a userspace perspective it does cache writes, the write operations that occur through a SLOG are called write-through synchronous operations, which is a form of write caching from the userspace perspective. This means that it is written to both the SLOG and the backing storage array. The write is acknowledged to userspace once the SLOG has been written to, which again, is the function of a write-through cache.

That will wrap up my discussion points on ZFS SLOGs, sorry @littleskunk.

Sync writes always write in log and storage include setup when slog not exist. Nobody call this “caching”.

I think we should discuss ZFS in another thread, because it is off-topic here. However, what you call “write cache” is precisely for sync writes and SLOG helps with them. Async writes already go to memory first and do not need (or even use) SLOG.

1 Like

I dont call it “write cache” . I call it separate log device according zfs documentation. This is about i wrote about zfs here.

sgc, me and some others already discussed lots of zfs related stuff in here: Zfs discussions

And we all agree that using a SLOG is very helpful. If you call it a write cache or not doesn’t matter. The point is, it significantly reduces the write load on the drive.

(Without SLOG the data has to be written to the HDD [zil on disk] which is slow and has to happen immediately so the client gets a success response.
With SLOG the data gets written to the SLOG and stays in RAM. It will then get flushed from RAM to disk every 5 seconds. This reduces HDD load and you can call this write cache if you want because the data stays cached in RAM. But I don’t care how you call it, we’re not here to discuss names…)