Re: stats collector spins my disk up every 500ms (8.2.3) - Mailing list pgsql-general

From Tom Lane
Subject Re: stats collector spins my disk up every 500ms (8.2.3)
Date
Msg-id 5881.1179341432@sss.pgh.pa.us
Whole thread Raw
In response to Re: stats collector spins my disk up every 500ms (8.2.3)  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: stats collector spins my disk up every 500ms (8.2.3)
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Daniel Barlow wrote:

>> Questions:
>> 1) this is on a system with I believe to be quiescent - there is only
>> one client open which is not doing anything.  Before I get more involved
>> with this, can someone just confirm that pgstat will continue to update
>> this file even when nothing is happening?  If not, then I guess
>> something /is/ happening and I need to investigate what it is (advice on
>> how to track it down is welcome - I already have statement logging on,
>> and there's nothing showing in there)

> Hmm, I don't think we have an optimization to avoid writing it when the
> data hasn't changed.  This seems easy to do ... see attached patch
> (untested)

Have you made any effort to confirm this is needed?  Watching the
collector with strace, I don't see it doing anything but poll() unless
new messages come in.  However, in HEAD it seems new messages come in
every 30 seconds or so --- it looks to me like the autovacuum launcher
is rather uselessly launching a new worker every few seconds, and the
worker generates stats in the process of examining a database.
Can we damp that behavior down a bit in an idle system?

I'm not sure about Daniel's report of unprovoked writes every 500ms.
It might be an artifact of the stats delay bug we fixed in 8.2.4,
but this isn't the symptom that was reported.

            regards, tom lane

pgsql-general by date:

Previous
From: Ron Mayer
Date:
Subject: Re: stats collector spins my disk up every 500ms (8.2.3)
Next
From: Tom Lane
Date:
Subject: Re: a few questions on backup