Default to zstd
Bug #1856043 reported by
Fábio Lima
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zram-config (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Package zram-config now defaults compression algorithm to lzo.
What about to change to zstd?
Even better: refactor the script and use zramctl, that manages in a better way.
init-zram-swapping can be like below. I changed this at my machine and works fine.
#!/bin/bash
# Calculate memory to use for zram (1/4 of ram)
modprobe zram 1
zram=$(zramctl --find --algorithm zstd --size $(($(cat /proc/meminfo | grep MemTotal | awk -F' ' '{print $2}') / 4))KiB)
mkswap $zram
swapon $zram
PS: I also suggest considering bug 1835726
It would be nice to test the default vs zstd and lz4.