please consider the real pupose of swap. it is not for extra ram, it is not as emergency ram (even tough it works as such so system doesnt lock up and kernel oom has time to clean up to prevent a freeze)
But main purpose is memory organisation and its incredible important for it.
without it we cant page out anonymous pages as one of many examples where we need it.
what happens if swap is dead?
well not that much actually. systemcrashes are highly unlikely. However it crashes anything that reads and writes to it.
This is a problem on a proxmox host, with huge memory chunks from the VMs.
and i agree swap on zfs is bad, swap on non fault tollerant disks is bad too.
it may not crash the entire host but it may as well corrupt an entire vm.
another thing is vm.swappiness - this is not what people think it is and not what proxmox documented.
it does not reduce or increase swapping
it decides the ratio between file_prio and anon_prio
file_prio: reclaim file pages
anon_prio: reclaim anonymous pages
Default is 200 file_prio minus swappiness for anony.prio
example: vm.swappiness=10 equals 190 file_prio and 10 anon.prio
so its just a cost calculation. if you have nvmes as swap a swappiness of 100 can be incredible beneficial if you also have a lot of unlcaimed pages.
yea i know contrary to the proxmox documentation
now the issue is fault tollerance. we all know zfs is a nogo, mdraid seems to be an issue too.
btrfs i wouldnt trust it.
i see here 3 possible options:
#1 zram with enough ram, run at least 8gb or more
#2 hardware raid for pure swap disks
#3 a combination of both
iam currently also exploring zswap as its a combination of classic swap and zram, but i have my doubts about fault tollerance.