On Tue, Nov 17, 2026 at 5:37 PM Matthew Mochalkin <[email protected]> wrote: > > Yes, same thing. The contention your perf report showed inside HMAC_Init_ex() > is what the patch removes. > > I ran pgbench --connect through pgbouncer as you suggested. Same pgbench > binary (master), base and patched libpq swapped with LD_LIBRARY_PATH. > pgbouncer 1.24.1, auth_type = scram-sha-256, the role's SCRAM verifier in > auth_file, PostgreSQL 16 behind it, OpenSSL 3.5.7, 8 CPUs for the client. > > pgbench --connect -n -c N -j N -T 20 -f select1.sql, connections per second: > > -c = -j base patched > 1 403 451 > 8 1,170 5,380 > 16 734 8,555 > > With the base libpq pgbench used 6-8 cores for those ~1,000 connections/s, > the "1000% CPU" you saw. With the patch it uses about the same CPU for 5-8x > the connections. >
Cool! Perhaps just please register the $thread using https://commitfest.postgresql.org and mark it as 'Needs review', so it's not lost and somebody can later pick it up (You probably need to register there to do that). -J.
