Re: Dangerous hint in the PostgreSQL manual

From: Florian Weimer <fweimer(at)bfk(dot)de>
To: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Dangerous hint in the PostgreSQL manual
Date: 2007-12-11 10:26:05
Message-ID: 824pepr0hu.fsf@mid.bfk.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-docs

* 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(at)bfk(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Allan Kamau 2007-12-11 12:07:16 (Pl/SQL) Obtaining field names from record 'variable'
Previous Message Bansal, Gaurav (Gaurav) 2007-12-11 09:16:23 Postgres Start

Browse pgsql-docs by date

  From Date Subject
Next Message Andrew Sullivan 2007-12-11 13:42:31 Re: Dangerous hint in the PostgreSQL manual
Previous Message Listaccount 2007-12-11 08:23:38 Re: Dangerous hint in the PostgreSQL manual