pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Uwe <uwe@oss4u.com>
To: pgsql-general@lists.postgresql.org
Cc: mark <pgroad@163.com>
Subject: Re: postgresql 9.5 has ocuuered OOM
Date: Wed, 20 Dec 2017 16:44:36 +0000 (UTC)
Message-ID: <7244900.kHztgW4kYm@tiburon> (raw)
In-Reply-To: <2fd6f5eb.10a25.160747856ec.Coremail.pgroad@163.com>
References: <2fd6f5eb.10a25.160747856ec.Coremail.pgroad@163.com>

On Wednesday, December 20, 2017 11:08:51 PM PST mark wrote:
> I have set shared_buffers is 1/4 of memory.
> work_mem is 2% of memory.
> max_connections is 50.
> momery size is 16GB.
> postgresql process used over 70% of memory and occuered OOM.
> what should I do to deal with this problem?

IIRC work_mem is a PER CONNECTION setting, that means every connection can use 
2% of your total memory.  I'd try setting work_mem to something like 16MB or 
32MB and see if the queries still execute properly. You want to set work_mem 
as high as needed to allow proper query execution but as low as possible to 
avoid running out of memory.

view thread (9+ messages)  latest in thread

Message-ID: <7244900.kHztgW4kYm@tiburon>
Permalink:  ../7244900.kHztgW4kYm@tiburon/
Also on:    postgresql.org/message-id/7244900.kHztgW4kYm@tiburon

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: uwe@oss4u.com, pgroad@163.com
  Subject: Re: postgresql 9.5 has ocuuered OOM
  In-Reply-To: <7244900.kHztgW4kYm@tiburon>
  References: <2fd6f5eb.10a25.160747856ec.Coremail.pgroad@163.com> <7244900.kHztgW4kYm@tiburon>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox