Re: LWLOCK_STATS

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: LWLOCK_STATS
Date: 2012-01-07 07:58:05
Message-ID: 4F07FB0D.8000302@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07.01.2012 00:24, Robert Haas wrote:
> It's been a while since I did any testing with LWLOCK_STATS defined,
> so I thought it might be about time to do that again and see how
> things look. Here's how they looked back in July:
>
> http://archives.postgresql.org/pgsql-hackers/2011-07/msg01373.php

Interesting.

A couple of weeks ago I wrote a little patch that's similar to
LWLOCK_STATS, but it prints out % of wallclock time that is spent
acquiring, releasing, or waiting for a lock. I find that more useful
than the counters.

Here's the patch, I hope it's useful to others. It uses timer_create()
and timer_settime(), so it probably won't work on all platforms, and
requires linking with -lrt.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2012-01-07 08:12:39 Re: LWLOCK_STATS
Previous Message Pavel Stehule 2012-01-07 07:47:12 broken link to PostgreSQL 9.1 repository for Fedora 14