I try to used zram-generator to create a zram device but it doesn't work.
I followed the steps listed in the README.md from the github repository.
- Install zram-generator using one of the methods listed above.
- Create a zram-generator.conf config file.
- Run
systemctl daemon-reload
to create new device units. - Run
systemctl start /dev/zram0
(adjust the name as appropriate to match the config). - Call
zramctl
orswapon
to confirm that the device has been created and is in use.
- I installed zram-generator using cargo with the command
cargo install zram-generator
- I created zram-generator.conf in /etc/systemd/zram-generator.conf
[zram0]
host-memory-limit = none
zram-size = min(ram / 2, 8192) # I have 16Go of RAM on my host
- I ran
systemctl daemon-reload
- Then I ran
systemctl start /dev/zram0
but it timeout after a while zramctl
return nothing andswapon --show
return
NAME TYPE SIZE USED PRIO
/dev/sda4 partition 16G 0B -2
Even a reboot changes nothing.
Did I do something wrong?