Pinebook Pro Setting Up Zram
Preamble
ZRAM is essentially compressed memory. Your system uses some of it's CPU cycles to compress redundant data into a reserved area of your ram. Think of it as swap space, but without writing to your drive.
This is how to enable zram on ALARM/Manjaro ARM
Enabling ZRAM
Checking if ZRAM is supported
$ insmod | grep zram
Output: zram ????? ?
If you get similar results, zram should be supported.
Setting up ZRAM
Load the zram module and create a 12GB zram device using lzo-rle
for
compression.
sudo modprobe zram && sudo zramctl -a lzo-rle -s 12G zram0
Enabling swapping on the zram device
sudo mkswap /dev/zram0 && sudo swapon /dev/zram0
Verify the 12GB of ZRAM is being used as swap
free -h
total used free shared buff/cache available
Mem: 3.7Gi 429Mi 2.7Gi 30Mi 562Mi
Swap: 11Gi 0B 11Gi