Re: Review: DTrace probes (merged version) ver_03

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Robert Lor <Robert(dot)Lor(at)Sun(dot)COM>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, jesus(at)omniti(dot)com
Subject: Re: Review: DTrace probes (merged version) ver_03
Date: 2008-08-01 20:01:37
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Greg Smith wrote:
> One tiny change I'd suggest here: if you look at the code for checkpoint
> buffer writing there are traces for two points in the process:
> CheckPointBuffers(int flags)
> {
> CheckpointStats.ckpt_write_t = GetCurrentTimestamp();
> BufferSync(flags);
> CheckpointStats.ckpt_sync_t = GetCurrentTimestamp();
> smgrsync();
> CheckpointStats.ckpt_sync_end_t = GetCurrentTimestamp();
> }
> Note how the existing code also tracks how long the sync phase took
> compared to the write one, and reports both numbers in the checkpoint
> logs. It would be nice to add another probe at that same point (just
> after ckpt_sync_t is set) so that dtrace users could instrument all these
> possibilities as well: just buffer write time/resources, just sync ones,
> or both.

Sounds like the thing to do would be to pass CheckpointStats into the
DONE probe.

Alvaro Herrera
The PostgreSQL Company - Command Prompt, Inc.

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-08-01 20:31:58 Re: SSL configure patch: review
Previous Message Alvaro Herrera 2008-08-01 19:59:31 Re: SSL configure patch: review