From: Marina Polyakova <m.polyakova@postgrespro.ru>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pgbench: option delaying queries till connections establishment?
Date: Tue, 17 Nov 2020 00:09:34 +0300
Message-ID: <b854fa107c6614e1b38cd9303243e7b0@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfdu9baaNc121Ct_DUa5TkTOnak41HLiP24uO3gMTy8xGig@mail.gmail.com>
References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de>
<CAPpHfdu9baaNc121Ct_DUa5TkTOnak41HLiP24uO3gMTy8xGig@mail.gmail.com>
Hello!
On 2020-11-14 20:07, Alexander Korotkov wrote:
> 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.g...
Sorry I'm not familiar with the internal architecture of snapshots,
locks etc. in postgres, but I wanted to ask - what exact kind of patch
for fair lwlocks do you want to offer to the community? I applied the
6-th version of the patch for fair lwlocks from [1] to the old master
branch (see commit [2]), started many threads in pgbench (-M prepared -c
1000 -j 500 -T 10 -P1 -S) and I did not receive stable first progress
reports, which IIUC are one of the advantages of the discussed patch for
the pgbench (see [3])...
[1]
https://www.postgresql.org/message-id/CAPpHfduV3v3EG7K74-9htBZz_mpE993zGz-%3D2k5RNA3tqabUAA%40mail.g...
[2]
https://github.com/postgres/postgres/commit/84d514887f9ca673ae688d00f8b544e70f1ab270
[3]
https://www.postgresql.org/message-id/20200227185129.hikscyenomnlrord%40alap3.anarazel.de
--
Marina Polyakova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: m.polyakova@postgrespro.ru, aekorotkov@gmail.com, andres@anarazel.de
Subject: Re: pgbench: option delaying queries till connections establishment?
In-Reply-To: <b854fa107c6614e1b38cd9303243e7b0@postgrespro.ru>
References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de> <CAPpHfdu9baaNc121Ct_DUa5TkTOnak41HLiP24uO3gMTy8xGig@mail.gmail.com> <b854fa107c6614e1b38cd9303243e7b0@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox