pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Rob <rclemley@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: System overload / context switching / oom, 8.3
Date: Tue, 2 Feb 2010 13:25:28 -0700
Message-ID: <dcc563d11002021225v757f48c8i9faee286f82f703f@mail.gmail.com> (raw)
In-Reply-To: <4B6878DF.3000004@yahoo.com>
References: <4B6878DF.3000004@yahoo.com>

On Tue, Feb 2, 2010 at 12:11 PM, Rob <rclemley@yahoo.com> wrote:
> pg 8.3.9, Debian Etch, 8gb ram, quadcore xeon, megaraid (more details at end)
> ~240 active databases, 800+ db connections via tcp.
>
> Everything goes along fairly well, load average from 0.5 to 4.0.  Disk
> IO is writing about 12-20 MB every 4 or 5 seconds.  Cache memory about
> 4gb.  Then under load, we see swapping and then context switch storm and
> then oom-killer.

SNIP

> postgresql.conf:
> max_connections = 1100
> work_mem = 32MB

32MB * 1000 = 32,000MB...  And that's if you max out connections and
they each only do 1 sort.  If you're running many queries that run > 1
sorts it'll happen a lot sooner.

Either drop max connections or work_mem is what I'd do to start with.
If you have one or two reporting apps that need it higher, then set it
higher for just those connections / users.



view thread (12+ messages)  latest in thread

Message-ID: <dcc563d11002021225v757f48c8i9faee286f82f703f@mail.gmail.com>
Permalink:  ../dcc563d11002021225v757f48c8i9faee286f82f703f@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d11002021225v757f48c8i9faee286f82f703f@mail.gmail.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-performance@postgresql.org
  Cc: scott.marlowe@gmail.com, rclemley@yahoo.com
  Subject: Re: System overload / context switching / oom, 8.3
  In-Reply-To: <dcc563d11002021225v757f48c8i9faee286f82f703f@mail.gmail.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