Skip site navigation (1) Skip section navigation (2)

New DTrace probes proposal

From: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>
To: pgsql-hackers(at)postgresql(dot)org
Subject: New DTrace probes proposal
Date: 2008-05-18 02:33:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
(Resending since it didn't work the first time. Not sure if attaching a 
tar file was the culprit.)

I'd like to propose adding the following probes (some of which came from 
Simon) to 8.4.

I think these probe provide very useful data. Although some of the data 
can be collected now, the main advantages with probes, among others, are 
(1) they are always available and can be enabled only when needed 
especially in production (2) different combinations of probes can be 
used together to collect interesting data.

They work on OS X Leopard & Solaris now, and hopefully on FreeBSD soon.

Preliminary patch attached along with sample DTrace scripts.



* Probes to measure query time
query-parse-start (int, char *)
query-parse-done (int, char *)
query-plan-start ()
query-plan-done ()
query-execute-start ()
query-execute-done ()
query-statement-start (int, char *)
query-statement-done (int, char *)

* Probes to measure dirty buffer writes by the backend because bgwriter 
is not effective
dirty-buffer-write-start (int, int, int, int)
dirty-buffer-write-done (int, int, int, int)

* Probes to measure physical writes from the shared buffer
buffer-write-start (int, int, int, int)
buffer-write-done (int, int, int, int, int)

* Probes to measure reads of a relation from a particular buffer block
buffer-read-start (int, int, int, int, int)
buffer-read-done (int, int, int, int, int, int)

* Probes to measure the effectiveness of buffer caching
buffer-hit ()
buffer-miss ()

* Probes to measure I/O time because wal_buffers is too small
wal-buffer-write-start ()
wal-buffer-write-done ()

* Probes to measure checkpoint stats such as running time, buffers 
written, xlog files added, removed, recycled, etc
checkpoint-start (int)
checkpoint-done (int, int, int, int, int)

* Probes to measure Idle in Transaction and client/network time
idle-transaction-start (int, int)
idle-transaction-done ()

* Probes to measure sort time
sort-start (int, int, int, int, int)
sort-done (int, long)

* Probes to determine whether or not the deadlock detector has found a 
deadlock-found ()
deadlock-notfound (int)

* Probes to measure reads/writes by block numbers and relations
smgr-read-start (int, int,  int, int)
smgr-read-end (int, int,  int, int, int, int)
smgr-write-start (int, int, int, int)
smgr-write-end (int, int, int, int, int, int)

Attachment: new-probes.patch
Description: text/x-patch (18.3 KB)
Attachment: pg-dtrace-scripts.tar.gz
Description: application/x-gzip (3.2 KB)


pgsql-hackers by date

Next:From: Greg SmithDate: 2008-05-18 04:52:03
Subject: Re: Link requirements creep
Previous:From: Tom LaneDate: 2008-05-18 01:36:53
Subject: Re: Link requirements creep

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group