pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Boreham <david_list@boreham.org>
To: pgsql-performance@postgresql.org
Subject: Re: Profiling PostgreSQL
Date: Thu, 22 May 2014 07:34:36 -0600
Message-ID: <537DFCEC.40800@boreham.org> (raw)
In-Reply-To: <CAC_Q3NwxzpZ41iByo8PKvROT4BbZRedCuJZGBVFsg-iGvCivFg@mail.gmail.com>
References: <CAC_Q3NwxzpZ41iByo8PKvROT4BbZRedCuJZGBVFsg-iGvCivFg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 5/22/2014 7:27 AM, Dimitris Karampinas wrote:
> Is there any way to get the call stack of a function when profiling 
> PostgreSQL with perf ?
> I configured with --enable-debug, I run a benchmark against the system 
> and I'm able to identify a bottleneck.
> 40% of the time is spent on an spinlock yet I cannot find out the 
> codepath that gets me there.
> Using --call-graph with perf record didn't seem to help.
>
> Any ideas ?
>
Can you arrange to run 'pstack' a few times on the target process 
(either manually or with a shell script)?
If the probability of the process being in the spinning state is high, 
then this approach should snag you at least one call stack.




-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (11+ messages)  latest in thread

Message-ID: <537DFCEC.40800@boreham.org>
Permalink:  ../537DFCEC.40800@boreham.org/
Also on:    postgresql.org/message-id/537DFCEC.40800@boreham.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: david_list@boreham.org
  Subject: Re: Profiling PostgreSQL
  In-Reply-To: <537DFCEC.40800@boreham.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox