public inbox for [email protected]
help / color / mirror / Atom feedFrom: Daniel Verite <[email protected]>
To: KK CHN <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Pgbouncer performance query
Date: Fri, 23 Jan 2026 16:04:24 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKgGyB_fxnmsMq-a4KxH+PQjL6_5m14UvpEb5ejbuiJy7H_iFA@mail.gmail.com>
KK CHN wrote:
> default_pool_size = 40
That limits the number of connections from pgBouncer to the database
to 40. That's per user/database, but pgbench connects to the same
database/same user. So when running pgbench -c 200, without pgBouncer
there are 200 active connections, whereas through pgBouncer there are
only 40 active connections in Postgres.
When queries are issued to pgBouncer and the 40 connections
are already busy, it makes them wait.
That alone might explain why the average latencies are so different
between pgBouncer and direct connections.
If you really want to support 200 concurrent clients, increase the pool
size accordingly.
Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
view thread (3+ messages)
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Pgbouncer performance query
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox