Don’t be confused by cached ram, be confused by the oom killer activating while you have plenty of swap and for some reason it kills the shell you ran Firefox from.
If you want to go on a memory allocation adventure try disabling memory overcommit 🥲
systemd-oomd with its memory pressure model never really worked for me, even after configuring it to be fairly aggressive. My system still irreversibly locks up the second the memory and swap touches 100%. earlyoom with its more primitive model works much better and actually kills processes before the memory and swap hits the ceiling. Combine this with a 2x RAM size swap file and desktop Linux is finally as stable as Windows and macOS. It is just a shame that distros do not configure generous, dynamically growing, swap files and a good oom killer by default, and you have to discover this fundamental problem of the Linux kernel yourself on multiple different devices before realizing what you actually need to do to fix these random freezes.
Don’t be confused by cached ram, be confused by the oom killer activating while you have plenty of swap and for some reason it kills the shell you ran Firefox from.
If you want to go on a memory allocation adventure try disabling memory overcommit 🥲
systemd-oomd with its memory pressure model never really worked for me, even after configuring it to be fairly aggressive. My system still irreversibly locks up the second the memory and swap touches 100%. earlyoom with its more primitive model works much better and actually kills processes before the memory and swap hits the ceiling. Combine this with a 2x RAM size swap file and desktop Linux is finally as stable as Windows and macOS. It is just a shame that distros do not configure generous, dynamically growing, swap files and a good oom killer by default, and you have to discover this fundamental problem of the Linux kernel yourself on multiple different devices before realizing what you actually need to do to fix these random freezes.
If you’re out of ram and using swap thats when the oom killer should be killing. Swap is not ram.
Unless you use zram. Compressing pages is pretty useful as an intermediate stage.
The swap is zram in this case.