Re: HACKERS[PROPOSAL] split ProcArrayLock into multiple parts

From: "Jim Van Fleet" <vanfleet(at)us(dot)ibm(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: HACKERS[PROPOSAL] split ProcArrayLock into multiple parts
Date: 2017-06-07 16:29:07
Message-ID: OFD6E2973D.82F57B44-ON86258138.0059B8E5-86258138.005A8EFA@notes.na.collabserv.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote on 06/07/2017 07:34:06 AM:

...

> > The down side is that on smaller configurations (single socket) where
there
> > is less "lock thrashing" in the storage subsystem and there are
multiple
> > Lwlocks to take for an exclusive acquire, there is a decided downturn
in
> > performance. On hammerdb, the prototype was 6% worse than the base on
a
> > single socket power configuration.
> >
>
> I think any patch having 6% regression on one machine configuration
> and 16% improvement on another machine configuration is not a net win.
> However, if there is a way to address the regression, then it will
> look much attractive.

I have to agree.
>
> > If there is interest in this approach, I will submit a patch.
> >
>
> The basic idea is clear from your description, but it will be better
> if you share the patch as well. It will not only help people to
> review and provide you feedback but also allow them to test and see if
> they can reproduce the numbers you have mentioned in the mail.

OK -- would love the feedback and any suggestions on how to mitigate the
low end problems.
>
> There is some related work which was previously proposed in this area
> ("Cache the snapshot") [1] and it claims to reduce contention around
> ProcArrayLock. I am not sure if that patch still applies, however, if
> you find it relevant and you are interested in evaluating the same,
> then we can request the author to post a rebased version if it doesn't
> apply.

Sokolov Yura has a patch which, to me, looks good for pgbench rw
performance. Does not do so well with hammerdb (about the same as base)
on single socket and two socket.

>
> [1] - https://www.postgresql.org/message-id/
> CAD__OuiwEi5sHe2wwQCK36Ac9QMhvJuqG3CfPN%2BOFCMb7rdruQ%40mail.gmail.com
>
> --
> With Regards,
> Amit Kapila.
> EnterpriseDB: http://www.enterprisedb.com
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2017-06-07 16:30:46 strange error message from slave when connection to master cannot be established
Previous Message Masahiko Sawada 2017-06-07 16:19:14 Re: Challenges preventing us moving to 64 bit transaction id (XID)?