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

Tatsuo Ishii ishii at sraoss.co.jp
Wed Aug 12 15:23:05 UTC 2009


> 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.
> 
> https://ecm.netcore.co.in/tmp/postgres_pgpool_comparison.html
> 
> 
> But that would mean my application would get thrashed for time. 
> I am new to postgres & pgpool ( had been using mysql all the while) 
> 
> Can someone guide me is this time difference normal. Where do I look for
> any tuning ? 

This is normal. pgpool sends INSERT request to the second node *after*
the first node returns from INSERT. This is neccessary to avoid
"global" dealock among multiple sessions. We learned this in hard
way.

However if there's only one session, we could issue INSERT
concurrently to both nodes. This would be a good optimization and may
be a TODO item if there's enough interest.

Also note that if you have the third node, time taken will be 100%,
not 200%. This is because pgpool issue INSERT concurrently for the
second and the third node.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list