Re: Pre-allocation of shared memory ... - Mailing list pgsql-hackers
From | Andrew Dunstan |
---|---|
Subject | Re: Pre-allocation of shared memory ... |
Date | |
Msg-id | 003c01c332b4$eb966530$6401a8c0@DUNSLANE Whole thread Raw |
In response to | Re: Pre-allocation of shared memory ... ("Andrew Dunstan" <andrew@dunslane.net>) |
Responses |
Re: Pre-allocation of shared memory ...
Re: Pre-allocation of shared memory ... Re: Pre-allocation of shared memory ... Re: Pre-allocation of shared memory ... |
List | pgsql-hackers |
Yes, but it's only a binary flag. Non-zero says "cheerfully overcommit" and 0 says "try not to overcommit" but there isn't a value that says "make sure not to overcommit". Have a look in mm/mmap.c in the plain 2.4.21 sources for evidence. There's nothing like the Alan Cox patch. 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. 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) The proof, if any is needed, that the mainline kernel still does not have this, is that it is still in Alan's patch set against 2.4.21, at http://www.kernel.org/pub/linux/kernel/people/alan/linux-2.4/2.4.21/patch-2.4.21-ac1.gz Summary: don't take shortcuts looking for this - Read the Source, Luke. It's important not to give people false expectations. For now, I'm leaning in Tom's direction of advising people to avoid Linux for mission-critical situations that could run into an OOM. cheers andrew ----- Original Message ----- From: "Kurt Roeckx" <Q@ping.be> To: "Matthew Kirkwood" <matthew@hairy.beasts.org> Cc: "Andrew Dunstan" <andrew@dunslane.net>; <pgsql-hackers@postgresql.org> Sent: Saturday, June 14, 2003 3:44 PM Subject: Re: [HACKERS] Pre-allocation of shared memory ... > On Sat, Jun 14, 2003 at 08:32:40PM +0100, Matthew Kirkwood wrote: > > On Sat, 14 Jun 2003, Andrew Dunstan wrote: > > > > > The trouble with this advice is that if I am an SA wanting to run a > > > DBMS server, I will want to run a kernel supplied by a vendor, not an > > > arbitrary kernel released by a developer, even one as respected as > > > Alan Cox. > > > > Like, say, Red Hat: > > > > $ ls -l /proc/sys/vm/overcommit_memory > > -rw-r--r-- 1 root root 0 Jun 14 18:58 /proc/sys/vm/overcommit_memory > > $ uname -a > > Linux stinky.hoopy.net 2.4.20-20.1.1995.2.2.nptl #1 Fri May 23 12:18:31 EDT 2003 i686 i686 i386 GNU/Linux > > > I also got that /proc/sys/vm/overcommit_memory on a plain 2.4.21. > > > Kurt > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html
pgsql-hackers by date: