For using zram I would use: apt install zram-tools zstd and configure: /etc/default/zramswap with zstd algorithm and whatever percent of RAM to use /etc/sysctl.d/99-vm-zram-parameters.conf vm.swappiness = 180 vm.watermark_boost_factor = 0 vm.watermark_scale_factor = 125 vm.page-cluster = 0