高级检索

    网络测量中高精度时间戳研究与实现

    High Precision Timestamps in Network Measurement

    • 摘要: 在网络测量中,时间戳记录数据包接收和发送的时间,是时延、带宽以及抖动等网络参数测量的基础.受缓存延迟、中断响应时间不确定等因素影响,软件时间戳只能达到毫秒级精度;基于GPS(global positioning system)时钟的硬件时间戳可以达到纳秒级精度,但其成本高且安装部署不方便.基于对网络测量系统中时间戳误差来源的详细分析,设计了精确时间戳测量系统,系统利用硬件产生时间戳,消除各种软件延迟影响,通过基于预测的时钟同步算法PCS(prediction-based clock synchronization)同步各测量节点时钟,达到了与GPS相当的精度.基于自行设计的千兆网卡实现了测量系统原型,测试表明各测量节点时间戳误差不超过100ns.

       

      Abstract: 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.

       

    /

    返回文章
    返回