Re: [HACKERS] pg_stat_wal_write statistics view

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] pg_stat_wal_write statistics view
Date: 2017-11-27 03:12:26
Message-ID: CAJrrPGcYMREiBL-x6qNhxM1a7DWGWy+j3gWFRP28nK=wgL9S2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 8, 2017 at 8:46 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Tue, Nov 7, 2017 at 4:31 AM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
> wrote:
> >> Updated patch attached.
> > Patch rebased.
>
> I think the earlier concerns about the performance impact of this are
> probably very valid concerns, and I don't see how the new version of
> the patch gets us much closer to solving them.
>

I will check the performance with the changes of removing the stats
collector
usage and provide the details.

> I am also not sure I understand how the backend_write_blocks column is
> intended to work. The only call to pgstat_send_walwrites() is in
> WalWriterMain, so where do the other backends report anything?
>

With the current patch, All the backends update the stats in shared memory
structure and only WAL writer process gathers the stats and share with the
stats collector.

> Also, if there's only ever one global set of counters (as opposed to
> one per table, say) then why use the stats collector machinery for
> this at all, vs. having a structure in shared memory that can be
> updated directly? It seems like adding a lot of overhead for no
> functional benefit.
>

Yes, I agree that using stats collector for these stats is an overhead.
I change the patch to use just the shared memory structure and
gather the performance results and post it to the next commitfest.

Currently I marked the patch as "returned with feedback" in the
ongoing commitfest.

Regards,
Hari Babu
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-11-27 05:37:43 Re: [HACKERS] GnuTLS support
Previous Message Jing Wang 2017-11-27 02:41:22 Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE