How do I know if my writes are off my ZFS cache in ram?

BoiDragon

Cadet
Joined
Feb 17, 2022
Messages
5
Hello! I have been trying to write a ton of data to my new server and I noticed that when I do so a lot of it is put in the ZFS write cache on my ram. I understand that this is normal but I am worried that If there were to be a blackout after I transfer files I would lose them in the ram cache. How do I know when all of the data is written to non-volitile disk?

Ryzen 5 2600
32 GB corsair vengence ram
Tuf gaming motherboard
5x 4tb ironwolf pro
EVGA 500 watt power supply
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Turn on sync writes to guarantee writes are committed to disk more quickly than the normal five second transaction group flush.

When that makes your writes very slow, look at adding a SLOG device (separate high speed log for the ZIL).

If you have no idea what I'm talking about, the ZIL/SLOG primer is over here:

 

BoiDragon

Cadet
Joined
Feb 17, 2022
Messages
5

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680

That's cute. :smile: I forgot to circle around and say that my guess is that this isn't really a concern. ZFS will always have flushed your data out to disk after a handful of seconds, sync writes or async. The maximum amount of time this would normally take is maybe fifteen seconds. If you manage to catch it off-guard, it can be a bit more than that, but it is UNLIKELY.
 
Top