[ntp:questions] Has anyone thought about this?

Terje Mathisen terje.mathisen at tmsw.no
Thu Apr 10 07:22:42 UTC 2014

Dowd, Greg wrote:
> However, t1 and t4 are not really in seconds if the client clock is slewing.
> That is, the
> difference t4 - t1 will be shorter than seconds if the clock is being slowed down
> and larger if the clock is being sped up.  Hence the clock slew may be a source of
> variation that is not presently being accounted for.

Yes, but see below...
> One some systems the frequency of the Performance Counter (PC) is constant
> because it is driven by the High Performance Event Timer (HPET).  And
> according to one article on the Internet, the PC can be made to be driven
> by the HPET on Win 8 by this edit: " run cmd as admin and paste
> 'bcdedit /set {current} useplatformclock Yes'".
> Would NTPD have less variation in offset and delay if, say, t4 were measured
> by the difference in PC readings between the time t1 is measured and the
> time T4 is presently measured?

Not really.

First of all, the HPET (or TSC) counters have no known frequency to 
start with, you have to measure that using regular "wall clock", i.e. 
ntp packet exchanges.

Secondly, even if you do have a "perfect interval timer", say a TCXO on 
your network card, the clock slew rate can only contribute very marginal 
second-order effects:

The maximum ntpd slew is +/- 500 ppm, which means that the absolute 
maximum possible slew between UTC and the local clock would be 1000 ppm 
(i.e. the clock is maximally bad, at +500 ppm, and we are currently 
slewing at -500 ppm), in which case the maximum error component from 
this would be 1/1000th of the actual time delta. (In real operating 
systems the actual errors are several orders of magnitude less! Typical 
clock frequency adjustments due to temperature cycling are in the single 
ppm range, but even a few tens of ppm gives relative errors in the 1e-4 
to 1e-5 range, which doesn't impact the control loop at all.


- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

More information about the questions mailing list