Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0B5AD1337A5D for ; Wed, 6 Apr 2011 15:30:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 37713-05 for ; Wed, 6 Apr 2011 18:30:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gransy.com (mail.gransy.com [82.208.29.194]) by mail.postgresql.org (Postfix) with ESMTP id DD891133655C for ; Wed, 6 Apr 2011 15:30:40 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.gransy.com (Postfix) with ESMTP id 000FF2E5A0BA for ; Wed, 6 Apr 2011 20:30:39 +0200 (CEST) Received: from mail.gransy.com ([127.0.0.1]) by localhost (nathalia.gransy.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mmq4LLbIcV2l for ; Wed, 6 Apr 2011 20:30:39 +0200 (CEST) Received: from [192.168.1.7] (ip-94-112-0-189.net.upcbroadband.cz [94.112.0.189]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id DF4D72E5A0B8 for ; Wed, 6 Apr 2011 20:30:39 +0200 (CEST) Message-ID: <4D9CB14F.8040901@fuzzy.cz> Date: Wed, 06 Apr 2011 20:30:39 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101219 Lightning/1.0b3pre Thunderbird/3.1.7 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: very long updates very small tables References: <4D91EEFA.90707@uni-heidelberg.de> <4D91EC7E020000250003BEEC@gw.wicourts.gov> <4D92DD2C.8010305@uni-heidelberg.de> <4D931A0C020000250003BF80@gw.wicourts.gov> <4D997D3D.1080104@uni-heidelberg.de> <4D999038020000250003C207@gw.wicourts.gov> In-Reply-To: <4D999038020000250003C207@gw.wicourts.gov> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 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 X-Spam-Level: X-Archive-Number: 201104/50 X-Sequence-Number: 43112 Dne 4.4.2011 16:32, Kevin Grittner napsal(a): > Nothing there makes a write glut on checkpoint less likely to be the > cause. Without a BBU write-back cache it is actually *more* likely, > and having enough RAM to hold the whole database makes it *more* > likely. If you haven't placed your pg_xlog directory on a separate > file system, it is also more likely. > > Turning on logging of checkpoint activity and checking whether that > correlates with your problem times is strongly indicated. > > -Kevin Checkpoints would be my first guess too, but the whole database is just 500MB. Lars, how did you get this number? Did you measure the amount of disk space occupied or somehow else? BTW how much memory is there (total RAM and dedicated to shared buffers)? How many checkpoint segments are there? Have you monitored the overall behavior of the system (what processes are running etc.) when the problems occur? I don't have much experience with Windows but tools from sysinternals are reasonable. And yet another idea - have you tried to use the stats collected by PostgreSQL? I mean the pg_stat_ tables, especially pg_stat_bgwriter and maybe pg_stat_all_tables. Those numbers are cummulative, so do two snapshot when the problems are happening and subtract them to get an idea of what's going on. regards Tomas