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

Re: Patch: add timing of buffer I/O requests

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Greg Smith" <greg(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch: add timing of buffer I/O requests
Date: 2011-11-28 09:24:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On 28 Listopad 2011, 8:54, Greg Smith wrote:
> -Have one of the PostgreSQL background processes keep track of a time
> estimate on its own, only periodically pausing to sync against the real
> time.  Then most calls to gettimeofday() can use that value instead.  I
> was thinking of that idea for slightly longer running things though; I
> doubt that can be made accurate enough to test instrument buffer

What about random sampling, i.e. "measure just 5% of the events" or
something like that? Sure, it's not exact but it significantly reduces the
overhead. And it might be a config parameter, so the user might decide how
precise results are needed, and even consider how fast the clocks are.

> Something more ambitious like the v$ stuff would also take care of what
> you're doing here; I'm not sure that what you've done helps built it
> though.  Please don't take that personally.  Part of one of my own
> instrumentation patches recently was rejected out of hand for the same
> reason, just not being general enough.

Yes, that'd be significant improvement. The wait-event stuff is very
useful and changes the tuning significantly.


In response to

pgsql-hackers by date

Next:From: Greg SmithDate: 2011-11-28 09:30:00
Subject: Re: Avoiding shutdown checkpoint at failover
Previous:From: Greg SmithDate: 2011-11-28 09:08:43
Subject: Re: Displaying accumulated autovacuum cost

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