Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DD2EE63421B for ; Tue, 23 Mar 2010 01:12:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 02451-01-3 for ; Tue, 23 Mar 2010 04:12:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id EEEC8633CE0 for ; Tue, 23 Mar 2010 01:12:13 -0300 (ADT) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M03PY-1NbQ7L1TxM-00utbU; Tue, 23 Mar 2010 05:12:12 +0100 Message-ID: <4BA83F99.5020607@2ndquadrant.com> Date: Tue, 23 Mar 2010 00:12:09 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Carlo Stonebanks CC: pgsql-performance@postgresql.org Subject: Re: Got that new server, now it's time for config! References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/eyDzimWLz1Y4B14C5Z3duts40SqmQ8f1vRJ1 JXFMwagn5k828KEMFAmcfJjHt182LAdwgQwIGvinsSURtWQzJF aSxzfBzGPok3WKzcAfFEj4lcD6+JxJw X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.381 tagged_above=-10 required=5 tests=AWL=0.218, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/290 X-Sequence-Number: 38115 Carlo Stonebanks wrote: > So, we have the hardware, we have the O/S - but I think our config > leaves much to be desired. Typically, our planner makes nad decisions, > picking seq scan over index scan, where index scan has a better result. > You're not setting effective_cache_size, so I wouldn't expect it to ever choose an index scan given the size of your data set. The planner thinks that anything bigger than 128MB isn't likely to fit in RAM by default, which favors sequential scans. That parameter should probably be >24GB on your server, so it's off by more than two orders of magnitude. > wal_sync_method = open_sync This is a scary setting to be playing with on Linux when using ext3 filesystems due to general kernel bugginess in this area. See http://archives.postgresql.org/pgsql-hackers/2007-10/msg01310.php for an example. I wouldn't change this from the default in your position if using that filesystem. I'd drastically increase effective_cache_size, put wal_sync_method back to the default, and then see how things go for a bit before tweaking anything else. Nothing else jumped out as bad in your configuration besides the extremely high logging levels, haven't looked at it that carefully yet though. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us