public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: KK CHN <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Pgbouncer performance query
Date: Thu, 22 Jan 2026 08:28:02 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKgGyB_fxnmsMq-a4KxH+PQjL6_5m14UvpEb5ejbuiJy7H_iFA@mail.gmail.com>
References: <CAKgGyB_fxnmsMq-a4KxH+PQjL6_5m14UvpEb5ejbuiJy7H_iFA@mail.gmail.com>

On 1/22/26 04:35, KK CHN wrote:
> List,
> 
> I am trying pgbouncer  for inhouse deployment for PostgreSQL 16.
> 
> My setup is      PostgreSQL VM : 5444 <=> Pgbouncer VM:5444  <===> Clients
> (PostgreSQL with IP 10.12.0.2  and  Pgbouncer 10.12.0.35 )
> 
> Conducted an inhouse  benchmark  test (pgbench) performed,   I have seen 
> the following results.
> 
> On direct hit  the DB server  handled tps = 162252.508744 (without 
> initial connection time)
> latency average = 1.233 ms  (Total time taken around  2 Minutes  to 
> complete)
> Through Pgbouncer  it handled  tps = 25107.166425 only  
> ( without initial connection time)
> latency average = 11.949 ms   ( Total time taken around 20 Minutes to 
> complete )
> 
> Could someone shed some light on   improving the total time taken by 
> pgbouncer in this scenario ?     How can I improve the  total time 
> taken  from 20 Minutes to any reasonably good value, say 5 Minutes is it 
> possible  ?

The significant difference between the test setups is the introduction 
of an additional VM between the clients and the database server in the 
pgBouncer case.

Have you tried it with pgBouncer installed in the Postgres VM?

Also see:

https://www.pgbouncer.org/faq.html#should-pgbouncer-be-installed-on-the-web-server-or-database-serve...

-- 
Adrian Klaver
[email protected]






view thread (3+ messages)  latest in thread

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