On 12/10/21 17:22, Laurenz Albe wrote:
On Fri, 2021-12-10 at 10:20 -0500, Tom Lane wrote:
Jeff Janes <jeff.ja...@gmail.com> writes:
Can we change the default setting of track_io_timing to on?

That adds a very significant amount of overhead on some platforms
(gettimeofday is not cheap if it requires a kernel call).  And I
doubt the claim that the average Postgres user needs this, and
doubt even more that they need it on all the time.
So I'm -1 on the idea.

I set "track_io_timing" to "on" all the time, same as "log_lock_waits",
so I'd want them both on by default.


IMHO those options have very different overhead - log_lock_waits logs only stuff that exceeds deadlock_timeout (1s by default), so the amount of gettimeofday() calls is miniscule compared to calling it for every I/O request.

I wonder if we could simply do the thing we usually do when measuring expensive stuff - measure just a small sample. That is, we wouldn't measure timing for every I/O request, but just a small fraction. For cases with a lot of I/O requests that should give pretty good image.

That's not a simple "change GUC default" patch, but it's not a very complicated patch either.

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to