Method and equipment for setting explicit congestion notification threshold value of outbound direction queue
By dynamically adjusting the explicit congestion notification threshold of the outgoing queue of the network device, the frequent notification and poor performance optimization caused by improper threshold setting in the prior art are solved, and effective congestion control during high traffic is achieved, ensuring that the network device is efficient forwarding capability.
Patent Information
- Application Number
- CN202411318868.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When setting the explicit congestion notification threshold for outgoing direction queues of network equipment, it is difficult to balance the problem of frequent notifications caused by too low and poor performance optimization caused by too high, especially during high traffic. .
ECN threshold is dynamically adjusted by setting the queue depth of the outgoing queue of each port, allocating the outgoing shared buffer, and calculating the shared space limit value minus the storage space offset, ensuring that the threshold is adjusted in time when the device forwarding capability changes. To avoid premature or late flow control.
It realizes the reasonable setting of explicit congestion notification thresholds based on the device forwarding capabilities, avoids frequent notifications to reduce the transmission rate and poor performance optimization caused by excessive thresholds, and improves the sensitivity and efficiency of congestion control of network devices during high traffic.
Smart Images

Figure CN119211132A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to communication technology, and more particularly to a method and device for setting an explicit congestion notification threshold of an outbound queue. Background Art
[0002] ECN (Explicit Congestion Notification) is a congestion notification technology. The ECN function uses the IP packet header to record the congestion status on the packet transmission path. Network devices that support ECN can adjust the sending method of outbound queue packets through the ECN mark in the packet to avoid aggravating congestion in the network.
[0003] The length of the outbound queue of the port of the network device is less than the minimum queue length, and the network device directly forwards the packets entering the outbound queue. The packets of this port are forwarded from the outbound interface.
[0004] When the queue length of the outbound queue of the port of the network device is greater than the minimum queue length but less than the queue ECN threshold, packets entering the inbound queue of the port with an ECN field of 00 are randomly discarded according to the WRED (Weighted Random Early Detection) policy; packets entering the inbound queue of the port with an ECN field of 01 or 10 are randomly modified to 11 according to the WRED policy; packets entering the inbound queue of the port with an ECN field of 11 are sent from the port pointed to by their destination addresses.
[0005] When the queue length of the outbound queue of a port of a network device is greater than the queue ECN threshold, the packets entering the inbound queue of the port with an ECN field of 00 are discarded; the packets entering the inbound queue of the port with an ECN field of 01 or 10 are randomly modified to 11 according to the WRED policy; the packets entering the inbound queue of the port with an ECN field of 11 are sent from the port pointed to by their destination address. Therefore, setting the ECN threshold for the outbound queue of the port of a network device can alleviate congestion while ensuring network latency and throughput. Summary of the invention
[0006] The present invention provides a method and device for setting an explicit congestion notification threshold of an outbound queue, which reasonably sets the explicit congestion notification threshold according to the forwarding capability of the device.
[0007] To achieve the above-mentioned purpose, the present disclosure provides a method for setting an explicit congestion notification threshold of an outbound queue, the method comprising: setting a queue depth of each outbound queue of each port; setting an outbound shared buffer; allocating an initial shared buffer of the outbound shared buffer to each outbound queue of each port; setting a shared space limit value of each outbound queue of each port equal to the sum of the queue depth of the outbound queue and the initial shared buffer; setting an explicit congestion notification (ECN) threshold of each outbound queue of each port equal to the shared space limit value minus a storage space offset.
[0008] In the above method, a fixed minimum queue depth of each outgoing queue of each port is further set.
[0009] In the above method, the size of the allocatable shared buffer area of each outgoing queue of each port is further dynamically detected; the allocatable shared buffer area of each outgoing queue of each port and the outgoing queue depth are summed to calculate the current shared space limit value; the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset is calculated; when the difference value of any queue is greater than the fixed minimum queue depth, its current ECN threshold is set to the difference value. Or,
[0010] In the above method, the size of the allocatable shared buffer area of each outbound queue of each port is further dynamically detected; the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth are summed to calculate the current shared space limit value; the difference between the current shared space limit value of each outbound queue of each port and the storage space offset is calculated; when the difference of any queue is less than the fixed minimum queue depth, its current ECN threshold is set to the fixed minimum queue depth.
[0011] To achieve the above-mentioned purpose, the present disclosure also provides a device for setting an explicit congestion notification threshold of an outbound queue, the device comprising a processor, a machine-readable storage medium, a memory, a switching chip, and a network interface; the processor performs the following operations by running machine-executable instructions recorded in the machine-readable storage medium: setting the queue depth of each outbound queue of each port; setting an outbound shared buffer; allocating an initial shared buffer of the outbound shared buffer to each outbound queue of each port; setting the shared space limit value of each outbound queue of each port to be equal to the sum of the queue depth of the outbound queue and the initial shared buffer; setting the explicit congestion notification ECN threshold of each outbound queue of each port to be equal to the shared space limit value minus the storage space offset.
[0012] The processor of the above device further sets a fixed minimum queue depth of each outgoing queue of each port through the above machine executable instructions.
[0013] The processor of the above-mentioned device further dynamically detects the size of the allocatable shared buffer area of each outgoing queue of each port through the above-mentioned machine executable instructions; sums the allocatable shared buffer area of each outgoing queue of each port and the outgoing queue depth to calculate the current shared space limit value; calculates the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset; when the difference value of any queue is greater than the fixed minimum queue depth, sets its current ECN threshold to the difference value. Or,
[0014] The processor of the above-mentioned device further dynamically detects the size of the allocatable shared buffer area of each outbound queue of each port through the above-mentioned machine executable instructions; sums the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; calculates the difference between the current shared space limit value of each outbound queue of each port and the storage space offset; when the difference of any queue is less than the fixed minimum queue depth, sets its current ECN threshold to the fixed minimum queue depth.
[0015] In the present disclosure, a machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device for storing or containing information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein may be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard drive), solid-state drive, any type of storage optical disk (such as a CD, DVD, etc.), and similar devices, or a combination thereof. In addition, any machine-readable storage medium described herein may be a non-temporary machine-readable storage medium.
[0016] The beneficial effect of the present disclosure is that the display congestion notification threshold is reasonably set according to the forwarding capacity of the device, which not only avoids the display congestion threshold being too low, resulting in frequent notifications to the sender to reduce the sending rate, but also avoids the congestion threshold being too high and unable to timely feedback the network congestion situation, resulting in poor performance optimization during high traffic periods. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of an embodiment of a method for setting an explicit congestion notification threshold of an outbound queue according to the present disclosure;
[0018] Figure 2 A schematic diagram of the outbound queues and shared area division of multiple ports of a network device;
[0019] Figure 3A-3B A schematic diagram of an embodiment of setting an explicit congestion notification threshold for an outbound queue in the present disclosure;
[0020] Figure 4A schematic diagram of another embodiment of setting an explicit congestion notification threshold for an outbound queue in the present disclosure;
[0021] Figure 5 A schematic diagram of another embodiment of setting an explicit congestion notification threshold for an outbound queue in the present disclosure;
[0022] Figure 6 The present invention is a schematic diagram of an embodiment of a device for setting an explicit congestion notification threshold of an outbound queue according to the present invention. DETAILED DESCRIPTION
[0023] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present disclosure. Known methods, steps, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.
[0024] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.
[0025] Figure 1 FIG. 1 is a schematic diagram of an embodiment of a method for setting an explicit congestion notification threshold of an outbound queue provided by the present disclosure, the method comprising the following processing:
[0026] Process 101, setting the queue depth of each outgoing queue of each port;
[0027] Process 102, setting an outbound shared buffer;
[0028] Process 103, allocating an initial shared buffer of the outbound shared buffer zone to each outbound queue of each port;
[0029] Process 104, setting the shared space limit value of each outbound queue of each port to be equal to the sum of the queue depth of the outbound queue and the initial shared buffer;
[0030] Process 105: Set the explicit congestion notification threshold of each outgoing queue of each port to be equal to the shared space limit value minus the storage space offset.
[0031] The beneficial effect of the present disclosure is that the display congestion notification threshold is reasonably set according to the forwarding capacity of the device, which not only avoids the display congestion threshold being too low, resulting in frequent notifications to the sender to reduce the sending rate, but also avoids the congestion threshold being too high and unable to timely feedback the network congestion situation, resulting in poor performance optimization during high traffic periods.
[0032] Figure 2A schematic diagram of the outbound queues and shared area divisions of multiple ports of a network device.
[0033] Figure 2 In the example, each of the network device ports 1 to 5 has 8 outbound queues, namely queue 0 to queue 7. The queue depth (depth) of each queue set by the network device is L. The network device sets an outbound shared buffer 201 for the outbound queues of ports 1 to 5.
[0034] The shared buffer 201 of port 1 to port 5 and the outgoing queues of each of port 1 to port 5 are sending buffers, which cache the messages to be sent to prevent the messages from being lost due to failure to be sent in time.
[0035] Figure 3A-3B A schematic diagram of an embodiment of setting an explicit congestion notification threshold for an outbound queue in the present disclosure;
[0036] Figure 3A In the outgoing direction, queue 202 is Figure 2 The outbound queue 7 of port 5 is shown in Figure 1.
[0037] The network device allocates a portion of the storage space of the outbound shared buffer 201 to the outbound queue 202 as the initial shared buffer 201 , sets a storage space offset (offset) 203 for the outbound queue 202 , and sets a fixed minimum depth 204 for the outbound queue 202 .
[0038] The network device calculates the shared space limit value 311 for the outgoing queue 202 (ie, the shared space limit value queue share limit of the outgoing queue 202):
[0039] The shared space limit value 311 = the queue depth L of the outgoing queue + the initial shared buffer 201 .
[0040] Figure 3A In FIG. 3 , the network device sets a shared space limit value 311 for the outgoing queue 202 .
[0041] The network device calculates the ECN threshold 312 of the direction queue 202 based on the shared space limit value 311 and the storage space offset 203:
[0042] ECN threshold 312 = shared space limit 311 - storage space offset 203
[0043] Figure 3B In FIG. 3 , the network device sets an ECN threshold 312 for the outgoing queue 202 .
[0044] Figure 3A and 3BThe beneficial effect of the example shown is that, when the forwarding capability of the network device is strong, it avoids marking the ECN flag of the cached messages in the outbound queue too early due to the ECN threshold of the port's outbound queue being too small, thereby increasing the message cache capacity of the outbound queue and avoiding overly sensitive flow control that reduces network utilization.
[0045] Figure 3A and 3B In the example shown, the size of the storage space offset is not limited and is set to a reasonable value to ensure that when the network device has efficient forwarding capabilities, the ECN threshold is not less than the fixed minimum depth of the outbound queue.
[0046] Figure 4 It is a schematic diagram of another embodiment of setting an explicit congestion notification threshold of an outbound queue in the present disclosure.
[0047] The network device dynamically detects the size of the allocatable shared buffer area of each outgoing queue of each port. When the to-be-sent message of any outgoing queue of port 1 to port 5 is buffered in the shared buffer 201, the allocatable shared buffer area of other outgoing queues is reduced. Therefore, as the forwarding capability of the network device decreases, the allocatable shared buffer area of each outgoing queue of each port is also reduced.
[0048] Figure 4 In the process, the network device detects the outgoing queue 202 ( Figure 2 The size of the allocatable shared buffer area of the outgoing queue 7 of port 5) is shown as the allocatable shared buffer area 2012.
[0049] The network device calculates the direction queue 202 and sets the shared space limit value 411:
[0050] Shared space limit value 411 = queue depth L of outgoing queue + allocatable shared buffer area 2012 The network device sets a shared space limit value 411 for the outgoing queue 202 .
[0051] The network device calculates a difference based on the shared space limit value 411 and the storage space offset 203 ; compares the calculated difference with the fixed minimum depth 204 , and determines that the difference is greater than the fixed minimum depth 204 .
[0052] The network device sets the difference as the ECN threshold 412 of the outgoing queue 202:
[0053] ECN threshold 412 = shared space limit 411 - storage space offset 203
[0054] Figure 4The beneficial effect of the embodiment is that the forwarding capacity of the network device decreases, the storage space occupied by the shared buffer area of the outbound queue of each port increases, the allocatable shared buffer area of each outbound queue of each port decreases, the network device dynamically reduces the ECN threshold of each outbound queue, and promptly ECN marks the messages cached in the outbound queue, thereby improving the sensitivity of congestion control. Figure 5 In the process, the network device detects the outgoing queue 202 ( Figure 2 The size of the allocatable shared buffer area of the outgoing queue 7 of port 5) is shown as the allocatable shared buffer area 2013.
[0055] The network device calculates the direction queue 202 and sets the shared space limit value 411:
[0056] Shared space limit value 511 = queue depth L of outgoing queue + allocatable shared buffer area 2012 The network device sets a shared space limit value 511 for the outgoing queue 202 .
[0057] The network device calculates a difference based on the shared space limit value 511 and the storage space offset 203 ; compares the calculated difference with the fixed minimum depth 204 , and determines that the difference is less than the fixed minimum depth 204 .
[0058] The network device sets the fixed minimum depth 204 as the ECN threshold 512 of the outgoing queue 202 .
[0059] Figure 5 The beneficial effect of the embodiment is that when the forwarding capacity of the network device is used, the ECN threshold of each outbound queue is dynamically reduced while preventing the ECN threshold of each outbound queue from being too low, and a large number of messages cached in each outbound queue are ECN marked, resulting in a too low sending rate at the sender and limited network efficiency.
[0060] Figure 6 The present disclosure provides a schematic diagram of an embodiment of a device for setting an explicit congestion notification threshold of an outbound queue, wherein the device 60 includes a processor 61, a machine-readable storage medium 62, a switching chip 63, a network interface 631, etc. The processor 61 performs the following operations by running machine-executable instructions recorded in the machine-readable storage medium 62: setting the queue depth of each outbound queue of each port; setting an outbound shared buffer; allocating an initial shared buffer of the outbound shared buffer to each outbound queue of each port; setting the shared space limit value share limit of each outbound queue of each port to be equal to the sum of the queue depth of the outbound queue and the initial shared buffer; and setting the explicit congestion notification ECN threshold of each outbound queue of each port to be equal to the shared space limit value minus the storage space offset.
[0061] The processor 61 sets a fixed minimum queue depth of each outgoing queue of each port by running the machine executable instructions recorded in the machine readable storage medium 62 .
[0062] The processor 61 dynamically detects the size of the allocatable shared buffer area of each outbound queue of each port by running the machine executable instructions recorded in the machine readable storage medium 62; sums the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; calculates the difference between the current shared space limit value of each outbound queue of each port and the storage space offset; when the difference value of any queue is greater than the fixed minimum queue depth, sets its current ECN threshold value to the difference value.
[0063] The processor 61 further dynamically detects the size of the allocatable shared buffer area of each outbound queue of each port by running the machine executable instructions recorded in the machine readable storage medium 62; sums the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; calculates the difference between the current shared space limit value of each outbound queue of each port and the storage space offset; when the difference of any queue is less than the fixed minimum queue depth, sets its current ECN threshold to the fixed minimum queue depth.
[0064] In another embodiment provided by the present disclosure, a machine-readable storage medium is further provided, wherein the machine-readable storage medium records machine-executable instructions, and when the machine-executable instructions are executed by a processor, the above-mentioned Figure 2-Figure 5 Setting the explicit congestion notification threshold for the outbound queue.
[0065] In the present disclosure, a machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device for storing or containing information (such as executable instructions, data, etc.). For example, any machine-readable storage medium described herein may be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard drive), solid-state drive, any type of storage optical disk (such as a CD, DVD, etc.), and similar devices, or a combination thereof. In addition, any machine-readable storage medium described herein may be a non-temporary machine-readable storage medium.
[0066] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A method for setting an explicit congestion notification threshold of an outbound queue, characterized in that: The method comprises, Set the queue depth of each outgoing queue of each port; Set up an outbound shared buffer; Allocating an initial shared buffer of the outbound shared buffer zone to each outbound queue of each port; Set the share limit value of each outbound queue of each port to be equal to the sum of the queue depth of the outbound queue and the initial shared buffer; The explicit congestion notification (ECN) threshold of each outgoing queue of each port is set equal to the shared space limit value minus the storage space offset.
2. The method according to claim 1, characterized in that The method further comprises, Set a fixed minimum queue depth for each outbound queue of each port.
3. The method according to claim 2, characterized in that The method further comprises, Dynamically detecting the size of the allocatable shared buffer of each outgoing queue of each port; Sum the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; Calculate the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset; When the difference of any queue is greater than the fixed minimum queue depth, its current ECN threshold is set to the difference.
4. The method according to claim 2, characterized in that: The method further comprises, Dynamically detecting the size of the allocatable shared buffer area of each outgoing queue of each port; Sum the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; Calculate the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset; When the difference of any queue is less than the fixed minimum queue depth, the current ECN threshold of the queue is set to the fixed minimum queue depth.
5. A device for setting an explicit congestion notification threshold of an outbound queue, comprising a processor, a machine-readable storage medium, a memory, a switching chip, and a network interface; characterized in that: The processor executes the following operations by running the machine executable instructions recorded in the machine readable storage medium: Set the queue depth of each outgoing queue of each port; Set up an outbound shared buffer; Allocating an initial shared buffer of the outbound shared buffer zone to each outbound queue of each port; Set the shared space limit value share limit of each outbound queue of each port to be equal to the sum of the queue depth of the outbound queue and the initial shared buffer; The explicit congestion notification (ECN) threshold of each outgoing queue of each port is set equal to the shared space limit value minus the storage space offset.
6. The device according to claim 5, characterized in that The processor further performs the following operations through the machine executable instructions: Set a fixed minimum queue depth for each outgoing queue of each port.
7. The device according to claim 6, characterized in that The processor further performs the following operations through the machine executable instructions: Dynamically detecting the size of the allocatable shared buffer area of each outgoing queue of each port; Sum the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; Calculate the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset; When the difference of any queue is greater than the fixed minimum queue depth, its current ECN threshold is set to the difference.
8. The device according to claim 6, characterized in that The processor further performs the following operations through the machine executable instructions: Dynamically detecting the size of the allocatable shared buffer area of each outgoing queue of each port; Sum the allocatable shared buffer area of each outbound queue of each port and the outbound queue depth to calculate the current shared space limit value; Calculate the difference between the current shared space limit value of each outgoing queue of each port and the storage space offset; When the difference of any queue is less than the fixed minimum queue depth, the current ECN threshold of the queue is set to the fixed minimum queue depth.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium records machine-readable instructions, and when the machine-readable instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Cache management method and apparatus in network device
CN106789729A
Micro burst flow oriented congestion sensing and marking method in multi-queue data center environment
CN110061927A
ECN waterline value configuration method and apparatus, and network device
CN113783785A
Adaptive congestion management
US20140064079A1
Cited By
Dynamic ECN threshold adjustment method and system based on queue water level
CN121462501A
Data caching device, data caching method, processor and electronic equipment
CN121918771A
Data caching apparatus, data caching method, processor, electronic device
CN121918771B
