Don't use Zram, use Zswap. Especially if you want to swap to disk.
https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-...
> Especially if you want to swap to disk.
if you don't want to swap to disk you should not use zswap.
zram is ideal in that scenario, though it may complicate OOM killer considerations (you may want a userspace one).
I've tried for running bsdiff and zswap was slower and spilled out data to the disk (which would wear an SSD).
I never want to swap to disk. If I'm ever in that situation, it means I did something wrong, so I want my userspace OOM killer to trigger and inform me of my mistake immediately instead of wasting time and SSD endurance delaying the inevitable. But zram with lz4 compression is effectively free RAM in most circumstances, so there's little reason not to enable it.