hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Guo <paul...@gmail.com>
Subject Re: s/gettimeofday/clock_gettime/ in hawq?
Date Wed, 26 Apr 2017 05:26:46 GMT
Exactly.

2017-04-25 22:40 GMT+08:00 Lei Chang <lei_chang@apache.org>:

> Good catch. There are a lot of uses of getimeofday for timeout.
>
> clock_gettime is also affected by NTP if NTP moves time back except
> that CLOCK_MONOTONIC
> option is used.
>
> Thanks
> Lei
>
>
> On Mon, Apr 24, 2017 at 1:36 PM, Paul Guo <paulguo@gmail.com> wrote:
>
> > Hi,
> >
> > HAWQ sometimes use gettimeofday() syscall for some timeout check in
> various
> > module, however it could be affected by ntp, so the timeout checking
> logic
> > could be wrong sometimes. I would propose to use clock_gettime() to
> replace
> > it on Linux (I have not investigated the alternative on other platforms
> > e.g. mac). Both gettimeofday() and clock_gettime() are fast vdso sys call
> > so I do not expect there is performance loss in some case where there are
> > frequent calls of gettimeofday(). By the way, I found some gettimeofday()
> > calls on postgresql and gpdb, so they might have this issue also.
> >
> > Regards,
> >
> > Paul
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message