Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 02614B5D832 for ; Fri, 20 May 2011 20:41:17 -0300 (ADT) 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 04424-05 for ; Fri, 20 May 2011 23:41:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f46.google.com (mail-pw0-f46.google.com [209.85.160.46]) by mail.postgresql.org (Postfix) with ESMTP id DE08FB5D801 for ; Fri, 20 May 2011 20:41:09 -0300 (ADT) Received: by pwi15 with SMTP id 15so1905763pwi.19 for ; Fri, 20 May 2011 16:41:09 -0700 (PDT) Received: by 10.68.1.165 with SMTP id 5mr67147pbn.304.1305934869198; Fri, 20 May 2011 16:41:09 -0700 (PDT) Received: from Craig-Jamess-MacBook-Pro.local (wsip-70-167-122-86.sd.sd.cox.net [70.167.122.86]) by mx.google.com with ESMTPS id u1sm2735971pbm.41.2011.05.20.16.41.06 (version=SSLv3 cipher=OTHER); Fri, 20 May 2011 16:41:08 -0700 (PDT) Message-ID: <4DD6FC11.4000706@emolecules.com> Date: Fri, 20 May 2011 16:41:05 -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: Scott Marlowe CC: pgsql-admin@postgresql.org Subject: Re: Who is causing all this i/o? References: <4DD6D9A6.1010101@emolecules.com> In-Reply-To: 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: 201105/137 X-Sequence-Number: 37574 On 5/20/11 4:25 PM, Scott Marlowe wrote: > On Fri, May 20, 2011 at 3:14 PM, Craig James wrote: >> Our development server (PG 8.4.4 on Ubuntu server) is constantly doing >> something, and I can't figure out what. The two production servers, which >> are essentially identical, don't show these symptoms. In a nutshell, it's >> showing 10K blocks per second of data going out, all the time, and >> essentially zero blocks per second of input. >> After a lot of digging around, I found this in the /postgres/pg_stat_tmp >> directory. If I list the directory including the i-nodes once every second, >> I find that a new 2MB file is being created roughly once every two seconds: > Have you got a lot of databases in your development environment? I > think that can sometimes cause a lot of pg_stat writes. Yes. The production servers have a dozen or so databases, but the development server has a couple hundred databases. Does that count as "a lot of databases"? We've had even more databases in the past (>500) and didn't see this sort of I/O activity. The odd thing is that this activity is gradually growing, so slowly that you don't notice it right away. A month or two ago, nothing. A couple weeks ago, a constant stream of "grass" in xload's graph. Today, xload is showing a 50% all the time. I can only guess that the load will continue to increase. Is there a way to tell Postgres not to do this, or to do it less? It's not a big disaster (yet), but it's annoying to have the system spewing a couple megabytes of pg_stat_tmp data every few seconds. Thanks, Craig