In the near term, we could consider tweaking the systemd-oomd defaults in Ubuntu. According to the commit that added systemd-oomd in Jammy [1], the current config is based on Fedora's. This includes using the default value of SwapUsedLimit=90% [2]. However, Fedora has more swap space by default: a fresh install of Fedora 35 in a VM with 4GB of memory has 4GB of swap, whereas a fresh install of Jammy in a VM with 4GB of memory has 968MB of swap. So, maybe the default SwapUsedLimit is not appropriate for Ubuntu.
In the near term, we could consider tweaking the systemd-oomd defaults in Ubuntu. According to the commit that added systemd-oomd in Jammy [1], the current config is based on Fedora's. This includes using the default value of SwapUsedLimit=90% [2]. However, Fedora has more swap space by default: a fresh install of Fedora 35 in a VM with 4GB of memory has 4GB of swap, whereas a fresh install of Jammy in a VM with 4GB of memory has 968MB of swap. So, maybe the default SwapUsedLimit is not appropriate for Ubuntu.
[1] https:/ /git.launchpad. net/~ubuntu- core-dev/ ubuntu/ +source/ systemd/ commit/ ?h=ubuntu- jammy&id= 771fee9e73316c9 2e065e93946ec64 c578b43706 /www.freedeskto p.org/software/ systemd/ man/oomd. conf.html# SwapUsedLimit=
[2] https:/