Re: Profiling PostgreSQL

From: David Boreham <david_list(at)boreham(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Profiling PostgreSQL
Date: 2014-05-22 13:34:36
Message-ID: 537DFCEC.40800@boreham.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2014-05-22 13:48:52 Re: Profiling PostgreSQL
Previous Message Dimitris Karampinas 2014-05-22 13:27:26 Profiling PostgreSQL