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 854F252802 for ; Wed, 1 Jun 2005 06:10:45 -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 59987-01 for ; Wed, 1 Jun 2005 09:10:43 +0000 (GMT) Received: from cmailg1.svr.pol.co.uk (cmailg1.svr.pol.co.uk [195.92.195.171]) by svr1.postgresql.org (Postfix) with ESMTP id A6A5252806 for ; Wed, 1 Jun 2005 06:10:43 -0300 (ADT) Received: from modem-2676.leopard.dialup.pol.co.uk ([217.135.154.116] helo=192.168.0.102) by cmailg1.svr.pol.co.uk with esmtp (Exim 4.41) id 1DdPFN-0005w3-4j; Wed, 01 Jun 2005 10:10:45 +0100 Subject: Re: slow queries, possibly disk io From: Simon Riggs To: Josh Close Cc: POSTGRES-PERFORMANCE In-Reply-To: <4a0cafe205052705526fccfe75@mail.gmail.com> References: <4a0cafe205052613242e0d4d10@mail.gmail.com> <42963C3F.4000905@arbash-meinel.com> <4a0cafe205052705526fccfe75@mail.gmail.com> Content-Type: text/plain Organization: 2nd Quadrant Date: Wed, 01 Jun 2005 10:06:19 +0100 Message-Id: <1117616779.3844.903.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-3) Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200506/9 X-Sequence-Number: 12647 On Fri, 2005-05-27 at 07:52 -0500, Josh Close wrote: > > Setting shared buffers above something like 10-30% of memory is counter > > productive. > > What is the reason behind it being counter productive? If shared > buffers are at 30%, should effective cache size be at 70%? How do > those two relate? They don't relate. shared_buffers = 50000 is enough. More than that will give bgwriter issues. effective_cache_size changes whether indexes are selected or not. Higher settings favour indexed access. > > > > Increasing sort_mem can help with various activities, but increasing it > > too much can cause you to swap, which kills performance. The caution is > > that you will likely use at least 1 sort_mem per connection, and can > > likely use more than one if the query is complicated. > > I have a max of 100 connections and 2 gigs of mem. Right now the sort > mem is a 4 megs. How much higher could I put that? > Please post your server hardware config all in one go. You have more than 2 CPUs, yes? Also, mention what bgwriter settings are. You may need to turn those down a bit. Best Regards, Simon Riggs