Ancient laptop, ZSWAP and systemd-oomd.service

Hi,

I have an ancient laptop with only 2 GB of memory.

That’s why oomd often kills my processes.

I think moving the SWAP to disk will solve the problem.

I found

https://wiki.archlinux.org/title/Btrfs#Swap_file

Is this acceptable for Fedora?

A couple more questions:

  1. What file size should I make?
  2. Wouldn’t it be better to disable SWAP on ZRAM?

OS = Fedora 38 Cinnamon

Thanks.

I’m afraid it can only mitigate the problem to some extent.
You’ll likely still encounter OOM while using modern software with huge RAM requirements, such as browsers.

About 1-4 GB depending on your personal workflow and preferences.
More than that would likely be unbearable to tolerate.

Yes, you can do that:

sudo systemctl mask systemd-zram-setup@zram0.service
sudo systemctl stop systemd-zram-setup@zram0.service

That should work.