I have a dedicated PostgreSQL server and a pgBouncer server. all connections are established through pgBouncer. I tested the system using Apache JMeter and PHP. The results are weird. The throughput with 500 connections are not bad but when I test using more connections it drops.
This is the test result:
The pgbouncer config:
[databases]
maindb = host=212.212.322.323 port=5432 user=myuser dbname=mydb pool_size=1000 pool_mode=transaction
[pgbouncer]
logfile = /var/log/postgresql/pgbouncer.log
pidfile = /var/run/postgresql/pgbouncer.pid
listen_addr = *
listen_port = 6432
auth_type = trust
auth_file = /etc/pgbouncer/userlist.txt
pool_mode = session
max_client_conn = 1000
default_pool_size = 20