Re: [Proposal] Add accumulated statistics for wait event - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [Proposal] Add accumulated statistics for wait event
Date
Msg-id CAPpHfdt6M3568HZ5ZEzrOdb=n7vc527+aFodSLYpy6tJvJppGQ@mail.gmail.com
Whole thread Raw
In response to Re: [Proposal] Add accumulated statistics for wait event  (Michael Paquier <michael@paquier.xyz>)
Responses RE: Re: [Proposal] Add accumulated statistics for wait event  (MyungKyu LIM <myungkyu.lim@samsung.com>)
List pgsql-hackers
On Mon, Jul 23, 2018 at 10:53 AM Michael Paquier <michael@paquier.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


pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Fix calculations on WAL recycling.
Next
From: Nikhil Sontakke
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions