Re: SLRU statistics

From: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SLRU statistics
Date: 2020-01-21 08:09:33
Message-ID: CA+fd4k79ngs-vjAeLXhMyy1FGgXSqGdCnWW-mR0By5vzgLO47g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 21 Jan 2020 at 01:38, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>
> On Mon, Jan 20, 2020 at 01:04:33AM +0000, tsunakawa(dot)takay(at)fujitsu(dot)com wrote:
> >From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
> >> One of the stats I occasionally wanted to know are stats for the SLRU
> >> stats (we have couple of those - clog, subtrans, ...). So here is a WIP
> >> version of a patch adding that.

+1

> >
> >How can users take advantage of this information? I think we also need
> >the ability to set the size of SLRU buffers. (I want to be freed from
> >the concern about the buffer shortage by setting the buffer size to its
> >maximum. For example, CLOG would be only 1 GB.)
> >
>
> You're right the users can't really take advantage of this - my primary
> motivation was providing a feedback for devs, benchmarking etc. That
> might have been done with DEBUG messages or something, but this seems
> more convenient.

I've not tested the performance impact but perhaps we might want to
disable these counter by default and controlled by a GUC. And similar
to buffer statistics it might be better to inline
pgstat_count_slru_page_xxx function for better performance.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 曾文旌 (义从) 2020-01-21 08:45:53 Re: [Proposal] Global temporary tables
Previous Message Andres Freund 2020-01-21 07:35:22 Re: aggregate crash