time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Re: [time-nuts] Alternate frequency sources - second opinions

HM
Hal Murray
Sun, Nov 29, 2009 5:24 AM

[From a few days ago.]

bill@iaxs.net said:

IIRC, NTP turns a computer clock into a DO with millisecond accuracy.

Like any DO, the long term accuracy tracks the clock you are locking to.
Short term accuracy depends on the quality of the signal you are tracking and
your OS.

NTP gets it's time from two types of sources.  One is NTP servers out there
on the net.  That "net" can vary from a local lightly loaded ethernet to a
grossly overloaded internet connection.

The accuracy you can get from the out-there servers depends on the quality of
your connection to the internet and their connection as well as the quality
of their clocks.  ntp assumes the round trip time is symmetrical.  That's a
good estimate, but it's clearly wrong when I'm downloading a CD on an
otherwise lightly loaded DSL connection.

The other type of source is some local non-NTP clock such as a GPS receiver.
NTP calls them refclocks (reference clocks).  The accuracy you can get from a
refclock depends upon the quality of the clock, how well your OS can measure
it, and probably things I've forgotten.

Accuracy is stratified, with a number of Stratum 1 sources available.

"Stratum" in NTP is similar to the phone company usage.  It's the number of
hops from a system that gets time from something outside NTP.  There is no
direct translation to accuracy.  In theory each refclock provides an estimate
of how good it is, and that gets passed down the chain.

Mills was working on microsecond accuracy five years ago. Where does
NTP stand now?

With a good PPS source and good OS support, ntpd will claim to get within a
few microseconds.  It's hard to verify that.

If I wanted to test this, I would probably do something like this:

Write a hack ntp-user program that
turned on a printer-port bit,
grabbed the time
sent a packet to a local ntp server (using that time)
waited for a return packet
grabbed the time
turned off the printer-port bit
printed everything out.  Maybe you have to use two printer-port bits, one
before grabbing the time and one after.  Or grab the time twice, just before
and just after flipping the bit.

On the server side, I'd hack the ntp server to turn on a printer-port bit
when a request arrived and turn it off when the response is sent.

Now capture a bunch of printout and scope traces showing both printer-port
bits.  Maybe you need a PPS signal on the scope too.

--
These are my opinions, not necessarily my employer's.  I hate spam.

[From a few days ago.] bill@iaxs.net said: > IIRC, NTP turns a computer clock into a DO with millisecond accuracy. Like any DO, the long term accuracy tracks the clock you are locking to. Short term accuracy depends on the quality of the signal you are tracking and your OS. NTP gets it's time from two types of sources. One is NTP servers out there on the net. That "net" can vary from a local lightly loaded ethernet to a grossly overloaded internet connection. The accuracy you can get from the out-there servers depends on the quality of your connection to the internet and their connection as well as the quality of their clocks. ntp assumes the round trip time is symmetrical. That's a good estimate, but it's clearly wrong when I'm downloading a CD on an otherwise lightly loaded DSL connection. The other type of source is some local non-NTP clock such as a GPS receiver. NTP calls them refclocks (reference clocks). The accuracy you can get from a refclock depends upon the quality of the clock, how well your OS can measure it, and probably things I've forgotten. > Accuracy is stratified, with a number of Stratum 1 sources available. "Stratum" in NTP is similar to the phone company usage. It's the number of hops from a system that gets time from something outside NTP. There is no direct translation to accuracy. In theory each refclock provides an estimate of how good it is, and that gets passed down the chain. > Mills was working on microsecond accuracy five years ago. Where does > NTP stand now? With a good PPS source and good OS support, ntpd will claim to get within a few microseconds. It's hard to verify that. If I wanted to test this, I would probably do something like this: Write a hack ntp-user program that turned on a printer-port bit, grabbed the time sent a packet to a local ntp server (using that time) waited for a return packet grabbed the time turned off the printer-port bit printed everything out. Maybe you have to use two printer-port bits, one before grabbing the time and one after. Or grab the time twice, just before and just after flipping the bit. On the server side, I'd hack the ntp server to turn on a printer-port bit when a request arrived and turn it off when the response is sent. Now capture a bunch of printout and scope traces showing both printer-port bits. Maybe you need a PPS signal on the scope too. -- These are my opinions, not necessarily my employer's. I hate spam.