Re: Patch: add timing of buffer I/O requests
От | Tomas Vondra |
---|---|
Тема | Re: Patch: add timing of buffer I/O requests |
Дата | |
Msg-id | 7190cedf6afba31f8bb934a92a8fcd7f.squirrel@sq.gransy.com обсуждение исходный текст |
Ответ на | Re: Patch: add timing of buffer I/O requests (Greg Smith <greg@2ndQuadrant.com>) |
Список | 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
В списке pgsql-hackers по дате отправления: