Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYg9u-0005L7-RH for pgsql-performance@arkaria.postgresql.org; Tue, 22 Oct 2013 17:54:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VYg9u-0003sZ-9F for pgsql-performance@arkaria.postgresql.org; Tue, 22 Oct 2013 17:54:22 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYg9s-0003qv-QX for pgsql-performance@postgresql.org; Tue, 22 Oct 2013 17:54:21 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYg9o-0005T1-KB for pgsql-performance@postgresql.org; Tue, 22 Oct 2013 17:54:19 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 685B0508C6C for ; Tue, 22 Oct 2013 19:54:12 +0200 (CEST) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com X-Spam-Flag: NO X-Spam-Score: 0.313 X-Spam-Level: X-Spam-Status: No, score=0.313 tagged_above=0 required=5 tests=[ALL_TRUSTED=-1, URI_HEX=1.313] autolearn=disabled Received: from mail.gransy.com ([82.208.44.189]) by antispam.gransy.com (antispam.gransy.com [77.78.104.124]) (amavisd-new, port 10024) with ESMTP id yVrZIpcYAksm for ; Tue, 22 Oct 2013 19:54:22 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id 74779508C6E; Tue, 22 Oct 2013 19:54:11 +0200 (CEST) Received: from [192.168.1.227] (ip-78-45-139-138.net.upcbroadband.cz [78.45.139.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id 56AB5508C5D for ; Tue, 22 Oct 2013 19:54:11 +0200 (CEST) Message-ID: <5266BBC3.90800@fuzzy.cz> Date: Tue, 22 Oct 2013 19:54:11 +0200 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Hot Standby performance issue 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 22.10.2013 06:49, Magnus Hagander wrote: > > On Oct 22, 2013 1:14 AM, "Tomas Vondra" > 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 >> > >> >> 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