pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig A. James <cjames@modgraph-usa.com>
To: Richard Troy <rtroy@ScienceTools.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Huxton <dev@archonet.com>
Cc: Russell Smith <mr-russ@pws.com.au>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres server crash
Date: Sat, 18 Nov 2006 22:43:14 -0800
Message-ID: <455FFD02.1060503@modgraph-usa.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0611181713170.19262-100000@denzel.in>
References: <Pine.LNX.4.33.0611181713170.19262-100000@denzel.in>

Richard Troy wrote:
> I did that - spent about two f-ing hours looking for what I wanted. (Guess
> I entered poor choices for my searches. -frown- ) There are a LOT of
> articles that TALK ABOUT OOM, but prescious few actually tell you what you
> can do about it.
> 
> Trying to save you some time:
> 
> On linux you can use the sysctl utility to muck with vm.overcommit_memory;
> You can disable the "feature."
> 
> Google _that_ for more info!


Here's something I found googling for "memory overcommitment"+linux

  http://archives.neohapsis.com/archives/postfix/2000-04/0512.html

  From /usr/src/linux/Documentation/sysctl/vm.txt

  "overcommit_memory:

  This value contains a flag that enables memory overcommitment.
  When this flag is 0, the kernel checks before each malloc()
  to see if there's enough memory left. If the flag is nonzero,
  the system pretends there's always enough memory."

  This flag is settable in /proc/sys/vm

Lo and behold, here it is on my system:

   $ cat /proc/sys/vm/overcommit_memory
   0
   $ cat /proc/sys/vm/overcommit_ratio 
   50

Craig



view thread (30+ messages)  latest in thread

Message-ID: <455FFD02.1060503@modgraph-usa.com>
Permalink:  ../455FFD02.1060503@modgraph-usa.com/
Also on:    postgresql.org/message-id/455FFD02.1060503@modgraph-usa.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cjames@modgraph-usa.com, rtroy@ScienceTools.com, tgl@sss.pgh.pa.us, dev@archonet.com, mr-russ@pws.com.au
  Subject: Re: Postgres server crash
  In-Reply-To: <455FFD02.1060503@modgraph-usa.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox