pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Евгений Селявка <evg.selyavka@gmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgresql 9.1 out of memory
Date: Wed, 30 Oct 2013 08:14:09 -0700 (PDT)
Message-ID: <1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com> (raw)
In-Reply-To: <CAKPhvNY+LJV1MDTW=1KHX+igoUyyPVW8_V1-5+T18qBQ3CJGrw@mail.gmail.com>
References: <CAKPhvNY+LJV1MDTW=1KHX+igoUyyPVW8_V1-5+T18qBQ3CJGrw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Евгений Селявка <evg.selyavka@gmail.com> wrote:

> Server HW:

> 32GB RAM

> Before server crash i have this parameters in config:
>
> max_connections = 350

> work_mem = 2GB

> After crash  i change this parameters:

> work_mem = 1GB

A good "rule of thumb" is to allow for one work_mem allocation per
connection for a reasonable estimation of peak memory usage for
this purpose.  (This may need to be adjusted based on workload, but
it's a reasonable place to start.)  So you have adjusted likely
peaks down from 700GB to 350GB.

I usually start with work_mem set to RAM * 25% / max_connections.
In your case that works out to 23MB.  If you are able to use a
connection pooler to reducee max_connections, that will allow you
to boost work_mem.

-- 
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (6+ messages)  latest in thread

Message-ID: <1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com>
Permalink:  ../1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com/
Also on:    postgresql.org/message-id/1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: kgrittn@ymail.com, evg.selyavka@gmail.com
  Subject: Re: postgresql 9.1 out of memory
  In-Reply-To: <1383146049.700.YahooMailNeo@web162906.mail.bf1.yahoo.com>

* 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