Re: [HACKERS] pg_stat_lwlock wait time view - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] pg_stat_lwlock wait time view
Date
Msg-id CA+TgmoYtMAgEzx7jes9psngTc2D3Y5LtWV6aBhLCTp34Lmg9CA@mail.gmail.com
Whole thread Raw
In response to pg_stat_lwlock wait time view  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-hackers
On Mon, Jan 9, 2017 at 12:13 AM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> Whenever the Backend is waiting for an LWLock, it sends the message to
> "stats collector" with PID and wait_event_info of the lock. Once the stats
> collector receives the message, Adds that Backend entry to Hash table after
> getting the start time. Once the Backend ends the waiting for the Lock, it
> sends the signal to the "stats collector" and it gets the entry from Hash
> table
> and finds out the wait time and update this time to the corresponding LWLock
> entry in another Hash table.

I will be extremely surprised if this doesn't have a severe negative
impact on performance when LWLock contention is high (e.g. a pgbench
read-only test using a scale factor that fits in the OS cache but not
shared_buffers).

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] RustgreSQL
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Logical Replication WIP