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

Tatsuo Ishii ishii at postgresql.org
Tue Jun 11 16:56:39 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

That is not good. If anything wrong with pgpool, I really want to fix
it. Possible cause of this:

- pgpool version. You might want to try 3.2-stable head (we are going
  to release 3.2.5 in June).

- kernel version. Recently I heard kernel 3.2 has a problem in terms
  of performance while using PostgreSQL. This may or may not be
  related to your problem.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> 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.


More information about the pgpool-general mailing list