[
https://issues.apache.org/jira/browse/HADOOP-15901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676673#comment-16676673
]
Steve Loughran commented on HADOOP-15901:
-----------------------------------------
bq. This blog was really informative.
doesn't look at the issue of multisocket systems whose return value of RDTSCP
is inconsistent across sockets, even though it is (now( consistent across cores
in a single socket.
bq. So what we should do? Remove all usages of System.nanoTime() in Hadoop?
don't know.
big issue with time is in VMs where the clock can suddenly jump forwards
(sometimes even backwards), far more frequently than you see with NTP —the
latter can be set to slowly sync up at a rate less likely to break things
(though again, its clock can go backwards.
Thoughts:
* if any clock goes backwards, we are in trouble, especially in any code which
uses the diff and assumes its always positive.
* if a clock leaps forward through a NTP change, that's a spurious failure.
Proposed: people set clock correction rate to be low
* if a clock leaps forward through a VM suspent/resume, then it may be that
wall time has suddenly moved. things should (correctly) time out here
* I don't think we can rely on nanotime being consistent, but like you say,
currentTimeMillis isn't monotonic either
> IPC Client and Server should use Time.monotonicNow() for elapsed times.
> -----------------------------------------------------------------------
>
> Key: HADOOP-15901
> URL: https://issues.apache.org/jira/browse/HADOOP-15901
> Project: Hadoop Common
> Issue Type: Bug
> Components: ipc, metrics
> Reporter: Vinayakumar B
> Assignee: Vinayakumar B
> Priority: Major
> Attachments: HADOOP-15901-01.patch
>
>
> Client.java and Server.java uses {{Time.now()}} to calculate the elapsed
> times/timeouts. This could result in undesired results when system clock's
> time changes.
> {{Time.monotonicNow()}} should be used for elapsed time calculations within
> same JVM.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]