Latency is a synonym for delay. In the telecom space, low latency is associated with a positive user experience (UX), while high latency is associated with poor UX.

In computer networks, latency represents the time it takes for a packet to travel from one specified point to another. Ideally, the latency will be as close to zero as possible. Network latency can be measured by determining the round-trip time (RTT) for a packet to and from its destination. (Network latency vs. RTT)

High network latency significantly increases page load time, interrupts video and audio streams, and renders applications unusable. Depending on the application, even a relatively small increase in latency can ruin the user experience. One of the main reasons for the poor latency is geography. Highly distributed Internet Protocol (IP) networks span great distances, increasing the transfer time that can derail applications. In any situation where the delay between perception and response needs to be extremely low — for example, some actions in autopilot — it makes sense to bring the computer that processes the data as close to the data source as possible, a concept known as edge computing.

The cause of the telecommunications delay

Delays can be caused by a number of reasons, including the following:

  • Transport media. Latency can be affected by the type of media used to transmit data, voice, and video. For example, packets transmitted over a T1 line can be expected to experience lower latency than packets transmitted over a CAT5 cable.
  • Packet size. A large packet takes longer to send a round trip than a small packet.
  • Packet loss and jitter. A high percentage of packets fail to reach their destination or the time required for some packets to travel from one system to another varies too much, which can also cause delays.
  • Signal strength. This can cause delays if the signal is weak and must be enhanced through a repeater.
  • Propagation delay. If each gateway node had to spend time checking and potentially changing the headers in the packet — for example, changing the number of hops in the time to live (TTL) field — the latency would be even higher.
  • Other computers and storage delays. The latency can be even higher if the packet is affected by storage and disk access latency on an intermediate device (such as a switch).

Delayed type

Interrupt latency is the length of time a computer takes to process a signal that tells the host operating system (OS) to stop until it can decide what it should do in response to the event.

Fiber optic delay is the time required for light to travel a specified distance over a fiber optic cable. Depending on the speed of light, a delay of 3.33 microseconds (μs) naturally occurs for each kilometre (km) covered. In practice, however, fiber-optic cables have a latency of about 4.9 microseconds per kilometre — this is because light travels slowly through the cables. Bends or other defects in the cable could make the delay even higher.

Internet latency depends on the distance. The longer a packet travels across a global wide area network (WAN), the higher the latency.

WAN latency can be an important factor in determining Internet latency. Whether a resource is requested from a server on a local area network (LAN), another computer on that network, or somewhere else on the Internet, a WAN busy directing other traffic creates delays.

Audio lag is the delay between creating and hearing a sound. In the case of sound produced in the physical world, this delay is determined by the speed of sound, which varies slightly depending on the medium through which the sound wave travels. Sound travels faster in denser media: it travels faster in solids, slower in liquids, and slowest in air. In audio, the acceptable intermediate delay is about 8 to 12 microseconds. Listeners typically notice a delay of 30 milliseconds (ms). If the operation is executed in a linear workflow, the operation latency can be defined as the total time of the operation. In parallel workflows, latency is determined by the slowest operation performed by a single task worker.

Mechanical delay is the delay from the input to the mechanical system or device to the desired output. This delay is dictated by the limitations of mechanisms based on Newtonian physics (except quantum mechanics).

Computer and operating system latency is the combined latency between input or commands and the desired output. Causes of increased computer latency include insufficient data buffers and data speed mismatches between microprocessors and input/output (I/O) devices.

Delay testing and measurement

Latency testing may vary from application to application. In some applications, measuring delay requires knowledge of special and complex equipment or special computer commands and programs; In other cases, a stopwatch can be used to measure the delay. Network administrators have a number of tools to choose from to do this, including Traceroute, My Traceroute (MTR), and Ping. The Ping command is used to determine if the host the user is trying to access is running. To assess the latency, the network administrator sends an Internet Control Message Protocol (ICMP) echo request to the specified interface on the network and waits for a response. You can also use the traceroute command to gather information about latency. Traceroute visualizes the path of packets through the IP network, recording the latency between each host on the route. MTR mixes elements of Ping and Traceroute to track latency and total transfer time between devices on a path. To assess mechanical delays, high-speed cameras can be used to capture small differences in response time from input to mechanical action.

Reduce the delay

Delays can be reduced by tweaking, tweaking, and upgrading computer hardware, software, and mechanical systems. Within a computer, latency can be eliminated or hidden through techniques such as prefetching (anticipating demand for data entry requests) and multithreading or using parallelism across multiple threads of execution. Other steps to reduce latency and improve performance include uninstalling unnecessary programs, optimizing network and software configurations, and upgrading or overclocking hardware.

Latency and Throughput

Both throughput and latency are commonly used to measure network performance and perfect load times. Latency can be thought of as the time required to perform an action, while throughput can be thought of as the number of actions that can be performed in a unit of time. In other words, latency measures how fast data can be transmitted, while throughput measures how much data can be sent. Bandwidth is another concept that is often associated with latency. Bandwidth describes the maximum capacity of a network/Internet connection. The less bandwidth the network has, the greater the latency. To understand the relationship between bandwidth and latency, think of bandwidth as a pipe, and throughput as how much water the pipe can carry in a given amount of time. The delay becomes the time it takes for the water to reach its destination. The smaller the pipe, the longer it will take the water to reach its destination. Similarly, the larger the pipe, the faster the water will reach its destination. Bandwidth and latency are causal in this way.