Re: Performance Monitoring

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Performance Monitoring
Date: 2007-06-15 17:29:36
Message-ID: Pine.GSO.4.64.0706151318480.5871@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 15 Jun 2007, Umar Farooq wrote:

> Surprisingly, no matter what type of query I execute, when I use strace
> to monitor the system calls generated they turn out to be the same for
> ALL sorts of queries.

How are you calling strace? The master postgres progress forks off new
processes for each of the clients, you need to make sure you include stats
from all of them as well to get anything.

I normally use

strace -c -f -p [main postgres process]

which is helpful to collecte basic info, but even that's not quite right;
you don't get the work done by the other proceses (logger, writer, stats
collector). To get everything, you need to start some process that you
attach strace to like this, then have that process start the server.

I haven't found strace to be a great tool for this type of work. You
might take at look at systemtap instead (
http://sourceware.org/systemtap/wiki ) which is a bit immature but is
going the right direction.

I will now bow my head and wait for someone to suggest you move to an OS
that supports dtrace.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-06-15 17:29:45 Re: Rethinking user-defined-typmod before it's too late
Previous Message Stephen Frost 2007-06-15 16:59:36 Re: Rethinking user-defined-typmod before it's too late