Re: Publish checkpoint timing and sync files summary data to pg_stat_bgwriter - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Publish checkpoint timing and sync files summary data to pg_stat_bgwriter
Date
Msg-id CAEYLb_W4JW+2wg0ViecWJSUy3dQAuH=WZMkuFX4=ORbqxkk=fw@mail.gmail.com
Whole thread Raw
In response to Re: Publish checkpoint timing and sync files summary data to pg_stat_bgwriter  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Publish checkpoint timing and sync files summary data to pg_stat_bgwriter  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 28 March 2012 15:23, Robert Haas <robertmhaas@gmail.com> wrote:
> At any rate, I strongly agree that counting the number of
> strategy allocations is not really a viable proxy for counting the
> number of backend writes.  You can't know how many of those actually
> got dirtied.

Sure.

> Since any backend write is necessarily the result of that backend
> trying to allocate a buffer, I think maybe we should just count
> whether the number of times it was trying to allocate a buffer *using
> a BAS* vs. the number of times it was trying to allocate a buffer *not
> using a BAS*.  That is, decide whether or not it's a "strategy write"
> not based on whether the buffer came in via a strategy allocation, but
> rather based on whether it's going out as a result of a strategy
> allocation.

I'm not quite sure I understand what you mean here. Are you suggesting
that I produce a revision that bumps beside FlushBuffer() in
BufferAlloc(), as a dirty page is evicted/written, while breaking the
figure out into != BAS_NORMAL and == BAS_NORMAL figures? Would both
figures be presented as separate columns within pg_stat_bgwriter?
--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: measuring lwlock-related latency spikes
Next
From: Tom Lane
Date:
Subject: Re: Re: [GENERAL] pg_dump incredibly slow dumping a single schema from a large db