I gave it a go, but get errors:
purism@pureos:~$ systemctl status zramswap.service
● zramswap.service - Linux zramswap setup
Loaded: loaded (/lib/systemd/system/zramswap.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-10-20 14:18:28 CEST; 47s ago
Docs: man:zramswap(8)
Process: 695 ExecStart=/usr/sbin/zramswap start (code=exited, status=1/FAILURE)
Main PID: 695 (code=exited, status=1/FAILURE)
CPU: 45ms
okt 20 14:18:28 pureos systemd[1]: Starting Linux zramswap setup...
okt 20 14:18:28 pureos zramswap[695]: /usr/sbin/zramswap: rad 53: echo: skrivfel: Ogiltigt argument
okt 20 14:18:28 pureos root[743]: Error: setting compression algo to lz4
okt 20 14:18:28 pureos zramswap[743]: <13>Oct 20 14:18:28 root: Error: setting compression algo to lz4
okt 20 14:18:28 pureos systemd[1]: zramswap.service: Main process exited, code=exited, status=1/FAILURE
okt 20 14:18:28 pureos systemd[1]: zramswap.service: Failed with result 'exit-code'.
okt 20 14:18:28 pureos systemd[1]: Failed to start Linux zramswap setup.
Contents of /etc/default/zramswap:
# Compression algorithm selection
# speed: lz4 > zstd > lzo
# compression: zstd > lzo > lz4
# This is not inclusive of all that is available in latest kernels
# See /sys/block/zram0/comp_algorithm (when zram module is loaded) to see
# what is currently set and available for your kernel[1]
# [1] https://github.com/torvalds/linux/blob/master/Documentation/blockdev/zram.txt#L86
#ALGO=lz4
# Specifies the amount of RAM that should be used for zram
# based on a percentage the total amount of available memory
# This takes precedence and overrides SIZE below
PERCENT=50
# Specifies a static amount of RAM that should be used for
# the ZRAM devices, this is in MiB
#SIZE=256
# Specifies the priority for the swap devices, see swapon(2)
# for more details. Higher number = higher priority
# This should probably be higher than hdd/ssd swaps.
PRIORITY=100
I am getting the error with the compression algo, but no idea how to fix it.