[ntp:questions] Win7: ntpd adjusting time backwards

David Lord snews at lordynet.org
Wed Dec 12 00:20:06 UTC 2012


Jeroen Mostert wrote:
> On 2012-12-11 22:10, E-Mail Sent to this address will be added to the 
> BlackLists wrote:
>> Jeroen Mostert wrote:
>>> I noticed the drift was ever-increasing, slowly but surely.
>>> Since I muddled with settings quite a bit, I stopped ntpd,
>>>   deleted ntp.drift and restarted it.
>>> The results are quite interesting.
>>> 56272 68581.536 0.022139147 2.356 0.006080932 0.008049 10
>>> 56272 68781.535 0.021885071 2.357 0.005698660 0.007537 10
>>> 56272 69311.535 0.020898356 2.359 0.005342012 0.007109 10
>>> 56272 71122.534 0.023597293 0.000 0.008392764 0.000000 6
>>> 56272 71458.536 0.013381279 39.825 0.012521981 0.000000 6
>>> 56272 71524.551 0.009503058 39.825 0.011793222 0.000000 6
>>> 56272 71527.552 0.000754424 39.825 0.011456980 0.000000 6
>>> 56272 71528.552 0.000233147 39.825 0.010722584 0.000000 6
>>> 56272 71930.577 -0.013119319 39.511 0.011085491 0.111141 6
>>> 56272 72003.578 -0.016005287 39.441 0.010419607 0.106838 6
>>> 56272 72207.579 -0.031178859 39.062 0.011125504 0.167193 6
>>> 56272 72331.588 -0.032740845 38.820 0.010421598 0.178267 6
>>> 56272 72607.596 -0.036786552 38.215 0.009852891 0.271267 7
>>> 56272 72611.597 -0.048063956 38.212 0.010042013 0.253749 7
>>> 56272 72667.599 -0.050119893 38.170 0.009421524 0.237821 7
>>> 56272 72960.613 -0.050045193 37.952 0.008819790 0.235492 6
>>> 56272 73291.594 -0.049274393 36.980 0.008257379 0.408236 6
>>> 56272 73419.587 -0.049355146 36.603 0.007731784 0.404411 6
>>     day,   second,      offset,  drift, est error, stability, poll
>>                                   comp
>>
>> I looked at several of the last few days of loopstats
>>   on a few machines; it appears your drift compensation
>>   change rate is perhaps hundreds of times what mine are?
>>
>> I'm not certain what that means, is the PC/Device experiencing
>>   large Temperature Swings, or Cpu/Core Frequency/Power Management?
>>
> Improbable. I've admittedly not measured, but the machine has been 
> running constantly for three days in a room with even heating, with no 
> significant change in load. I don't think there's any way temperature 
> could explain this much drift. CPU frequency remains constant and power 
> management has been turned off.
> 
> I suspect some driver or other is giving me trouble, preventing ntpd 
> from getting decent readings from the clock. Or maybe the machine is 
> just broken (clockwise, I mean), I guess that happens.
> 
> For kicks, I repeated the procedure -- stop ntpd, delete the drift file, 
> start ntpd, forcing it to do yet another drift calibration. (The servers 
> must love me.) The difference isn't quite so dramatic, but still notable.
> 
> 56272 76491.581 -0.039118819 30.383 0.004118758 0.429325 6
> 56272 76748.567 -0.038717153 29.790 0.003868185 0.453044 6
> 56272 76884.559 -0.035856775 29.500 0.003757023 0.436066 6
> 56272 76929.557 -0.023728814 29.436 0.005544073 0.408522 6
> 56272 77378.579 -0.030387567 0.000 0.010782393 0.000000 6
> 56272 77719.530 0.011532945 33.821 0.031973641 0.000000 6
> 56272 77719.532 0.012297079 33.821 0.029910596 0.000000 6
> 56272 77783.546 -0.000656742 33.821 0.028351163 0.000000 6
> 56272 77800.543 -0.000072661 33.821 0.026522332 0.000000 6
> 56272 78118.559 0.001651644 33.852 0.024816859 0.011068 6
> 56272 78127.560 -0.003217920 33.851 0.023277801 0.010371 6
> 56272 78193.560 -0.007368853 33.822 0.021823790 0.014112 6
> 56272 78197.561 -0.014632962 33.818 0.020575203 0.013258 6
> 56272 78257.562 -0.015837880 33.761 0.019251054 0.023555 7
> 56272 78989.594 -0.023846042 33.501 0.018228934 0.094564 7
> 56272 79047.605 -0.024689830 33.480 0.017055101 0.088777 7
> 
> The moral of this story is, uhm... time is not on my side.
> 

Here if ntpd is in sync, stopped, driftfile deleted, ntpd
restarted the time taken to resync with creation of a new
driftfile can be anything from a few hours to a few days.

On the pcs that have taken a few days to resync the drift
will probably be quite large, maybe > 50 ppm but offset
after a restart will usually be < 1 ms within around around
30  minutes (only slightly longer than a restart of a pc
with drift nearer to 0 ppm).

I've had pcs with a system clocks so far off that ntpd is
unable to correct and sometimes a fixed manual correction
has achieved both a low drift and  offset but more recent
ntpd seems to have automatic calibration which defeats such
manual correction (at least ntpd 4.2.6p5 on NetBSD-6).

What's the value of your driftfile?

pc     offset(ms)  frequency(ppm)
ntp0    0.275      -50.8
ntp1   -0.106      -10.9

The offsets above are subject to a fair degree of jitter but
frequency is fairly constant depending on temperature.


David



More information about the questions mailing list