Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CF8B2632971 for ; Thu, 15 Apr 2010 19:21:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 71789-10 for ; Thu, 15 Apr 2010 22:21:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 642E96327C2 for ; Thu, 15 Apr 2010 19:21:12 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o3FMLAeZ025791; Thu, 15 Apr 2010 18:21:10 -0400 (EDT) To: Chris cc: pgsql-performance@postgresql.org Subject: Re: stats collector suddenly causing lots of IO In-reply-to: <20100413170105.GA29571@chris-laptop.a2hosting.com> References: <20100413170105.GA29571@chris-laptop.a2hosting.com> Comments: In-reply-to Chris message dated "Tue, 13 Apr 2010 13:01:06 -0400" Date: Thu, 15 Apr 2010 18:21:10 -0400 Message-ID: <25790.1271370070@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.117 tagged_above=-10 required=5 tests=AWL=-0.207, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/193 X-Sequence-Number: 38443 Chris writes: > I have a lot of centos servers which are running postgres. Postgres isn't used > that heavily on any of them, but lately, the stats collector process keeps > causing tons of IO load. It seems to happen only on servers with centos 5. > The versions of postgres that are running are: > 8.1.18 > 8.2.6 > 8.3.1 > 8.3.5 > 8.3.6 > 8.3.7 > 8.3.8 > 8.3.9 > 8.4.2 > 8.4.3 Do these different server versions really all show the problem to the same extent? I'd expect 8.4.x in particular to be cheaper than the older branches. Are their pgstat.stat files all of similar sizes? (Note that 8.4.x keeps pgstat.stat under $PGDATA/pg_stat_tmp/ whereas in earlier versions it was under $PGDATA/global/.) If your applications create/use/drop a lot of tables (perhaps temp tables) then bloat of the pgstat.stat file is to be expected, but it should get cleaned up by vacuum (including autovacuum). What is your vacuuming policy on these servers ... do you use autovacuum? regards, tom lane