Skip to content

Instantly share code, notes, and snippets.

@dmytrokyrychuk
Created February 3, 2022 09:51
Show Gist options
  • Select an option

  • Save dmytrokyrychuk/8d9f74d14a62829e28f48b4277af1801 to your computer and use it in GitHub Desktop.

Select an option

Save dmytrokyrychuk/8d9f74d14a62829e28f48b4277af1801 to your computer and use it in GitHub Desktop.
Enable zram on Ubuntu 20.04 on DigitalOcean

The Ubuntu 20.04 image appears to come without extra modules, so they need to be installed additionally:

$ sudo apt install linux-modules-extra-$(uname -r)

Then simply install zram-config

$ sudo apt install zram-config

And then reboot.

Verify that zram is working:

cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/zram0                              partition	500180	82688	5

If you see the /dev/zramX devices in the output, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment