How does network latency occur?

How does network latency occur?

Network latency

Network delay refers to the time it takes for an IP packet to be sent from the source host process to the destination host process, measured in milliseconds.

IP packets travel from the source host through multiple relay devices, such as switches and routers, and finally reach the destination. Network latency is composed of the following three factors:

Network delay = transmission delay + processing delay + buffer queue delay

[[275205]]

Transmission delay

This delay is easy to understand. It refers to the delay of light or electrical signals on wired media, or the delay of radio signals in air media. This transmission delay is only related to the speed of light or the transmission speed of electrical signals. Users cannot change this delay. For a selected end-to-end path, this value is constant.

[[275206]]

Processing Delays

Receiving IP packets, querying the forwarding table, hardware or software forwarding, including encapsulation, decapsulation, encoding, and decoding time, the more devices it passes through, the weaker the device throughput (how many Gb of data can be forwarded in one second), and the greater the delay. However, for a selected end-to-end path, this value is also constant.

Buffer queue delay

When there is no network congestion on the end-to-end path, the delay of the buffer queue is almost zero, and the network forwarding performance reaches line speed, as if the two ends are directly connected by a wire.

[[275207]]

However, network congestion often occurs because the host's demand for bandwidth is endless, so congestion is the norm. When the network is congested, the router will buffer the traffic that cannot be forwarded in time in the egress queue, which may use the weighted fair queue WFQ (Weighted FairQueue), or the low latency queue LLQ (Low Latency Queue), or the default first in first out queue FIFO (First In First Out). This queue may cause a delay of several hundred milliseconds or more. This value is variable and can be close to 0 or several seconds, depending on the degree of network congestion.

1. What is Weighted Fair Queuing (WFQ)?

Different types of traffic are placed in different queues, and a weight or percentage is pre-assigned to different queues. The buffered data of each queue is sent in turn in a fair round-robin manner.

2. What is Low Latency Queuing (LLQ)?

According to IP priority, high-priority voice traffic (Precedence = 5) is sent first and can jump the queue for VIP customers.

3. What is a FIFO queue?

Those who arrive first will be sent first, and those who arrive last will be sent last.

Therefore, excessive network delay is mainly caused by excessive buffer queue delay!

Google's latest TCP BBR algorithm actively measures network latency and uses intelligent algorithms to obtain the network's maximum available bandwidth, making the sending rate ≤ the maximum available bandwidth, thereby minimizing the depth of the router's buffer queue and minimizing latency.

In summary, network delay is composed of transmission delay that is not controlled by humans, and processing delay and queue delay that can be controlled by humans. Obviously, if you want to reduce the overall delay of IP packets, you must start with the latter two, that is, how to reduce processing delay and queue delay.

Processing delay is a key indicator to measure whether a device is awesome. Take a router as an example. For a router with nearly one million routing tables, how to match the correct routing entry as quickly as possible involves a lot of black technology. With multi-level query, you only need to query a few hundred or at most a few thousand entries to hit the correct entry. This is a technical element that needs to be implemented during product design.

<<:  Can 5G extend the life of HTC’s desperate VR business?

>>:  Paving the way for 5G commercial use, the three major operators made major frequency adjustments

Recommend

Java Server Model - TCP Connection/Flow Optimization

Usually, our applications do not need to handle t...

6 top data center education and certifications IT professionals need

Nowadays, many IT professionals are committed to ...

RackNerd: $19.99/year KVM-1.8GB/28GB/3TB/Los Angeles Data Center

RackNerd has launched some promotions in Los Ange...

How to unleash the power of the tactile internet through 5G networks

Today, the Internet is everything! It was created...

Nine global manufacturers using 5G

Manufacturers around the world are beginning to a...

Millimeter wave tragedy puts 5G in an awkward position

The United States is increasingly anxious and str...

Verizon expands Ultra Wideband 5G and 5G Home Internet to new cities

Verizon, the US telecom operator, recently announ...

Whether to upgrade WiFi 6 routers depends on the consumer's own situation

Nowadays, remote home office and classes have bec...

What is Mesh Technology? What are the advantages of mesh networking?

Since its birth in the 1960s, network technology ...

Please! Stop asking me these questions about multithreading

[[340332]] This article is reprinted from the WeC...

Global chip makers warn that global chip shortages will last for years

According to industry media reports, some well-kn...