-
I have a slog with power loss protection and I'm wondering if special vdevs need plp too, when you already have a slog with plp? Does every write to special go through the slog first? This also roused another question in me, which is; what happens to async writes in general on power loss, when you have a proper slog? I assume all writes in zfs actually become sync writes at some point? Or are async writes actually never used in practice except for caching? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
ZFS respects application requests. Sync writes are first written into SLOG and then as part of TXG commit written to the main pool (or special vdev, there is no difference). Async writes are waiting for the TXG commit in memory, and if power is lost before the last synchronize cache request of the commit -- they are lost. You should probably read what exactly the PLP promise you for specific vendor/model. ZFS does not need every write to the device to be immediately persistent. It sends synchronize cache requests when required, and once those requests are completed -- data must be safe on non-volatile storage. SSDs with supercaps or other PLP techniques may be able to handle those requests much faster, like 10us instead of 500us, that is critical for SLOG, but not really for other vdevs if SLOG is present. |
Beta Was this translation helpful? Give feedback.
ZFS respects application requests. Sync writes are first written into SLOG and then as part of TXG commit written to the main pool (or special vdev, there is no difference). Async writes are waiting for the TXG commit in memory, and if power is lost before the last synchronize cache request of the commit -- they are lost.
You should probably read what exactly the PLP promise you for specific vendor/model. ZFS does not need every write to the device to be immediately persistent. It sends synchronize cache requests when required, and once those requests are completed -- data must be safe on non-volatile storage. SSDs with supercaps or other PLP techniques may be able to handle those request…