Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djxe2-0000J2-0z for pgsql-performance@arkaria.postgresql.org; Tue, 22 Aug 2017 01:06:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1djxe1-0003Vr-Dt for pgsql-performance@arkaria.postgresql.org; Tue, 22 Aug 2017 01:06:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1djxcF-0000Fs-FG for pgsql-performance@postgresql.org; Tue, 22 Aug 2017 01:04:23 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1djxcB-000518-Gk for pgsql-performance@postgresql.org; Tue, 22 Aug 2017 01:04:21 +0000 Received: from localhost (localhost [127.0.0.1]) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTP id DA78C8086E; Tue, 22 Aug 2017 13:04:14 +1200 (NZST) X-Virus-Scanned: Debian amavisd-new at cat-porwal-prod-mail1.servers.catalyst.net.nz Received: from cat-porwal-prod-mail1.catalyst.net.nz ([127.0.0.1]) by localhost (cat-porwal-prod-mail1.servers.catalyst.net.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nSdJEW3cXYfF; Tue, 22 Aug 2017 13:04:13 +1200 (NZST) Received: from [IPv6:2406:e001:83b:1:38b5:3a17:c1db:b898] (unknown [IPv6:2406:e001:83b:1:38b5:3a17:c1db:b898]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 9FD54806E2; Tue, 22 Aug 2017 13:04:13 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catalyst.net.nz; s=catalyst; t=1503363853; bh=922Pn8jxvXLq9Asykjlt+6GOZwcEz1Gn+/BOQzlS2f0=; h=Subject:From:To:Cc:References:Date:In-Reply-To; b=lOPVGdwal/Ye+Xi3jxlGX4oftG2EE+NG3e2zRsEZIVyfNGlz4Jyx1XJM6dA1FnIbY 074z4zQgWg0Kvsaupy2cdbL6PTXjDD62//AAn9r5dN/ZAoYFpxsBJPv7/pzG7hudLh SLJPtUAt7RTKIspN8QRE6JM0cwY7obK7EQbS5jj8= Subject: Re: Odd sudden performance degradation related to temp object churn From: Mark Kirkwood To: Jeremy Finzel , Scott Marlowe Cc: Jerry Sievers , Peter Geoghegan , postgres performance list References: <87mv71eoep.fsf@jsievers.enova.com> Message-ID: <83942a43-c11f-2325-7fbb-dbc5539ecf7d@catalyst.net.nz> Date: Tue, 22 Aug 2017 13:04:13 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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 19/08/17 13:49, Mark Kirkwood wrote: > > > On 19/08/17 02:21, Jeremy Finzel wrote: >> On Tue, Aug 15, 2017 at 12:07 PM, Scott Marlowe >> > wrote: >> >> So do iostat or iotop show you if / where your disks are working >> hardest? Or is this CPU overhead that's killing performance? >> >> >> Sorry for the delayed reply. I took a look in more detail at the >> query plans from our problem query during this incident. There are >> actually 6 plans, because there were 6 unique queries. I traced one >> query through our logs, and found something really interesting. That >> is that all of the first 5 queries are creating temp tables, and all >> of them took upwards of 500ms each to run. The final query, however, >> is a simple select from the last temp table, and that query took >> 0.035ms! This really confirms that somehow, the issue had to do with >> /writing /to the SAN, I think. Of course this doesn't answer a whole >> lot, because we had no other apparent issues with write performance >> at all. >> >> I also provide some graphs below. >> >> > Hi, graphs for latency (or await etc) might be worth looking at too - > sometimes the troughs between the IO spikes are actually when the > disks have been overwhelmed with queued up pending IOs... > > Sorry - I see you *did* actually have iowait in there under your CPU graph...which doesn't look to be showing up a lot of waiting. However still might be well worth getting graphs showing per device waits and utilizations. regards Mark -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance