Re: Postgres server crash

From: "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>
To: Richard Troy <rtroy(at)ScienceTools(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Huxton <dev(at)archonet(dot)com>, Russell Smith <mr-russ(at)pws(dot)com(dot)au>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Postgres server crash
Date: 2006-11-19 06:43:14
Message-ID: 455FFD02.1060503@modgraph-usa.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-11-19 06:51:05 Re: Postgres server crash
Previous Message rakesh kumar 2006-11-19 04:05:08 Fwd: start up cost estimate