On one of my FreeBSD hosts I use swap on ZFS configured this way: ``` zfs create -V 64gb -o org.freebsd:swap=on -o checksum=off -o compression=off -o dedup=off -o sync=disabled -o primarycache=none zroot/swap swapon /dev/zvol/zroot/swap ``` The thing is… the swap is used in 1% there but I get OOMs from the kernel with Influxdb using a bit over 50G RSS. Had exactly the same issue on one arm64 machine also with ZFS, crashing the same way… having gigabytes of free swap available. Seems like swap on ZFS is not a real thing, or it simply doesn't work well?
(In reply to dmilith from comment #0) > … crashing … FYI <https://github.com/openzfs/zfs/issues/7734> >> Swap deadlock in 0.7.9 · Issue #7734 · openzfs/zfs
Swapping to ZFS volumes isn't reliable because writing to ZFS can require further allocations. The common safe configuration uses GEOM mirrored swap partitions for disk redundancy and GELI for encryption. Of course this doesn't help you if you've already allocated all your disk space to ZFS.