X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 93F8F5E46EA for ; Fri, 6 Aug 2004 15:27:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67333-06 for ; Fri, 6 Aug 2004 18:27:51 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id 574AD5E46E7 for ; Fri, 6 Aug 2004 15:27:47 -0300 (ADT) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i76IRHe18249; Fri, 6 Aug 2004 20:27:18 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i76IRgZ06997; Fri, 6 Aug 2004 20:27:42 +0200 Message-ID: <4113CD75.2060508@bigfoot.com> Date: Fri, 06 Aug 2004 20:27:01 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Josh Berkus Cc: Paul Serby , pgsql-performance@postgresql.org Subject: Re: The black art of postgresql.conf tweaking References: <4110DA83.7020505@clockltd.com> <411100EC.8010802@bigfoot.com> <200408060929.19840.josh@agliodbs.com> In-Reply-To: <200408060929.19840.josh@agliodbs.com> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/81 X-Sequence-Number: 7717 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Josh Berkus wrote: | Paul, | | |>>Physical Memory: 2077264 kB | | |>>sort_mem = 12000 | | | Hmmm. Someone may already have mentioned this, but that looks problematic. | You're allowing up to 12MB per sort, and up to 300 connections. Even if each | concurrent connection averages only one sort (and they can use more) that's | 3600MB ... roughly 1.5 times your *total* RAM, leaving out RAM for Apache, | postmaster, shared buffers, etc. | | I strongly suggest that you either decrease your total connections or your | sort_mem, or both. Of course your are speaking about the "worst case", I aplly in scenarios like this on the rule 80/20: 80% of connection will perform a sort and 20% will allocate memory for the sort operation in the same window time: 300 -- 80% --> 240 --> 20% --> 48 48 * 12MB = 576 MB that seems resonable with the total ammount of memory available. Am I too optimistic? Regards Gaetano Mendola -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBE81z7UpzwH2SGd4RAuzzAJ98Ze0HQedKaZ/laT7P1OS44FG0CwCfaWkY MAR1TEY1+x61PoXjK/K8Q4Y= =8UmF -----END PGP SIGNATURE-----