Re: performance statistics monitoring without spamming logs

From: Adrien NAYRAT <adrien(dot)nayrat(at)anayrat(dot)info>
To: Lukas Fittl <lukas(at)fittl(dot)com>, Patrick Hemmer <postgresql(at)stormcloud9(dot)net>
Cc: <pgsql-performance(at)lists(dot)postgresql(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: performance statistics monitoring without spamming logs
Date: 2018-07-13 07:23:59
Message-ID: db6adcc6-b947-6bfa-fe38-68c2506dd0e9@anayrat.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 07/13/2018 12:25 AM, Lukas Fittl wrote:
> On Tue, Jul 10, 2018 at 11:38 AM, Justin Pryzby <pryzby(at)telsasoft(dot)com
> <mailto:pryzby(at)telsasoft(dot)com>> wrote:
>
> > 2. Make stats available in `pg_stat_statements` (or alternate view that
> > could be joined on). The block stats are already available here, but
> > others like CPU usage, page faults, and context switches are not.
>
> pg_stat_statements is
> ./contrib/pg_stat_statements/pg_stat_statements.c which is 3k LOC.
>
> getrusage stuff and log_*_stat stuff is in src/backend/tcop/postgres.c
>
>
> Before you start implementing something here, take a look at
> pg_stat_kcache [0]
>
> Which already aims to collect a few more system statistics than what
> pg_stat_statements provides today, and might be a good basis to extend from.
>
> It might also be worth to look at pg_stat_activity wait event sampling
> to determine where a system spends time, see e.g. pg_wait_sampling
> [1] for one approach to this.
>

Hi,

You should look Powa stack :

https://github.com/powa-team/powa

Powa can aggregate metrics from different extensions such as
pg_stat_statements, pg_stat_kcache and pg_wait_sampling recently :
https://rjuju.github.io/postgresql/2018/07/09/wait-events-support-for-powa.html

Regards,

> [0]: https://github.com/powa-team/pg_stat_kcache
> <https://github.com/powa-team/pg_stat_kcache>
> [1]: https://github.com/postgrespro/pg_wait_sampling
> <https://github.com/postgrespro/pg_wait_sampling>
>
> Best,
> Lukas
>
> --
> Lukas Fittl

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Adrien NAYRAT 2018-07-13 07:24:52 Re: performance statistics monitoring without spamming logs
Previous Message Tsunakawa, Takayuki 2018-07-13 07:11:59 RE: How to make partitioning scale better for larger numbers of partitions

Browse pgsql-performance by date

  From Date Subject
Next Message Adrien NAYRAT 2018-07-13 07:24:52 Re: performance statistics monitoring without spamming logs
Previous Message Lukas Fittl 2018-07-12 22:25:25 Re: performance statistics monitoring without spamming logs