Which M2.PCIe (2280) SSD for fast 'sync writes'

Joined
Oct 22, 2019
Messages
3,641
I don't think it's a matter of your entire pool failing if the SLOG dies, even during a powerloss.

I think it's a matter of losing "recently written" data.
 

saveZFS

Explorer
Joined
Jan 6, 2022
Messages
87
I don't think it's a matter of your entire pool failing if the SLOG dies, even during a powerloss.
So you mean that only the most recent data would then be lost?
I would be afraid that the metadata might then no longer be correct.
Can anyone else confirm this statement?
Then it would be usable in the home lab without any problems.
 
Joined
Oct 22, 2019
Messages
3,641
So you mean that only the most recent data would then be lost?
I would be afraid that the metadata might then no longer be correct.
How would it be any different from a random power outage without a SLOG, in which "sync" writes were using the ZIL area of the pool itself (located on the data drives)?

This means power outages would be causing a slew of corrupted pools and metadata.

ZFS is copy-on-write, so it's "either-or". Either you have it or you don't. Either the record was written and the pointer updated/created, or it wasn't. This includes metadata records as well.

A SLOG is just leveraging the performance of a faster device (compared to the devices that comprise your data pool). So instead of using a region on the data drives of the pool itself (ZIL), your sync writes use a separate (faster) device, which is your SLOG. Same issue, with or without one, in regards to powerloss or failure. You lose the most recently written data. The only difference is if your SLOG has built-in powerloss protection, which can "save" these recent writes; and upon rebooting the system, they will be read and written to the data drives of the pool.

Someone more versed in the nitty gritty can better explain this.
 
Last edited:

saveZFS

Explorer
Joined
Jan 6, 2022
Messages
87
Someone more versed in the nitty gritty can better explain this.
Thanks, now I understand.
And if the SLOG fails at the same time as the power loss, then only the most recent data is lost and not the entire pool.
So the whole thing is really just about the data of the last few milliseconds or maybe a few more seconds.
This may of course look different with databases (MS SQL, etc.), but in my private environment I no longer see any danger for myself thanks to your explanation.
 
Joined
Oct 22, 2019
Messages
3,641
So the whole thing is really just about the data of the last few milliseconds or maybe a few more seconds.
I think it’s about 5 seconds on average. (From the time it’s waiting in RAM to being written in a transaction group to the storage device, whether “async” to the data drives directly, or “sync” to the ZIL region of the data drives or SLOG device.)

I’m going from memory, so I could be wrong.

The ZIL or SLOG only comes into play for “sync” writes; however, I believe the same “5-seconds rule” applies when writing from RAM in a transaction group.
 

saveZFS

Explorer
Joined
Jan 6, 2022
Messages
87
I think it’s about 5 seconds on average. (From the time it’s waiting in RAM to being written in a transaction group to the storage device, whether “async” to the data drives directly, or “sync” to the ZIL region of the data drives or SLOG device.)
Then I think I'd be best off with an Intel P4510!
Although then I don't have any redundancy like in a mirror!

Then I only have to think about the perfect backup strategy for this use case!
 

saveZFS

Explorer
Joined
Jan 6, 2022
Messages
87
As promised, I made a few benchmarks and would like to share the results with you. Maybe it will help someone.
It is only one Intel SDD in a stripe.

Intel P4510 - MB/s (TrueNAS_128KiB - 2 Cores - 16GB RAM)
P4510 - MBs - TrueNAS_128KiB - 2 Cores - 16GB RAM.JPG

Intel P4510 - MB/s (TrueNAS_128KiB - 2 Cores - 32GB RAM)

P4510 - MBs - TrueNAS_128KiB - 2 Cores - 32GB RAM.JPG

Intel P4510 - MB/s (TrueNAS_128KiB - 4 Cores - 32GB RAM)
P4510 - MBs - TrueNAS_128KiB - 4 Cores - 32GB RAM.JPG


Intel P4510 - IOPS (TrueNAS_128KiB - 2 Cores - 16GB RAM)
P4510 - IOPS - TrueNAS_128KiB - 2 Cores - 16GB RAM.JPG

Intel P4510 - IOPS (TrueNAS_128KiB - 2 Cores - 32GB RAM)
P4510 - IOPS - TrueNAS_128KiB - 2 Cores - 32GB RAM.JPG

Intel P4510 - IOPS (TrueNAS_128KiB - 4 Cores - 32GB RAM)
P4510 - IOPS - TrueNAS_128KiB - 4 Cores - 32GB RAM.JPG


I am very happy with the result.
Many times faster than most consumer SSDs. Especially the IOPS are excellent from my point of view.

By increasing the RAM to 32GB and doubling the CPUs, I might have expected a little more.
However, this also shows that in my case 2 CPUs and 16GB RAM are generally sufficient.
Nevertheless, I am considering whether I should stick with 4 cores and 24GB or 32GB RAM.
 
Top