[ntp:questions] Allan deviation survey
David L. Mills
mills at udel.edu
Fri Sep 10 20:48:58 UTC 2010
Miroslav,
I've done this many times with several machines in several places and
reported the results in Chapter 12 and 6 in both the first and second
editions of my book, as well as my 1995 paper in ACM Trans. Networking.
Judah Levine of NIST has done the same thing and reported in IEEE
Transactions. He pointed out valuable precautions when making these
measurements. You need to disconnect all time disciplines and let the
computer clock free-wheel. You need to continue the measurements for at
least a week, ten times longer than the largest lag in the plot. You
need to display on log-log coordinates and look for straight lines
intersecting at what I have called the Allan intercept. I have Matlab
programs here that do that and produce graphs like the attached.
Most of the prior work was done 15 years ago. I strongly suspect the
Allan intercept has moved to lower time values due to the fact that
modern processors are faster and the interrupt latency is smaller. The
current NTP distribution includes a NTP simulator that can be excited
with white phase noise and random-walk frequency noise that very nicely
models the real noise sources.
For those that might want to repeat the experiments, see the attached
figure. Trace 1 is from an old Sun SPARC IPC; trace 2 is from a Digital
Alpha. Traces 3 and 4 were generated using artificial noise sources with
parameters chosen to closely match the measured characteristics. Phase
noise is generated from an exponential distribution, while frequency
nose is generated from the integral of a Gaussian distribution, in other
words a random walk. Trace 4 is the interesting one. It shows the
projected performance with precision of one nanosecond. The fastest
machines I have found have a precision of about 500 ns. Note, precision
is the time taken to read the kernel clock and is not the resolution.
Dave
Miroslav Lichvar wrote:
>Hi,
>
>I'm trying to find out how a typical computer clock oscillator
>performs in normal conditions without temperature stabilization or a
>stable CPU load and how far it is from the ideal case which includes
>only a random-walk frequency noise.
>
>A very useful statistics is the Allan deviation. It can be used to
>compare performance of oscillators, to make a guess of the optimal
>polling interval, whether enabling ntpd daemon loop to use FLL will
>help, how much better chrony will be than ntpd, etc.
>
>If you have a PPS device and would be willing to run the machine
>unsynchronized for a day, I'd like to ask you to measure the Allan
>deviation and send it to me.
>
>I wrote a small ncurses program that can be used with LinuxPPS to
>capture the PPS samples and create an Allan deviation plot. An
>overview is displayed and continuously updated while samples are
>collected. Data which can be used to make an accurate graph (e.g. in
>gnuplot) are written to the file specified by -p option when the
>program is ended or when the 'w' key is pressed.
>
>Available at:
>http://mlichvar.fedorapeople.org/ppsallan-0.1.tar.gz
>
>Obligatory screenshot :-)
> Allan deviation plot (span 11:09:55, skew +0.0)
>1e-05├
> │
> +
> │
> │ + +
>1e-06├ +
> │ +++
> │ ++
> │ +++
> │ ++
>1e-07├ +++
> │ ++
> │ +++
> │ ++ ++++++
> │ +++ ++++
>1e-08├ +++++++++
> │
> │
> │
> │
>1e-09└───────────┴───────────┴───────────┴───────────┴───────────┴
> 1e+00 1e+01 1e+02 1e+03 1e+04 1e+05
>w:Write q:Quit r:Reset 1:Skew 0.0 2:Skew +1.0 3:Skew -0.5
>
>
>To make a good plot:
>1. disable everything that could make system clock adjustments
>2. start ./ppsallan -p adev.plot /sys/devices/virtual/pps/pps0/assert
> (change the sys file as appropriate)
>3. let it collect the PPS samples for at least one day
>4. hit q and send me the adev.plot file
>
>Thanks,
>
>
>
More information about the questions
mailing list