Re: gettimeofday is at the end of its usefulness? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gettimeofday is at the end of its usefulness?
Date
Msg-id 4920.1400038971@sss.pgh.pa.us
Whole thread Raw
In response to Re: gettimeofday is at the end of its usefulness?  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> I actually think it would be more interesting if we could measure the
> overhead and adjust for it.

Actually, that's quite a good thought.  The overhead should be a pretty
stable number on any given machine, so in theory we could do this to
high precision.  And the numbers I just showed say that on current
x86_64 platforms, the *best we could possibly hope for* in terms of
direct overhead reduction is about 4x.  Which is something, but it
hardly makes the problem vanish.

I have a vague feeling that we discussed subtract-the-overhead once before
and thought it wasn't necessary yet.  Maybe it's time.

But we also need to be using something that gives better than 1usec
resolution.  So I'm still thinking we should use clock_gettime() where
available, and look for alternative APIs where not.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Proposal for CSN based snapshots
Next
From: Rajeev rastogi
Date:
Subject: Re: Proposal for CSN based snapshots