Re: Pre-allocation of shared memory ...

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Kurt Roeckx" <Q(at)ping(dot)be>, "Matthew Kirkwood" <matthew(at)hairy(dot)beasts(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Pre-allocation of shared memory ...
Date: 2003-06-15 03:46:48
Message-ID: 200306142346.48798.lamar.owen@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday 14 June 2003 16:38, Andrew Dunstan wrote:
> IOW, simply the presence of /proc/sys/vm/overcommit_memory with a value set
> to 0 doesn't guarantee you won't get an OOM kill, AFAICS.

Right. You need the value to be 2 or 3. Which means you need Alan's patch to
do that.

> I *know* the latest RH kernel docs *say* they have paranoid mode that
> supposedly guarantees against OOM - it was me that pointed that out
> originally :-). I just checked on the latest sources (today it's RH8,
> kernel 2.4.20-18.8) to be doubly sure, and can't see the patches. (That
> would be really bad of RH, btw, if I'm correct - saying in your docs you
> support something that you don't)

But note these two lines in the docs with 2.4.20-13.9 (RHL9 errata):
* This describes the overcommit management facility in the latest kernel
tree (FIXME: actually it also describes the stuff that isnt yet done)

Pay double attention to the line that says FIXME. IOW, they've documented
stuff that might not be done!

You can try Red Hat's enterprise kernel, but you'll have to build it from
source. RHEL AS is available online as source RPMs.

Also understand that the official Red Hat kernel is very close to an Alan Cox
kernel. Also, if you really want to get down and dirty testing the kernel, a
test suite is available to help with that, known as Cerberus. Configs are
available specifically tuned to stress-test kernels. I think Cerberus is on
Source Forge.

So, make sure you have a kernel that allows overcommit-accounting mode 2 to
prevent kills on OOM. Theoretically mode 2 will prevent the possiblity of
OOM completely.

If I read things right, if you have double swap space mode 0 will not OOM
nearly as quickly.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-06-15 04:07:12 Re: [HACKERS] ECPG, threading and pooling
Previous Message Andrew Dunstan 2003-06-14 21:39:56 Re: Pre-allocation of shared memory ...