Earlier quoted context omitted.
> Both Windows and macOS do so much better out of the box for essentially any workload. We test FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows in Zig's CI fleet. Of these, Windows is the only OS that we've had to configure with swap double the size of physical RAM to not hit completely unjustifiable OOMs. By "unjustifiable", I mean that we're not even close to actually running out of physical memory (let alone s…
Windows seems to work a lot better with a 16MB page file for whatever reason, just because it refuses to enable memory compression without it. Fucking stupid
PostgreSQL and the OOM killer: Why we use strict memory overcommit
111–120 of 140 posts
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#112Linux vm defaults are legit insane in 2026. - system dies under memory pressure (regardless of swapping, actually not having swap makes it worse which should be common knowledge by now) - system dies under disk pressure even if there are tons of free memory (this one is fun to diagnose) - system can technically not die, but render itself useless (or worse) under memory pressure by the oom killer - memory compression…
What are better defaults for 2026+?
for some more user sanity huge ram consumers under memory pressure should be suspended, paged out as much as possible and the user notified (macOS does it right)
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#113Earlier quoted context omitted.
If a memory allocations fails with strict mode then you'll get a null pointer returns and some kind of crash or panic (in code that doesn't handle it properly). If it fails with the default mode the whole process will get killed by the OS. Is that really much better?
OOM is better. If a program doesn't handle ENOMEM properly, then its state is unpredictable and can lead to data corruption.
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#114Linux vm defaults are legit insane in 2026. - system dies under memory pressure (regardless of swapping, actually not having swap makes it worse which should be common knowledge by now) - system dies under disk pressure even if there are tons of free memory (this one is fun to diagnose) - system can technically not die, but render itself useless (or worse) under memory pressure by the oom killer - memory compression…
> Both Windows and macOS do so much better out of the box for essentially any workload. We test FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows in Zig's CI fleet. Of these, Windows is the only OS that we've had to configure with swap double the size of physical RAM to not hit completely unjustifiable OOMs. By "unjustifiable", I mean that we're not even close to actually running out of physical memory (let alone s…
It sounds like the application wanted to allocate contiguous regions of memory when none were available. That's a typical indicator of an 'early' OOM condition.
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#115Earlier quoted context omitted.
Which, 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.
You 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.
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#116Earlier quoted context omitted.
damn, 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
That's what I've seen Linux do too. What's different about how Windows chooses a process to kill?
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#117Earlier quoted context omitted.
Windows seems to work a lot better with a 16MB page file for whatever reason, just because it refuses to enable memory compression without it. Fucking stupid
My curiosity is piqued. What reason did you have to disable the page file?
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#118Earlier quoted context omitted.
Why are programs even allocating memory that they don't use?
Because no one can predict the future, and they don't know how many resources they will need.
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#119Earlier quoted context omitted.
> Both Windows and macOS do so much better out of the box for essentially any workload. We test FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows in Zig's CI fleet. Of these, Windows is the only OS that we've had to configure with swap double the size of physical RAM to not hit completely unjustifiable OOMs. By "unjustifiable", I mean that we're not even close to actually running out of physical memory (let alone s…
Windows seems to work a lot better with a 16MB page file for whatever reason, just because it refuses to enable memory compression without it. Fucking stupid
Re: PostgreSQL and the OOM killer: Why we use strict memory overcommit
#120Linux vm defaults are legit insane in 2026. - system dies under memory pressure (regardless of swapping, actually not having swap makes it worse which should be common knowledge by now) - system dies under disk pressure even if there are tons of free memory (this one is fun to diagnose) - system can technically not die, but render itself useless (or worse) under memory pressure by the oom killer - memory compression…
> Both Windows and macOS do so much better out of the box for essentially any workload. We test FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows in Zig's CI fleet. Of these, Windows is the only OS that we've had to configure with swap double the size of physical RAM to not hit completely unjustifiable OOMs. By "unjustifiable", I mean that we're not even close to actually running out of physical memory (let alone s…
NT is optimized, since day one, to swap.
This is a feature, not a bug.