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 075E85E46C7 for ; Fri, 6 Aug 2004 20:30:16 -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 54834-02 for ; Fri, 6 Aug 2004 23:30:08 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 5C8ED5E3F15 for ; Fri, 6 Aug 2004 20:30:03 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i76NU4Sv015840 for ; Fri, 6 Aug 2004 23:30:04 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i76NOqHa015597 for pgsql-performance@postgresql.org; Fri, 6 Aug 2004 23:24:52 GMT From: Gaetano Mendola X-Newsgroups: comp.databases.postgresql.performance Subject: Re: Performance Bottleneck Date: Sat, 07 Aug 2004 01:24:18 +0200 Organization: PYRENET Midi-pyrenees Provider Lines: 65 Message-ID: <41141322.3010200@bigfoot.com> References: <410FDC53.5080509@bigfoot.com> <4110FFF6.1030001@bigfoot.com> <41140D17.7070101@ethereal-realms.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@pyrenet.fr To: Martin Foster User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en In-Reply-To: <41140D17.7070101@ethereal-realms.org> X-Enigmail-Version: 0.84.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-performance@postgresql.org 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/85 X-Sequence-Number: 7721 Martin Foster wrote: > Gaetano Mendola wrote: > >> >> >> Let start from your postgres configuration: >> >> shared_buffers = 8192 <==== This is really too small for your >> configuration >> sort_mem = 2048 >> >> wal_buffers = 128 <==== This is really too small for your >> configuration >> >> effective_cache_size = 16000 >> >> change this values in: >> >> shared_buffers = 50000 >> sort_mem = 16084 >> >> wal_buffers = 1500 >> >> effective_cache_size = 32000 >> >> >> to bump up the shm usage you have to configure your OS in order to be >> allowed to use that ammount of SHM. >> >> This are the numbers that I feel good for your HW, the second step now is >> analyze your queries >> > > These changes have yielded some visible improvements, with load averages > rarely going over the anything noticeable. However, I do have a > question on the matter, why do these values seem to be far higher then > what a frequently pointed to document would indicate as necessary? > > http://www.varlena.com/GeneralBits/Tidbits/perf.html > > I am simply curious, as this clearly shows that my understanding of > PostgreSQL is clearly lacking when it comes to tweaking for the hardware. Unfortunately there is no a "wizard tuning" for postgres so each one of us have a own "school". The data I gave you are oversized to be sure to achieve improvements. Now you can start to decrease these values ( starting from the wal_buffers ) in order to find the good compromise with your HW. Regards Gaetano Mendola