[pgpool-general: 1837] Re: pgpool vs. pgbouncer

Kouber Saparev kouber at saparev.com
Tue Jun 11 16:29:22 JST 2013


On 06/07/2013 04:05 AM, Tatsuo Ishii wrote:
>> PgBouncer is running in session mode:
>>
>> max_client_conn = 2000
>> default_pool_size = 150
>> reserve_pool_size = 50
>>
>> PgPool:
>>
>> num_init_children = 100
>> max_pool = 1
>>
>> I wrote a munin plugin in order to be able to answer you for the real
>> amount of connections. At peak time there are about 42 connections to
>> pgpool and 22 to pgbouncer. Still, it is not accurate, because munin is
>> running once every 5 minutes, so in between there could be higher values
>> (and probably there really are a lot more).
> Hum. Pgbouncer is running in session mode? I wonder what if pgbouncer
> accepts 2000 connections. In that case pgbouncer tries to create 2000
> connections to pgpool? Then 1900 connections will be in the kernel
> accpet queue, no? If so, I don't understand the difference from
> clients connect to pgpool directory. Because that will create 1900
> accept queue in the kernel as well.

We need the session features of PostgreSQL. As to the connections, you
are right. Initially we needed just a pooler, then we chose pgbouncer
because setting it up was easier. Then at some point we needed to setup
a replication with additional slave nodes, hence the need of a load
balancer. At that point we tried to use pgpool only, but it was not
behaving well (the system load was getting very high, etc.) and we
didn't have enough time to play with it... so we left the pooling job to
pgbouncer and configured pgpool to only balance.

At some point in the future we might perform additional tests to see
whether using pgpool only would be better. Theoretically it should be.

Regards,
--
Kouber Saparev


More information about the pgpool-general mailing list