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 Smith||Date: 2011-11-28 09:30:00|
|Subject: Re: Avoiding shutdown checkpoint at failover|
|Previous:||From: Greg Smith||Date: 2011-11-28 09:08:43|
|Subject: Re: Displaying accumulated autovacuum cost|