From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Cc: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: SLRU statistics
Date: Tue, 21 Jan 2020 14:56:14 +0100
Message-ID: <20200121135614.vt4cpuzwiyarzfca@development> (raw)
In-Reply-To: <CA+fd4k79ngs-vjAeLXhMyy1FGgXSqGdCnWW-mR0By5vzgLO47g@mail.gmail.com>
References: <20200119143707.gyinppnigokesjok@development>
<OSAPR01MB5073426AFE2F2A524948FA6CFE320@OSAPR01MB5073.jpnprd01.prod.outlook.com>
<20200120163754.mbbkbhzaummlo47c@development>
<CA+fd4k79ngs-vjAeLXhMyy1FGgXSqGdCnWW-mR0By5vzgLO47g@mail.gmail.com>
On Tue, Jan 21, 2020 at 05:09:33PM +0900, Masahiko Sawada wrote:
>On Tue, 21 Jan 2020 at 01:38, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
>>
>> On Mon, Jan 20, 2020 at 01:04:33AM +0000, tsunakawa.takay@fujitsu.com wrote:
>> >From: Tomas Vondra <tomas.vondra@2ndquadrant.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.
>
Hmmm, yeah. Inlining seems like a good idea, and maybe we should have
something like track_slru GUC.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, masahiko.sawada@2ndquadrant.com, tsunakawa.takay@fujitsu.com
Subject: Re: SLRU statistics
In-Reply-To: <20200121135614.vt4cpuzwiyarzfca@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox