Re: pg_stat_lwlocks view - lwlocks statistics, round 2

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Satoshi Nagayasu <snaga(at)uptime(dot)jp>, pgsql-hackers(at)postgresql(dot)org, Qi Huang <huangqiyx(at)hotmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Re: pg_stat_lwlocks view - lwlocks statistics, round 2
Date: 2012-10-13 23:55:38
Message-ID: CAB7nPqTUtyQEE02jVAt2w+hGo4C778W5VPN8cduxjj_+tDEqzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 14, 2012 at 6:00 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> On Sun, Oct 14, 2012 at 3:34 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
> wrote:
> > On Sat, Oct 13, 2012 at 11:34 PM, Satoshi Nagayasu <snaga(at)uptime(dot)jp>
> wrote:
> >> Hi,
> >>
> >> 2012/10/13 23:05, Satoshi Nagayasu wrote:
> >>> Hi all,
> >>>
> >>> I have fixed my previous patch for pg_stat_lwlocks view, and
> >>> as Josh commented, it now supports local and global (shared)
> >>> statistics in the same system view.
> >>
> >> Sorry, I found my mistakes. New fixed one is attached to this mail.
> >
> > Thanks for revising the patch. Here are the comments:
> >
> > The document needs to be updated.
> >
> > The patch caused the following compile warnings in my machine.
> >
> > pgstat.c:1357: warning: no previous prototype for
> 'pgstat_report_lwlockstat'
> > postgres.c:3922: warning: implicit declaration of function
> > 'pgstat_report_lwlockstat'
> > pgstatfuncs.c:1854: warning: no previous prototype for
> 'pg_stat_reset_lwlocks'
> >
> > In my test, this patch caused the measurable performance overhead.
> > I created the test database by pgbench -s10 and ran pgbench -c8 -j8 -T60
> -S.
> > Results are:
> >
> > [HEAD]
> > number of transactions actually processed: 1401369
> > tps = 23351.375811 (including connections establishing)
> > tps = 23355.900043 (excluding connections establishing)
> >
> > [PATCH]
> > number of transactions actually processed: 1401369
> > tps = 23351.375811 (including connections establishing)
> > tps = 23355.900043 (excluding connections establishing)
>
> Oops! Obviously I copied and pasted the test result wrongly...
> Here is the right result.
>
> [HEAD]
> number of transactions actually processed: 1401369
> tps = 23351.375811 (including connections establishing)
> tps = 23355.900043 (excluding connections establishing)
>
> [PATCH]
> number of transactions actually processed: 1092400
> tps = 18179.498013 (including connections establishing)
> tps = 18182.450824 (excluding connections establishing)
>
Performance difference is due to only the mutex lock taken?

>
> Another comment is; local_calls/waits/time_ms are really required?
> I'm not sure how those info would help the performance debugging.
>
> Regards,
>
> --
> Fujii Masao
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

--
Michael Paquier
http://michael.otacoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2012-10-14 01:46:16 Re: pg_stat_lwlocks view - lwlocks statistics, round 2
Previous Message Erik Rijkers 2012-10-13 22:11:14 Re: proposal - assign result of query to psql variable