How to enable the zRAM module for faster swapping on Linux

2471

If you’ve dealt with Linux long enough, you are fully aware of swap. If you’re relatively new to Linux, this is what you need to understand about a swap partition: The swap partition is a dedicated partition to be used when a system runs out of RAM. When this happens, inactive pages are moved out of RAM and into the swap partition.

The problem with swap is that it typically resides on drives that are slower than the RAM installed on a system. Of course, this is Linux, so there’s always a way around this. Said way is the zRAM module. What this does is dedicate a portion of RAM to serve as the swap space.

[Source: TechRepublic]