我预计时间将来自以太网中同一子网上的第0层NTP服务器的准确性如何?
时间:2020-03-06 14:39:24 来源:igfitidea点击:
我有一个依赖gpsd和ntpd的应用程序,可以在Linux机器上准确设置系统时间。
为gpsd提供NMEA + PPS
该应用程序通过网络每秒发送约25MB的数据,我认为系统上的负载会以某种方式导致时间抖动。 (加载的PCI Express总线导致不规则的中断延迟)
我有一台根本没有加载的计算机,可以将其设置为读取GPS并充当已加载计算机的NTP服务器。 (加载的计算机将获得启动1 ???)
我期望从以太网中同一子网的第0层NTP服务器获取时间的准确性如何?
我希望这不是一个太过分的话题,我相信有时其他人会很乐意将答案记录在这里。 ;-)
解决方案
我可以找到的有关NTP准确性的最佳信息,在局域网设置中似乎指向1-2毫秒:
NTP v4 with kernel mods to support it, is capable of much better than 1ms accuracy, possibly as good as 1ns. According to [Dave Mills] article, NTP v3 is accurate to 1-2ms in a LAN and 10s of ms in WAN nets. http://www.cis.udel.edu/~mills/ntp.html Other articles suggest that with an accurate time source, such as a GPS time source, NTP is accurate to 50us, but the links on the Linux kernel support say that accuracy of a few ms are possible. http://www.atomic-clock.galleon.eu.com/support/ntp-time-server-accuracy.html Another article says that it is dependent on the predictability of network delays (i.e. a low jitter network). http://www.postel.org/pipermail/end2end-interest/2003-April/002925.html
在这种情况下,通常认为NTP对于较小的个位数ms很有用。
在运行了几天之后,任何实际时钟中都不应出现太大的抖动,因为ntpd实现了非常长的时间常数过滤堆。
但是,我们并没有真正说出如何测量时间,并且所使用的任何机制都可能与基础同步(如果不超过)一样令人不安。
如果我们确实有繁忙的网络和具有真正深度缓冲的网卡,那么这可能无济于事,因为数据包到达和中断服务之间的抖动会更大。在这方面,以太网交换的幻想性越差,因为对老式集线器进行定时要比交换器更好。