1

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 or swapon to confirm that the device has been created and is in use.
  1. I installed zram-generator using cargo with the command cargo install zram-generator
  2. 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
  1. I ran systemctl daemon-reload
  2. Then I ran systemctl start /dev/zram0 but it timeout after a while
  3. zramctl return nothing and swapon --show return
NAME      TYPE      SIZE USED PRIO
/dev/sda4 partition  16G   0B   -2

Even a reboot changes nothing.

Did I do something wrong?

1 Answer 1

0

try with this conf instead ?

[zram0]
zram-size = ram / 2 
compression-algorithm = zstd
[zram1]
options = X-mount.mode=1777
mount-point = /var/compressed

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .