[Pgpool-general] What is the performance penalty of using pgpool

Jaume Sabater jsabater at gmail.com
Wed Aug 12 13:20:51 UTC 2009


On Wed, Aug 12, 2009 at 1:20 PM, ram<ram at netcore.co.in> wrote:

> I am supposed to implement some database replication , in order to have a
> real time data backup.
> I tried out pgpool in a test environment and benchmarking with pgbench I
> realized that the time for inserts would grow by an average 100% with
> pgpool.


I have two clusters running two PostgreSQL servers each with 1 active
pgpool-II instance, all of them on Debian Lenny x86_64. On both I have
the same performance: inserts are twice as slow and selects are twice
as fast.

I have load_balance and replication, of course. As far as I know, it's
the way it is if you want:

1. Sync cluster (i.e. transactions are commited once they are okay in
both nodes). It's not a master-slave configuration in which only the
master has the really good data and slave is always left behind a bit.

2. Load balance: select queries are balanced between the nodes,
therefore you get 1*num_of_nodes speed boost.

If you want to have fast inserts, you can't have a sync cluster, you
need to have a master-slave cluster. And you won't have load balance
advantages. In my case, we do very few inserts and a lot of selects,
hence it's good for us. But it's not okay for all cases.

People requiring a master-slave configuration use Slony-I, I think
(not really sure as I have never used it), or binary log shipping (the
native solution of PostgreSQL, which just got improved in 8.4
version).

-- 
Jaume Sabater
http://linuxsilo.net/

"Ubi sapientas ibi libertas"


More information about the Pgpool-general mailing list