Re: Big trouble with memory !! - Mailing list pgsql-general

From Richard Huxton
Subject Re: Big trouble with memory !!
Date
Msg-id 4253FA36.60406@archonet.com
Whole thread Raw
In response to Big trouble with memory !!  (Hervé Piedvache <herve@elma.fr>)
Responses Re: Big trouble with memory !!  (Hervé Piedvache <herve@elma.fr>)
Re: Big trouble with memory !!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hervé Piedvache wrote:
> Hi,
>
> We have switched to kernel 2.6.11.6 from kernel 2.4.26 ... since this date we
> have many troubles with PostgreSQL and most of them seems to be memory
> troubles.
>
> As far as we can see, kernel kills the postmaster process when it begins to
> use swap. You can see the output from dmesg at the bottom of the message.
> The first thing I am not sure to understand is that the kernel should kill
> processes to reallocate memory only when physical memory and swap memory are
> exhausted, shouldn't it ?
> Second thing: it seems to be related to our kernel switch as it did not happen
> before that.
>
> This can occur when queries / a vacuum require too much memory to run.
> I have configured my kernel with these options:
> # shared mem
> kernel.shmmax= 641604096
> # semaphore
> kernel.sem = 250 32000 100 400
> fs.file-max=65536
> # overcommit
> vm.overcommit_memory=2
>
> Does anyone can explain me why I have this problem and how to resolve it ?
>
> This server is a dedicated PostgreSQL server with 4Gb of RAM.

You might want to try vm.overcommit_memory=1. You don't appear to be the
only one suffering from an over-zealous oom-killer.

http://www.ussg.iu.edu/hypermail/linux/kernel/0501.2/1295.html
http://www.linuxquestions.org/questions/history/291119

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: very slow after a while...
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Big trouble with memory !!