Linux time keeping
Posted February 18th, 2010 by dale
Ran into an interesting note at Dr. Dobbs again today (how come I only have time to do this kind of reading when I'm on vacation?) about maintaining accurate time of day. The article: http://www.drdobbs.com/embedded/223000197?pgno=1 show a comparison of NTP with an (apparently) proprietary app call Time Keeper.
The comparison is interesting but from my perspective there are some significant issues with the explanations, including:
0) The author dings NTP because it takes time to settle down after boot. This is in fact part of the design: it is intended to do a reasonable job under adverse conditions. It is very easy (nearly trivial) to force the OS time of day clock to sync to an external, reliable source if you are willing to gamble - or design a system such that there is always one available.
1) The author shows some data where it appears that the NTP demon has slewed the clock by 1.5 seconds instantaneously. This seems a miss-configured ntp install and not a flaw in ntp.
2) The author "guesses" what's going on in the NTP code but does not bother to look at the code to see. Of course one can't look at the other systems code.
And finally, it is not clear to me from the explanation in the article, if one uses the normal system functions to access the capabilities of BitKeeper. Too bad there aren't any code fragments to look at.
Probably the biggest omission in this kind of discussion of precision time keeping was to not even mention IEEE-1588 which is capable of maintaining sub-microsecond time across a network. References at:
http://ieee1588.nist.gov/
http://www.ieee1588.com/
http://en.wikipedia.org/wiki/Precision_Time_Protocol
