Re: Additional LWLOCK_STATS statistics

From: Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Additional LWLOCK_STATS statistics
Date: 2015-09-16 14:13:29
Message-ID: 55F97909.3010101@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/15/2015 03:51 PM, Jesper Pedersen wrote:
>> It
>> would be nice to get a better sense of how *long* we block on various
>> locks. It's hard to tell whether some other lock might be have fewer
>> blocking events but for a much longer average duration.
>>
>

I did a run with the attached patch, recording the time from
LWLockQueueSelf() until the lock is required.

Doing block_time / block_count basically only shows "main 0" -- its
called "unassigned:0"; it also shows up in the max exclusive report.
Where it is coming from is another question, since it shouldn't be in use.

Due to the overhead of gettimeofday() I think that _v1 is better to
consider.

Best regards,
Jesper

Attachment Content-Type Size
lwstats_v2.patch text/x-patch 5.4 KB
lwstats_blocktime.svg image/svg+xml 40.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jesper Pedersen 2015-09-16 14:25:52 Re: Additional LWLOCK_STATS statistics
Previous Message Zhaomo Yang 2015-09-16 14:09:20 Re: CREATE POLICY and RETURNING