[ntp:questions] Bug 1700 - Clock drifts excessively at polling levels above 256.

Mischanko, Edward T Edward.Mischanko at arcelormittal.com
Fri Apr 22 12:20:27 UTC 2011



Edward T. Mischanko | Maintenance Technician, Electrical
ArcelorMittal Burns Harbor
 
Finishing | 250 W. US Highway 12
Burns Harbor, IN 46304-9745
 
T +1 219 787 3601 | F +1 219 787 4510
www.arcelormittal.com
 

_____________________________________________
From: Mischanko, Edward T 
Sent: Thursday, April 21, 2011 12:02 PM
To: 'questions at lists.ntp.org'
Subject: Bug 1700 - Clock drifts excessively at polling levels above
256.

My system clock drifts excessively when polling above 256 in a Windows
environment, as much as 5 ms or more.  I have made changes to
.../ntpd/ntp_loopfilter.c CLOCK_PLL, CLOCK_FLL, CLOCK_LIMIT, and
CLOCK_PGATE to address this problem.  I realize the changes I have made
are global in nature and really only need changes in the Windows port.
I would welcome a patch to the Windows port to accomplish these changes
or any other changes that accomplish the 1 ms stability I have now
achieved.  I hope Dr. Mills will have constructive comments on this
problem and proposed solutions.


/*
 * This is an implementation of the clock discipline algorithm described
 * in UDel TR 97-4-3, as amended. It operates as an adaptive parameter,
 * hybrid phase/frequency-lock loop. A number of sanity checks are
 * included to protect against timewarps, timespikes and general mayhem.
 * All units are in s and s/s, unless noted otherwise.
 */
#define CLOCK_MAX		.128
/* default step threshold (s) */
#define CLOCK_MINSTEP	300.					/*
default stepout threshold (s) */
#define CLOCK_PANIC	1000.					/*
default panic threshold (s) */
#define CLOCK_PHI		15e-6
/* max frequency error (s/s) */
#define CLOCK_PLL		1.8
/* PLL loop gain (log2) */
#define CLOCK_AVG		8.
/* parameter averaging constant */
#define CLOCK_FLL		.001
/* FLL loop gain */
#define CLOCK_FLOOR	.0005					/*
startup offset floor (s) */
#define CLOCK_ALLAN	11					/* Allan
intercept (log2 s) */
#define CLOCK_DAY		86400.				/* one
day in seconds (s) */
#define CLOCK_JUNE	(CLOCK_DAY * 30)		 	/* June
in seconds (s) */
#define CLOCK_LIMIT	15					/*
poll-adjust threshold */
#define CLOCK_PGATE	2.					/*
poll-adjust gate */
#define PPS_MAXAGE	120					/*
kernel pps signal timeout (s) */
#define FREQTOD(x)	((x) / 65536e6) 			/* NTP
to double */ 
#define DTOFREQ(x)	((int32)((x) * 65536e6)) 	/* double to NTP
*/



More information about the questions mailing list