Elsevier

Computer Networks

Volume 50, Issue 11, 10 August 2006, Pages 1872-1884
Computer Networks

Low-complexity offline and online clock skew estimation and removal

https://doi.org/10.1016/j.comnet.2005.08.009Get rights and content

Abstract

Packet delay traces are important sources of measurements for analyzing end-to-end performance of computer networks. Due to the lack of tight synchronization between the clocks of end systems, these measurements can be quite inaccurate. Therefore, detection, estimation and removal of clock skew from delay traces is a critical operation to obtain precise measurements of network latencies. In this paper, we propose two new techniques to detect, estimate and remove the clock skew in delay traces. The first technique, named average technique, derives the clock skew estimate by calculating the average of the difference between consecutive packets delay. The second technique, named direct skew removal technique, proceeds by iteratively evaluating a set of possible skew values until the best value is reached.

Compared with existing techniques such as linear programming and Convex_Hull, the average technique reduces the complexity of the skew estimation operation. The direct skew removal is more accurate and allows us to obtain delay after skew removal with the same precision as the original traces. Applied to traces that contain clock resets, the direct skew removal also reduces the time complexity of the operation.

Clock skew is also present in online delay measurements that are used by real-time endpoints such as audio and video terminals, to determine the buffering delay of received packets and to synchronize streams from different sources. The problem is more obvious when communication sessions last for a long time. Contrary to the offline skew removal, little work has been done on the online skew removal problem. In this paper, we propose two simple algorithms to remove the clock skew from online delay measurements. The first algorithm, named sliding window algorithm, tracks the skew by continually evaluating the variation of the minimum measured delay. The second algorithm, named the combined algorithm, is a mixed approach of the sliding window and the Convex_Hull algorithm proposed elsewhere.

Introduction

End-to-end delay traces are frequently used to analyze network performance. Measurement data can be used to optimize the use of network resources, to monitor network availability and to detect traffic anomalies. Traces are obtained either by monitoring packet delay or by active probing. In both cases, the difference between the arrival time, according to the destination clock, and the timestamp added by the source and conveyed by the packet, is considered to be the delay experienced by that packet. If the two clocks are perfectly synchronized, then this measured delay is the true delay between the two hosts. However, two clocks are rarely perfectly synchronized in real systems. In particular, they may run at different speeds. This difference in speed is called the clock skew. The Network Time Protocol (NTP) [1] is widely used in the Internet for clock synchronization and it provides an accuracy of the order of milliseconds. Unfortunately, not all Internet hosts have access to a NTP server, nor are all NTP servers perfectly synchronized. Fig. 1 shows the impact of clock skew on delay measurement.

Online delay measurements are used at voice over IP (VoIP) endpoints to determine the buffering delay needed to compensate for jitter variation of packets propagation. Inaccuracy in those measurements may lead to buffer overflow or underflow and to a high probability of packet loss. Moreover, conferencing systems may use timestamps to determine the set of packets from different sources that are to be mixed together. This operation requires a compensation procedure that maps timestamps from different sources to the same true time before deciding on the set of packets that are to be mixed together. This procedure is mainly needed when very time sensitive traffic such as music is to be mixed.

In this paper, we propose two offline skew estimation and removal techniques and compare their performance to other available techniques. We also propose two online clock skew removal techniques and evaluate their accuracy. Note that we do not address sophisticated research systems, rather we address low performance systems that are usually used for troubleshooting and application performance testing and pc-based systems that are more and more used for Internet real-time communications.

The remainder of the paper is organized as follows. In Section 2, we survey available literature on the subject of clock skew removal from delay traces. In Section 3, we define the terms needed to describe clock behavior and introduce the notation used in the remainder of the paper. In Section 4, we describe the average technique. In Section 5, we describe the direct skew removal technique and its extension for skew removal in presence of clock resets. In Section 6, we introduce the two online skew removal algorithms. In Sections 7 Simulations, 8 Experiment, we present the results of our simulations and experiments. Finally, concluding remarks are provided in Section 9.

Section snippets

Related work

Several papers have studied the offline clock skew problem. In [2], Paxson provides an algorithm using the median line fitting technique. This algorithm has been tested in [3] and gives a poor estimate of the slope of the skew when the data is highly variable. In [3], Moon et al. have discussed the linear regression algorithm and concluded that it does not work well due to the nature of the delay measurements. In the same paper, the authors have proposed another technique for skew estimation.

Terminology and background

In this section we introduce the terminology that we are going to use in the remainder of this paper and we formalize the definition of the clock skew. We define the following parameters:

  • N: number of packets reported in the analyzed trace.

  • Cs: sender clock.

  • Cr: receiver clock.

  • pi: ith packet of the collected data.

  • gis: generation time of the ith packet according to Cs, it is also the timestamp conveyed by the ith packet.

  • gir: generation time of the ith packet according to Cr.

  • ais: arrival time of the

Average technique

Fig. 1 shows a time series plot of measured delay, i.e., the evolution of packet measured-delay di as a function of tis. In this work, we propose to examine, instead of the time series plot, the so-called phase plot [6] of the packets delay. In the phase plot, the evolution of the difference between packet delays di  di−1 is plotted as a function of time tis.

From Eq. (3) we get:di+1-di=di+1r-dir+(α-1)(ti+1s-tis).Let us denote by Tis=ti+1s-tis. We define ri = di  di−1 and rir=dir-di-1r. Eq. (4) can

Direct skew removal technique

The direct skew removal technique that we introduce in this section is different from available techniques (including the average technique) in two aspects: first, it does not estimate the skew value but, instead, it aims at removing its impact directly from the trace. Second, it considers the effect of the clock resolution on the accuracy of delay measures, which allows it to be more accurate than other techniques.

This section is organized as follows: first, we discuss the effect of clock

Online skew estimation and removal

For online skew estimation and removal, we propose two techniques. The first technique is the sliding window technique. The second one is a combined approach between the first one and the online Convex_Hull algorithm.

Simulations

We have collected three two-ways delay traces (Trace 1, Trace 2, and Trace 3) using the public Internet, and used them to test our algorithms and compare their performance to other techniques. Original traces do not contain clock skew as they involved only one clock. We have programmatically added the skew effect to these traces using Eq. (3). To respect the 1 ms precision constraint, we have randomly rounded the skewed values. The rounding procedure ensures that the generated traces are

Experiment

We collected a trace of delay measurements containing apparent skew on 3 March, 2004. UDP packets of constant payload containing a timestamp and a sequence number were sent between two stations in the same city (Montreal, Canada). Packets were sent out at periodic intervals of 1 s. The duration of the trace is 4 h and 30 min. The results of the application of the average technique on this trace are shown in Fig. 13 (di-(α-1)tis is plotted as dir). Those of the direct skew removal technique are

Conclusion

In this paper, we have studied techniques for adjusting the delay measurements to obtain more accurate results and remove the effect of the clock skew. We have presented a framework for understanding the effect of clock resolution on the accuracy of clock skew estimation techniques.

For the offline skew removal problem, we have proposed two techniques. The first one, the average technique, reduces the complexity of available algorithms from O(N) to O(1). The second technique is the direct skew

Hechmi Khlifi has a Bachelor’s degree in Telecom Engineering from Sup’Com Tunisia, a Master in Telecommunications from INRS-EMT and he is currently a Ph.D. candidate at INRS-EMT. His research interests include real-time systems, Voice over IP and telecom service engineering.

References (9)

  • M.J.L. Panagiotis et al.

    Internet time synchronization: the network time protocol

    IEEE Transactions on communications

    (1991)
  • V. Paxson, On calibrating measurements of packet transit times, in: Measurement and Modeling of Computer Systems,...
  • S.B. Moon, P. Skelly, D. Towsley, Estimation and removal of clock skew from network delay measurements, in: INFOCOM,...
  • L. Zhang, Z. Liu, C.H. Xia, Clock synchronization algorithms for network measurements, in: INFOCOM, 2002, pp....
There are more references available in the full text version of this article.

Cited by (17)

  • Evolution of network time synchronization towards nanoseconds accuracy: A survey

    2022, Computer Communications
    Citation Excerpt :

    These are the first and the last minimum OWDs observed in one minute intervals at the beginning and the end of the trace, respectively. The second offline technique from [40] tracks the increasing effect of the clock skew on the OWD in terms of the clock resolution, that is the unit of time measurement. This unit is set to one millisecond, which the authors consider as the clock resolution of common computers.

  • Novel clock synchronization algorithm of parametric difference for parallel and distributed simulations

    2013, Computer Networks
    Citation Excerpt :

    However, NTP-based schemes have too many weaknesses [38–40] to be applied: indefinite network delay heavy weight implementation, high frequency interchanges, and great expedition. As to the clock skew and network delay, scholars have proposed some algorithms [40–42] to estimate and remove them, but these issues have not been radically resolved. The standard IEEE-1588 (PTP) [11] applied by industrial control fields is a typical protocol of the hybrid synchronization scheme, in which a hardware scheme, such as GPS, assists to attain high synchronization accuracy of the order of nanoseconds while software solutions are not implemented because of some particular requirements.

View all citing articles on Scopus

Hechmi Khlifi has a Bachelor’s degree in Telecom Engineering from Sup’Com Tunisia, a Master in Telecommunications from INRS-EMT and he is currently a Ph.D. candidate at INRS-EMT. His research interests include real-time systems, Voice over IP and telecom service engineering.

Jean-Charles Grégoire has a Bachelor’s degree in Electrical Engineering, a Master’s Degree in Mathematics from the University of Waterloo and a Ph.D. in Industrial Engineering from the Swiss Federal Polytechnic School, Lausanne. He has been with INRS-EMT (then Telecommunications) since 1990, and a Professor since 1992. His research revolves around telecommunications systems engineering and his interests include concurrency, networking, protocols, performance and security. He has also made several contributions in the area of Formal Methods and performance analysis tools. In 2002, Prof. Grégoire was on sabbatical leave with Bell Canada where he worked on the performance evaluation of multi-service traffic aggregation equipment. He is currently on leave with the International Institute of Telecommunications, working on new service infrastructures for third Generation Wireless systems. He is the founder of the Annual Spin Workshop and contributes to several conferences and workshops.

View full text