[pgpool-general: 585] Re: Load balancing does not work

Kouber Saparev kouber at saparev.com
Mon Jun 4 18:14:48 JST 2012


On 06/01/2012 03:47 PM, Lazaro Ruben Garcia Martinez wrote:
> Would you try a test with pgbench?
> <http://www.uci.cu/>

Here it goes. I created a simple pgbench script:

\setrandom delay 1 500
SELECT 1;
\sleep :delay ms
SELECT :delay;


Then started it:

pgbench -U postgres -d pgbench -h db1 -c 210 -C -j 7 -f pgbench.sql


The last lines of output:

transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 210
number of threads: 7
number of transactions per client: 10
number of transactions actually processed: 2100/2100
tps = 15.937769 (including connections establishing)
tps = 929.128364 (excluding connections establishing)


And still nothing in the log of db2 (the slave node). Everything is sent
to db1. Meanwhile when visiting the /status.php script of pgpoolAdmin, I
see the "SELECT pg_is_in_recovery()" query twice in the logs of both
servers. The status says:

db1    5432     Up. Disconnect. Running as primary server     0.500
db2    5432     Up. Disconnect. Running as standby server     0.500


In pgpool.conf:

load_balance_mode = true
master_slave_mode = true
master_slave_sub_mode = 'stream'


--
Kouber Saparev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120604/ca85b433/attachment.html>


More information about the pgpool-general mailing list