Resource Usage same In spite of fronting my DB server with Pgbouncer ?

From: KK CHN <kkchn(dot)in(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Resource Usage same In spite of fronting my DB server with Pgbouncer ?
Date: 2026-01-23 18:14:45
Message-ID: CAKgGyB9z_dN_5vOGS34CNMrT74F4OQWBToCHoSjsWShVDOGZyQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

List,
I am fronting my postgres 16 server with pgbouncer1.23.1

What surprises me, even though I am deploying pgbouncer as a separate VM
in front of DB server VM, the top command shows the almost same resource
usage statistics in the case of load averages, Memory usage etc on the DB
Server, whether I am infronting DB server with pgbouncer or not.

Please find the top output from the db server pasted here.

https://glot.io/snippets/hf4ilogbz0

My Pgbouncer server top output shows littler resource usages in terms of
CPU, MEM usage
on the top out put of pgbouncer VM ( load averagaes less than 3 always,
and Ram usage is very low, swap usage almost nil..

Why eventhough I have deployed pgbouncer for this setup why DB server
still shows large resource usage as in the pasted out put.

How can I improve the resource usages on DB server ? what is the root
cause DB server's still high resource usage ?

Any hints are most welcome .

My pgbouncer.ini config params pasted here for any valuable suggestions
for fine tuning.

[root(at)pgbouncer ~]# grep ^[^\;\;] /usr/local/etc/pgbouncer.ini
[databases]

recoil = host=dbmain.erss.in port=5444 dbname=recoil
[users]
[pgbouncer]
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
listen_addr = *
listen_port = 5444
auth_type = md5
auth_file = /usr/local/etc/pgbouncer.users
admin_users = myuser
stats_users = myuser,
pool_mode = transaction
max_prepared_statements = 100
server_reset_query = DISCARD ALL
server_reset_query_always = 1
ignore_startup_parameters = extra_float_digits, options, statement_timeout,
idle_in_transaction_session_timeout

max_client_conn = 5000
default_pool_size = 50
min_pool_size = 30
reserve_pool_size = 10
reserve_pool_timeout = 5
max_db_connections = 900
max_user_connections = 800
server_lifetime = 3600
server_idle_timeout = 60000
[root(at)pgbouncer ~]#

Regards,
Krishane

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-01-23 18:48:17 Re: Resource Usage same In spite of fronting my DB server with Pgbouncer ?
Previous Message Daniel Verite 2026-01-23 15:04:24 Re: Pgbouncer performance query