Re: Will shared_buffers crash a server - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: Will shared_buffers crash a server
Date
Msg-id BANLkTikj7akJeSE6biLaAZ9vv-=BRfovPg@mail.gmail.com
Whole thread Raw
In response to Will shared_buffers crash a server  (Qiang Wang <forest_qiang@yahoo.com>)
List pgsql-performance
On Fri, Apr 29, 2011 at 1:13 AM, Qiang Wang <forest_qiang@yahoo.com> wrote:
>
> We have 10GB memory and we tuned PostgreSQL as follow:

> - max_connection = 100
> - work_mem = 50MB

You do know that work_mem is PER SORT right?  Not per connection or
per user or per database.  If all 100 of those connections needs to do
a large sort at once (unlikely but possible, especially if under heavy
load) then you could have pgsql trying to allocate 50000MB.  If you
have the occasional odd jobs that really need 50MB work_mem then set
it for a single user or connection and leave the other users in the 1
to 4MB range until you can be sure you're not running your db server
out of memory.

> However we suffered 2 times server crashes after tunning the configuration.
> Does anyone have any idea how this can happen?

Look in your log files for clues.  postgresql logs as well as system
logs.  What exact symptoms, if any, can you tell us of the crash?

pgsql-performance by date:

Previous
From: James Mansion
Date:
Subject: Re: Performance
Next
From: Rishabh Kumar Jain
Date:
Subject: Re: Order of tables