Re: Reducing memory usage of insert into select operations?

From: "Douglas McNaught" <doug(at)mcnaught(dot)org>
To: "Francisco Reyes" <lists(at)stringsutils(dot)com>
Cc: "PostgreSQL general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Reducing memory usage of insert into select operations?
Date: 2008-07-18 13:53:55
Message-ID: 5ded07e00807180653u4dcab72bl703b2f7afc585cf8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 18, 2008 at 12:18 AM, Francisco Reyes
<lists(at)stringsutils(dot)com> wrote:
> Douglas McNaught writes:
>
>
>> It does seem that reducing work_mem might help you, but others on this
>
> I reduced it from 256MB to 64MB. It seems it is helping.

You should also look at your memory overcommit settings (in
/proc/sys/vm). You can set things up so that Postgres gets a malloc()
failure (which it is generally prepared to cope with cleanly) when the
system runs out of RAM, rather than having the OOM killer go off and
hit it with SIGKILL. Overcommit is useful in some contexts (Java apps
tend to map a lot more memory than they actually use) but for a
dedicated database server you really don't ever want to have the OOM
killer triggered.

-Doug

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2008-07-18 13:53:57 Re: TODO list and "hyphen"
Previous Message Russ Brown 2008-07-18 13:50:50 Re: TODO list and "hyphen"