Network latency refers to the time it takes for a data packet to travel from one point in a network to another. It's also important to consider round-trip time (RTT), which is the time it takes for data to travel from one point in a network to another and back again. RTT is a significant measurement because it directly impacts the user experience regardless of bandwidth.
Latency and TCP data
TCP data is used for business critical applications, cloud services, web pages, and other purposes. The performance of TCP data depends on the RTT for both upstream and downstream data transmission. If delay occurs in either direction then it can affect the user experience. If the delay gets too long the user connections will disconnect, resulting in the worst possible user experience.
TCP data is loss intolerant, which means if a packet is lost in transmission it needs to be recovered. All the data that follows a missing packet cannot be processed, and the recovery process dramatically increases the RTT, including late packets. Visualware NCS devices can detect data quality issues such as retransmissions, duplicates, and losses (bytes and packets).
A statement we hear frequently is: "I have a 1 Gbps connection, that's all that matters!"
In reality, latency matters more. The maximum route throughput, the amount of data that can be transmitted over a network connection in a given amount of time, is determined by the latency. For example, the maximum route throughput for a 15 ms round-trip is 34.95Mbps. Why is this?
The TCP receive window size is the amount of receive data (524,280 bits) that can be buffered during a connection. The sending computer can send only that amount of data before it must wait for an acknowledgment and window update from the receiving computer. The Windows OS is designed to self-tune and uses larger default window sizes when possible.
Divide the round-trip time into the window size (524,280 / 15) to get the maximum throughput achievable for one window of data, which in this case is 34.95Mbps.
As the Windows OS self-tunes, the window size may be increased, but don't know by how much.
It's important to note, sending more data doesn't necessarily help. It leaves less bandwidth for other services or applications trying to use the connection at the same time.
Having one window of data performing at 100% efficiency and quality of service is preferable over many windows performing inadequately.
Latency and UDP data (VoIP, Video streaming)
In the case of real-time voice data transmitted over UDP, the RTT can have a significant impact on the quality of the voice data transmission.
UDP is a low-latency protocol that does not provide error checking or retransmission of lost packets, unlike TCP. This means that if a packet is lost during transmission, there is no mechanism for the receiver to request that the sender resend the packet. As a result, lost packets can have a significant impact on the quality of the voice transmission.
The RTT can affect UDP voice data transmission in several ways:
- Increased jitter: Jitter is the variation in the delay between packets. A higher RTT can increase jitter, which can cause voice data packets to arrive at irregular intervals, resulting in choppy or distorted audio.
- Increased packet loss: A higher RTT can increase the likelihood of packet loss, which can cause gaps in the audio or other audio quality issues.
- Increased latency: A higher RTT can increase latency, or the delay between when a voice packet is sent and when it is received. This can result in delays in the audio, making it difficult for users to have a natural conversation.
To minimize the impact of RTT on UDP voice data transmission, it is important to have a low-latency network connection with a stable and consistent RTT. Other techniques, such as using jitter buffers, can help mitigate the effects of jitter and packet loss on voice data transmission. Additionally, using compression techniques, such as silence suppression, can reduce the amount of data that needs to be transmitted, which can help minimize the impact of RTT on UDP voice data transmission.
RTT Consistency
Another important factor regarding latency is the consistency of the trip-time (RTT). It's important for several reasons.
- Network Performance: In order to maintain a reliable and responsive network, it is essential to ensure that RTT is consistent. Consistent RTT helps to avoid delays and disruptions, which can affect the overall network performance.
- Quality of Service (QoS): In a QoS environment, the consistency of RTT is critical for ensuring that traffic is prioritized correctly. If RTT is inconsistent, packets may not be delivered in the correct order, causing data loss or delay, which can degrade the user experience.
- Application Performance: Consistent RTT is important for many internet applications, particularly those that rely on real-time communication, such as video conferencing and online gaming. These applications require low-latency connections to ensure that users can interact smoothly and effectively.
- Network Troubleshooting: When network issues arise, consistent RTT can help network administrators pinpoint the cause of the problem more quickly. If RTT is inconsistent, it may be more difficult to determine where the issue is occurring and what needs to be done to fix it.
Improving RTT
Here are some ways to improve RTT.
- Reduce network congestion: Network congestion can increase RTT by causing delays in the transmission of data. To reduce congestion, you can limit the number of devices that are connected to the network or use traffic shaping and quality of service (QoS) techniques to prioritize important traffic.
- Use a more direct route: The more hops data has to make to travel between devices, the longer the RTT will be. By using a more direct route between devices, such as by connecting them through a dedicated point-to-point connection, you can reduce the number of hops and improve the RTT.
- Use a content delivery network (CDN): A CDN is a network of servers located in different geographic locations that can help improve the delivery of content by caching and delivering it from a server that is geographically closer to the user. This can reduce the distance that data needs to travel and improve the RTT.
- Optimize network protocols: Some network protocols, such as TCP, can add overhead that can increase RTT. Optimizing network protocols or using alternative protocols that are designed for low-latency connections, such as UDP, can help improve the RTT.
