From: Scott Carey <scott@richrelevance.com>
To: Craig Ringer <craig@postnewspapers.com.au>
Cc: Peter Schuller <peter.schuller@infidyne.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Identifying the nature of blocking I/O
Date: Sun, 24 Aug 2008 18:34:18 -0700
Message-ID: <a1ec7d000808241834v48122c83s385a8439253994bc@mail.gmail.com> (raw)
In-Reply-To: <48B1FD1A.7040807@postnewspapers.com.au>
References: <20080822115243.GA10981@hyperion.scode.org>
<48B1FD1A.7040807@postnewspapers.com.au>
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<htt...;
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
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: scott@richrelevance.com, craig@postnewspapers.com.au, peter.schuller@infidyne.com
Subject: Re: Identifying the nature of blocking I/O
In-Reply-To: <a1ec7d000808241834v48122c83s385a8439253994bc@mail.gmail.com>
References: <20080822115243.GA10981@hyperion.scode.org> <48B1FD1A.7040807@postnewspapers.com.au> <a1ec7d000808241834v48122c83s385a8439253994bc@mail.gmail.com>
* 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