Orange Pi Ubuntu 20 LTS Increase Zram/Swap Size

By default Orange Pi Lite is coming with 512 Mb zram/swap which makes it impossible to compile anything heavy on it. You can increase zram size to 1024 Mb with following steps.

sudo swapoff /dev/zram1
sudo zramctl --reset /dev/zram1
sudo zramctl --find --size 1024M # You can also set to 2 GB = 2048, 4 GB = 4096
sudo mkswap /dev/zram1
sudo swapon /dev/zram1 -p 5

You can check it now.

sudo swapon --show
free -h

More information about zramctl can be found here: