Re: Inconsistency in reporting checkpointer stats

Поиск
Список
Период
Сортировка
От Nitin Jadhav
Тема Re: Inconsistency in reporting checkpointer stats
Дата
Msg-id CAMm1aWY1UFW-2CGRQyyU3QOrXqc6No_SiGc4UB0isdRXXLwr4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inconsistency in reporting checkpointer stats  (Andres Freund <andres@anarazel.de>)
Ответы Re: Inconsistency in reporting checkpointer stats  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Re: Inconsistency in reporting checkpointer stats  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Inconsistency in reporting checkpointer stats  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Thanks Robert and Andres for sharing your thoughts.

I have modified the code accordingly and attached the new version of
patches. patch 0001 fixes the inconsistency in checkpointer stats and
patch 0002 separates main buffer and SLRU buffer count from checkpoint
complete log message. In 0001, I added a new column to
pg_stat_bgwriter view and named it as slru_buffers_checkpoint and kept
the existing column buffers_checkpoint as-is. Should I rename this to
something like main_buffers_checkpoint? Thoughts?

Please refer to sample checkpoint complete log message[1]. I am not
quite satisfied with the percentage of buffers written information
logged there. The percentage is calculated based on NBuffers in both
the cases but I am just worried that are we passing wrong information
to the user while user may
think that the percentage of buffers is based on the total number of
buffers available and the percentage of SLRU buffers is based on the
total number of SLRU buffers available.

Kindly review and share your comments.

[1]:
2022-12-21 10:52:25.931 UTC [63530] LOG:  checkpoint complete: wrote
4670 buffers (28.5%), wrote 3 slru buffers (0.0%); 0 WAL file(s)
added, 0 removed, 4 recycled; write=0.045 s, sync=0.161 s, total=0.244
s; sync files=25, longest=0.146 s, average=0.007 s; distance=66130 kB,
estimate=66130 kB; lsn=0/5557C78, redo lsn=0/5557C40

Thanks & Regards,
Nitin Jadhav

On Tue, Dec 20, 2022 at 11:08 PM Andres Freund <andres@anarazel.de> wrote:
>
> On 2022-12-20 08:18:36 -0500, Robert Haas wrote:
> > I think that the SLRU information is potentially useful, but mixing it
> > with the information about regular buffers just seems confusing.
>
> +1
>
> At least for now, it'd be different if/when we manage to move SLRUs to
> the main buffer pool.
>
> - Andres

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Inconsistency in reporting checkpointer stats
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL