Re: pgbench: option delaying queries till connections establishment? - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: pgbench: option delaying queries till connections establishment?
Date
Msg-id CAPpHfdu9baaNc121Ct_DUa5TkTOnak41HLiP24uO3gMTy8xGig@mail.gmail.com
Whole thread Raw
In response to pgbench: option delaying queries till connections establishment?  (Andres Freund <andres@anarazel.de>)
Responses Re: pgbench: option delaying queries till connections establishment?  (Marina Polyakova <m.polyakova@postgrespro.ru>)
Re: pgbench: option delaying queries till connections establishment?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi!

On Thu, Feb 27, 2020 at 9:01 PM Andres Freund <andres@anarazel.de> wrote:
> I am trying to run a few benchmarks measuring the effects of patch to
> make GetSnapshotData() faster in the face of larger numbers of
> established connections.
>
> Before the patch connection establishment often is very slow due to
> contention. The first few connections are fast, but after that it takes
> increasingly long. The first few connections constantly hold
> ProcArrayLock in shared mode, which then makes it hard for new
> connections to acquire it exclusively (I'm addressing that to a
> significant degree in the patch FWIW).

Hmm...  Let's see the big picture.  You've recently committed a
patchset, which greatly improved the performance of GetSnapshotData().
And you're making further improvements in this direction.  But you're
getting trouble in measuring the effect, because Postgres is still
stuck on ProcArrayLock.  And in this thread you propose a workaround
for that implemented on the pgbench side.  My very dumb idea is
following: should we finally give a chance to more fair lwlocks rather
than inventing workarounds?

As I remember, your major argument against more fair lwlocks was the
idea that we should fix lwlocks use-cases rather than lwlock mechanism
themselves.  But can we expect that we fix all the lwlocks use-case in
any reasonable prospect?  My guess is 'no'.

Links
1. https://www.postgresql.org/message-id/CAPpHfdvJhO1qutziOp%3Ddy8TO8Xb4L38BxgKG4RPa1up1Lzh_UQ%40mail.gmail.com

------
Regards,
Alexander Korotkov



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench: option delaying queries till connections establishment?
Next
From: Julien Rouhaud
Date:
Subject: Re: Supporting = operator in gin/gist_trgm_ops