Printer FriendlyEmail Article Link

Spirent TestCenter: What is the formula to calculate the Latency, Jitter and Server processing time in TWAMP.

Environment/Versions
  • Spirent TestCenter
Answer

Please find the below formula's for calculating Latency, Jitter and Server Processing Time.
 

  • Jitter =  | Latency1 - Latency2 |
  • Latency = [(Client Rx time of reflected packet – Client Tx time of original packet) - (ServerProcessingTime)
    • The Tx timestamp of the original packet (TWAMP_Test_Session-Sender Message) from the client is shown in the decode of Wirehsark as Timestamp: xxxxxxxxx.xxxxx" 
    • or can be found in the Sender timestamp field of the reflected packet (TWAMP_Test_Session-Reflector Message) from the server.
  • ServerProcessingTime = (Server Tx Time of reflected packet) – (Server Rx Time of original packet)
    • These times can be seen in a single TWAMP_Test_Session-Reflector Message sent by the Server.
    • The Tx timestamp of the reflected packet from the server is shown in the decode of Wireshark as "Timestamp: xxxxxxxxx.xxxxx"
    • The Rx timestamp of the reflected packet to the server is shown in the decode of Wireshark as "Receive TimeStamp: xxxxxxxxx.xxxxx" 
  • Round Trip Time (RTT)
    • Not currently presented in the results.
    • This can be calculated with the values given in the results.
    • Latency + ServerProcessingTime = RTT
       
  • Note the following delay types:
    1. Transmission Delay: how long it takes to send out the data, there is formula for it. Td = data length/BW
    2. Propagation Delay: how long it takes for the last bit of the data to get to the other side, there is formula for it as well. Tp = Distance/Velocity
    3. Queuing Delay: how long does the data stays in the Receiver's queue before it gets process.
    4. Processing Delay: how long does the Receiver process the data.
    • for 3 and 4, there is no formula for it, and this is where TWAMP comes into play.
  • When the Twamp Receiver receives the packet, it should take the timestamp using its local clock, and then after it finished processing (right before sending it back to Sender), it should take the timestamp again.
    • These two timestamps are shown as following:
    • When the Sender gets the response, it simply calculate the 'Processing Latency' by Tx - Rx.
    • In the running example (Frame #37), it is 0.88863-0.88861 = 0.00002s = 20us, which is the same order of magnitude calculated by STC.
      • One should not compare the Sender's Tx with Tx, because the clock of Sender and Receiver is not synchronized)
      • The Time Delta gets from Wireshark at least includes one-way Propagation Delay, so it will be greater than the Processing Latency.
  • ​​​​​​​v5.31 support one-way latency measurements.
    • ​​​​​​​This needs both client and server to be sync'd.
    • The reflector packet shows the client received from the server.
      • The client's sent time is the Sender Timestamp (0.88659) can be compared to the server receive time (0.88861)
      • The client to server latency can be determined 0.88861 - 0.88659 = 0.00202a = 2.02ms
      • The server to client latency cannot be seen in any packet but is determined by the Server sent time (0.88863) and the clients internal clock time when it received the packet.
        • It may be possible to look at the wireshark TOD timestamp of the client side captured packet and compare that with the Server Tx timestamp in the reflector packet.

Product : TWAMP