Re: Some interesting news about Linux 3.12 OOM - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Some interesting news about Linux 3.12 OOM
Date
Msg-id m2li2szspg.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Some interesting news about Linux 3.12 OOM  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Some interesting news about Linux 3.12 OOM
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I laughed, too, but the reality is that at least as far as PG is
> concerned it's probably a truthful statement, and if it isn't, nobody
> here is likely to complain about having to fix it.  Yeah, there's a
> lot of other code out there not as well written or maintained as PG,
> but using SIGKILL as a substitute for ENOMEM because people might not
> be checking the return value for malloc() is extremely heavy-handed
> nannyism.

I've been told at several instances that this has been made for the JVM
and other such programs that want to allocate huge amount of memory even
if they don't really intend to use it.

Back in the day that amount could well be greater that the actual amount
of physical memory available. So the only way to allow Java applications
on Linux was, as I've been told, to implement OOM. And as the target was
the desktop, well, have it turned on by default.

Now, I liked that story enough to never actually try and check about it,
so if some knows for real why the linux kernel appears so stupid in its
choice of implementing OOM and turning it on by default…

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Some interesting news about Linux 3.12 OOM
Next
From: Andres Freund
Date:
Subject: Re: Some interesting news about Linux 3.12 OOM