[ntp:questions] Win7: ntpd adjusting time backwards

Jeroen Mostert jmostert at xs4all.nl
Tue Dec 11 20:24:35 UTC 2012


On 2012-12-10 21:41, Jeroen Mostert wrote:
> On 2012-12-10 21:17, unruh wrote:
>> On 2012-12-10, Jeroen Mostert<jmostert at xs4all.nl> wrote:
> <snip>
>>> For what it's worth, after all of that, the offset is steadily zigzagging
>>> between 27 and 41 ms, which I'm guessing is about the best you can hope for on a
>>> Windows machine with Internet sync. There have not been any major time step
>>> adjustments.
>>
>> Since a Linux machine under conditions of use of the internet for time
>> stamps is capable of sub-millisecond synchronization, this seems really
>> bad to me. I thought that clock interrupt went at 1ms intervals, and one
>> should be able to do that well even without interpolation, and with
>> interpolation even better.
>>
> If you say so. I have no idea how I would further diagnose a problem, if there
> is one, and fix it, if there is a solution. The obvious fix would be to install
> Linux, but for equally obvious reasons I'm not willing to go there. :-)
>
> NTP (and other tools) are indeed reporting a 1 ms resolution of the clock, and I
> can see the interrupt rate on core 0 is consistently above 1000 interrupts/sec,
> so I'm guessing that holds up.
>
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

So now NTP is betting very high on the drift and then shoots the clock in the 
other direction as a result.

I'll give it time to stabilize. Assuming it'll stabilize. I may end up with the 
same offset at the opposite sign, who knows?

-- 
J.



More information about the questions mailing list