Skip to content

Instantly share code, notes, and snippets.

@duckyduckG
Forked from dmytrokyrychuk/guide.md
Created April 28, 2025 07:42
Show Gist options
  • Select an option

  • Save duckyduckG/3f5868b25414491b24da5a3c88ebcd75 to your computer and use it in GitHub Desktop.

Select an option

Save duckyduckG/3f5868b25414491b24da5a3c88ebcd75 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