摘要
在网络测量中,时间戳记录数据包接收和发送的时间,是时延、带宽以及抖动等网络参数测量的基础.受缓存延迟、中断响应时间不确定等因素影响,软件时间戳只能达到毫秒级精度;基于GPS(global positioning system)时钟的硬件时间戳可以达到纳秒级精度,但其成本高且安装部署不方便.基于对网络测量系统中时间戳误差来源的详细分析,设计了精确时间戳测量系统,系统利用硬件产生时间戳,消除各种软件延迟影响,通过基于预测的时钟同步算法PCS(prediction-based clock synchronization)同步各测量节点时钟,达到了与GPS相当的精度.基于自行设计的千兆网卡实现了测量系统原型,测试表明各测量节点时间戳误差不超过100ns.
Timestamps are used to record receiving and transmitting time for each packet and are of great importance in measuring network performance metrics such as delay, bandwidth and jitters. Limited by the uncertainty of packet buffering delay and interrupts, software-based timestamps can only achieve milliseconds-precision. Although timestamps based on global positioning system (GPS) can achieve nanoseconds-precision, it is too expensive and inconvenient for large scale use. In this paper, we analyze the root cause of inaccuracy for software-based timestamps. Based on these analyses, we propose a timestamp system which involves programmable network interface card (NIC) and prediction-based clock synchronization (PCS) algorithm. When a packet arrives at the NIC, a hardware timestamp is generated in the NIC which precisely records the accurate time. As the timestamp is inserted by hardware, all the uncertainty introduced by software are eliminated. PCS algorithm is used to synchronize the clock of one NIC with other NICs. With one NIC set to be master, other slave NIC will adjust their clock according to PCS algorithm to synchronize with the master's clock. We implement the prototype system in our gigabit network interface card. The system achieves the same accuracy as GPS does. Test results show that the deviation between two cards is no bigger than 100ns.
出处
《计算机研究与发展》
EI
CSCD
北大核心
2010年第12期2049-2058,共10页
Journal of Computer Research and Development
基金
国家"九七三"重点基础研究发展计划基金项目(2007CB3l0702)
国家自然科学基金项目(60903208
60873242)
中国科学院重大科研装备研制基金项目(YZ200926)
关键词
网络测量
时钟同步
GPS
误差
时间戳
network measurement
clock synchronization
GPS
time deviation
timestamp