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

From Bruce Momjian
Subject Re: Dangerous hint in the PostgreSQL manual
Date
Msg-id 200712161124.lBGBOmU13812@momjian.us
Whole thread Raw
In response to Re: Dangerous hint in the PostgreSQL manual  (Listaccount <lst_hoe01@kwsoft.de>)
List pgsql-admin
Listaccount wrote:
> Yes, but the documentation should at least warn if some setting
> *could* lead to trouble you would not have otherwise.
>
> > What I _would_ support in the docs is the following addition in 17.4.3,
> > where this is discussed:
> >
> >     . . .it will lower the chances significantly and will therefore
> >     lead to more robust system behavior.  It may also cause fork() to fail
> >     when the machine appears to have available memory.  This is done by
> >     selecting. . .
> >
> > Or something like that.  This would warn potential users that they really do
> > need to read their kernel docs.
>
> On this one we can agree. Maybe we should mention the root-cause.
>
> "It may also cause fork() to fail when the machine appears to have
> available memory because of other applications doing careless memory
> allocation"
>
> Would be nice to save others from learning about this the hard way.

Good, text added in parentheses:

    On Linux 2.6 and later, an additional measure is to modify the
    kernel's behavior so that it will not <quote>overcommit</> memory.
    Although this setting will not prevent the OOM killer from
    invoking altogether, it will lower the chances significantly and
    will therefore lead to more robust system behavior.  (It might also
    cause fork() to fail when the machine appears to have available memory
    because of other applications with careless memory allocation.) This
    is done by selecting strict overcommit mode via

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://postgres.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-admin by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: reading pg_stat_activity view
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_hba.conf is driving me nuts