Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 5ED892E0041 for ; Sat, 17 May 2008 10:14:04 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95962-08 for ; Sat, 17 May 2008 10:13:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wizmail.org (wizmail.org [217.146.104.199]) by developer.postgresql.org (Postfix) with ESMTP id 765E92E0033 for ; Sat, 17 May 2008 10:13:58 -0300 (ADT) Received: from ebony.jgh.adsl.wizards.co.uk ([217.146.123.59]) (from_AS 16353) by wizmail.org with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.67) id 1JxMEW-00064k-IK for pgsql-performance@postgresql.org (return-path ); Sat, 17 May 2008 13:13:56 +0000 Message-ID: <482EDA10.5060603@wizmail.org> Date: Sat, 17 May 2008 14:13:52 +0100 From: Jeremy Harris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080226 Fedora/2.0.0.12-1.fc7 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: I/O on select count(*) References: <920841.71690.qm@web44808.mail.sp1.yahoo.com> <482B1D5F.EE98.0025.0@wicourts.gov> <20080515020553.GN9838@alvh.no-ip.org> <20080515155232.GC8221@alvh.no-ip.org> <20080516201528.GJ13061@alvh.no-ip.org> <18382.1210992302@sss.pgh.pa.us> In-Reply-To: <18382.1210992302@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-Archive-Number: 200805/262 X-Sequence-Number: 30230 Tom Lane wrote: > One additional point: this means that one transaction in every 32K > writing transactions *does* have to do extra work when it assigns itself > an XID, namely create and zero out the next page of pg_clog. And that > doesn't just slow down the transaction in question, but the next few > guys that would like an XID but arrive on the scene while the > zeroing-out is still in progress. > > This probably contributes to the behavior that Simon and Josh regularly > complain about, that our transaction execution time is subject to > unpredictable spikes. I'm not sure how to get rid of it though. A thread maintaining a pool of assigned and cleared pg_clog pages, ahead of the immediate need? Possibly another job for an existing daemon thread. - Jeremy