Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0654A6328D3 for ; Fri, 25 Jun 2010 13:17:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15645-08 for ; Fri, 25 Jun 2010 16:17:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id 9FD77632277 for ; Fri, 25 Jun 2010 13:17:01 -0300 (ADT) Received: by pwj8 with SMTP id 8so2418622pwj.19 for ; Fri, 25 Jun 2010 09:17:00 -0700 (PDT) Received: by 10.115.65.14 with SMTP id s14mr1101317wak.209.1277482620453; Fri, 25 Jun 2010 09:17:00 -0700 (PDT) Received: from Craig-Jamess-MacBook-Pro.local (wsip-70-167-124-126.sd.sd.cox.net [70.167.124.126]) by mx.google.com with ESMTPS id s15sm8236092wal.2.2010.06.25.09.16.58 (version=SSLv3 cipher=RC4-MD5); Fri, 25 Jun 2010 09:16:59 -0700 (PDT) Message-ID: <4C24D679.7030701@emolecules.com> Date: Fri, 25 Jun 2010 09:16:57 -0700 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: Occasional giant spikes in CPU load References: <4BBCFB12.1010306@emolecules.com> <4BBD3A17.90209@emolecules.com> <4C23FD52.40508@emolecules.com> <23596.1277438692@sss.pgh.pa.us> <4C24B3BB.3070901@emolecules.com> <2286.1277477230@sss.pgh.pa.us> In-Reply-To: <2286.1277477230@sss.pgh.pa.us> 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=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/469 X-Sequence-Number: 39325 On 6/25/10 7:47 AM, Tom Lane wrote: > Craig James writes: >> On 6/24/10 9:04 PM, Tom Lane wrote: >>> sinval queue overflow comes to mind ... although that really shouldn't >>> happen if there's "no real load" on the server. What PG version is >>> this? > >> 8.3.10. Upgraded based on your advice when I first asked this question. > > Any chance of going to 8.4? If this is what I suspect, you really need > this 8.4 fix: > http://archives.postgresql.org/pgsql-committers/2008-06/msg00227.php > which eliminated the thundering-herd behavior that previous releases > exhibit when the sinval queue overflows. Yes, there is a chance of upgrading to 8.4.4. I just bought a new server and it has 8.4.4 on it, but it won't be online for a while so I can't compare yet. This may motivate me to upgrade the current servers to 8.4.4 too. I was pleased to see that 8.4 has a new upgrade-in-place feature that means we don't have to dump/restore. That really helps a lot. A question about 8.4.4: I've been having problems with bloat. I thought I'd adjusted the FSM parameters correctly based on advice I got here, but apparently not. 8.4.4 has removed the configurable FSM parameters completely, which is very cool. But ... if I upgrade a bloated database using the upgrade-in-place feature, will 8.4.4 recover the bloat and return it to the OS, or do I still have to recover the space manually (like vacuum-full/reindex, or cluster, or copy/drop a table)? > Or you could look at using connection pooling so you don't have quite > so many backends ... I always just assumed that lots of backends that would be harmless if each one was doing very little. If I understand your explanation, it sounds like that's not entirely true in pre-8.4.4 releases due to the sinval queue problems. Thanks, Craig