pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Additional LWLOCK_STATS statistics
Date: Wed, 16 Sep 2015 12:44:21 -0400
Message-ID: <55F99C65.4070209@redhat.com> (raw)
In-Reply-To: <20150916162627.GF2086@alap3.anarazel.de>
References: <55F82AE1.3010407@redhat.com>
	<CA+TgmoYvgL7rA6jBzn60FUeHhb5TH2xu2m9JKPiXFqbZ5Dyi7w@mail.gmail.com>
	<55F871BA.4060404@redhat.com>
	<CA+TgmoaXdUvA1P=-9PScZU5PMBEYeHw2XD4zF69=_LTU2zs+Wg@mail.gmail.com>
	<55F876CA.8020702@redhat.com>
	<55F97909.3010101@redhat.com>
	<55F97BF0.70503@redhat.com>
	<55F97EB7.8080308@redhat.com>
	<20150916162627.GF2086@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hi,

On 09/16/2015 12:26 PM, Andres Freund wrote:
> On 2015-09-16 10:37:43 -0400, Jesper Pedersen wrote:
>>    #ifdef LWLOCK_STATS
>>    	lwstats->spin_delay_count += SpinLockAcquire(&lock->mutex);
>> +
>> + 	/*
>> + 	 * We scan the list of waiters from the back in order to find
>> + 	 * out how many of the same lock type are waiting for a lock.
>> + 	 * Similar types have the potential to be groupped together.
>> + 	 *
>
> Except for LW_WAIT_UNTIL_FREE there shouldn't be much in terms of
> grouping? Can't you instead iterate and count
> counter[waiter->lwWaitMode]++ or so?
>

The sample report (-c/-j 80) shows in the exclusive report that 
CLogControlLock has 79 in series, XidGenLock has 80 and ProcArrayLock 
only 7. For shared CLogControlLock has 63 and ProcArrayLock has 74 
(which is also its max queue size).

So, I think there is some value in keeping this information separate.

Best regards,
  Jesper



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (16+ messages)  latest in thread

Message-ID: <55F99C65.4070209@redhat.com>
Permalink:  ../55F99C65.4070209@redhat.com/
Also on:    postgresql.org/message-id/55F99C65.4070209@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jesper.pedersen@redhat.com, andres@anarazel.de
  Subject: Re: Additional LWLOCK_STATS statistics
  In-Reply-To: <55F99C65.4070209@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox