Hi, On 2020-11-14 20:07:38 +0300, 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.
No, the problem was that I couldn't measure the before/after behaviour reliably, because not all connections actually ever get established *before* the GetSnapshotData() scability patchset. Which made the numbers pointless, because we'd often end up with e.g. 80 connections doing work pre-patch, and 800 post-patch; which obviously measures very different things. I think the issue really is that, independent of PG lock contention, it'll take a while to establish all connections, and that starting to benchmark with only some connections established will create pretty pointless numbers. > 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? Perhaps - I just don't think it's related to this thread. And how you're going to address the overhead. Greetings, Andres Freund