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 3C02BD1B385 for ; Wed, 4 Aug 2004 09:45:59 -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 27220-02 for ; Wed, 4 Aug 2004 12:46:04 +0000 (GMT) Received: from mail.clockltd.com (unknown [213.219.6.249]) by svr1.postgresql.org (Postfix) with ESMTP id D9967D1B37D for ; Wed, 4 Aug 2004 09:45:53 -0300 (ADT) Received: from [193.195.120.35] (helo=[10.0.0.113]) by mail.clockltd.com with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1BsL9X-0004St-4t for pgsql-performance@postgresql.org; Wed, 04 Aug 2004 13:45:55 +0100 Message-ID: <4110DA83.7020505@clockltd.com> Date: Wed, 04 Aug 2004 13:45:55 +0100 From: Paul Serby Organization: Clock User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: The black art of postgresql.conf tweaking 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-Clock-Relay: yes X-Clock-MailScanner-Information: Please contact the ISP for more information X-Clock-MailScanner: Found to be clean X-Clock-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5, autolearn=not spam) X-MailScanner-From: paul.serby@clockltd.com 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/45 X-Sequence-Number: 7681 Can anyone give a good reference site/book for getting the most out of your postgres server. All I can find is contradicting theories on how to work out your settings. This is what I followed to setup our db server that serves our web applications. http://www.phpbuilder.com/columns/smith20010821.php3?page=2 We have a Dell Poweredge with the following spec. CPU: Intel(R) Xeon(TM) CPU 3.06GHz (512 KB Cache) CPU: Intel(R) Xeon(TM) CPU 3.06GHz (512 KB Cache) CPU: Intel(R) Xeon(TM) CPU 3.06GHz (512 KB Cache) CPU: Intel(R) Xeon(TM) CPU 3.06GHz (512 KB Cache) Physical Memory: 2077264 kB Swap Memory: 2048244 kB Apache on the Web server can take up to 300 connections and PHP is using pg_pconnect Postgres is set with the following. max_connections = 300 shared_buffers = 38400 sort_mem = 12000 But Apache is still maxing out the non-super user connection limit. The machine is under no load and I would like to up the max_connections but I would like to know more about what you need to consider before doing so. The only other source I've found is this: http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html But following its method my postgres server locks up straight away as it recommends setting max_connections to 16 for Web sites? Is there a scientific method for optimizing postgres or is it all 'finger in the air' and trial and error.