Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 79CA263501D for ; Fri, 16 Apr 2010 12:30:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 90043-02-9 for ; Fri, 16 Apr 2010 15:29:56 +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 25622633662 for ; Fri, 16 Apr 2010 12:29:51 -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 o3GFTmrw009858; Fri, 16 Apr 2010 11:29:48 -0400 (EDT) To: Chris cc: pgsql-performance@postgresql.org Subject: Re: stats collector suddenly causing lots of IO In-reply-to: <20100416151900.GA3179@chris-laptop.a2hosting.com> References: <20100413170105.GA29571@chris-laptop.a2hosting.com> <25952.1271370711@sss.pgh.pa.us> <20100416151900.GA3179@chris-laptop.a2hosting.com> Comments: In-reply-to Chris message dated "Fri, 16 Apr 2010 11:19:13 -0400" Date: Fri, 16 Apr 2010 11:29:47 -0400 Message-ID: <9857.1271431787@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/207 X-Sequence-Number: 38457 Chris writes: > After the file was made larger and I stopped the vacuum process, I started > seeing the problem. All other postgress processes were quiet, but the stats > collector was constantly causing anywhere from 20-60 of the IO on the server. > Since all the other postgres processes weren't really doing anything, and it is > a busy web server which is predominately MySQL, I'm fairly curious as to what > it is doing. Yeah, the stats collector rewrites the stats file every half second, if there have been any changes since last time --- so the bigger the file, the more overhead. (8.4 is smarter about this, but that doesn't help you on 8.3.) > I straced the stats collector process. I wasn't sure what else to trace as > there wasn't a single other postgres process doing anything. That strace doesn't really prove much; it's what I'd expect. Here's what to do: start a PG session, and strace that session's backend *and* the stats collector while you manually do VACUUM some-small-table. The VACUUM command should try to send some messages to the stats collector process. I'm wondering if those get dropped somehow. regards, tom lane