✘sys_fuzz * ntp_random()

Gary E. Miller gem at rellim.com
Thu Jan 26 00:52:58 UTC 2017


Yo Kurt!

On Wed, 25 Jan 2017 00:01:43 +0100
Kurt Roeckx <kurt at roeckx.be> wrote:

> On Tue, Jan 24, 2017 at 10:38:50PM +0100, Achim Gratz wrote:
> > sys_fuzz (which whitens the quantization noise on the clock reading)
> > doesn't make a difference or you might not.  But presumably Dave
> > Mills didn't put it in there just because he was trying to add
> > useless code.  
> 
> So it seems to me that this is the wrong order, you first add the
> noise and then do the quantization, not the other way around.

The quantization noise is already in the time read from the system..

clock_gettime() has a resolution of one nano Second, but depending on the
host, it increments in steps that are a lot bigger.  ntpd tries
to determine that minimum increment and store it in sys_tick.

Annoying there was no way to read that variable that I could find.

Now there is a way, just pushed to git head, new option:

	ntpq -c 'rv 0 tick'

Results are in milli Seconds.  Here is what I get on a Xeon:

spidey ntpsec # ntpq -c 'rv 0 tick fuzz'
fuzz=0.000202, tick=0.000202

Tick seems to equal fuzz.  About 202 nano Seconds.

Table time:

Xeon:	 	fuzz=0.000202, tick=0.000202
skylake:	fuzz=0.000109, tick=0.000109
RasPi:		fuzz=0.003,    tick=0.003
RasPi2:		fuzz=0.001823, tick=0.001823
RasPi3:		fuzz=0.000937, tick=0.000937
mac mini:       fuzz=0.0005,   tick=0.001

Pretty much sys_fuzz == sys_tick.  Except that mac!

Looks like ntpd is built to handle a lot of complexity that no longer exists
in my test platforms.  Except that mac...

looks like sys_tick can be less than sys_fuzz.  Anyone got the reverse
case?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170125/35905827/attachment.bin>


More information about the devel mailing list