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

Re: Timing overhead and Linux clock sources

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timing overhead and Linux clock sources
Date: 2012-08-26 02:48:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Aug 20, 2012 at 03:11:51PM -0400, Robert Haas wrote:
> On Thu, Aug 16, 2012 at 10:28 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > FYI, I am planning to go ahead and package this tool in /contrib for PG
> > 9.3.
> Isn't this exactly what we already did, in 9.2, in the form of
> contrib/pg_test_timing?

Sorry, not sure how I missed that commit.  Anyway, I am attaching a
patch for 9.3 that I think improves the output of the tool, plus adds
some C comments.

The new output has the lowest duration times first:

	Testing timing overhead for 3 seconds.
	Per loop time including overhead: 41.31 nsec
	Histogram of timing durations:
	< usec   % of total      count
	     1     95.87135   69627856
	     2      4.12759    2997719
	     4      0.00086        628
	     8      0.00018        133
	    16      0.00001          5
	    32      0.00000          1

This should make the output clearer to eyeball for problems --- a good
timing has a high percentage on the first line, rather than on the last

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + It's impossible for everything to be true. +

Attachment: timing.diff
Description: text/x-diff (6.4 KB)

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2012-08-26 02:59:00
Subject: Re: psql output locations
Previous:From: Tomas VondraDate: 2012-08-26 00:48:39
Subject: Re: PATCH: pgbench - random sampling of transaction written into log

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