What is the best configuration for pgBouncer in my case?
I have only 1 database, 1 user and the max_connections
in postgresql.conf is 1024
.
The currently config of my pgbouncer.config is:
max_client_conn = 1024
default_pool_size = 1024
min_pool_size = 32
;max_db_connections = 50
;max_user_connections = 50
Best Answer
It would be great to know how many connections you spect to handle at the same time.
I would size this depending on your server hardware use expectations
If you expect 1024 concurrent connections as much this setting is correct.
But here are the changes that worked for me. If you change the pooling mode you can reduce the default_pool_size, this increased my performance
Take a look at the different pooling modes to see if you can benefit from a more efficient pooling mode than the default value session pool mode.