Re: Additional LWLOCK_STATS statistics - Mailing list pgsql-hackers

From Jesper Pedersen
Subject Re: Additional LWLOCK_STATS statistics
Date
Msg-id 55F97BF0.70503@redhat.com
Whole thread Raw
In response to Re: Additional LWLOCK_STATS statistics  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: Additional LWLOCK_STATS statistics  (Jesper Pedersen <jesper.pedersen@redhat.com>)
List pgsql-hackers
On 09/16/2015 10:13 AM, Jesper Pedersen wrote:
> 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.
>

Note, that the time it recorded before the spin lock is acquired, so not 
ideal.

> 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.
>

Likely from LWLOCK_STATS' own lwlock.c::print_lwlock_stats, which would 
make sense.

Best regards, Jesper




pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: Additional LWLOCK_STATS statistics
Next
From: Teodor Sigaev
Date:
Subject: Re: pgbench progress with timestamp