GPS vs NIST which should I trust?


#1

I had an NTP server sync with time1.aliyun.com, which claimed sync with GPS and has about 10~30 ms error with NIST
Meanwhile Apple, Google’ s NTP server only has <1ms error.
But some guys at forum says GPS is better than NIST.
Which time source should I trust?

My test code is here.
https://gist.github.com/mengzhuo/8acbd88b71d0a88c6844a22f0f39093f

And My test result:
offsetToNIST, offset time
time2.aliyun.com,28.655746ms
time3.aliyun.com,26.759582ms
time5.aliyun.com,29.008967ms
time6.aliyun.com,22.483205ms
time1.google.com,302.125µs
time2.google.com,154.277µs
time3.google.com,942.302µs
time1.apple.com,128.849µs
time2.apple.com,150.666µs
time3.apple.com,46.247µs
time4.apple.com,263.644µs
time5.apple.com,196.309µs
time6.apple.com,28.467µs
time3.aliyun.com,25.598556ms
time5.aliyun.com,29.037168ms
time6.aliyun.com,14.518584ms
time1.google.com,0s
time2.google.com,1.146204ms
time2.apple.com,0s
time3.apple.com,0s
time4.apple.com,0s
time6.apple.com,0s
time1.aliyun.com,14.320869ms
time2.aliyun.com,26.738995ms
time3.aliyun.com,26.47347ms
time4.aliyun.com,26.599685ms
time5.aliyun.com,28.720771ms
time1.google.com,66.609µs
time2.google.com,129.603µs
time3.google.com,438.115µs
time1.apple.com,-91.208µs
time2.apple.com,121.155µs
time3.apple.com,-142.25µs
time4.apple.com,61.033µs
time5.apple.com,81.492µs
time6.apple.com,-171.77µs


#2

hi mengzhuo

I can’t answer this question. And I don’t want to answer because it would be definitely wrong in some situations.

But you should take care of some aspects:

  • What is the delay ( RTT ) to the remote server
  • What is the jitter to this server
  • Is this just a snapshot or is this a long term average.

I am running three stratum 1 server ( DCF77, GPS and atomic rubidium based )
As reference I use BEV ( Bundesamt fuer Eich und Vermessungswesen ). This is a government in Austria and official responsible for time. They offer three stratum 1 server. If I do a 10 day average compare between my GPS based server and BEV I see sometimes a positive drift using a calculation with a polynomial of first degree but a negative drift using a calculation with a polynomial of second degree.

So what should I trust in this 10 day period ? But over long time they identical in a certain range.

Kind regards
Hans


#3

If the aliyun time servers are well run, the difference is likely because of an asymmetric network route to and from those servers from your network.

For NTP in general you can only trust (or not) the responses from the server as they arrive on your system. It doesn’t matter much how that server syncs compared to how well it’s managed, the network path between their network and yours, etc.

During the last leap second we saw some “national time reference” servers that didn’t implement it right and were off by a second for a while (oops!).