Re: [Proposal] Add accumulated statistics for wait event

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: myungkyu(dot)lim(at)samsung(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, don(dot)hong(at)samsung(dot)com, woosung(dot)sohn(at)samsung(dot)com
Subject: Re: [Proposal] Add accumulated statistics for wait event
Date: 2018-07-23 10:58:11
Message-ID: CAPpHfdt6M3568HZ5ZEzrOdb=n7vc527+aFodSLYpy6tJvJppGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 23, 2018 at 10:53 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> What's the performance penalty? I am pretty sure that this is
> measurable as wait events are stored for a backend for each I/O
> operation as well, and you are calling a C routine within an inlined
> function which is designed to be light-weight, doing only a four-byte
> atomic operation.

Yes, the question is overhead of measuring durations of individual
wait events. It has been proposed before, and there been heated
debates about that (see threads [1-3]). It doesn't seem to be a
conclusion about this feature. The thing to be said for sure:
performance penalty heavily depends on OS/hardware/workload. In some
cases overhead is negligible, but in other cases it appears to be
huge.

1. https://www.postgresql.org/message-id/flat/559D4729.9080704%40postgrespro.ru
2. https://www.postgresql.org/message-id/flat/CA%2BTgmoYd3GTz2_mJfUHF%2BRPe-bCy75ytJeKVv9x-o%2BSonCGApw%40mail.gmail.com
3. https://www.postgresql.org/message-id/flat/CAG95seUAQVj09KzLwU%2Bz1B-GqdMqerzEkPFR3hn0q88XzMq-PA%40mail.gmail.com

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikhil Sontakke 2018-07-23 11:01:50 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Kyotaro HORIGUCHI 2018-07-23 10:55:57 Re: Fix calculations on WAL recycling.