Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D9ADA133616B for ; Fri, 4 Feb 2011 15:08:17 -0400 (AST) 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 76643-05 for ; Fri, 4 Feb 2011 19:08:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148133.authsmtp.co.uk (outmail148133.authsmtp.co.uk [62.13.148.133]) by mail.postgresql.org (Postfix) with ESMTP id 40DA71337B94 for ; Fri, 4 Feb 2011 15:06:09 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt12.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p14J68oq071924 for ; Fri, 4 Feb 2011 19:06:08 GMT Received: from Sidney-Stratton.local (dsl081-245-111.sfo1.dsl.speakeasy.net [64.81.245.111]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p14J5woW069942 for ; Fri, 4 Feb 2011 19:05:59 GMT Message-ID: <4D4C4E15.20401@agliodbs.com> Date: Fri, 04 Feb 2011 11:05:57 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Write-heavy pg_stats_collector on mostly idle server Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: cd79f7b7-3091-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkbIhBDJB8RWB5f NVxfJ1xYPXUEQkpF VCReGBUITgIzDi11 bxUnOFdCYEpPXhVr WUJJR1hXHUtuBQIJ BwAcVhxsdgRHZ3x1 Z0N9Xj4bXUAAcAEi JU5SHGQCZylha2Ib HhMMcAoCd1FNYxxF Y1FiVXJYYXgPZihp WldrZWpvYW1VeHQO TxcyN1MOTAMLEzci VlgaEgI0AUQZXBI4 KBgiJ1UAG1xZNUN6 NFw6RVYJex4eDgAW BExXHiJDT/T/ X-Authentic-SMTP: 61633136333939.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. 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: 201102/212 X-Sequence-Number: 42350 All, Seeing an issue which is new on me. On a mostly idle PostgreSQL server, the stats collector is rewriting the entire stats file twice per second. Version: 8.4.4 Server: Ubuntu, kernel 2.6.32 Server set up: ApacheMQ server. 25 databases, each of which hold 2-3 tables. Filesystem: Ext4, defaults Active connections: around 15 Autovacuum settings: defaults Symptoms: on a server which gets around 20 reads and 15 writes per minute, we are seeing average 500K/second writes by the stats collector to pg_stat.tmp. pg_stat.tmp is around 270K. An strace of the stats collector process shows that the stats collector is, in fact, rewriting the entire stats file twice per second. Anyone seen anything like this before? -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com