I hope there will be an update where when my RAM gets full my PC doesn't freeze and becomes unusable... I remember that Linux and Windows do this in different ways and Windows doesn't have the problem.
Its not enabled by default, but enabling MGLRU setting /sys/kernel/mm/lru_gen/min_ttl_ms to 70 has entirely resolved the issue for me. It _does_ usually pick firefox or vscode to kill, but my system remains interactive, with no need for earlyoom.
Docs https://docs.kernel.org/admin-guide/mm/multigen_lru.html#thr...
> Windows doesn't have the problem
Maybe not in the same way then.
Anyways, you've unlocked an old memory of mine, where Windows would crap itself due to low RAM and the fonts and interface elements would render in a "compatible" way, like using "fixedsys" font everywhere.
Me too, but you can improve the behavior yourself too. It's been an issue with desktop linux and the default settings for a long time. You could maybe tune OOM killer settings, but another option is to use a package like earlyoom: https://man.archlinux.org/man/earlyoom.1.en
For me Windows becomes unusable as soon as any of my drives is being hammered, including when it is swapping, but not limited to it.
Solaris family kernels move this problem to run/allocation time, instead of waiting for the system to become unusable before trying to do something about it. Kinda nice
Are these directly comparable, though? Doesn't Windows default to using free space on the system drive to grow the swap file in case of memory pressure? Linux has you set up swap files/partitions explicitly.
earlyoom is what you're looking for. it'll crash the process instead of hang
When my RAM gets full the kernel kills Firefox (3 profiles) so the PC becomes unusable, with lost data.
Windows absolutely does have this problem.
zswap and systemd-oomd/earlyoom are your friends.
macOS too sadly. by the time you realise there's a problem the machine is already comatose and unresponsive
all these electron apps and invisible virtual machines (looking at you Claude) really don't help.
From my experience, Windows does freeze and become completely unusable too, just not usually from RAM usage hitting 100%.
I don't use Windows much, nor do I care much about that environment, but from what I've seen it seems to keep RAM usage below 100% most of the time. What I do see pretty often is the drive getting stuck at 100% usage instead, which makes the whole system ridiculously unusable anyway.