Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYOgT-0001Hd-Ct for pgsql-performance@arkaria.postgresql.org; Mon, 21 Oct 2013 23:14:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VYOgS-0000PS-Ir for pgsql-performance@arkaria.postgresql.org; Mon, 21 Oct 2013 23:14:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYOgR-0000PL-FT for pgsql-performance@postgresql.org; Mon, 21 Oct 2013 23:14:47 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VYOgO-0001HB-KI for pgsql-performance@postgresql.org; Mon, 21 Oct 2013 23:14:47 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id BCF3E508D7B for ; Tue, 22 Oct 2013 01:14:43 +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 BMGCvucJM_13 for ; Tue, 22 Oct 2013 01:14:44 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id 7F5F6508D82; Tue, 22 Oct 2013 01:14:43 +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 51483508D7D for ; Tue, 22 Oct 2013 01:14:43 +0200 (CEST) Message-ID: <5265B562.3040407@fuzzy.cz> Date: Tue, 22 Oct 2013 01:14:42 +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> In-Reply-To: <1382396377294-5775349.post@n5.nabble.com> 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 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 ... We really need the perf results. Or try to run strace, maybe it'll give more info about which files it accesses. > Do you suggest if I remove all the data files from /data/base folder > of standby and again rebuild using rsync from primary ? do you see > any issues there.? This is just to rule out any fragmentation on > standby side. The EXPLAIN really should not do much I/O. I doubt it has anything to do with fragmentation, so I doubt this is going to help. > Our sys admin is planning to run fsck sometime today or tomorrow. OK. Which filesystem do you use, btw? Tomas -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance