[ntp:questions] NTPD_USE_INTERP_DANGEROUS was ARRGH!!! I woke up to a 50 SECOND clock error.

David J Taylor david-taylor at blueyonder.co.uk.invalid
Sun Mar 18 16:54:21 UTC 2012


"Ron Frazier (NTP)" <timekeepingntplist at c3energy.com> wrote in message 
news:4F65EE78.20502 at c3energy.com...
> I'm forking the subject line, which didn't really seem relevant any 
> more.
>
> more below
[]
>>  http://www.satsignal.eu/ntp/Win-8+Internet.html
[]
> From my point of view, those look pretty good.  Those peerstats graphs 
> come in pretty handy.

It is an unloaded system, but may show what NTP can do at best using just 
Internet servers in a domestic Internet-linked environment.

[]
> What's the dangerous part?  Are we just talking lots of CPU churning? 
> If so, can I just shut down NTP and tweak it?
>
> Sincerely,
>
> Ron

Ron,

It's just about performance.  Windows XP performed better when NTP tried 
to interpolate the ~15 millisecond timer ticks.  Windows Vista performed 
significantly worse when that interpolation scheme was used, so it was 
conditionally disabled.  In early tests of Windows-7, performance seemed 
better, but the OS code which changed the timer interval didn't start at 
the same time as NTP, so sometimes NTP made the wrong choice.

Here's what Dave Hart said at that time:
  "I thought I understood the problem with ntpd interpolation on 
Vista/Win7 to be caused by the OS scheduling granularity being 
insufficiently finer than the native clock granularity, so that the 
interpolation thread's sampling of counter/native clock correlations was 
nearly always occurring at the same relative point between two native 
clock ticks, rather than being nicely spread around.  Being spread around 
is important because the algorithm chooses the sample nearest the prior 
native clock tick when converting a counter value to an interpolated 
time."

So there's no problem with high CPU or anything like that - simply worse 
offset and jitter.  You can also force interpolation off by setting:

  NTPD_USE_SYSTEM_CLOCK=1

or on with:

  NTPD_USE_INTERP_DANGEROUS=1

Delete the environment variables not in use.  The actual value they are 
set to doesn't matter, it's only the presence or absence which is tested. 
After setting these SYSTEM environment variables, simply restart the NTP 
service to see the change.  I see these settings as ones for 
experimenters, and they should not be needed in normal use.

Cheers,
David 



More information about the questions mailing list