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-27 22:20:31
Message-ID: 20120827222031.GA2487@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Aug 27, 2012 at 04:42:34PM -0400, Robert Haas wrote:
> On Mon, Aug 27, 2012 at 1:18 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > He wrote it that way to allow for simpler C code --- he could just start
> > from 31 and keeping skipping entries until he hit a non-zero.
> >
> > My format makes it easy to see which line should have the majority of
> > the entries, e.g. first line should be > 90%.  I doubt there are enough
> > people running this cross-version that consistency in output makes any
> > difference between major PG versions.
> 
> I don't see why it's better for the first line to have a big number
> than the last line.  What difference does it make?

When you are looking at that output, the <1 usec is where you want to
see most of the percentage, and it trails off after that.

Here is an example from the current output format:

	Histogram of timing durations:
	   < usec:      count   percent
	       16:          3  0.00007%
	        8:        563  0.01357%
	        4:       3241  0.07810%
	        2:    2990371 72.05956%
	        1:    1155682 27.84870%

That first line is pretty meaningless.  You have to look at the last
line, see that only 27% of <1, then look up to see that 72% is 1<2,
which isn't good.  My format shows:

	< usec   % of total      count
	     1     27.84870    1155682
	     2     72.05956    2990371
	     4      0.07810       3241
	     8      0.01357        563
	    16      0.00007          3

First line, 27%, that's a problem, look down for more details.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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


In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2012-08-27 22:43:56
Subject: Re: Incorrect behaviour when using a GiST index on points
Previous:From: Greg Sabino MullaneDate: 2012-08-27 22:19:43
Subject: Re: MySQL search query is not executing in Postgres DB

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