[ntp:questions] high precision tracking: trying to understand sudden jumps
martin.burnicki at meinberg.de
Wed Apr 2 08:53:58 UTC 2008
> Martin Burnicki <martin.burnicki at meinberg.de> writes:
>>Yes, PTP can yield an accuracy better than 100 ns if both the NICs at the
>>clients and the server support hardware timestamping of sent/received PTP
> I am still confused. To timestamp you have to read the computer's clock.
> That is a software operation-- reading the counter in the cpu, translating
> to time, returning the result through the kernel, etc. That has all kinds
> of variable latencies,etc. I am having trouble seeing 100ns. Also seeing
> the PPS from the hardware clock and its interrupts. Or are you replacing
> all of the hardware and software of the system? (new kernel, new interrupt
> system, new nics, etc)
Yes, maybe I've been a little bit too unspecific here.
Those timestamps are taken from a local oscillator, e.g. on the NIC board,
and that oscillator can be disciplined with the mentioned accuracy.
Most of those devices also contain a hardware PPS output, so you can use an
oscilloscope to compare the PPS output of the PTP slave to the PTP output
of the PTP grandmaster, and this is where you can see which accuracy you
can get using the PTP protocol, and you can also see that you may not get
that accuracy if you use switches which are not PTP-aware.
BTW, we've made some tests and could see that you can yield the same
accuracy with NTP and hardware timestamping.
A different story is of course how you get the accurate time from the NIC's
oscillator/counter to the kernel's system time.
This introduces the latencies you mentioned, and those latencies occur
regardless of whether you are using a NIC with timestamp counter, or GPS
PCI card, or even when evaluating an incoming PPS signal.
The latter also depends strongly on the operating system, i.e. the
resolution of the system clock (1 microsecond or better under most
Unix-like systems, about 16 milliseconds under Windows, except Vista).
More information about the questions