pgbench: option delaying queries till connections establishment?
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Date: 2020-02-27T18:01:00Z
Lists: pgsql-hackers
Hi, 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). But for a fair comparison of the runtime effects I'd like to only compare the throughput for when connections are actually usable, otherwise I end up benchmarking few vs many connections, which is not useful. And because I'd like to run the numbers for a lot of different numbers of connections etc, I can't just make each run several hour longs to make the initial minutes not matter much. Therefore I'd like to make pgbench wait till it has established all connections, before they run queries. Does anybody else see this as being useful? If so, should this be done unconditionally? A new option? Included in an existing one somehow? Greetings, Andres Freund
Commits
-
Fix new pthread code to respect --disable-thread-safety.
- de91c3b976cf 14.0 landed
-
Add missing pthread_barrier_t.
- 44bf3d5083e1 14.0 landed
-
pgbench: Improve time logic.
- 547f04e7348b 14.0 landed
-
pgbench: Refactor thread portability support.
- b1d6a8f86813 14.0 landed
-
pgbench: Synchronize client threads.
- aeb57af8e640 14.0 landed
-
Fix bogus logic for skipping unnecessary partcollation dependencies.
- 84d514887f9c 12.0 cited