Greg, Let me correct a couple of minor misconceptions. The clock filter, which I call a minimum filter, selects from the last eight samples the one with minimum delay. Since the reference clock delay is always zero, the algorithm selects the most recent sample and the filter is effectively out of the loop. One of my recent correspondents reports using a many-stage minimum filter at relatively high sample rates on a busy wire and claims it works very well.
On the other hand, the reference clock filter sorts up to 60 of the most recent samples and finds the median. It then trims off a number of the most distant samples at either end and averages the rest. I call this a median filter, although my signal processing buddies use that name for other architectures. As the oscillator gets better the Allan intercept increases to higher values and the averaging time can be longer. Assuming the samples are iid and unbiased, the noise decreases by 3 dB for every doubling of the number of samples. However, you are averaging network delays, which might have a more exponential than uniform distribution, so would expect a bit of bias, unless the distribution is similar on both the out and in directions. Sunses can be lousy timekeepers. There is a built-in 1.8-ms delay on the input side, either in the NIC or driver. FreeBSD Pertia make wonderful timekeepers, generally withing 1-2 microseconds when steered by PPS and parallel I/O pin. Even the serial timecode is within 1-3 us. FreeBSD Pentia on a 100-Mb Ethernet are typically within 50 us when chiming a GPS server. Most of the error is due to oscillator wander, not network jitter. When you come right down to it and scrape the barnacles away, both NTP and PTP use the same four-timestamp protocol, although NTP is symmetric and PTP is not. While the PTP resolution is 1 ns and NTP is 0.23 ns, that is not an issue. The most accurate thing that one can say when comparing the two protocols is that NTP synchronizes uncompenstated computer clocks and PTP synchronizes compensated NIC clocks, either in computers or specialized devices. Should PTP be used to synchronize the computer clock it would be no better or worse than NTP. There has been a good deal of discussion in the working group how to improve NTP timekeeping to the order of the PPS signal as mentioned above. There are two effective ways to do this, using output timestamps captured by the driver and using a two-step protocol as in PTP. In fact, the architecture briefing on the NTP project page includes protocol modifications to do that. A primary driver in this work is the adaptation of NTP for use in NASA projects, specifically the Proximity protocol used between the orbiters and rovers. Nicely enough, the hardware includes provisions for packet timestamping at the modem. Dave Greg Dowd wrote: > PTP default profile operation is 1 way sync transmissions from the > grandmaster to all slaves (via multicast) with an implicit "occasional" > delay request/response for ranging from each slave. The work we are > doing in the telecom space (through ITU and IETF) defines a new > application profile for PTP which is unicast based and has a 1:1 > correspondence between sync and delay request/response. It also allows > higher sync and delay request rates. > > So, while NTP and PTP essentially have a like set of timestamps and > fundamental assumptions, I wouldn't say they do the same thing. The > small LAN is where PTP default profile is optimized for operation. > While everything from a single LAN segment to the big, hairy, scary > Internet is the target for NTP (along with lousy oscillators). > > On a small LAN, with light traffic, it is likely all moot. > > I'm not sure we agree on the effectiveness of the clock servo in ntp. > First, there is no protocol requirement to only use 8 taps, it could be > changed. I've checked :-) IIRC, there are 20 taps in the ACTS reference > clock driver. However, since the network client filter is 8 entries > deep, and the poll interval can climb to 1024 seconds, I wonder if you > feel like the frequency stability of a pc is useful out at observation > intervals in the 10k seconds range? My guess would be that > environmentals would stomp on those samples. Also, wander can be > introduced by the LRD characteristics of network traffic. > > However, moving closer in, I still think the higher update rate has > value. If you start using higher quality oscillators and hardware > timestamping, the dominant noise source becomes the delay variation in > the network. Since the remote clock can't average this (it's not > uniform or Gaussian), it needs to use some intelligent filtering. > Higher packet rates mean that there are more samples to pick from. > > Also, one thing a lot of these discussions miss is the natural tradeoff > between trying to be the most accurate vs trying to be the most stable. > These tradeoffs, as well as differences in noise processes, mean there > is no one "correct" servo. Having spent some time studying networks > with multiple network load generators connected through and across > network where sync is transferred (mostly for wireless backhaul), I've > developed a healthy respect for many of the various sampling and > filtering functions in ntp. > > > > > > Greg Dowd > gdowd at symmetricom dot com (antispam format) > Symmetricom, Inc. > www.symmetricom.com > "Everything should be made as simple as possible, but no simpler" Albert > Einstein > > -----Original Message----- > From: Bill Unruh [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 30, 2008 3:21 PM > To: Greg Dowd > Cc: questions@lists.ntp.org > Subject: RE: frequency adjusting only > > On Wed, 30 Apr 2008, Greg Dowd wrote: > > >>As noted, these are really stability measurements of the difference >>between two clocks. The absolute accuracies, particularly once you >>reach the submillisecond domain, are impacted by the sum of all biases > > >>in the measurement system, os, stack, driver, dma controller, bus, >>mac, phy, physical layer, switching/routing matrix and protocols >>(ARP/STP/QoS) and phy,mac,bus,driver,stack,os,app on the other end. >>Not just jitter and delay variation, but biases. Sometimes the biases >>are complentary and cancel and sometimes they don't. > > > Agreed. However, ntp and PTP is software do almost the same thing > (unless ptp really uses broadcast in which case it is much worse than > ntp-- broadcast is horrible since it cannot see those sudden increases > in delays due to congestion, etc. NTP is far to aggressive in throwing > away packets-- keeping only about 1/8 of the packets due to the clock > filter algorithm But ptp is if what you say is correct, much worst, > since broadcast mode is really only good to ms due to those variable > delays. > > > >>There is a real difference available which is the followup message. >>It is possible to have the system record the timestamp of actual >>transmission and send it in a followup in ptp. I did some testing >>with this a few years ago and achieved the same results in timestamp >>transmission with both protocols. Having said that, I presume that >>one REAL benefit for time transfer is that PTP can, and does, run at a > > >>higher sync rate than ntp. It is also synchronizing to a single > > clock. > Greg, > The higher sync rate can be a benefit. It can also be bad because the > Markovian clock discipline means that no use can be made of long time > baselines to get better clock frequency accuracy (one of the great > advantages of chrony in situations where the phase noise dominates). > ntp's handling is a kludge. > > > >>Also, the default ptp app is using multicast "broadcasts" with ttl 1 >>and the client uses a slightly funky "point to point" multicast >>transmission as a ranging request to calculate propagation delay. The > > >>delay is then added to sync to arrive at value for local clock >>comparison. However, I don't think that there is a multi tap filter. > > >>In fact, in the open source ptp, I think the servo is just pretty much > > >>a jam hack. The point was to show the protocol. > > > It looked like it. But both ntp and ptp use simply markovian response > filters. They preserve no memory, which is silly. > > > >>All of this is good dialogue but it is VERY important to note that >>what you test in a small LAN has very little bearing on the >>performance possible in various types of real networks of greater > > scale.. > > Agreed. > But the OP wanted to use it in a small lan. > > >> >>Greg Dowd >>gdowd at symmetricom dot com (antispam format) Symmetricom, Inc. >>www.symmetricom.com >>"Everything should be made as simple as possible, but no simpler" >>Albert Einstein >> >>-----Original Message----- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On >>Behalf Of Bill Unruh >>Sent: Wednesday, April 30, 2008 1:20 PM >>To: questions@lists.ntp.org >>Subject: Re: [ntp:questions] frequency adjusting only >> >>[EMAIL PROTECTED] (maxime louvel) writes: >> >> >>>On Tue, Apr 29, 2008 at 6:27 PM, Unruh <[EMAIL PROTECTED]> >> >>wrote: >> >> >>>>[EMAIL PROTECTED] (maxime louvel) writes: >>>> >>>> >>>>>Hi, >>>> >>>>>I have know run a lot of tests. >>>>>Just to let you know what I've got so far. >>>>>I have tried NTP, and NTP + PTP (Precision Time Protocol). >>>>>I haven't tried Chrony nor TSClock. >>>>>I have used the software only implementation of PTP (ptpd). >>>> >>>>>With NTP only I have got an accuracy around 1ms, >> >>Actually, I have no idea what the difference is between the "software >>implimentation" of PTP and standard NTP is. The advantage of PTP is >>the HARDWARE timestamping of the packets as they come into the >>ethernet card (special purpose ethernet cards with clocks on board) >>and possibly PTP aware switches which race through the PTP packets > > without delay. > >>Software only means >>that PTP uses exactly the same kernel routines, etc. to read the >>computer clock as does ntp I assume. I cannot see how it can be better > > >>unless there are some severe bugs in NTP. >>What version of NTP are you running? >> >> >>_______________________________________________ >>questions mailing list >>questions@lists.ntp.org >>https://lists.ntp.org/mailman/listinfo/questions >> > > _______________________________________________ questions mailing list questions@lists.ntp.org https://lists.ntp.org/mailman/listinfo/questions