pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Jesper Pedersen <jesper.pedersen@redhat.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Additional LWLOCK_STATS statistics
Date: Wed, 16 Sep 2015 18:26:27 +0200
Message-ID: <20150916162627.GF2086@alap3.anarazel.de> (raw)
In-Reply-To: <55F97EB7.8080308@redhat.com>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Hi,

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?

Greetings,

Andres Freund


-- 
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: <20150916162627.GF2086@alap3.anarazel.de>
Permalink:  ../20150916162627.GF2086@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20150916162627.GF2086@alap3.anarazel.de

 · 

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: andres@anarazel.de, jesper.pedersen@redhat.com
  Subject: Re: Additional LWLOCK_STATS statistics
  In-Reply-To: <20150916162627.GF2086@alap3.anarazel.de>

* 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