pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: Krzysztof Kardas <krzychk2@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL with Zabbix - problem of newbe
Date: Fri, 9 Apr 2010 10:44:59 -0600
Message-ID: <r2ydcc563d11004090944vdee233a7w4dbf3ea99217005c@mail.gmail.com> (raw)
In-Reply-To: <l2gb42b73151004090930r8942742fhe96e3c8fe4920916@mail.gmail.com>
References: <v2w4ff8a7a31004080223mec26e053n69a2b80f24328f37@mail.gmail.com>
	<4BBF4FDD.3090008@2ndquadrant.com>
	<l2gb42b73151004090930r8942742fhe96e3c8fe4920916@mail.gmail.com>

On Fri, Apr 9, 2010 at 10:30 AM, Merlin Moncure <mmoncure@gmail.com> wrote:
> On Fri, Apr 9, 2010 at 12:03 PM, Greg Smith <greg@2ndquadrant.com> wrote:
>> The main problem with this configuration is that work_mem is set to an
>> unsafe value--1.6GB.  With potentially 400 connections and about 2GB of RAM
>> free after starting the server, work_mem='4MB' is as large as you can safely
>> set this.
>
> if you need more work_mem for this or that and also need to serve a
> lot of connections, you can always set it locally (1.6GB is still too
> high though -- maybe 64mb if you need to do a big sort or something
> like that).
>
> Another path to take is to install pgbouncer, which at 400 connections
> is worth considering -- but only if your client stack doesn't use
> certain features that require a private database session.  zabbix will
> _probably_ work because it is db portable software (still should check
> however).

Also remember you can set it by user or by db, depending on your
needs.  I had a server that had a reporting db and an app db.  The app
db was set to 1 or 2 Meg work_mem, and the reporting db that had only
one or two threads ever run at once was set to 128Meg.  Worked
perfectly for what we needed.



view thread (18+ messages)  latest in thread

Message-ID: <r2ydcc563d11004090944vdee233a7w4dbf3ea99217005c@mail.gmail.com>
Permalink:  ../r2ydcc563d11004090944vdee233a7w4dbf3ea99217005c@mail.gmail.com/
Also on:    postgresql.org/message-id/r2ydcc563d11004090944vdee233a7w4dbf3ea99217005c@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, mmoncure@gmail.com, greg@2ndquadrant.com, krzychk2@gmail.com
  Subject: Re: PostgreSQL with Zabbix - problem of newbe
  In-Reply-To: <r2ydcc563d11004090944vdee233a7w4dbf3ea99217005c@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