3 ms·
The reason you hear less about Window's OOM killer is simply because it works well. The Linux Kernel OOM killer kills random things. Userspace OOM killers are
by tredre3 4mo ago
The reason you hear less about Window's OOM killer is simply because it works well.
The Linux Kernel OOM killer kills random things. Userspace OOM killers are meant to improve this, and they work well in a server situation when you already know in advance what is likely to go haywire and what is safe to kill. But they don't work well on desktop (some of them are improving but it doesn't seem to be a priority).
The Windows OOM killer by comparison usually kills something sensible (i.e. the program that is actually using all the memory), and asks the user for permission before killing it (when possible). You do see a lot of memes of situations where it fails.
- nok22kon 4mo agodamn, good observation, when my data analysis python script goes wrong and allocates 24 GB of RAM on a 32 GB computer, it crashes (gets killed) with "out of memory" error. I've never seen something else getting killed
- deleted 4mo ago[deleted]
- frollogaston 4mo agoThat's what I've seen Linux do too. What's different about how Windows chooses a process to kill?
- 0x1d7 4mo agoWindows doesn't kill.
- man8alexd 4mo ago> The Linux Kernel OOM killer kills random things. By default, the Linux kernel kills the largest process in the system (unless OOM adjust was applied).
- 0x1d7 4mo agoWhich, by default, is dumb for a presumably interactive system. Photoshop (or equiv) is going to be my "largest" process on a system. Because it's the one I'm interacting with. Don't kill what I'm using.
- man8alexd 4mo agoYou can always tell the system not to kill your Photoshop (or whatever else) by setting the OOM Score Adjust. This mechanism has existed for almost two decades and systemd has supported it for over a decade.
- 0x1d7 4mo agoYes, you can but the fact that I have to do it makes for a poor system.
- silon42 3mo agoA better default would be to first kill the processes with largest over-commit, then other if needed.
- man8alexd 3mo agoWhy do you think it is a better default? What does it solve?
- senfiaj 4mo agoI think Windows doesn't do OOM kill, it just fails fast for unreasonably large memory allocations. If the allocation is succeeds, the committed virtual pages are backed up (or more precisely guaranteed to be backed up) by a page file.