6 ms·
Why is this so difficult on Linux? I've used Windows since 3.11, but I've never had anywhere close to the infuriating OOM issues I experience on Linux. It feel
by magicalhippo 4y ago
Why is this so difficult on Linux? I've used Windows since 3.11, but I've never had anywhere close to the infuriating OOM issues I experience on Linux.
It feels like the whole system is designed so that it can only do the least sensible thing when it runs out of memory.
- alyandon 4y agoThis rather humorous take is still as relevant today as it was in 2004 - https://lwn.net/Articles/104185/ https://lwn.net/Articles/104185/
- perryizgr8 4y agoWindows has the best handling for when you run out of memory. It almost never kills stuff, and has a reasonable swap by default. Macos will just kill your latest app and throw an idiotic dialog box that's of no use now that the biggest offender has already been killed. It seems Linux has similar issues.
- djur 4y agoLinux allows memory overcommitment and Windows does not. On Windows, when the system is out of memory, attempts to allocate more will fail. Each running application has to decide from there on out exactly what to do. On Linux, running processes can allocate more memory than is available, and the OOM condition is triggered when too much of that memory is actually used. Once that happens, the OS has to decide which process to kill in order to reclaim some memory.
- karelpeeters 4y agoThis has always seemed so strange to me, where are all of these applications that allocate a bunch of memory and then never use it? Isn't this just a chicken-and-egg thing where linux allowed this and then programs started depending on it?
- hulitu 4y agoFun times. Until Win XP SP1, i think, if the memory is full windows will just crash.
- magicalhippo 4y agoThanks to being a n00b programmer at the time, I ran out of memory on NT4 plenty of times and it handled that more gracefully than my Linux desktop today. Whatever you're talking about must have been some specific issue.
- zamadatix 4y agoSounds more like a general memory allocation bug in some patch level of Windows XP SP1 than a change in OOM behavior.