From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-performance@postgresql.org
Subject: Re: Hot Standby performance issue
Date: Tue, 22 Oct 2013 19:54:11 +0200
Message-ID: <5266BBC3.90800@fuzzy.cz> (raw)
In-Reply-To: <CABUevEyJrUEBRr-X4YbHmQZSaUhfFUHB_OcW-CzMQar4b6-scg@mail.gmail.com>
References: <1381869626548-5774673.post@n5.nabble.com>
<1382291901534-5775181.post@n5.nabble.com>
<526460B7.3020008@fuzzy.cz>
<1382367933794-5775257.post@n5.nabble.com>
<52658780.1040002@fuzzy.cz>
<1382390332002-5775332.post@n5.nabble.com>
<5265A28E.4060601@fuzzy.cz>
<1382396377294-5775349.post@n5.nabble.com>
<5265B562.3040407@fuzzy.cz>
<CABUevEyJrUEBRr-X4YbHmQZSaUhfFUHB_OcW-CzMQar4b6-scg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 22.10.2013 06:49, Magnus Hagander wrote:
>
> On Oct 22, 2013 1:14 AM, "Tomas Vondra" <tv@fuzzy.cz
> <mailto:tv@fuzzy.cz>> wrote:
>>
>> On 22.10.2013 00:59, sparikh wrote:
>> > Yes, Expalin without Analyze is taking long. It is weird. In the
>> > pg_stat_activity Explain was the only query running. So server was
>> > almost idle. Using New relic interface I checked CPU was almost idle
>> > - around 10-20%. There were some IO activity - around 40-50%.
>> >
>> > I forgot to mention before I could run perf on command line even with
>> > root permission. It says command not found. May be utility is not
>> > installed or not enabled.
>>
>> Obviously you need to install it ... maybe ask your sysadmin to do that.
>>
>> > I have attached the snapshot of vmstat while explain was running in
>> > background. vmstat.txt
>> > <http://postgresql.1045698.n5.nabble.com/file/n5775349/vmstat.txt;
>>
>> The vmstat clearly shows that ~1 CPU is waiting on I/O. Hmm, I'm really
>> wondering what's going on here - I can't think of a case where this
>> would happen with a plain EXPLAIN ...
>
> Catalog bloat could make that happen. Though that should show up on
> the master as well, it could be that it's cached there and therefor
> only shows us to as cpu and not io and is therefore not noticed.
Maybe, but sparikh reported the query to be running for ~20 minutes.
That'd be hell of a bloat.
Sparikh, can you show us the size of system catalogs? Something like
SELECT relname, relpages FROM pg_class
WHERE relname LIKE 'pg%'
ORDER BY relpages DESC LIMIT 20;
Should give the same results both on primary and standby.
Tomas
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tv@fuzzy.cz
Subject: Re: Hot Standby performance issue
In-Reply-To: <5266BBC3.90800@fuzzy.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox