Anyone using DigitalOcean

Just wondering if anyone is using Digital Ocean with Ubuntu servers.
I’m using Ubuntu on my SBCs and typically run zram because of their small RAM size.
I tried to set up zram on my DO VPS, but no go. What’s the trick? zram-config installs and runs, but no swap file appears, even after a reboot. Maybe someone with some more Linux chops can help me figure out the issue?
Setting up a normal swapfile on DO works fine, but I prefer zram.

Thank you for making me aware of zram. I don’t use DO but Vultr, so I’m not sure if this will help you.

Ubuntu 20.04 was used as a test, then executed:

sudo apt install zram-config

after that there was no swap and didn’t reboot, tried zramswap status and it said to install zram-tools, installed zram-tools, zramswap status worked and said 0 for all metrics but still no swap. Reboot the system and now I have a 256MB zram swap for a 1GB test server.

So my only question is: did you install zram-tools? I hope that is the only thing missing and it works for you.

I had some DO credit, it doesn’t work I get errors:

modprobe: FATAL: Module zram not found in directory /lib/modules/5.4.0-73-generic
/usr/sbin/zramswap: line 49: /sys/block/zram0/disksize: No such file or directory
mkswap: cannot open /dev/zram0: No such file or directory
swapon: cannot open /dev/zram0: No such file or directory

when I do zramswap start. Sorry.

Never had to before on Ubuntu, but I’ll give it a try. I wonder if I need both zram-config and zram-tools or just one…

I was not able to make Zram work with Ubuntu 20 or 18 in DigitalOcean.

It worked without problems with Ubuntu 20 in Vultr.

Zswap works with Ubuntu 18 (I’ll test 20 later) in DigitalOcean, I read these guides:

but instead of modifying grub directly, I had to modify the file in grub.d

Yeah, not quite sure what’s being done differently on DO. As I said, I run Ubuntu 20.04 on my SBCs and zram is usually installed by default, but when it isn’t, it’s very easy to add.