Re: Will shared_buffers crash a server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 29, 2011 at 1:13 AM, Qiang Wang <forest_qiang@xxxxxxxxx> 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?

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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux