Re: LWLock optimization for multicore Power machines

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LWLock optimization for multicore Power machines
Date: 2017-03-25 16:50:48
Message-ID: CAPpHfdtsW_jWr_YFU_x7bffk1vJxa_rbKX1XA2pfGKsNOMCbXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 16, 2017 at 8:35 PM, David Steele <david(at)pgmasters(dot)net> wrote:

> On 2/21/17 9:54 AM, Bernd Helmle wrote:
> > Am Dienstag, den 14.02.2017, 15:53 +0300 schrieb Alexander Korotkov:
> >> +1
> >> And you could try to use pg_wait_sampling
> >> <https://github.com/postgrespro/pg_wait_sampling> to sampling of wait
> >> events.
> >
> > I've tried this with your example from your blog post[1] and got this:
> >
> > (pgbench scale 1000)
> >
> > pgbench -Mprepared -S -n -c 100 -j 100 -T 300 -P2 pgbench2
> >
> > SELECT-only:
> >
> > SELECT * FROM profile_log ;
> > ts | event_type | event | count
> > ----------------------------+---------------+---------------+-------
> > 2017-02-21 15:21:52.45719 | LWLockNamed | ProcArrayLock | 8
> > 2017-02-21 15:22:11.19594 | LWLockTranche | lock_manager | 1
> > 2017-02-21 15:22:11.19594 | LWLockNamed | ProcArrayLock | 24
> > 2017-02-21 15:22:31.220803 | LWLockNamed | ProcArrayLock | 1
> > 2017-02-21 15:23:01.255969 | LWLockNamed | ProcArrayLock | 1
> > 2017-02-21 15:23:11.272254 | LWLockNamed | ProcArrayLock | 2
> > 2017-02-21 15:23:41.313069 | LWLockNamed | ProcArrayLock | 1
> > 2017-02-21 15:24:31.37512 | LWLockNamed | ProcArrayLock | 19
> > 2017-02-21 15:24:41.386974 | LWLockNamed | ProcArrayLock | 1
> > 2017-02-21 15:26:41.530399 | LWLockNamed | ProcArrayLock | 1
> > (10 rows)
> >
> > writes pgbench runs have far more events logged, see the attached text
> > file. Maybe this is of interest...
> >
> >
> > [1] http://akorotkov.github.io/blog/2016/03/25/wait_monitoring_9_6/
>
> This patch applies cleanly at cccbdde. It doesn't break compilation on
> amd64 but I can't test on a Power-based machine
>
> Alexander, have you had a chance to look at Bernd's results?
>

Bernd's results look good. But it seems that his machine is not big
enough, so effect of patch isn't huge.
I will get access to big enough Power8 machine in Monday 27 March. I will
run benchmarks there and post results immediately.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-03-25 16:59:22 Re: increasing the default WAL segment size
Previous Message Fujii Masao 2017-03-25 16:37:21 Re: pgsql: Allow vacuums to report oldestxmin