Re: Identifying the nature of blocking I/O

From: "Scott Carey" <scott(at)richrelevance(dot)com>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "Peter Schuller" <peter(dot)schuller(at)infidyne(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Identifying the nature of blocking I/O
Date: 2008-08-25 01:34:18
Message-ID: a1ec7d000808241834v48122c83s385a8439253994bc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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://lethargy.org/%7Ejesus/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(at)postnewspapers(dot)com(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-08-25 01:37:07 Re: Identifying the nature of blocking I/O
Previous Message Scott Carey 2008-08-25 01:08:08 Re: Large number of tables slow insert