Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 774EDB5DBCC for ; Sun, 19 Jun 2011 12:43:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67882-09 for ; Sun, 19 Jun 2011 15:43:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id 5A6D7B5DBCB for ; Sun, 19 Jun 2011 12:43:19 -0300 (ADT) Received: by pzk9 with SMTP id 9so2905573pzk.19 for ; Sun, 19 Jun 2011 08:43:18 -0700 (PDT) Received: by 10.68.32.3 with SMTP id e3mr1767949pbi.325.1308497754898; Sun, 19 Jun 2011 08:35:54 -0700 (PDT) Received: from Craig-Jamess-MacBook-Pro.local (mta-76-176-59-179.san.rr.com [76.176.59.179]) by mx.google.com with ESMTPS id i7sm2666964pbj.74.2011.06.19.08.35.51 (version=SSLv3 cipher=OTHER); Sun, 19 Jun 2011 08:35:52 -0700 (PDT) Message-ID: <4DFE1756.9060101@emolecules.com> Date: Sun, 19 Jun 2011 08:35:50 -0700 From: Craig James User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Who is causing all this i/o? References: <4DD6D9A6.1010101@emolecules.com> <4DD6FC11.4000706@emolecules.com> <1174.1305990672@sss.pgh.pa.us> <1308336703621-4499692.post@n5.nabble.com> In-Reply-To: <1308336703621-4499692.post@n5.nabble.com> 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 X-Spam-Level: X-Archive-Number: 201106/114 X-Sequence-Number: 37740 On 6/17/11 11:51 AM, Shianmiin wrote: > Tom Lane-2 wrote: >> What's not apparent however is why the stats collector is writing disk >> so much. 8.4 does have the logic change to not write stats out unless >> something is asking to see them. So either it's really pre-8.4, or you >> have a monitoring task that is constantly asking to see stats. >> > We have a PostgreSQL 9.0.4 on CentOs for performance testing and we are > seeing the similar issue. > we have a "crazy" setup it has 1 database with 1000 identical schemas. There > are occasional I/O write storm > of over 100 MB/sec without any disk reads, and it could last for a couple of > minutes when the schemas/data are aggressively populated by pg_restore. All > the io writes seem to be on pgstat.tmp. > > The I/O write storm seemed to be trigger by Vacuum. Based on the advice I got from my original question, I changed autovacuum_naptime to "5min", and the problem completely disappeared. (I know that's a long interval, but this particular server gets maybe 5-10 heavy updates per week and is idle the rest of the time.) select count(1) from pg_database ; count ------- 267 It seems like there's a problem somewhere. Autovacuum has improved enormously in the last couple of years, but some change to its algorithm causes a lot of I/O thrashing when there are more than a few hundred separate databases. Craig