Why pgpool TPS is lowest versus postgresql direct connections?

From: "Lazaro Garcia" <lazaro3487(at)gmail(dot)com>
To: <pgpool-general(at)pgpool(dot)net>, <pgsql-admin(at)postgresql(dot)org>
Subject: Why pgpool TPS is lowest versus postgresql direct connections?
Date: 2017-02-09 09:59:53
Message-ID: 001d01d282bb$43909610$cab1c230$@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

The correct results reported by sysbench was:

Concurrent Users

1

20

50

100

PostgreSQL

3582

11943

12852

10618

Pgpool

2240

7628

7013

6135

Is there any way to tuning this behavior?

Regards

De: Lazaro Garcia [mailto:lazaro3487(at)gmail(dot)com]
Enviado el: miércoles, 8 de febrero de 2017 05:28 p. m.
Para: 'pgpool-general(at)pgpool(dot)net'; 'pgsql-admin(at)postgresql(dot)org'
Asunto: Why pgpool TPS is lowest versus postgresql direct connections?

After installed Pgpool with 2 postgresql nodes with streaming replication, I
have noticed that access directly to postgresql is more efficient than
through pgpool.

I supposed that load balance could increase the transactions per second
executed because each node could receive more load, but the results shown
below are not expected.

This is the setup:

Pgpool 3.6.1 whit connection pooling, streaming replication mode and load
balancing mode.

2 PostgreSQL server 9.6.1 whit streaming replication.

For the tests I used sysbench and pgbench.

The results of sysbench:

Concurrent Users

1

20

50

100

PostgreSQL (TPS) Direct

1166

20936

25743

27344

Pgpool (TPS)

2240

7628

7013

6135

The results of pgbench


1

20

50

100

PostgreSQL (TPS) Direct

1403

6805

6194

5726

Pgpool (TPS)

511

5430

5528

4705

As you can see in both cases even with load balance, the total transactions
per second are lower.

Is this the expected behavior. Is there any way to allow more TPS when
pgpool is used?

There are other publications with similar results:

https://www.os3.nl/_media/2011-2012/courses/lia/rory_breuk_gerrie_veerman_-_
report.pdf (page 28)

http://www.mail-archive.com/pgpool-general(at)pgfoundry(dot)org/msg03326.html

Regards

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message John Scalia 2017-02-09 13:07:51 Very long index build time
Previous Message Steve Crawford 2017-02-09 04:17:38 Re: Change ownership of a database