[pgpool-general: 1475] Re: [Benchmarks] Replication mode VS Master/Slave mode

Tatsuo Ishii ishii at postgresql.org
Sun Mar 10 08:20:35 JST 2013

Not sure how much numbers you got, but I would think the difference
between those mode comes from the way database gets replicated.  (I
assme you are using the Master/Slave mode with streaming replication).

Streaming replication(SR) is essentially a synchrnonous replication
system. That means when client is noticed that UPDATE command
completes, it is possible that standbys are not silll get updated. So
SR is fast. The price for this is, if you send SELECT to standbys, you
may get older results.

On the other hand with pgpool's replication mode, when client is
noticed that UPDATE command completes, it is guaranteed that slaves
are get updated. The price is speed, of course. If you have two DB
nodes, because pgpool-II needs to write to the first node then the
second node, the performance is expected 1/2 comparing with single
node. If you have third and fource node, there are written in
parallel. Included diagram(write-query-performance.png) shows the
relationship between performance (Y axis) and number of nodes(X
axis). Also I include anoter diagram(read-query-performance.png) which
is similar one but for read query.

If you issue read/write queries, total performance would be somewhat
synthetic of those two diagrams.

Hope this helps,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> Hello everyone.
> Does someone already did some benchmarks to compare Replication Mode
> with Master/Slave_mode (using streaming replication) ?
> I did some benchmarks on pgpool-II using pgbench-tools
> (https://github.com/gregs1104/pgbench-tools) and I was really
> surprised by results.
> Indeed with my tests the Master/Slave mode was more or less twice
> better than the replication mode (obviously using the same servers and
> sames postgresql configurations during both tests).
> I used pgbench-tools to test simple select or more complicated
> transactions: insert, update, select and in both case  Master/Slave
> was really better.
> I can't figure out why there is such a huge difference.
> I would love to have some feedbacks about that kind of experience.
> Thanks.
> Thomas
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write-query-performance.png
Type: image/png
Size: 41599 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130310/949117f9/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read-query-performance.png
Type: image/png
Size: 37609 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130310/949117f9/attachment-0003.png>

More information about the pgpool-general mailing list