Re: Reducing contention for the LockMgrLock

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Reducing contention for the LockMgrLock
Date: 2005-12-09 08:25:59
Message-ID: 1134116759.2906.1152.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2005-12-08 at 09:44 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > The output you gave wasn't anything I recognize in the code. Assuming
> > its not already there, please can you share code you are using to find
> > the evidence, even if its just privately in some form?
>
> See below. Also, the message I previously mentioned shows a different
> tack on the same theme:
> http://archives.postgresql.org/pgsql-patches/2003-12/msg00365.php
> although in the light of later events I think that keeping the counts
> in shared memory like that is a bad idea --- too likely to skew the
> results.

Looks good, thanks. Like the shmem_exit solution. I'll use this in any
testing, to allow easier discussion of results and encourage all other
testers to do the same.

> > You're looking at the number of spins to acquire each lock?
>
> Number of semop waits.

I wonder whether that is the thing to measure. That measure doesn't show
how long each waiter waited. I would also want to see:
- queue length at wait time
- any variability over time

I was thinking of looking at the histogram of wait queue length
frequency for the highly contested locks.

> > Manfred's earlier patch provides very clear output for observing
> > contention, including full summaries. Could we commit that, so we can
> > all use this for analysis? Updated with the wait info.
>
> What patch would that be?

Sorry, thought Manfred had written the earlier patch.

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2005-12-09 09:10:00 psql patch: new host/port
Previous Message Qingqing Zhou 2005-12-09 06:02:22 Re: Warm-cache prefetching