systemd / zram-generator

Systemd unit generator for zram devices
MIT License
584 stars 50 forks source link

ram size not being read from the config #136

Closed KarthikNayak closed 2 years ago

KarthikNayak commented 2 years ago

Hello!

I have a very minimal use case of this tool, I just want a /dev/zram0 partition which has the same size as my ram. I created the config file as follows:

❯ cat /etc/systemd/zram-generator.conf
[zram0]
zram-size = ram / 1

and followed the instructions as mentioned on the README. But it doesn't seem to be using my config.

❯ free -h
               total        used        free      shared  buff/cache   available
Mem:            15Gi       1.4Gi        12Gi        46Mi       1.3Gi        13Gi
Swap:          4.0Gi          0B       4.0Gi

❯ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   4G   0B  100

Did I miss something?

keszybz commented 2 years ago

Which program version are you using?

KarthikNayak commented 2 years ago

@keszybz

❯ pacman -Qe | grep zram
zram-generator 0.3.2-1
keszybz commented 2 years ago

zram-size option was only added in 1.1.0. Please use zram-fraction and max-zram-size instead.

KarthikNayak commented 2 years ago

@keszybz thank you so much!