Got it

Congestion avoidance - tail drop and WRED

Latest reply: Jan 17, 2021 20:26:39 1957 1 4 0 0

In the last chapter, we introduced the queues and congestion management. The queues helps buffering the packets when the packet rate exceeds the interface bandwidth or the bandwidth allocated to the queue that buffers packets. The queuing technology is not a good solution if the congestion becomes worse. So that the congestion avoidance is introduced.

Congestion avoidance is a flow control technique used to relieve network overload. By monitoring the usage of network resources for queues or memory buffers, a device automatically drops packets that shows a sign of traffic congestion.

Huawei routers support two drop policies: Tail drop and Weighted Random Early Detection (WRED).

 

Tail drop is a simple way. It drops the newly arrived packets when congestion occures. As every sword has two blades, there is a huge disadvantage if the tail drop is enabled, which is TCP global synchronization.

As known, TCP is a reliable protocol, there is a mechanism called sliding window. When the source detects the massive of packets loss in a short time, it will reduce the window size to ease the congestion. After the network recovers from the congestion, device increase the window size, which casing the congestion again. The behavior cycles contantly. This phenomenon, called TCP global sychronization, servely reducing the network usage.

 

202859vix3ifcl6ikykxnw.png

 

Besides the tail drop, another drop policy called WRED is more reasonable.

 

WRED is a congestion avoidance mechanism used to drop packets before the queue overflows. WRED resolves TCP global synchronization by randomly dropping packets to prevent a burst of TCP retransmission. If a TCP connection reduces the transmission rate when packet loss occurs, other TCP connections still keep a high rate for sending packets. The WRED mechanism improves the bandwidth resource usage.

WRED sets lower and upper thresholds for each queue and defines the following rules:

1. When the length of a queue is lower than the lower threshold, no packet is dropped.

2. When the length of a queue exceeds the upper threshold, all newly arrived packets are tail dropped.

3. When the length of a queue ranges from the lower threshold to the upper threshold, newly arrived packets are randomly dropped, but a maximum drop probability is set. The maximum drop probability refers to the drop probability when the queue length reaches the upper threshold.

 

WRED delivers a random value i to each arrived packet, (0 < i% < 100%), and compares the random value with the drop probability of the current queue. Supposing the drop paobability is x when the queue length is m. If the random value i ranges from 0 to x, the newly arrived packet is dropped; if the random value ranges from x to 100%, the newly arrived packet is not dropped.

 

Some guys might be confuessed, why the lower drop probability packets are droped while higher drop probability packets are not.

202900oov2mmz5v9dr79d7.png

As the picture above shows, when i>x, the pacekt is not droped. The range of T1 will decrease when the x increase, so the probability of the random number i locates in the range of T1 reduced.

In another word, the higher of the drop probability(x), the higher probability of the packets droped.

 

From the picture, we can get other conclusions.

1. The longer of the queue length, the drop probability is higher.

202900rcndjxc20ibwbjdn.png

 

2. The higher drop probability configured, the higher drop probability of the packets.

202900md1ttsf1sdzk1sdf.png

 

In actual applications, the WRED lower threshold is recommended to start from 50% and change with the drop precedence. As shown in Figure 5, a lowest drop probability and highest lower and upper thresholds are recommended for green packets; a medium drop probability and medium lower and upper thresholds are recommended for yellow packets; a highest drop probability and lowest lower and upper thresholds are recommended for red packets. When traffic congestion intensifies, red packets are first dropped due to low lower threshold and high drop probability. As the queue length increases, the device drops green packets at last. If the queue length reaches the upper threshold for red/yellow/green packets, red/yellow/green packets respectively start to be tail dropped.

 

As the picture below shows:

202900k0gcy12pc999y191.png

 

 

 


Congestion avoidance - tail drop and WRED-3746947-1
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.