Re: configurability of OOM killer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: configurability of OOM killer
Date: 2008-02-04 20:31:15
Message-ID: 7806.1202157075@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> On Mon, 2008-02-04 at 11:38 -0800, Jeff Davis wrote:
>> I am missing something, can you elaborate? What is postgresql doing
>> wrong?

> We make no attempt to limit our overall memory usage. We limit
> individual sessions by default, but don't prevent them from increasing
> that allocation as they choose. We don't try to reallocate memory once
> it has finished being used.

Even if that were true (and of your three claims, the last two are
wrong), there's still not anything much wrong with what Postgres is
doing. The problem is with which process the kernel chooses to kill
when it's under memory pressure. We cannot guarantee that the kernel
will never be under memory pressure, at least not in a machine that is
doing anything at all besides running Postgres ... and on a dedicated
machine you might just as well disable overcommit.

> This isn't criticism; we are where we are. I just want to gain agreement
> that we should be looking at that as a high priority for the next
> release.

Frankly, I'm entirely unpersuaded. It will do zilch to improve the OOM
problem, and I cannot see any way of restricting global memory
consumption that won't hurt performance and flexibility.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-02-04 20:41:29 Re: configurability of OOM killer
Previous Message Simon Riggs 2008-02-04 20:06:47 Re: configurability of OOM killer