Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVrpc-0005hH-7n for pgsql-performance@arkaria.postgresql.org; Mon, 14 Oct 2013 23:45:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VVrpb-0000iM-OP for pgsql-performance@arkaria.postgresql.org; Mon, 14 Oct 2013 23:45:47 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVrpa-0000iG-UP for pgsql-performance@postgresql.org; Mon, 14 Oct 2013 23:45:47 +0000 Received: from mail.gransy.com ([2001:1528:137::f1]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VVrpU-00014r-Tu for pgsql-performance@postgresql.org; Mon, 14 Oct 2013 23:45:46 +0000 Received: from antispam.gransy.com (antispam.gransy.com [77.78.104.124]) by mail.gransy.com (Postfix) with ESMTP id 144C0508C36 for ; Tue, 15 Oct 2013 01:45:39 +0200 (CEST) X-Virus-Scanned: G-Hosting.cz + Station.cz + Klenot.cz + Subreg.cz amavisd-new at antispam.gransy.com 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 pkwvIlUU519B for ; Tue, 15 Oct 2013 01:45:39 +0200 (CEST) Received: by mail.gransy.com (Postfix, from userid 5000) id DDA31508C60; Tue, 15 Oct 2013 01:45:38 +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 B0634508C36 for ; Tue, 15 Oct 2013 01:45:38 +0200 (CEST) Message-ID: <525C8223.9080900@fuzzy.cz> Date: Tue, 15 Oct 2013 01:45:39 +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: CPU spikes and transactions References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 15.10.2013 01:26, Tony Kay wrote: > Hi Calvin, > > Yes, I have sar data on all systems going back for years. > > Since others are going to probably want to be assured I am really > "reading the data" right: > > - This is 92% user CPU time, 5% sys, and 1% soft > - On some of the problems, I _do_ see a short spike of pgswpout's > (memory pressure), but again, not enough to end up using much system time > - The database disks are idle (all data being used is in RAM)..and are > SSDs....average service times are barely measurable in ms. OK. Can you share the data? Maybe we'll notice something suspicious. > If I had to guess, I'd say it was spinlock misbehavior....I cannot > understand why ekse a transaction blocking other things would drive > the CPUs so hard into the ground with user time. Have you tried running perf, to verify the time is actually spent on spinlocks? Tomas -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance