Re: performance statistics monitoring without spamming logs

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Adrien NAYRAT <adrien(dot)nayrat(at)anayrat(dot)info>
Cc: Lukas Fittl <lukas(at)fittl(dot)com>, Patrick Hemmer <postgresql(at)stormcloud9(dot)net>, 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:55:14
Message-ID: CAOBaU_bOZ4rc6-3j95ZP6SRuxYPe4NPWvRGhEfQEomULaN5BWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Fri, Jul 13, 2018 at 9:23 AM, Adrien NAYRAT
<adrien(dot)nayrat(at)anayrat(dot)info> wrote:
> 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.
>>

Also no one asked for it before, but we can definitely add all the
other fields returned by get_rusage(2) in pg_stat_kcache. You can
also look at https://github.com/markwkm/pg_proctab.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Toshi Harada 2018-07-13 07:56:09 Re: [HACKERS] WIP: Data at rest encryption
Previous Message Yugo Nagata 2018-07-13 07:52:36 Re: Preferring index-only-scan when the cost is equal

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2018-07-15 03:25:21 Re: Improving Performance of Query ~ Filter by A, Sort by B
Previous Message Adrien NAYRAT 2018-07-13 07:24:52 Re: performance statistics monitoring without spamming logs