Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D4717B5DE57 for ; Mon, 5 Sep 2011 13:47:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 12116-02 for ; Mon, 5 Sep 2011 16:47:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from marajade.localdomain (97-64-237-59.client.mchsi.com [97.64.237.59]) by mail.postgresql.org (Postfix) with ESMTP id 8F040B5DE54 for ; Mon, 5 Sep 2011 13:47:17 -0300 (ADT) Received: from [192.168.1.116] (173-31-201-111.client.mchsi.com [173.31.201.111]) (Authenticated sender: andy) by marajade.localdomain (Postfix) with ESMTPA id 488C843B35; Mon, 5 Sep 2011 11:47:16 -0500 (CDT) Message-ID: <4E64FD13.3030600@squeakycode.net> Date: Mon, 05 Sep 2011 11:47:15 -0500 From: Andy Colson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110707 Lightning/1.0b2 Thunderbird/3.1.11 MIME-Version: 1.0 To: Richard Shaw CC: pgsql-performance@postgresql.org Subject: Re: Rather large LA References: <4E64D0FE.6020704@squeakycode.net> <97BCA6CA-A1DB-43C7-B710-C2836B656FD6@aggress.net> In-Reply-To: <97BCA6CA-A1DB-43C7-B710-C2836B656FD6@aggress.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.918 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RDNS_DYNAMIC=0.982 X-Spam-Level: X-Archive-Number: 201109/44 X-Sequence-Number: 44820 On 09/05/2011 08:57 AM, Richard Shaw wrote: > > Hi Andy, > > It's not a new issue no, It's a legacy system that is in no way ideal but is also not in a position to be overhauled. Indexes are correct, tables are up to 25 million rows. > > On startup, it hits CPU more than IO, I'll provide some additional stats after I restart it tonight. > > Server logs have been reviewed and where possible, slow queries have been fixed. > > Autovacuum has been disabled and set to run manually via cron during a quiet period and fsync has recently been turned off to gauge any real world performance increase, there is battery backup on the raid card providing some level of resilience. > > Thanks > > Richard > > So I'm guessing that setting fsync off did not help your performance problems. And you say CPU is high, so I think we can rule out disk IO problems. > possibly installing more RAM as the most used db @ 67GB might appreciate it That would only be if every row of that 67 gig is being used. If its history stuff that never get's looked up, then adding more ram wont help because none of that data is being loaded anyway. Out of that 67 Gig, what is the working size? (Not really a number you can look up, I'm looking for more of an empirical little/some/lots/most). pgpool: max_client_conn = 4096 reserve_pool_size = 800 I've not used pgpool, but these seem really high. Does that mean pgpool will create 4K connectsions to the backend? Or does it mean it'll allow 4K connections to pgpool but only 800 connections to the backend. I wonder...When you startup, if you watch vmstat for a bit, do you have tons of context switches? If its not IO, and you dont say "OMG, CPU is pegged!" so I assume its not CPU bound, I wonder if there are so many processes fighting for resources they are stepping on each other. When you get up and running (and its slow), what does this display: ps ax|grep postgr|wc --lines That and a minute of 'vmstat 2' would be neet to see as well. -Andy