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: 7190cedf6afba31f8bb934a92a8fcd7f.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

Tomas

In response to

Browse pgsql-hackers by date

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