Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZcDes-0007QV-Ej for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2015 14:26:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZcDes-0007SG-0r for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Sep 2015 14:26:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZcDer-0007SA-Hj for pgsql-hackers@postgresql.org; Wed, 16 Sep 2015 14:26:01 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZcDen-0006Fv-Qp for pgsql-hackers@postgresql.org; Wed, 16 Sep 2015 14:26:00 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 0AC538CF62 for ; Wed, 16 Sep 2015 14:25:53 +0000 (UTC) Received: from localhost.localdomain (vpn-53-52.rdu2.redhat.com [10.10.53.52]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8GEPqBV017495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Sep 2015 10:25:53 -0400 Subject: Re: Additional LWLOCK_STATS statistics To: "pgsql-hackers@postgresql.org" References: <55F82AE1.3010407@redhat.com> <55F871BA.4060404@redhat.com> <55F876CA.8020702@redhat.com> <55F97909.3010101@redhat.com> From: Jesper Pedersen Organization: JBoss, by Red Hat Message-ID: <55F97BF0.70503@redhat.com> Date: Wed, 16 Sep 2015 10:25:52 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55F97909.3010101@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/16/2015 10:13 AM, Jesper Pedersen wrote: > On 09/15/2015 03:51 PM, Jesper Pedersen wrote: >>> It >>> would be nice to get a better sense of how *long* we block on various >>> locks. It's hard to tell whether some other lock might be have fewer >>> blocking events but for a much longer average duration. >>> >> > > I did a run with the attached patch, recording the time from > LWLockQueueSelf() until the lock is required. > Note, that the time it recorded before the spin lock is acquired, so not ideal. > Doing block_time / block_count basically only shows "main 0" -- its > called "unassigned:0"; it also shows up in the max exclusive report. > Where it is coming from is another question, since it shouldn't be in use. > Likely from LWLOCK_STATS' own lwlock.c::print_lwlock_stats, which would make sense. Best regards, Jesper -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers