[ntp:questions] Allan deviation survey
David L. Mills
mills at udel.edu
Thu Sep 16 01:23:28 UTC 2010
Miroslav,
The fastest machine I can find on campus has precision -22, or about 230
ns. Then, I peeked at time.nist.gov, which is actually three machines
behind a load leveler. It reports to be an i386 running FreeBSD 61. Are
you ready for this? It reports precision -29 or 1.9 ns! I'm rather
suspiciousabout that number. What processor and operating system are
you using. What is the precision reported by ntpd?
For historic perspective, the time to read the clock on a Sun SPARC IPC
in the late 1980s was 42 microseconds.
Thanks for the jitter.c update.
Dave
Miroslav Lichvar wrote:
>On Tue, Sep 14, 2010 at 07:17:04PM +0000, David L. Mills wrote:
>
>
>>Miroslav,
>>
>>Better recalibrate your slide rule. On a 2.8 GHz dual-core Pentium
>>running OpenSolaris 10, the measured precision is -21, which works
>>out to 470 ns.
>>
>>
>
>That probably just means the system on your machine is not using the
>rdtsc instruction when reading time.
>
>
>
>>You claim ten times faster. What snake oil are you
>>using for your processor? To check, try running the jitter.c program
>>in the distribution.
>>
>>
>
>Average 0.000000088
>First rank
> 0 0.000000082
> 1 0.000000082
> 2 0.000000082
> 3 0.000000082
> 4 0.000000082
> 5 0.000000082
> 6 0.000000082
> 7 0.000000082
> 8 0.000000082
> 9 0.000000082
>Last rank
>799990 0.000013065
>799991 0.000013324
>799992 0.000013477
>799993 0.000013545
>799994 0.000013782
>799995 0.000014010
>799996 0.000019316
>799997 0.000023405
>799998 0.000034991
>799999 0.000111950
>
>But I had to apply the following patch, because there was time stored
>as seconds since 1900 in double format, which for current time gives
>only about 119ns resolution and so the differences ended up as zero.
>
>--- jitter.c.orig 2008-07-16 23:20:59.000000000 +0200
>+++ jitter.c 2010-09-15 10:10:06.000000000 +0200
>@@ -15,6 +15,7 @@
> #include <sys/time.h>
> #include <stdlib.h>
> #include "jitter.h"
>+#include <time.h>
>
> #define NBUF 800002
> #define FRAC 4294967296. /* a bbbbillion */
>@@ -33,7 +34,7 @@
> char *argv[]
> )
> {
>- l_fp tr;
>+ l_fp tr, first;
> int i, j;
> double dtemp, gtod[NBUF];
>
>@@ -43,11 +44,13 @@
> for (i = 0; i < NBUF; i ++)
> gtod[i] = 0;
>
>+ get_systime(&first);
> /*
> * Construct gtod array
> */
> for (i = 0; i < NBUF; i ++) {
> get_systime(&tr);
>+ tr.l_i -= first.l_i;
> LFPTOD(&tr, gtod[i]);
> }
>
>
>
More information about the questions
mailing list