Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C620065015A for ; Sun, 24 Aug 2008 22:34:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28828-07 for ; Sun, 24 Aug 2008 22:34:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by postgresql.org (Postfix) with ESMTP id DD6EE65014C for ; Sun, 24 Aug 2008 22:34:21 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 25so1356012wfc.28 for ; Sun, 24 Aug 2008 18:34:19 -0700 (PDT) Received: by 10.142.147.20 with SMTP id u20mr1338616wfd.47.1219628059017; Sun, 24 Aug 2008 18:34:19 -0700 (PDT) Received: by 10.143.39.19 with HTTP; Sun, 24 Aug 2008 18:34:18 -0700 (PDT) Message-ID: Date: Sun, 24 Aug 2008 18:34:18 -0700 From: "Scott Carey" To: "Craig Ringer" Subject: Re: Identifying the nature of blocking I/O Cc: "Peter Schuller" , pgsql-performance@postgresql.org In-Reply-To: <48B1FD1A.7040807@postnewspapers.com.au> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_89263_8335482.1219628059020" References: <20080822115243.GA10981@hyperion.scode.org> <48B1FD1A.7040807@postnewspapers.com.au> X-Google-Sender-Auth: a33faabcdc2817ba X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200808/315 X-Sequence-Number: 31196 ------=_Part_89263_8335482.1219628059020 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline More info/notes on DTrace -- DTrace is available now on MacOSX, Solaris 10, OpenSolaris, and FreeBSD. Linux however is still in the dark ages when it comes to system monitoring, especially with I/O. You can write some custom DTrace scripts to map any of the basic Postgres operations or processes to things that it is waiting on in the OS. You can definitely write a script that would be able to track the I/O in reads and writes caused by a transaction, how long those took, what the I/O sizes were, and even what portion of the disk it went to. http://lethargy.org/~jesus/archives/74-PostgreSQL-performance-through-the-eyes-of-DTrace.html http://www.brendangregg.com/dtrace.html#DTraceToolkit Even without the custom DTrace probes in Postgres, DTrace gives you the ability to see what the OS is doing, how long it is taking, and what processes, files, locks, or other things are involved. Most important however is the ability to correlate things and not just deal with high level aggregates like more simplistic tools. It takes some work and it is not the easiest thing to use, as its power comes at a complexity cost. On Sun, Aug 24, 2008 at 5:30 PM, Craig Ringer wrote: > Peter Schuller wrote: > > > But in general, it would be very interesting to see, at any given > > moment, what PostgreSQL backends are actually blocking on from the > > perspective of PostgreSQL. > > The recent work on DTrace support for PostgreSQL will probably give you > the easiest path to useful results. You'll probably need an OpenSolaris > or (I think) FreeBSD host, though, rather than a Linux host. > > -- > Craig Ringer > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > ------=_Part_89263_8335482.1219628059020 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
More info/notes on DTrace --

DTrace is available now on MacOSX, Solaris 10, OpenSolaris, and FreeBSD.
Linux however is still in the dark ages when it comes to system monitoring, especially with I/O.

You can write some custom DTrace scripts to map any of the basic Postgres operations or processes to things that it is waiting on in the OS.  You can definitely write a script that would be able to track the I/O in reads and writes caused by a transaction, how long those took, what the I/O sizes were, and even what portion of the disk it went to.

http://lethargy.org/~jesus/archives/74-PostgreSQL-performance-through-the-eyes-of-DTrace.html
http://www.brendangregg.com/dtrace.html#DTraceToolkit

Even without the custom DTrace probes in Postgres, DTrace gives you the ability to see what the OS is doing, how long it is taking, and what processes, files, locks, or other things are involved.  Most important however is the ability to correlate things and not just deal with high level aggregates like more simplistic tools.  It takes some work and it is not the easiest thing to use, as its power comes at a complexity cost.



On Sun, Aug 24, 2008 at 5:30 PM, Craig Ringer <craig@postnewspapers.com.au> wrote:
Peter Schuller wrote:

> But in general, it would be very interesting to see, at any given
> moment, what PostgreSQL backends are actually blocking on from the
> perspective of PostgreSQL.

The recent work on DTrace support for PostgreSQL will probably give you
the easiest path to useful results. You'll probably need an OpenSolaris
or (I think) FreeBSD host, though, rather than a Linux host.

--
Craig Ringer

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

------=_Part_89263_8335482.1219628059020--