Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread David J Taylor

Unruh  wrote in message news:rl5hm.50089$db2.40...@edtnps83...
[]
 As I tried to emphasise, if the round trip is not symmetric, then 
 neither ntp not
 chrony can compensate for that lack of symmetry, and the absolute time 
 will be
 out. If occasionally it has an assymetric round trip, then ntp will 
 probably
 elimate it, and chrony may or may not, depending on how you set up 
 chrony, but
 typically chrony will be more sensitive to that asymmetry.
 Eb, say on exactly every 5th query, an extra .3ms is added to the return 
 trip, and
 lets say that the minimum round trip is .15ms plus or minus .1 ntp will 
 always
 throw out those fifth cases. but will have an error around .05 ms. 
 chrony will
 not, and without them would have an error of .02ms but with them would 
 have an
 error of about .05ms, just as would ntp. Ie, in this case the chrony 
 advantage
 would be more or less erased by those asymmetric round trips.

 There is no definative answer.
 It depends on the situation.

Many thanks - that's clearer.

David 

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Jan Ceuleers
David Lord wrote:
 How do you get the time difference between your GPS and system
 time?

Include the GPS in your ntp.conf, but mark it with noselect on the server 
line.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Unruh
David Lord sn...@lordynet.org writes:

Unruh wrote:
 David Lord sn...@lordynet.org writes:
 
 David J Taylor wrote:
 Unruh unruh-s...@physics.ubc.ca wrote in message 
 news:qg_gm.50009$db2.46...@edtnps83...
 David J Taylor 
 david-tay...@blueyonder.not-this-bit.nor-this.co.uk.invalid writes:


 David J Taylor
 david-tay...@blueyonder.not-this-bit.nor-this.co.uk.invalid wrote in
 message news:%xqgm.126$ym4...@text.news.virginmedia.com...
 Unruh  wrote in message news:34jgm.50898$ph1.36...@edtnps82...
 []
 Note that chrony will give you a factor of 2 or three improvement over
 ntp  in the errors, assuming that the roundtrip is equally split on
 Linux or BSD.
 For those without wide-bandwidth academic connections - those folks on
 cable or ADSL - how good is an equal split round trip assumption?

 David
 Thanks, David, David and Jan.  A few milliseconds is what I had 
 expected,
 so if you are on a consumer line, what implications does that have for
 unruh's comment?
 Cheers,
 David
 Which comment?
 The one I quoted:

 Note that chrony will give you a factor of 2 or three improvement over 
 ntp  in the errors, assuming that the roundtrip is equally split on 
 Linux or BSD.

 On consumer-grade circuits the assumption about equal round trip is 
 unlikely to be valid.

 I hope that David Lord can make some tests, and I await the results with 
 interest.
 
 Both fileserver using ntpd and desktop using chrony had only my
 local ntp servers as sources so I've restarted both with three
 remote sources, one common source at my isp, and alternate
 sources from two different sites.
 
 What I'm most interested in is the effect of temperature as it's
 one of two periods in year that gets largest temperature
 variations and I've already had to restart the servers as ntpd
 was unable to keep up with the higher minpoll values I had set.
 
 I'm now not quite sure how best to compare stats from chrony vs
 ntpd.
 
 Well, the way I did it was to attach a GPS PPS to the computer and use the 
 offset
 between it and the system time as a measurement of the accuracy. 
 (the gps was NOT used as a source for eitehr ntp or chrony).
 

How do you get the time difference between your GPS and system
time?

I wrote a parallel port interrupt routine ( well adapted on) which read the PPS
interrupt and time stamps it. Ideally that timestamp should be exactly on the
second. It is usually off by a few tens of microseconds. That is the time
difference.


At the moment there only seems to be 100us between offsets and
apart from this being insignificant I wouldn't know which was
nearer to ntp time.

?? sure you would the kernel time is ntp time. The offsets are the difference
between the time ntp gets from sending out and receiving back a packet from the
remote site. This is not ntp time That reading goes through the clock filter,
and then is fed into the feedback loop to disciple the computer clock. That
computer clock time is the closest one can come to something called ntp time.
Unlike chrony, ntp does NOT use the time readings from the remote site to do a
best estimate of the true time, and then drive the kernel time toward that. It
assumes at each reading that the output of the clock filter IS the best estimate
of the the true time, and slowly drives the clock to minimize that. Slowly means
that in the end, the time ntp approaches is a sort of mean of those readings. 

Chrony on the other hand uses from 3 to 60 of thepast readings to find the best
estimate of what the true time now is, and finds the difference between the 
system
clock and that true time. It then corrects for that difference both in offset 
and
rate. It is a very different philosophy.


My adsl connection has also been off already for 30 minutes
after I'd set this up. One of my servers that gets time from
MSF and also has both test systems as sources. Both test
systems also have the common source of my isp's timeserver
so I'm expecting to get something meaningful from that.

MSF?
The problem is that I have no idea what the accuracy of any of those items is.
YOur ISP's timesever may be a stratum 7 getting time from a bunch of bozos. Or 
it
may be stratum 1 getting its time from a well implimented GPS clock. 


You are interested in the difference between your computer time and true UTC. 
the
only way you will get that is by having a local source of true time ( eg a GPS
with a 1usec or so accuracy).
I used a GPS 18LVM, but of course even there I am not sure that the internals of
the GPS receiver do not introduce microsecond sized time errors. I have never
calibrated my GPS against some better true time standard. 

I might be able to get GPS to both systems but not for a while.

One GPS receiver should be able to be split to supply time to both machines to
usec accuracy.


___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


[ntp:questions] Frequently asked question about error bounds?

2009-11-01 Thread berra.84
What is the correct error bound between client and server? In the RFC
documentation I read one thing and in many theads another. I'm
confused so please help me. Which is correct?

1) In the documentation for RFC1305 p. 102 it can be read that the
true  offset between
client and server must lie somewhere in the correctness  interval,
defined by
I=[theta - delta/2 - epsilon, theta + delta/2 + epsilon]

2) And in threads and websites I usuallly see the statement that the
error is bounded with half the roundtrip. And it sure look like that
when scatter diagram(wedge plots) with offset as a function rtt are
viewed.

---
To bound the error to the root of the synchronization subnet. Here,
upper-case variables are used relative to the primary reference source
(s), i.e., via a peer to the root of the synchronization subnet.

Since offset, dispersion and delay(rtt) are all additive, you easily
sum up all variables from the primary server to server i and achieve
OFFSET sub i, ROOT DISPERSION sub i and ROOT DELAY sub i to the root.

The synchronization distance, sometimes called the root distance, is
calculated with DELTA/2 + EPSILON and represents the biggest
statistical error. So the true offset relative to a primary reference
server must be contained in the interval [OFFSET- SYNC.DIST, OFFSET
+SYNC.DIST.]

If the 1) alternative is right, all the other would be much more
consistently.

Thanks in advance

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Frequently asked question about error bounds?

2009-11-01 Thread David Woolley
berra.84 wrote:

 1) In the documentation for RFC1305 p. 102 it can be read that the
 true  offset between
 client and server must lie somewhere in the correctness  interval,
 defined by
 I=[theta - delta/2 - epsilon, theta + delta/2 + epsilon]

This is (more) correct. I'm not sure if it fully accounts for some of 
the details of the intersection algorithm.  One would need to double 
check whether it was valid during startup transients and in the light of 
the averaging of multiple sources that is actually used to estimate the 
time.

 
 2) And in threads and websites I usuallly see the statement that the
 error is bounded with half the roundtrip. And it sure look like that
 when scatter diagram(wedge plots) with offset as a function rtt are
 viewed.

This is an oversimplification that is quite often valid in cases where 
the error is significant, as delay tends to dominate dispersion and most 
of the delay, and in particular, nearly all its asymmetry, is associated 
with the retail hop.

Another factor, I think is that the RFC attempts to be a mathematical 
treatise, and the use of lots of Greek letters, rather than spelling out 
what they mean, turns people off, so very few users can actually read 
and understand the RFC.

Please note that RFC 1305 is de facto obsolete, and current versions of 
NTP actually correspond with a new, draft, RFC.

Also note that this is not a frequently asked question, although maybe 
it should be.

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Maarten Wiltink
Unruh unruh-s...@physics.ubc.ca wrote in message
news:iebhm.50125$db2.41...@edtnps83...
[...]
 The problem is that I have no idea what the accuracy of any of those
 items is. YOur ISP's timesever may be a stratum 7 getting time from
 a bunch of bozos. Or itmay be stratum 1 getting its time from a well
 implimented GPS clock.

ntpq -p will tell you that. And ntptrace does exactly that, climbing
the chain up from you to stratum 1.

Groetjes,
Maarten Wiltink


___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Frequently asked question about error bounds?

2009-11-01 Thread Unruh
berra.84 berra...@spray.se writes:

What is the correct error bound between client and server? In the RFC
documentation I read one thing and in many theads another. I'm
confused so please help me. Which is correct?

1) In the documentation for RFC1305 p. 102 it can be read that the
true  offset between
client and server must lie somewhere in the correctness  interval,
defined by
I=[theta - delta/2 - epsilon, theta + delta/2 + epsilon]

2) And in threads and websites I usuallly see the statement that the
error is bounded with half the roundtrip. And it sure look like that
when scatter diagram(wedge plots) with offset as a function rtt are
viewed.
That is the delta term above. 
But it is clear that if the clock you are comparing to is wildly off, then the
roundtrip time does not encompas the error. Lets say that the server gets its 
time
from a GPS NMEA which has a best accuracy of about 1ms ( and often worse) but 
the
roundtrip time is 200usec. Then the accuracy will be a few ms, not 200usec. 
That is epsilon.




If the 1) alternative is right, all the other would be much more
consistently.

It is right.

Thanks in advance

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Unruh
David J Taylor david-tay...@blueyonder.not-this-bit.nor-this.co.uk.invalid 
writes:

Unruh  wrote in message news:iebhm.50125$db2.41...@edtnps83...
[]
 MSF?

See:
  
 http://www.npl.co.uk/science-technology/time-frequency/time/products-and-services/msf-radio-time-signal

UK 60KHz radio time signal.

Ah, OK. Its accuracy is probably not much better than a few msec I assume. 
GPS is a few usec. Since the network gives accuracies of better than a few ms, 
MSF
is not a good way of testing the accuracy of network set clocks. 


David 

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread David J Taylor
Unruh  wrote in message news:vcjhm.50153$db2.9...@edtnps83...
[]
UK 60KHz radio time signal.

 Ah, OK. Its accuracy is probably not much better than a few msec I 
 assume.
 GPS is a few usec. Since the network gives accuracies of better than a 
 few ms, MSF
 is not a good way of testing the accuracy of network set clocks.

At source, it's recently been within about 10 microseconds:

  
http://www.npl.co.uk/science-technology/time-frequency/time/products-and-services/msf-bulletins

  http://resource.npl.co.uk/time/bulletins/msf/msfbul_08_2009.pdf

In the field, the accuracy will depend on the receiver you use, the 
propagation, and the quality of signal you have.  A few milliseconds is 
probably a fair estimate, although it would be interesting to see some 
measured values.

Cheers,
David 

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread John Hasler
David J Taylor writes:
 UK 60KHz radio time signal.

Bill Unruh writes:
 Ah, OK. Its accuracy is probably not much better than a few msec I
 assume.

Should be as good as WWVB, which is good to within 100usec.  The
propagation delay is highly predictable at 60KHz.  These stations can
also can provide extremely aaccurate frequency references.
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread John Hasler
I wrote:
 Should be as good as WWVB, which is good to within 100usec.

But evidently many commercial receivers are only good to a ms or two.
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] Running two ntpd systems in parallel

2009-11-01 Thread Dave Hart
Please see my message to hackers@ today pointing to a prototype ntpd
that disciplines a synthetic clock and does not require root
privileges:

http://lists.ntp.org/pipermail/hackers/2009-November/004633.html

Cheers,
Dave Hart
___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread John Hasler
I wrote:
 Should be as good as WWVB, which is good to within 100usec.  The

David Woolley writes:
 Most receivers only use the slow code (including the simple hardware
 solutions for ntpd).

I'm assuming a real receiver.  With the single-chip designs intended for
atomic watches you'll be lucky to get with a second.

 For high accuracy you would have to sync to the carrier, and possibly
 use the fast time codes.

With WWVB I'd use an analog PLL to recover the carrier and a DPLL to get
the PPS.
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Unruh
David J Taylor david-tay...@blueyonder.not-this-bit.nor-this.co.uk.invalid 
writes:

Unruh  wrote in message news:vcjhm.50153$db2.9...@edtnps83...
[]
UK 60KHz radio time signal.

 Ah, OK. Its accuracy is probably not much better than a few msec I 
 assume.
 GPS is a few usec. Since the network gives accuracies of better than a 
 few ms, MSF
 is not a good way of testing the accuracy of network set clocks.

At source, it's recently been within about 10 microseconds:

Sorry, at 10usec, the distance away of the transmitter must be less than 3 km.
Also your system needs to see the start of the tone to 10usec which means that 
the
tone would have to be about 1MHz which is a bit beyond audio.



  
 http://www.npl.co.uk/science-technology/time-frequency/time/products-and-services/msf-bulletins

  http://resource.npl.co.uk/time/bulletins/msf/msfbul_08_2009.pdf

In the field, the accuracy will depend on the receiver you use, the 
propagation, and the quality of signal you have.  A few milliseconds is 
probably a fair estimate, although it would be interesting to see some 
measured values.

Cheers,
David 

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread John Hasler
Bill Unruh writes:
 Sorry, at 10usec, the distance away of the transmitter must be less than 3 km.

10usec at the transmitter.

 Also your system needs to see the start of the tone to 10usec which
 means that the tone would have to be about 1MHz which is a bit beyond
 audio.

There isn't any tone.  It's the UK equivalent of WWVB.
http://resource.npl.co.uk/docs/networks/time/meeting3/martin.pdf
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Unruh
John Hasler jhas...@newsguy.com writes:

Bill Unruh writes:
 Sorry, at 10usec, the distance away of the transmitter must be less than 3 
 km.

10usec at the transmitter.

 Also your system needs to see the start of the tone to 10usec which
 means that the tone would have to be about 1MHz which is a bit beyond
 audio.

There isn't any tone.  It's the UK equivalent of WWVB.

How is the beginning of the second ( an hour) marked?
The bandwidth of whatever marks it has to be pretty narrow, or the transmitter
would interfer with everything around it. Ie, that means a large time 
uncertainty.

Ie how fast is the carrier actually switched off and on. It cannot be
instantaneous or the signal would spill out badly into neighbouring bands. 

http://resource.npl.co.uk/docs/networks/time/meeting3/martin.pdf
-- 
John Hasler 
jhas...@newsguy.com
Dancing Horse Hill
Elmwood, WI USA

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions


Re: [ntp:questions] NTP absolute accuracy?

2009-11-01 Thread Terje Mathisen
Unruh wrote:
 John Haslerjhas...@newsguy.com  writes:
 There isn't any tone.  It's the UK equivalent of WWVB.

 How is the beginning of the second ( an hour) marked?
 The bandwidth of whatever marks it has to be pretty narrow, or the transmitter
 would interfer with everything around it. Ie, that means a large time 
 uncertainty.

Not if they do the same spread spectrum modulation of the carrier as 
emplyed by the German DCF77 transmitter: By phase-locking a receiver to 
that signal, you can get down to the 10-30 us or so range.

(You still have to be close enough to the transmitter so that the 
propagation path is perfectly predictable, otherwise you'll see 
systematic excursions as a function of the time of day/night.)

Terje

-- 
- Terje.Mathisen at tmsw.no
almost all programming can be viewed as an exercise in caching

___
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions