# stupid, simple question about precision - NTP

This is a discussion on stupid, simple question about precision - NTP ; If 'ntpq -c rl' shows the precision of my clock as -20 (roughly, 9ns), does that translate to timestamp confidence interval of +/- of 9ns, or of +/- of 4.5ns) ? Feel free to point to me to the section ...

1. ## stupid, simple question about precision

If 'ntpq -c rl' shows the precision of my clock as -20 (roughly,
9ns), does that translate to timestamp confidence interval of +/- of
9ns, or of +/- of 4.5ns) ?

Feel free to point to me to the section of the NTP FAQ I've missed,
or any other resource that I haven't seen in trying to answer this
question on my own.

Any guidance greatly appreciated.

2. ## Re: stupid, simple question about precision

Simple Simon wrote:

> If 'ntpq -c rl' shows the precision of my clock as -20 (roughly,
> 9ns), does that translate to timestamp confidence interval of +/- of
> 9ns, or of +/- of 4.5ns) ?
>
> Feel free to point to me to the section of the NTP FAQ I've missed,
> or any other resource that I haven't seen in trying to answer this
> question on my own.
>
> Any guidance greatly appreciated.

I think you are mistaking precision for accuracy. Precision is the
measure of the shortest interval your clock can represent. It has
nothing (or very little) to do with accuracy.

ntptime will show you the estimated error for your clock. Unless you
are using a hardware reference clock, the estimated error may be in
milliseconds rather than microseconds.

3. ## Re: stupid, simple question about precision

rgilbert88@comcast.net wrote...
> Simple Simon wrote:
>
> > If 'ntpq -c rl' shows the precision of my clock as -20 (roughly,
> > 9ns), does that translate to timestamp confidence interval of +/- of
> > 9ns, or of +/- of 4.5ns) ?
> >
> > Feel free to point to me to the section of the NTP FAQ I've missed,
> > or any other resource that I haven't seen in trying to answer this
> > question on my own.
> >
> > Any guidance greatly appreciated.

>
> I think you are mistaking precision for accuracy. Precision is the
> measure of the shortest interval your clock can represent. It has
> nothing (or very little) to do with accuracy.
>
> ntptime will show you the estimated error for your clock. Unless you
> are using a hardware reference clock, the estimated error may be in
> milliseconds rather than microseconds.

After some focused reading of newbie materials, you are right: I am
mistaking precision for accuracy. I appreciate your good manners.

I've seen the estimated error go from 18.3 ms to 3.5 ms since you
reply a few days back. With a vanilla NTP configuration I suppose
I'm not going to see much additional improvement.

My understanding is the best accuracy I might get, on a generic PC
clock, is about 0.050 ms--and that's with SSP and the kernel clock.

Thanks for steering me towards better understanding.

4. ## Re: stupid, simple question about precision

Simple Simon wrote:
> rgilbert88@comcast.net wrote...
>
>>Simple Simon wrote:
>>
>>
>>>If 'ntpq -c rl' shows the precision of my clock as -20 (roughly,
>>>9ns), does that translate to timestamp confidence interval of +/- of
>>>9ns, or of +/- of 4.5ns) ?
>>>
>>>Feel free to point to me to the section of the NTP FAQ I've missed,
>>>or any other resource that I haven't seen in trying to answer this
>>>question on my own.
>>>
>>>Any guidance greatly appreciated.

>>
>>I think you are mistaking precision for accuracy. Precision is the
>>measure of the shortest interval your clock can represent. It has
>>nothing (or very little) to do with accuracy.
>>
>>ntptime will show you the estimated error for your clock. Unless you
>>are using a hardware reference clock, the estimated error may be in
>>milliseconds rather than microseconds.

>
>
> After some focused reading of newbie materials, you are right: I am
> mistaking precision for accuracy. I appreciate your good manners.
>
> I've seen the estimated error go from 18.3 ms to 3.5 ms since you
> reply a few days back. With a vanilla NTP configuration I suppose
> I'm not going to see much additional improvement.
>
> My understanding is the best accuracy I might get, on a generic PC
> clock, is about 0.050 ms--and that's with SSP and the kernel clock.
>
> Thanks for steering me towards better understanding.

The internet tends to introduce enough noise to render microsecond
accuracy improbable! If you have a hardware reference clock; e.g. a GPS
accuracy, or not, depending on the vagaries of radio propagation.

Selection of internet servers can have a strong influence on accuracy.
Look for low values of delay and jitter. The servers, if operating
properly, have the correct time; what you are really selecting is the
quality of the usual network paths between your site and the server.
Note the plural; the routers do their best to get the packet where it's
going but the route used is by no means constant.

Have a look at the ~/scripts/stats directory for some tools that will
allow you to study the quality of your servers and network paths.
peer.awk is a real help; you say something like
gawk -f peer.awk /var/ntp/ntpstats/peerstats.20061119
and you get a statistical analysis of the stats in that file.

5. ## Re: stupid, simple question about precision

rgilbert88@comcast.net wrote...
> Simple Simon wrote:
> > rgilbert88@comcast.net wrote...
> >
> >>Simple Simon wrote:
> >>
> >>
> >>>If 'ntpq -c rl' shows the precision of my clock as -20 (roughly,
> >>>9ns), does that translate to timestamp confidence interval of +/- of
> >>>9ns, or of +/- of 4.5ns) ?
> >>>
> >>>Feel free to point to me to the section of the NTP FAQ I've missed,
> >>>or any other resource that I haven't seen in trying to answer this
> >>>question on my own.
> >>>
> >>>Any guidance greatly appreciated.
> >>
> >>I think you are mistaking precision for accuracy. Precision is the
> >>measure of the shortest interval your clock can represent. It has
> >>nothing (or very little) to do with accuracy.
> >>
> >>ntptime will show you the estimated error for your clock. Unless you
> >>are using a hardware reference clock, the estimated error may be in
> >>milliseconds rather than microseconds.

> >
> >
> > After some focused reading of newbie materials, you are right: I am
> > mistaking precision for accuracy. I appreciate your good manners.
> >
> > I've seen the estimated error go from 18.3 ms to 3.5 ms since you
> > reply a few days back. With a vanilla NTP configuration I suppose
> > I'm not going to see much additional improvement.
> >
> > My understanding is the best accuracy I might get, on a generic PC
> > clock, is about 0.050 ms--and that's with SSP and the kernel clock.
> >
> > Thanks for steering me towards better understanding.

>
> The internet tends to introduce enough noise to render microsecond
> accuracy improbable! If you have a hardware reference clock; e.g. a GPS
> accuracy, or not, depending on the vagaries of radio propagation.

I was thinking more of the general, ideal case -- where there might
be multiple Stratum 1 timeservers on a LAN, and a generic PC clock.

The machine I've been working with here has one ISP-provided NTP
server (stratum 4) within a few ms distance, but the other servers
are from the pool so...well, frankly, I'm happily surprised I've got
a 3.5 ms est error.

Dumb usage question on the est error: If I have a time of N.003555
and an estimated error of 0.003555, do that mean the actual range of
time is N.00355 +/- 0.003555, or +/- 0.001778 ?

Thank you again for your patience dealing with a newbie for what is
undoubtedly the 10,000th time you've explained this basic stuff.

> Selection of internet servers can have a strong influence on accuracy.
> Look for low values of delay and jitter. The servers, if operating
> properly, have the correct time; what you are really selecting is the
> quality of the usual network paths between your site and the server.
> Note the plural; the routers do their best to get the packet where it's
> going but the route used is by no means constant.
>
> Have a look at the ~/scripts/stats directory for some tools that will
> allow you to study the quality of your servers and network paths.
> peer.awk is a real help; you say something like
> gawk -f peer.awk /var/ntp/ntpstats/peerstats.20061119
> and you get a statistical analysis of the stats in that file.

Thank you very much. Will do.

6. ## Re: stupid, simple question about precision

Simple Simon wrote:
[]
> My understanding is the best accuracy I might get, on a generic PC
> clock, is about 0.050 ms--and that's with SSP and the kernel clock.

My really old 133MHz Pentium PC with FreeBSD and a PPS source (with an
incomplete view of the sky) does a little better than than. I'm sure more
modern hardware and a better-positioned GPS antenna would do substantially
better.

http://www.david-taylor.myby.co.uk/mrtg/pixie_ntp.html

http://www.david-taylor.myby.co.uk/n...SD-GPS-PPS.htm

Cheers,
David

7. ## Re: stupid, simple question about precision

David J Taylor wrote:
> Simple Simon wrote:
> []
>
>>My understanding is the best accuracy I might get, on a generic PC
>>clock, is about 0.050 ms--and that's with SSP and the kernel clock.

>
>
> My really old 133MHz Pentium PC with FreeBSD and a PPS source (with an
> incomplete view of the sky) does a little better than than. I'm sure more
> modern hardware and a better-positioned GPS antenna would do substantially
> better.
>
> http://www.david-taylor.myby.co.uk/mrtg/pixie_ntp.html
>
> http://www.david-taylor.myby.co.uk/n...SD-GPS-PPS.htm
>
> Cheers,
> David
>
>

I haven't tried it with a PC but a ~10 year old Sun Ultra 10 with a 440
MHz processor and Solaris 8 keeps time within a couple of microseconds.
I do have a good view of the sky. Something blazingly fast with a
lower interrupt latency might do still better but my modest hardware
meets and exceeds my very modest needs.

8. ## Re: stupid, simple question about precision

rgilbert88@comcast.net wrote...
> David J Taylor wrote:
> > Simple Simon wrote:
> > []
> >
> >>My understanding is the best accuracy I might get, on a generic PC
> >>clock, is about 0.050 ms--and that's with SSP and the kernel clock.

> >
> >
> > My really old 133MHz Pentium PC with FreeBSD and a PPS source (with an
> > incomplete view of the sky) does a little better than than. I'm sure more
> > modern hardware and a better-positioned GPS antenna would do substantially
> > better.
> >
> > http://www.david-taylor.myby.co.uk/mrtg/pixie_ntp.html
> >
> > http://www.david-taylor.myby.co.uk/n...SD-GPS-PPS.htm
> >
> > Cheers,
> > David

>
> I haven't tried it with a PC but a ~10 year old Sun Ultra 10 with a 440
> MHz processor and Solaris 8 keeps time within a couple of microseconds.
> I do have a good view of the sky. Something blazingly fast with a
> lower interrupt latency might do still better but my modest hardware
> meets and exceeds my very modest needs.

client of a Stratum 1 timeserver connected to the GPS, or... ?

--
Taxes are not "punishment for success". Nor are they "theft". Taxes
are a royalty paid commensurate to the economic benefit obtained from
a shared socio-economic system.

"Those who gain the benefit should also bear the disadvantage."
- Common Law maxim

9. ## Re: stupid, simple question about precision

Simple Simon wrote:
> rgilbert88@comcast.net wrote...
>
>>David J Taylor wrote:
>>
>>>Simple Simon wrote:
>>>[]
>>>
>>>
>>>>My understanding is the best accuracy I might get, on a generic PC
>>>>clock, is about 0.050 ms--and that's with SSP and the kernel clock.
>>>
>>>
>>>My really old 133MHz Pentium PC with FreeBSD and a PPS source (with an
>>>incomplete view of the sky) does a little better than than. I'm sure more
>>>modern hardware and a better-positioned GPS antenna would do substantially
>>>better.
>>>
>>> http://www.david-taylor.myby.co.uk/mrtg/pixie_ntp.html
>>>
>>> http://www.david-taylor.myby.co.uk/n...SD-GPS-PPS.htm
>>>
>>>Cheers,
>>>David

>>
>>I haven't tried it with a PC but a ~10 year old Sun Ultra 10 with a 440
>>MHz processor and Solaris 8 keeps time within a couple of microseconds.
>> I do have a good view of the sky. Something blazingly fast with a
>>lower interrupt latency might do still better but my modest hardware
>>meets and exceeds my very modest needs.

>
>
> client of a Stratum 1 timeserver connected to the GPS, or... ?
>

My GPS is connected directly to serial port "B" on the Sun Ultra 10.
The PPS signal is connected to the DCD Pin. The Sun also uses a bunch
of Internet servers as a backup and sanity check. Normally, the GPS is
the selected synchronization source. This gives me a platform from
which I can evaluate internet servers and NTP over internet.

I find that servers/network connections are of highly variable quality.
I have ONE internet server that is solid as a rock and maintains an
approximately 2 millisecond offset from my GPS. I assume this is due to
an asymmetry in the network somewhere. A couple of the others bounce
around +/- ten to fifteen milliseconds. The quality of some of the
others varies with the time of day; the hours of darkness seem to
provide the best performance while normal business hours in the Eastern
time zone (US) seem provide the worst. I expect that this correlates
strongly with network traffic.

10. ## Re: stupid, simple question about precision

Richard B. Gilbert wrote:
> Simple Simon wrote:

[]
>> client of a Stratum 1 timeserver connected to the GPS, or... ?
>>

>
> My GPS is connected directly to serial port "B" on the Sun Ultra 10.
> The PPS signal is connected to the DCD Pin. The Sun also uses a bunch
> of Internet servers as a backup and sanity check. Normally, the GPS
> is the selected synchronization source. This gives me a platform from
> which I can evaluate internet servers and NTP over internet.

I have a similar arrangement to Richard's, with the serial port providing
the "which second am I" data, and the DCD line providing the "here is the
precise on-the-second edge" signal.

David