On Manjaro I do this for 4 core cpu and 8gb ram:
$ su
$ nano /etc/modules-load.d/zram.conf
zram
$ nano /etc/modprobe.d/zram.conf
options zram num_devices=4
$ nano /etc/udev/rules.d/99-zram.rules
KERNEL=="zram0", ATTR{disksize}="1024Mb" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"
KERNEL=="zram1", ATTR{disksize}="1024Mb" RUN="/usr/bin/mkswap /dev/zram1", TAG+="systemd"
KERNEL=="zram2", ATTR{disksize}="1024Mb" RUN="/usr/bin/mkswap /dev/zram2", TAG+="systemd"
KERNEL=="zram3", ATTR{disksize}="1024Mb" RUN="/usr/bin/mkswap /dev/zram3", TAG+="systemd"
$ nano /etc/fstab
/dev/zram0 none swap defaults 0 0
/dev/zram1 none swap defaults 0 0
/dev/zram2 none swap defaults 0 0
/dev/zram3 none swap defaults 0 0
$ echo "vm.swappiness=40" > /etc/sysctl.d/swap.conf
nano /etc/fstab I comment old swap by #
But after these manupilations I got swap 0k/0k
How to setup Zram on MX 19
Re: How to setup Zram on MX 19
I moved Zram script to /etc/init.d/zram after I checked by command $ lsmod | grep zram
zram 28672 4
zsmalloc 28672 1 zram
Does it mean it were installed? How it is work. Does it work for all my 4-core or only 1-core cpu? But I see swap file in my system 2gb
zram 28672 4
zsmalloc 28672 1 zram
Does it mean it were installed? How it is work. Does it work for all my 4-core or only 1-core cpu? But I see swap file in my system 2gb
-
- Posts: 51
- Joined: Tue Oct 15, 2019 9:40 am
Re: How to setup Zram on MX 19
I would be interested in knowing how to set up ZRAM as well.
By the way, I found this article.
https://wiki.debian.org/ZRam
P.S. Haven't tried it myself.
By the way, I found this article.
https://wiki.debian.org/ZRam
P.S. Haven't tried it myself.
-
- Posts: 51
- Joined: Tue Oct 15, 2019 9:40 am
Re: How to setup Zram on MX 19
Ok I decided to give the wiki guide a go myself.
Ended up with 2.8 GB ZRAM and 4 GB physical RAM Also disabled swap partition from fstab.. Works smooth and fast enough and no crashes yet.
Ended up with 2.8 GB ZRAM and 4 GB physical RAM Also disabled swap partition from fstab.. Works smooth and fast enough and no crashes yet.
-
- Posts: 51
- Joined: Tue Oct 15, 2019 9:40 am
Re: How to setup Zram on MX 19
Ok now trying with swap partition enabled + higher priority ZRAM.