Re: stats collector spins my disk up every 500ms (8.2.3)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Daniel Barlow <dan(at)coruskate(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: stats collector spins my disk up every 500ms (8.2.3)
Date: 2007-05-16 18:50:32
Message-ID: 5881.1179341432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-05-16 19:04:17 Re: a few questions on backup
Previous Message Ron Mayer 2007-05-16 18:34:36 Re: stats collector spins my disk up every 500ms (8.2.3)