Re: Does this perf output seem 'normal'?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Peter Devoy <peter(at)3xe(dot)co(dot)uk>
Cc: "Psql_General (E-mail)" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does this perf output seem 'normal'?
Date: 2016-04-27 05:45:14
Message-ID: CAMkU=1xN1=GtjjRW3_d7VkTmXrubgPR86VnN6SUS2YtYB4KTFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Apr 26, 2016 4:29 PM, "Peter Devoy" <peter(at)3xe(dot)co(dot)uk> wrote:
>
> Hi all,
>
> I am trying to work out why a piece of software, Mapnik, is executing
> slowly. All it is doing is loading a config file which causes about
> 12 preparation queries (i.e. with LIMIT 0) to be executed. I can see
> from pg_stat_statements these only take ~1ms in their totality.
>
> So next I ran "perf record -a -g sleep 0.4" and quickly loaded my PHP
> page to start the process (I am interfacing with mapnik via a PHP
> Extension), this is a sample of the result:
>
>
https://cloud.githubusercontent.com/assets/4375326/14836015/08b0a8b4-0c05-11e6-96e5-f1836497cdfe.png

I'm no expert in perf, but to me that looks like the profile of a system
which is bored. Which matches your description, of spending 0.4 seconds
watching something which only takes 0.06 seconds to happen. If you really
want to profile this, you should fire it off in a tight loop, using wget or
ab2 or curl.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Victor Yegorov 2016-04-27 06:14:27 Re: Slow join over three tables
Previous Message David Rowley 2016-04-27 02:09:04 Re: Slow join over three tables