我期望来自以太网同一子网上的第 0 层 NTP 服务器的时间有多准确?
我有一个依赖 gpsd 和 ntpd 的应用程序来准确设置 Linux 机器上的系统时间。
gpsd 被馈送到 NMEA + PPS
该应用程序通过网络每秒大约 25MB,我认为系统上的负载不知何故导致了时间抖动。 (加载的 PCI Express 总线导致不规则的中断延迟)
我有另一台根本没有加载的机器,我可以设置它来读取 GPS 并充当加载的机器的 NTP 服务器。 (加载的机器将开始启动 1 ???)
我期望来自以太网同一子网上的第 0 层 NTP 服务器的时间有多准确?
我希望这不是太偏离主题,我相信有时其他人会很高兴这里记录了答案。 ;-)
I have an application that depends on gpsd and ntpd to accurately set the system time on a linux machine.
gpsd is fed NMEA + PPS
The application is punping ~25MB per second over the network and I think the loading on the system is causing jitter in the time somehow. (loaded PCI express bus causing irregular interrupt latency)
I have another machine that is not loaded at all that I could setup to read the GPS and act as an NTP server for the loaded machine. (the loaded machine would be getting startum 1 ???)
How accurate can I expect the time to be from a stratum 0 NTP server on the same subnet on Ethernet?
I hope this is not too off topic, I am sure sometime someone else will be happy the answer is documented here. ;-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我可以在 NTP 准确度,在 LAN 设置中似乎指向 1-2 毫秒:
Best info I could find on NTP accuracy, seems to point at 1-2 ms in a LAN setting:
在这种情况下,NTP 通常被认为适用于较小的个位数毫秒。
运行几天后,任何实际时钟都不应该有太大的抖动,因为 ntpd 实现了一堆非常长的时间常数过滤。
但是,您并没有真正说明如何测量时间,并且您使用的任何机制都可能与底层同步一样不稳定(如果不是更多的话)。
如果您确实有一个繁忙的网络和具有真正深度缓冲的网卡,那么这可能没有帮助,因为数据包到达和中断服务之间的抖动会更大。 以太网交换越先进,计时就越差——在这方面,老式集线器比交换机更好。
NTP is usually considered good for small single-digit ms in this sort of situation.
After it has been running for a few days, there shouldn't really be much jitter in any of the the actual clocks, because the ntpd implements a heap of very long time-constant filtering.
However, you don't really say how you're measuring the time, and whatever mechanism you're using might be just as jittery as (if not more than) the underlying synchronisation.
If you do have a busy network and network cards with really deep buffering, then that might not be helping things, as the jitter between packet arrival and interrupt service will be larger. The fancier your Ethernet switching is the worse it is for timing too - old fashioned hubs are better than switches in this regard.
所讨论的 NTP 服务器的层级别与时钟/服务器的准确性无关。 它纯粹意味着你离“参考时钟”的距离。
更重要的是,就 NTP 准确性(当然是时间而言)而言,服务器之间的网络延迟、所使用的服务器类型以及潜在的服务器负载。 根据您使用的 NTP 服务器,它们会记录其时间的准确性。 每个服务器软件都使用各种算法根据网络延迟和服务器负载来计算时间,这取决于这些算法的准确性。
例如,MS NTP 服务器规定它会在 2 秒内准确。 OpenNTPd 已声明他们不会向您提供服务器可能的准确性。 在某些情况下,第 3 层服务器可能比第 2 层服务器更准确,等等。
The stratum level of the NTP server in question has no relation to the accuracy of the clock/server. It purely means the distance away from the "reference clock" you are.
What matters more, in regards to NTP accuracy (in regards to time, of course) is network latency between servers, type of server being used, and potentially server load. Depending on what NTP server you use, they document on how accurate their time will be. Each server software uses various algorithims to compute time based on network latency and server load, and it comes down to the accuracy of those algorithims.
For instance, MS NTP server states that it will be accurate within 2 seconds. OpenNTPd has stated that they won't give you the possible accuracy of the server. There are instances where stratum 3 servers can be more accurate than stratum 2 servers, etc.