Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5BC76633E07 for ; Fri, 9 Apr 2010 13:45:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72327-01 for ; Fri, 9 Apr 2010 16:45:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f171.google.com (mail-pz0-f171.google.com [209.85.222.171]) by mail.postgresql.org (Postfix) with ESMTP id 7122E633CE9 for ; Fri, 9 Apr 2010 13:45:00 -0300 (ADT) Received: by pzk1 with SMTP id 1so1511897pzk.15 for ; Fri, 09 Apr 2010 09:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zzx7r7JXKDd9937eyzmLRAF82fDfAz1yyRY8CMNuLLs=; b=ZCv+JUjPdKd9xgjOqBTbMPKMGEv+FiehWTGQy/KXS94vgpkfG4dH0+7UuB7KrwmIs1 3cU5qYoKux8SmBCI0ce2Ooo5XYIozD6ybSwNQpyIA035T/MMy3YiZJtEAHdgVdyG8jgs HKCUYEQy0+OeuD9fKf8uhvxUvKMBfxyYGUGwk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=LPQG0DuCY7+f6+v4bYe3Kt6nbf+QVsv2FkWbNFUiIud74cHKEez6WS1I+Sle+aavym H7lg4YnuJFfLQKkevkUvk55AC+Z5evFRGzNi9Ra14owyO+DMn6q/glOOK0vPsI/TyPWX /HOwWwj9oZAo3Zi1Z1wLCmZ27k4bKQM/MSLsk= MIME-Version: 1.0 Received: by 10.142.90.8 with HTTP; Fri, 9 Apr 2010 09:44:59 -0700 (PDT) In-Reply-To: References: <4BBF4FDD.3090008@2ndquadrant.com> Date: Fri, 9 Apr 2010 10:44:59 -0600 Received: by 10.142.120.26 with SMTP id s26mr282638wfc.141.1270831499807; Fri, 09 Apr 2010 09:44:59 -0700 (PDT) Message-ID: Subject: Re: PostgreSQL with Zabbix - problem of newbe From: Scott Marlowe To: Merlin Moncure Cc: Greg Smith , Krzysztof Kardas , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=-10 required=5 tests=FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201004/121 X-Sequence-Number: 38371 On Fri, Apr 9, 2010 at 10:30 AM, Merlin Moncure wrote: > On Fri, Apr 9, 2010 at 12:03 PM, Greg Smith wrote: >> The main problem with this configuration is that work_mem is set to an >> unsafe value--1.6GB. =A0With potentially 400 connections and about 2GB o= f RAM >> free after starting the server, work_mem=3D'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. =A0zabbix 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.