This is a step by step tutorial shows how to enable zram Kernel module and use as Swap device for better system performance in Ubuntu 24.04 PC/laptop with limited RAM.
As you may know, Ubuntu usually includes a swap space. It works like MS Windows’ “virtual memory”, that uses the hard disk for additional memory when there is not enough physical RAM for all tasks request.
Swap on disk however is slow, which will slow down the overall system performance. So, Linux introduced “zram” and “zswap” kernel modules to improve performance for computers with small amount of RAM.