Are you using ntpd on Windows and dissatisfied with its timekeeping?
I have a patched ntpd with changes intended to improve its accuracy
that could use some wider testing.  Source and binaries are linked to
below.

Two changes are particularly noteworthy:

1.  Code to disable the interpolation approach on systems where the
Windows system clock is observed to have better than 5ms precision.
Only Windows Vista so far has been observed with less than 10ms
increments to the system time of day clock, and then only when some
software (such as ntpd with -M) has raised the multimedia timer
resolution.  This means -M is recommended by me for Vista users of
this experimental version.  Without -M, ntpd may use interpolation,
which will work until you browse to a Flash website or launch a Java
applet or Quicktime, all of which are known to raise multimedia timer
resolution.  Then timiekeeping will go haywire as with the unpatched
ntpd.

2.  A dynamic filter attempts to reject 15-30% of the baseline (OS
time, performance counter) correlations sampled in the high-priority
timing thread used with interpolation, based on comparison with the
previous sample.  This results in some chattiness that might help fine-
tune the way the code automatically narrows or widens the filter.  Up
to once a minute while the filter is being adjusted messages are
logged like:

filtered 1357 of 3625 QPC samples (37.43%) 533.4 usec/period window
filtered 1144 of 3613 QPC samples (31.66%) 746.6 usec/period window
filtered 679 of 3623 QPC samples (18.74%) 821.2 usec/period window
filtered 518 of 3624 QPC samples (14.29%) 821.2 usec/period window
filtered 645 of 3624 QPC samples (17.80%) 794.0 usec/period window
filtered 518 of 3615 QPC samples (14.33%) 794.0 usec/period window
filtered 454 of 3624 QPC samples (12.53%) 767.6 usec/period window
filtered 633 of 3623 QPC samples (17.47%) 691.0 usec/period window

(QPC is shorthand for QueryPerformanceCounter)

On most machines the adjusting will settle down after the first 10 to
15 minutes and stabilize.  Changes in system load are likely to cause
the window to adjust.  If you see more than 90% of samples ignored I'd
like to see the (event)log lines like above.

This filtering seems to reduce local clock jitter and thereby reduce
erroneous frequency error estimate wander.

Download at:

http://davehart.net/ntp/testbin/ntp-4.2.4p6-DLH-QPC-20090128-src.zip
http://davehart.net/ntp/testbin/ntp-4.2.4p6-DLH-QPC-20090128-bin.zip
http://davehart.net/ntp/testbin/ntp-4.2.4p6-DLH-QPC-20090128-debug-bin.zip

The source includes the changes needed to build using the VC9 compiler
in recent Windows SDKs as well as Visual C++ 2008 Express Edition.
Both options are free downloads.  I believe I left the output
generated by mc.exe so even VC++ 2008 EE without the separate SDK
download should be able to build.

Feedback solicited

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to