Re: Dangerous hint in the PostgreSQL manual - Mailing list pgsql-admin

From Florian Weimer
Subject Re: Dangerous hint in the PostgreSQL manual
Date
Msg-id 824pepr0hu.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Dangerous hint in the PostgreSQL manual  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-admin
* Andrew Sullivan:

> You _want_ the fork to fail when the kernel can't (over)commit the
> memory, because otherwise the stupid genius kernel will come along
> and maybe blip your postmaster on the head, causing it to die by
> surprise.

The other side of the story is that with overcommit, the machine
continues to work flawlessly in some loads, when it would fail without
overcommit.  It's also not clear that trading a segfault for malloc
returning a null pointer leads to more deterministic failures (because
the malloc failure does not necessarily occur in the memory hog).

My personal experience is that vm.overcommit_memory=2 (together with
tons of swap space) leads to more deterministic failure behavior, but
we don't use much software that aggressively allocates address space
without actually using it (Sun's JVM does in some cases, and SBCL is
particularly obnoxious in this regard).

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

pgsql-admin by date:

Previous
From: "Bansal, Gaurav (Gaurav)"
Date:
Subject: Postgres Start
Next
From: Allan Kamau
Date:
Subject: (Pl/SQL) Obtaining field names from record 'variable'