Open HRio opened 5 years ago
Ping. Any response?
sync-always
will just add latency, whats the need for it? I feel it will only add to the problems when we are in a state where we need to swap
My guess: I assume the reasoning here is that if we are under a condition of extreme memory pressure (e.g. swapping is required) then it doesn't make sense to use more memory to buffer these writes which would compound the problem
sync=always
means that the data first i written to the ZIL and then after that to the final media. Its in memory also when the write to the ZIL is done. Its not free'd from the memory until both the zil write and the write to final storage is fully ready. I.e. sync always in this case only ads to the time before we can free the memory
Actually I've also just stumpled over that. I've wanted to checkout what are recommended settings for swap devices, and noticed, that everybody recommends sync=always (but their commands look al the same, so I guess they've all copied from the same place). Could anybody with more insight tell if there is any reason why sync=always should be used than sync=disabled (Which seems to be the logical choice for me)
Looking in: https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device I see
why
sync=always
? if the system crashes all RAM will be lost. hence writing swap synchronously seems a bit too much.FreeBSD docs for reference: https://wiki.freebsd.org/RootOnZFS#ZFS_Swap_Volume
Why should it be
sync=always
when using zfs on linux, or is it a typo?