From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | daveg <daveg(at)sonic(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Limit allocated memory per session |
Date: | 2009-10-01 17:20:29 |
Message-ID: | 20091001172029.GF5607@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Oh, BTW, did anyone get interested in adding the bits to disable the OOM
> > killer for postmaster on the various Linux initscripts? It needs some
> > games with /proc/<pid>/oom_adj and requires root privileges, but I think
> > an initscript is in an excellent position to do it.
>
> I was imagining that this would be something for individual distros
> to tackle. It's probably not portable enough to go into the
> contrib/start-scripts examples.
Hmm? I think it should be just (as root)
if [ -f /proc/$pid_of_postmaster/oom_adj ]; then
echo -17 > /proc/$pid_of_postmaster/oom_adj
fi
This is supported from 2.6.11 onwards AFAIK. If the kernel is older
than that, the file would not exist and this would be a noop.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Boszormenyi Zoltan | 2009-10-01 17:21:54 | Re: CommitFest 2009-09, two weeks on |
Previous Message | Kenneth Marshall | 2009-10-01 17:19:40 | Re: Rejecting weak passwords |