How To Set And Use ZRAM swap revisions

Go back to topic: How To Set And Use ZRAM swap

  1. v3 anchor; v3 full version
  2. v2 anchor; v2 full version

Revision #3

Edited on
2023-09-07
Edited by user
deeplow

Revision #2

Edited on
2022-05-10
Edited by user
enmus
**The **zram** module is controlled by **systemd**, so there's no need for an fstab entry**, so let's load the module **The **zram** module is controlled by **systemd**, so there's no need for a fstab entry**, so let's load the module
Now we have to set disk size. I have decreased dom0's `maxmem` size to 1536MB so for sure all of that will be used, and the rest it'll be taken - from RAM! So I blindly set 6GB and watching its use. > $ sudo bash -c "echo 6G > /sys/block/zram0/disksize" Now we have to set disk size. I have decreased dom0's `maxmem` size to 1536MB so for sure all of that will be used, and the rest it'll be taken - from RAM! So I blindly set 8GB and watching its use. > $ sudo bash -c "echo 8G > /sys/block/zram0/disksize"
disksize="6G" #Set this accordingly to available RAM disksize="8G" #Set this accordingly to available RAM