rungekutta
Contributor
- Joined
- May 11, 2016
- Messages
- 146
Hi guys,
Looking for clarity on something...
So I understand that in the case of synchronous writes, the SLOG (ZIL) keeps an on-disk copy of the data that will be written to the pool in the next transaction group. As opposed to asynchronous, where between the 5s writes to the pool, ZFS keeps this data in RAM, meaning data loss in the case of a failure.
I have also read many times that
a) the SLOG needs to deliver low-latency writes in order not to slow down synchronous writes of clients
b) the SLOG needs power loss protection, otherwise it defeats the purpose of the SLOG in the first place (may just as well have used RAM)
Thinking about this a bit more, I don't see how these two can work together..? Specifically, does ZFS write to the SLOG and wait for the SLOG device to ack before responding back to the client? That would explain (a) above. HOWEVER that being the case, why would power loss protection be required on the SLOG device? As the client won't get the positive ack until the data has been securely written.
Alternatively, there is some in-flight scenario where ZFS in effect responds back to the client before the SLOG has fully committed the write. That would explain (b) above. But in that case, why would write-latency of the SLOG be so important for performance...? As there's some degree of asynchronous write to the SLOG anyhow.
I'm sure I'm missing something here so would appreciate some guidance...!
Looking for clarity on something...
So I understand that in the case of synchronous writes, the SLOG (ZIL) keeps an on-disk copy of the data that will be written to the pool in the next transaction group. As opposed to asynchronous, where between the 5s writes to the pool, ZFS keeps this data in RAM, meaning data loss in the case of a failure.
I have also read many times that
a) the SLOG needs to deliver low-latency writes in order not to slow down synchronous writes of clients
b) the SLOG needs power loss protection, otherwise it defeats the purpose of the SLOG in the first place (may just as well have used RAM)
Thinking about this a bit more, I don't see how these two can work together..? Specifically, does ZFS write to the SLOG and wait for the SLOG device to ack before responding back to the client? That would explain (a) above. HOWEVER that being the case, why would power loss protection be required on the SLOG device? As the client won't get the positive ack until the data has been securely written.
Alternatively, there is some in-flight scenario where ZFS in effect responds back to the client before the SLOG has fully committed the write. That would explain (b) above. But in that case, why would write-latency of the SLOG be so important for performance...? As there's some degree of asynchronous write to the SLOG anyhow.
I'm sure I'm missing something here so would appreciate some guidance...!