[pgpool-general: 3438] Re: Performance degradation with load balancing

Tatsuo Ishii ishii at postgresql.org
Tue Jan 27 07:35:57 JST 2015


> This is sort of in the same vein as Keith’s question below.  I’ve got a setup where I have a master in one datacenter and a slave in another (across the country).  I want to use pgpool in load balancing mode to send read queries to the slave, and writes to the master.  However, I’m seeing a situation where, in load balancing mode, pgpool is making a lot of queries to the master before it makes the read query on the slave:
> 
> 2015-01-26 21:22:05: pid 182: LOG:  DB node id: 0 backend pid: 19437 statement: SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.oid = pgpool_regclass('drivers') AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'
> 2015-01-26 21:22:05: pid 182: LOG:  DB node id: 0 backend pid: 19437 statement: SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.oid = pgpool_regclass('driver_groups') AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'
> 2015-01-26 21:22:05: pid 182: LOG:  DB node id: 0 backend pid: 19437 statement: SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.oid = pgpool_regclass('users') AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'
> 2015-01-26 21:22:05: pid 182: LOG:  DB node id: 0 backend pid: 19437 statement: SELECT count(*) FROM pg_class AS c, pg_namespace AS n WHERE c.oid = pgpool_regclass('companies') AND c.relnamespace = n.oid AND n.nspname = 'pg_catalog'
> 2015-01-26 21:22:05: pid 182: LOG:  DB node id: 1 backend pid: 62278 statement: Parse: select …..
> 
> This is killing my performance. I’ve turned off check_temp_table and check_unlogged_table, but these multiple selects against the master persist.  Is there any way to turn them off completely or perhaps cache the resul

Actually pgpool-II caches those results. If you look into the log
carefully, you should notice that: pid 182 does not issue those
queries multiple times.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list