System for establishing and maintaining a clock reference indicating one-way latency in a data network
09722718 · 2017-08-01
Assignee
Inventors
Cpc classification
H04J3/0667
ELECTRICITY
International classification
H04L7/00
ELECTRICITY
Abstract
A method for indicating one-way latency in a data network, with continuous clock synchronization, between first and second node having clocks that are not synchronized with each other includes a continuous synchronization session and a measurement session. The method repetitively sends predetermined synchronization messages from the first node to the second node and from the second node to the first node, calculates a round trip time for each message at the first node, updates a synchronization point if the calculated round trip time is smaller than a previously calculated round trip time, stores the updated synchronization points of a synchronization window, and calculates a virtual clock from the updated synchronization points of the synchronization window. The measurement session collects multiple measurements of one-way latency between the first and second nodes using the virtual clock, and generates a latency profile by interpolating the multiple measurements.
Claims
1. A method of adapting to clock offsets in a network, the method comprising: establishing a plurality of virtual clocks at a responding node, each of the plurality of virtual clocks associated with one of a plurality of requesting nodes; transmitting a plurality of synchronization requests from the responding node to each of the plurality of requesting nodes; responding to each of the plurality of synchronization requests received by each of the plurality of requesting nodes by transmitting a synchronization response back to the responding node; for each of the plurality of synchronization responses received by the responding node, calculating a plurality of round trip delay measurements at the responding node, utilizing the plurality of round trip delay measurements to produce a plurality of synchronization points for each of the plurality of requesting nodes; and and utilizing the round trip delay to determine a latency profile for each of the plurality of requesting nodes.
2. The method of claim 1 wherein each of the plurality of synchronization points associated with each of the plurality of requesting nodes is produced using the minimum of the plurality of round trip delay measurements between the responding node and the associated one of the plurality of requesting nodes.
3. The method of claim 1 wherein the plurality of synchronization points are periodically updated using an additional plurality of round trip delay measurements.
4. The method of claim 1 wherein the number of the plurality of synchronization requests is predetermined.
5. The method of claim 1 wherein the plurality of synchronization points is produced by calculating a sum of least-squared method.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The invention may best be understood by reference to the following description taken in conjunction with the accompanying drawings.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
DETAILED DESCRIPTION OF ILLUSTRATED EMBODIMENTS
(14) Although the invention will be described in connection with certain preferred embodiments, it will be understood that the invention is not limited to those particular embodiments. On the contrary, the invention is intended to cover all alternatives, modifications, and equivalent arrangements as may be included within the spirit and scope of the invention as defined by the appended claims.
(15) A method for indicating one-way latency in a data network, with continuous clock synchronization between a first node and a second node is disclosed. The method comprises the exchange of clock synchronization information between a pair of network nodes via a synchronization session. This synchronization session sends synchronization messages at regular intervals and is separate from other management, measurement or user traffic. Synchronization messages do not need to use the same path as other traffic between the pair of nodes. The network node is equipped with a network interface card that can communicate using the Internet Protocol (IP). Such a node has a CPU, memory buses, disks, etc, that enable it to operate as a computer. The node runs an operating system, in which the system software can be implemented. This embodiment is implemented as a software module running in an operating system of such a node.
(16)
(17) The nodes 100, 102 communicate with messages over the network 101. There are two kinds of messages: Synchronization messages Measurement messages
(18) Both types of messages may be encapsulated over the IP protocol using the UDP/IP transport protocol or another datagram service. In an embodiment, both types of messages are encoded with the RTP protocol.
(19) Measurement sessions 103 use a synchronized virtual clock 104 by measurement responding node 100 to timestamp the measurement packets received from measurement requesting node 102. The virtual clock 104 between the two nodes needs to be established and maintained by the measurement responding node 100 of a measurement session. A measurement responding node 100 will maintain a separate virtual clock for each measurement requesting node 102.
(20) A synchronization session 106 comprises sending a number of times a predetermined message sequence from the measurement responding node 100 to the measurement requesting node 102 which then sends a response message back to the measurement responding node 100.
(21)
(22) A synchronization message is either a synch request 202 or synch response 203. The synch request 202 is sent by the measurement responding node 100 and received by a measurement requesting node 102. A synch response 203 is sent by a measurement requesting node 102 in response to a synch request 202. The synch response 203 is received by the measurement responding node 100.
(23) The synch request 202 message contains the following fields: a sequence number and a time-stamp T1 204.
(24) The synch response 203 contains the following fields: a sequence number and three timestamps: T1 204, T2 205, and T3 206. The semantics of the message fields are as follows:
(25) Sequence number—The measurement responding node 100 sets the sequence number incrementally (for example: 0, 1, 2, etc). The measurement requesting node 102 copies the sequence number from a synch request 202 to the synch response 203. The sequence number is used by the nodes 100, 102 to detect packet loss, reordering or duplication on the network.
(26) Timestamp T1 204. The time when the synch request 202 was sent by the measurement responding node 100.
(27) Timestamp T2 205. The time when the synch request 202 was received by the measurement requesting node 102.
(28) Timestamp T3 206. The time the synch response 203 was sent by the measurement requesting node 102.
(29) The next step is for the measurement responding node 100 to calculate an offset item 208 according to ((T2−T1)+(T3−T4))/2, where T1 204 is the sending time of the synch request 202 from the measurement responding node 100, T2 205 is the receiving time of the synch request 202 at the measurement requesting node 102, T3 206 is the sending time of the synch response 203 at the measurement requesting node 102, and T4 207 is the receiving time of the synch response 203 at the measurement responding node 100. The time T4 207 is set to the current time of the high accuracy clock 200.
(30)
(31) Once the synchronization window 302 includes a minimum number of synchronization points 301, 304 (experimentation indicates that 4 entries are a good minimum number of entries), the offset for the virtual clock 104 for the measurement responding node 100 can be calculated using the least square method applied to the most recent V synchronization points 301, 304 (where V is typically set to a value between 4 and 12) in the synchronization window 302. Using the least square method yields better results than simply computing an average value. Once an initial value for the offset for the virtual clock 104 of the measurement responding node 100 is calculated, the synchronization session 106 remains active to obtain other values for the offset for the virtual clock 104 and refreshing the offset for the virtual clock 104 using the V most recent values (or less than V if not enough synchronization points 301, 304 have been established to date) to recalculate the offset for the virtual clock 104 using the least square method.
(32) Measurement messages are sent from the measurement requesting node 102 to the measurement responding node 100. The measurement messages contain a sequence field and a timestamp field T1.
(33) The semantic of the message fields are as follows: Sequence number. The measurement requesting node 102 sets the sequence number incrementally (for example: 0, 1, 2, etc). Timestamp T1. The time (from the high accuracy clock 200) when the measurement message was sent by the measurement requesting node 102.
(34) The measurement step comprises calculating the one-way latency in the network 101 between a measurement requesting node 102 and a measurement responding node 100 according to the following relations:
latency=the time at which the measurement responding node 100 received the measurement message−(T1+(the offset for the virtual clock 104 calculated for the measurement responding node 100×calculated skew)).
(35) An overhead amount corresponding to the overhead for making measurements at one of the nodes 100, 102 can be subtracted from the above amount.
(36) It is possible to operate in relation to more nodes than a single one. The present embodiment may be used to operate against a plurality of nodes by maintaining a synchronization window 302 and an associated virtual clock 104 at a measurement responding node 100 for each measurement requesting node 102 via synchronization sessions 106 with each of a plurality of measurement requesting nodes 102.
(37) In
(38) The software module implementing the embodiment may be implemented as a user application in an operating system. It requires a socket API to access the network in order to send and receive packets over the network. In another embodiment, the software module may be implemented as a kernel application.
(39) The method is divided into two steps: On-going Clock Synchronization Measurement: requires that clock synchronization has been achieved between the measurement responding node 100 and the measurement requesting node 102.
(40)
(41) In
(42) Each burst 300 of synch requests 202 (SyncReq) starts by resetting the number of synch request and number of synch response (NSREQ and NSRSP) counters to a default value of zero (0) and setting the round trip time minimum (RTTMIN) value to a high value 600. For the duration of a synchronization burst 300, the sending node will send SyncReq messages 601 and will wait for a SyncRSP reply 602. Each SyncReq message includes a T1 timestamp 204 and the SyncRsp repeats the original T1 timestamp and adds the T2 205 and T3 206 timestamps. The T4 timestamp 207 is set internally for each SyncRsp received back at the sending node.
(43) If a timeout is received, processing goes to 601 (see ahead).
(44) Whenever a valid SyncRsp is received 603, the Round-Trip-Time (RTT) 305 is calculated by subtracting T1 204 from T4 207 and further subtracting the delay to prepare the SyncRsp reply represented by the difference between T3 206 and T2 205. This yields the current RTT 305 value 604.
(45) If this RTT 305 value is smaller than the current RTTMIN value 605, the RTTMIN candidate value for the current synchronization point (SyncPoint) 301 is updated to reflect the current RTT 305.
(46) The Clock Difference (CDIFF) for the candidate SyncPoint 301 is calculated as the sum of the delay in each direction divided by 2. This is represented by the formula: CDIFF=(T2−T1+T3−T4)/2. The absolute value of the virtual clock 104 (CABS) for the candidate SyncPoint 301 is set to the time when the current SyncRsp 203 was received (T4 207). This is represented by the formula CABS=T4.
(47) If the RTT value 305 is not smaller than the current RTTMIN. Processing goes to 606 (see ahead).
(48) The number of sent synchronization requests NSREQ in the current burst 300 is then checked 606. If the value of NSREQ has not yet reached the maximum defined for the SyncBurst, another SyncReq is sent 601.
(49) Otherwise, the desired number of SyncRsp messages has been received 607 and the Virtual Clock 104 can be updated taking into account the most recent SyncPoint 301. The update of the Virtual Clock 104 is discussed in more details below as per
(50) Once a SyncPoint 301 is established, the NSREQ and NSRSP counters and RTTMIN are reset in order to allow for another SyncBurst to take place 608.
(51) The SyncBurst will be delayed for a longer period (in the order of 6 seconds in this embodiment) once a valid Virtual Clock 104 has been established. Otherwise, a more aggressive SyncBurst period (set to 2 seconds in this embodiment) will be used 609.
(52) As per
(53) The size of the SyncWindow is checked 701. If it is not full processing goes to 703 (see ahead).
(54) Otherwise the maximum size of the SyncWindow has been reached 702 and, the oldest SyncPoint shall be removed from the SyncWindow and no longer used when calculating the Virtual Clock 104.
(55) The number of SyncRsp NSRP is checked 703. If none have been received, the new SyncPoint is not valid and the processing goes to 705 (see ahead).
(56) A SyncPoint will be declared valid as long as at least one (1) SyncRsp has been received 703 and the syncWindow is updated 704.
(57) The number of SyncPoints in the SyncWindow SyncWindowSize is checked 705. If it is not at least 4 then the process reverts back to the steps in
(58) Once the SyncWindow includes at least four (4) SyncPoint, the Virtual Clock 104 representing the Virtual Clock can be computed 706. This is covered in more details in
(59) As per
(60) SKEW: this is the variation (sometimes referred to as the jitter) of the clock between the measurement responding node 100 and the measurement requesting node 102
(61) CABS: this is the absolute value or wall clock value of the measurement requesting node 102
(62) CDIFF: difference (or offset) between the clock of the measurement responding node 100 and the clock of the measurement requesting node 102.
(63) The calculation of the virtual clock 104 involves the steps defined in
(64) Step 1 800: in order to obtain the Sum of the Least Square value for the virtual clock 104, a mean CABS value is obtained using each valid SyncPoint in the SyncWindow and a mean CDIFF value is obtained using each valid SyncPoint in the SyncWindow as follows:
CABSmean=SUM(CABS for each valid SyncPoint)/Number of valid SyncPoint
CDIFFmean=SUM(CDIFF for each valid SyncPoint)/Number of valid SyncPoint
(65) Step 2 801: Calculate the sum of differences above and below the slope of the SyncWindow as follows:
(66) For each valid SyncPoint in the SyncWindow,
ABOVE=SUM((CABS−CABSmean)×CDIFF)
BELOW=SUM((CABS−CABSmean)×(CABS−CABSmean)
(67) Using the mean value for CABS and CDIFF and the ABOVE and BELOW values, it is now possible to update the tuples making up the Virtual Clock 104 per these remaining steps.
(68) Step 3 802: the updated SKEW is obtained by dividing the value of ABOVE by the value of BELOW:
SKEW=ABOVE/BELOW
(69) Step 4 803: the new difference between the clocks of the measurement responding node 100 and of the measurement requesting node 102 involved in this Synchronization Session is obtained by subtracting the mean value of the CABS multiplied by the SKEW from the mean CDIFF value calculated in step 1.
CDIFF=CDIFFmean−(SKEW*CABSmean)
(70) Step 5 804: the new wall clock value of the measurement requesting node 102 is set to the mean value of the wall clock value of each valid SyncPoint in the SyncWindow calculated in step 1 above:
CABS=CABSmean
(71) Finally, in step 6 805, the clock difference from the initial reference point for the Synchronization Session (also called time zero) is obtained by adding the product of the new CABS value multiplied by the SKEW to the value of CDIFF obtained in Step 4 803 above.
(72) In summary, the process illustrated by
(73)
(74)
(75) The measurement requesting node 102 sends NM messages (for example 10000) with interval DT between each packet (for example 20s). Each measurement request 901 message will contain SEQ (the sequence number) initially set to 0 1000 and the time T1 903 the measurement request 901 was sent as per the measurement requesting node 102 high accuracy clock 200. The overhead of sending a measurement request 901 Ks is computed initially 1001. This is the difference in time from when the timestamp T1 903 was taken and when the measurement request 901 was actually sent. Ks may be set to 0 if the measurement requesting node 102 lacks the capability to compute this time. The next measurement request 901 is sent after the appropriate period of time and the sequence number SEQ is incremented 1002. The measurement requesting node 102 then checks to see if the sequence number SEQ is less than the number of measurement request 901 NM to be sent 1003. If it is, then it goes back around to 1002. Once the sequence number SEQ and number of messages to be sent NM are the same, all of the measurement requests 901 for a measurement session 103 have been sent and the processing on the measurement requesting node 102 is complete.
(76)
(77)
(78) While particular embodiments and applications of the present invention have been illustrated and described, it is to be understood that the invention is not limited to the precise construction and compositions disclosed herein and that various modifications, changes, and variations may be apparent from the foregoing descriptions without departing from the spirit and scope of the invention as defined in the appended claims.