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

Scott Rankin srankin at motus.com
Sat Jan 31 08:16:29 JST 2015






On 1/26/15, 10:35 PM, "Tatsuo Ishii" <ishii at postgresql.org> wrote:

>> 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.

Thank you! I had 150 worker threads, so I wasn’t seeing the caching.  When
I reduced it to 10, I saw it.


>
>Best regards,
>--
>Tatsuo Ishii
>SRA OSS, Inc. Japan
>English: http://www.sraoss.co.jp/index_en.php
>Japanese:http://www.sraoss.co.jp
This email message contains information that Motus, LLC considers confidential and/or proprietary, or may later designate as confidential and proprietary. It is intended only for use of the individual or entity named above and should not be forwarded to any other persons or entities without the express consent of Motus, LLC, nor should it be used for any purpose other than in the course of any potential or actual business relationship with Motus, LLC. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify sender immediately and destroy the original message.

Internal Revenue Service regulations require that certain types of written advice include a disclaimer. To the extent the preceding message contains advice relating to a Federal tax issue, unless expressly stated otherwise the advice is not intended or written to be used, and it cannot be used by the recipient or any other taxpayer, for the purpose of avoiding Federal tax penalties, and was not written to support the promotion or marketing of any transaction or matter discussed herein.


More information about the pgpool-general mailing list