Congestion-aware load balancing method and related devices

By obtaining the packet arrival rate and queue length change of the ingress port of the switch in the data center network, the instantaneous congestion probability is calculated, and the congested links are identified for load balancing. This solves the problem of low reliability of load balancing in the existing technology and improves data transmission efficiency.

CN121173746BActive Publication Date: 2026-03-03湖南工商大学
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511700138.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-03-03
Estimated Expiration
2045-11-19

AI Technical Summary

Technical Problem

Existing load balancing methods in data center networks lead to excessive rerouting, resulting in out-of-order packets and suboptimal load balancing, which impairs transmission performance and reduces reliability.

Method used

By obtaining the packet arrival rate at the destination switch's inbound port, calculating the queue length variation and warning value, and combining this with the instantaneous congestion probability, the congested links that require rerouting are identified, and load balancing is performed.

Benefits of technology

It improves the reliability of load balancing, rationally identifies congested links for rerouting, reduces out-of-order packets and suboptimal load balancing, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173746B_ABST
    Figure CN121173746B_ABST
Patent Text Reader

Abstract

This application relates to the field of data transmission technology, and provides a congestion-aware load balancing method and related equipment. The method includes: obtaining the data packet arrival rate at the ingress port of the destination switch; calculating the queue length variation degree and queue length warning value of the destination switch based on the data packet arrival rate; calculating the instantaneous congestion probability of the destination switch based on the data packet arrival rate and queue length variation degree; and determining the congested links requiring rerouting from all links of the source switch based on the queue length variation degree, queue length warning value, and instantaneous congestion probability, and performing load balancing on the congested links. The method of this application can improve the reliability of load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, and in particular to a congestion-aware load balancing method and related equipment. Background Technology

[0002] With the rapid development of technologies such as cloud computing, big data, and artificial intelligence, the scale and complexity of data centers are constantly increasing. As the core of modern information infrastructure, data centers provide infrastructure services for massive applications, including latency-sensitive services such as web search, instant messaging, and online recommendation systems, as well as computationally intensive services such as high-performance computing and data analysis, undertaking the tasks of storing, processing, and transmitting massive amounts of data. In recent years, to reduce network transmission latency and improve network throughput within data centers, Remote Direct Memory Access (RDMA) technology has been widely deployed in Ethernet data center networks. Compared with traditional network communication methods, RDMA allows computers to directly access the memory of remote computers without operating system intervention, thereby reducing latency and improving bandwidth utilization. With its advantages of low latency and high bandwidth, RDMA networks are becoming an indispensable technology in application scenarios such as high-performance computing, cloud computing, and big data processing.

[0003] Data centers employ a tree-like network topology, with servers typically connected via multi-path transmission networks. Data center load balancing methods reroute data flows from congested paths to uncongested paths, thereby improving data transmission efficiency. However, with the diversification of data center applications and the explosive growth of traffic, application traffic can cause prolonged or brief periods of congestion at switch ports. Existing load balancing methods, by performing rerouting, may lead to excessive rerouting, resulting in more out-of-order packets and suboptimal load balancing, thus impairing transmission performance. Therefore, current load balancing technologies suffer from low reliability. Summary of the Invention

[0004] This application provides a congestion-aware load balancing method and related equipment, which can solve the problem of low reliability in load balancing.

[0005] In a first aspect, this application provides a congestion-aware load balancing method, which includes:

[0006] Obtain the packet arrival rate at the destination switch's inbound port;

[0007] The destination switch's queue length variation rate and queue length warning value are calculated based on the packet arrival rate; the queue length warning value is the queue length that triggers PFC pause.

[0008] The instantaneous congestion probability of the destination switch is calculated based on the packet arrival rate and the degree of change in queue length; the instantaneous congestion probability is the probability that the destination switch will experience instantaneous congestion.

[0009] Based on the queue length variation, queue length warning value, and instantaneous congestion probability, the congested links that need to be rerouted are identified from all links of the source switch, and load balancing is performed on the congested links.

[0010] Optionally, the queue length variation rate and queue length warning value of the destination switch are calculated based on the packet arrival rate, including:

[0011] Calculate the change in queue length at the destination switch based on the data packet arrival rate;

[0012] The average arrival rate is calculated based on the packet arrival rate and the queue length variation, and the queue length warning value is calculated based on the average arrival rate.

[0013] Optionally, the queue length variation of the destination switch can be calculated based on the packet arrival rate, including:

[0014] Through the formula:

[0015] ;

[0016] Calculate the degree of change in queue length ;

[0017] in, Indicates the data packet arrival rate. This indicates the bottleneck link bandwidth.

[0018] Optionally, the average arrival rate can be calculated based on the packet arrival rate and the degree of change in queue length, including:

[0019] Through the formula:

[0020] ;

[0021] Calculate the average arrival rate ;

[0022] in, Indicates the weighting coefficient. Indicates the first The estimated packet arrival rate of each link. ;

[0023] The queue length warning value is calculated based on the average arrival rate, including:

[0024] Through the formula:

[0025] ;

[0026] Calculate the queue length warning value ;

[0027] in, This indicates the PFC pause trigger threshold. Indicates unit delay. This is the queue buffer value.

[0028] Optionally, the instantaneous congestion probability of the destination switch can be calculated based on the packet arrival rate and the degree of change in queue length, including:

[0029] Through the formula:

[0030] ;

[0031] Calculate instantaneous congestion probability ;

[0032] in, This indicates the number of new data streams added per unit of latency. Indicates the total number of data streams. The degree of queue length change when the destination switch inbound port queue length reaches the queue warning value. , The degree of change in queue length of the destination switch's ingress port before a unit delay. , , , All of these are preset weighting coefficients.

[0033] Optionally, based on the queue length variation rate, queue length warning value, and instantaneous congestion probability, the congested links requiring rerouting are identified from all links of the source switch, including:

[0034] The receiving status of the destination switch is determined based on the queue length variation, queue length warning value, and instantaneous congestion probability; the receiving status is either non-congestion, continuous congestion, or instantaneous congestion.

[0035] When the receiving state is a continuous congestion state, calculate the activity level of each link and mark the link with the highest activity level as a congested link that needs to be rerouted.

[0036] When the receiving state is momentarily congested, all links are marked as congested links that require rerouting.

[0037] Optionally, the receiving status of the destination switch can be determined based on the queue length variation rate, the queue length warning value, and the instantaneous congestion probability, including:

[0038] When the current queue length of the destination switch is less than the queue length warning value, the receiving state of the destination switch is non-congested.

[0039] When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change degree is greater than 0, and the instantaneous congestion probability is less than the probability threshold, the receiving state of the destination switch is a continuous congestion state.

[0040] When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change degree is greater than 0, and the instantaneous congestion probability is greater than or equal to the probability threshold, the receiving state of the destination switch is instantaneous congestion state.

[0041] Optionally, calculate the activity level of each link, including:

[0042] Through the formula:

[0043] ;

[0044] Calculate the activity of the link. ;

[0045] in, Indicates the size of the data stream in the link. Indicates the data packet arrival rate. This indicates the bottleneck link bandwidth.

[0046] Optionally, load balancing can be performed on congested links, including:

[0047] Links with queue lengths less than the queue length warning value at the source switch's outgoing port will be used as load balancing links.

[0048] When the destination switch is in a state of continuous congestion, the data packets to be sent on the congested link will be sent to the destination switch through the load-balanced link.

[0049] When the destination switch is in a momentary congestion state, the data packets to be sent on all congested links of the source switch's output port are divided into a transmission data packet set and a paused data packet set according to time sequence, and the transmission data packet set is sent to the destination switch using a load-balanced link. The transmission data packet set includes all data packets to be sent that arrive at the source switch's output port at a time greater than a preset time, and the paused data packet set includes all data packets to be sent that arrive at the source switch's output port at a time less than or equal to a preset time.

[0050] Secondly, this application provides a congestion-aware load balancing device, comprising:

[0051] The acquisition module is used to acquire the data packet arrival rate at the ingress port of the destination switch;

[0052] The first calculation module is used to calculate the queue length change rate and queue length warning value of the destination switch based on the data packet arrival rate; the queue length warning value is the queue length that triggers PFC pause.

[0053] The second calculation module is used to calculate the instantaneous congestion probability of the destination switch based on the data packet arrival rate and the degree of change in queue length; the instantaneous congestion probability is the probability that the destination switch will experience instantaneous congestion.

[0054] The determination module is used to identify congested links that need to be rerouted from all links of the source switch based on the queue length change degree, queue length warning value, and instantaneous congestion probability, and to perform load balancing on the congested links.

[0055] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the congestion-aware load balancing method described above.

[0056] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the congestion-aware load balancing method described above.

[0057] The above-mentioned solution in this application has the following beneficial effects:

[0058] In the embodiments of this application, the data packet arrival rate of the destination switch's ingress port is obtained. Then, the queue length variation and queue length warning value of the destination switch are calculated based on the data packet arrival rate. Next, the instantaneous congestion probability of the destination switch is calculated based on the data packet arrival rate and queue length variation. Finally, based on the queue length variation, queue length warning value, and instantaneous congestion probability, congested links requiring rerouting are identified from all links of the source switch, and load balancing is performed on these congested links. Specifically, identifying congested links based on queue length variation, queue length warning value, and instantaneous congestion probability considers the queue length variation and congestion status of the destination switch, improving the rationality of identifying congested links. Rerouting on reasonable congested links effectively improves the reliability of load balancing.

[0059] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 A flowchart of a congestion-aware load balancing method provided in an embodiment of this application;

[0062] Figure 2 A schematic diagram illustrating the specific process of a congestion-aware load balancing method provided in an embodiment of this application;

[0063] Figure 3 A schematic diagram of the structure of a congestion-aware load balancing device provided in an embodiment of this application;

[0064] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0065] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0066] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0067] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0068] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0069] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0070] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0071] To address the low reliability of existing load balancing methods, this application provides a congestion-aware load balancing method. This method obtains the data packet arrival rate at the ingress port of the destination switch, then calculates the queue length variation and queue length warning value of the destination switch based on the data packet arrival rate. Next, it calculates the instantaneous congestion probability of the destination switch based on the data packet arrival rate and queue length variation. Finally, based on the queue length variation, queue length warning value, and instantaneous congestion probability, it identifies congested links requiring rerouting from all links of the source switch and performs load balancing on these congested links. The method of identifying congested links based on queue length variation, queue length warning value, and instantaneous congestion probability considers both queue length changes and congestion conditions at the destination switch, improving the rationality of identifying congested links and enabling rerouting of reasonable congested links, thus effectively improving the reliability of load balancing.

[0072] The congestion-aware load balancing method provided in this application will be illustrated below.

[0073] like Figure 1 As shown, the congestion-aware load balancing method provided in this application includes the following steps:

[0074] Step 11: Obtain the packet arrival rate of the ingress port of the destination switch.

[0075] The above data packet arrival rate refers to the rate at which the destination switch receives data packets at its ingress port. The data packets are sent by the source switch, which is the switch that transmits data to other devices via a link. The destination switch is the switch that receives the data packets sent by the source switch via the link. The received data packets await further processing, such as forwarding or storage, at the destination switch's ingress port.

[0076] In some embodiments of this application, software or scripts for monitoring data transmission, such as the software Speedometer, can be used to obtain the packet arrival rate for each link.

[0077] Step 12: Calculate the queue length change rate and queue length warning value of the destination switch based on the data packet arrival rate.

[0078] The queue length threshold is the queue length at which Priority-based Flow Control (PFC) is triggered to pause. The queue length variability describes the degree of change in the packet queue length at the destination switch's inbound port.

[0079] In some embodiments of this application, the steps of calculating the queue length variation rate and queue length warning value of the destination switch based on the packet arrival rate include:

[0080] The first step is to calculate the change in queue length of the destination switch based on the data packet arrival rate.

[0081] Specifically, through the formula:

[0082] ;

[0083] Calculate the degree of change in queue length .

[0084] in, Indicates the data packet arrival rate. This indicates the bottleneck link bandwidth.

[0085] The second step is to calculate the average arrival rate based on the packet arrival rate and the queue length variation, and then calculate the queue length warning value based on the average arrival rate.

[0086] Specifically, through the formula:

[0087] ;

[0088] Calculate the average arrival rate .

[0089] in, Indicates the weighting coefficient. Indicates the first The estimated packet arrival rate of each link. .

[0090] Through the formula:

[0091] ;

[0092] Calculate the queue length warning value .

[0093] in, This indicates the PFC pause trigger threshold. This represents the unit delay (i.e., the transmission delay from the source switch to the destination switch). This is the queue buffer value.

[0094] Step 13: Calculate the instantaneous congestion probability of the destination switch based on the packet arrival rate and the degree of change in queue length.

[0095] The above instantaneous congestion probability is the probability that the destination switch will experience instantaneous congestion.

[0096] Specifically, through the formula:

[0097] ;

[0098] Calculate instantaneous congestion probability .

[0099] in, This indicates the number of new data streams added per unit of latency. Indicates the total number of data streams. The degree of queue length change when the destination switch inbound port queue length reaches the queue warning value. , The degree of change in queue length of the destination switch's ingress port before a unit delay. , , , All of these are preset weighting coefficients.

[0100] Step 14: Based on the queue length change rate, queue length warning value, and instantaneous congestion probability, identify the congested links that need to be rerouted from all links of the source switch, and perform load balancing on the congested links.

[0101] In some embodiments of this application, the steps of determining the congested links requiring rerouting from all links of the source switch based on queue length variation, queue length warning value, and instantaneous congestion probability, and then performing load balancing on the congested links, include:

[0102] The first step is to determine the receiving status of the destination switch based on the queue length change rate, the queue length warning value, and the instantaneous congestion probability.

[0103] The receiving status is either non-congested, continuously congested, or momentarily congested.

[0104] Specifically, when the current queue length of the destination switch is less than the queue length warning value, the receiving state of the destination switch is non-congested.

[0105] When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change is greater than 0, and the instantaneous congestion probability is less than the probability threshold, the receiving state of the destination switch is a continuous congestion state.

[0106] When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change degree is greater than 0, and the instantaneous congestion probability is greater than or equal to the probability threshold, the receiving state of the destination switch is instantaneous congestion state.

[0107] For example, in other cases besides those described above, the destination switch is in a non-congested state.

[0108] The second step is to calculate the activity level of each link when the receiving state is a continuous congestion state, and mark the link with the highest activity level as a congested link that needs to be rerouted.

[0109] When the receiving state is momentarily congested, all links are marked as congested links that require rerouting.

[0110] Specifically, through the formula:

[0111] ;

[0112] Calculate the activity of the link. .

[0113] in, Indicates the size of the data stream in the link. Indicates the data packet arrival rate. This indicates the bottleneck link bandwidth.

[0114] The third step is to designate links whose queue length at the source switch's outgoing port is less than the queue length warning value as load balancing links.

[0115] The fourth step is to send the data packets to be sent on the congested link to the destination switch through the load-balanced link when the receiving state of the destination switch is in a state of continuous congestion.

[0116] When the destination switch is in a momentary congestion state, the data packets to be sent on all congested links of the source switch's outgoing port are divided into a set of transmission data packets and a set of paused data packets in chronological order, and the set of transmission data packets is sent to the destination switch using a load-balanced link.

[0117] The aforementioned set of transmitted data packets includes all data packets to be sent that arrive at the source switch's outgoing port at a time greater than a preset time. The set of paused data packets includes all data packets to be sent that arrive at the source switch's outgoing port at a time less than or equal to a preset time. That is, based on the preset time, data packets arriving at the source switch's outgoing port earlier are divided into one set, and data packets arriving at the source switch's outgoing port later are divided into another set.

[0118] It should be noted that when the destination switch's receiving state is non-congested, it means that the destination switch will not experience congestion at present, and load balancing is not required. In the event of momentary congestion, only the transmission data packet set is sent initially. Once the data packet arrival rate at the destination switch's ingress port decreases, the transmission of the paused data packet set is resumed.

[0119] For example, the preset time can be set based on a unit delay, such as the nearest unit delay. Data packets arriving within and the nearest unit delay Data packets arriving from outside are isolated using the virtual queuing function of the destination switch's outgoing port. Only the data packets with the nearest unit delay are transmitted. For data packets arriving within the specified time, transmission is paused for the nearest unit delay. For incoming data packets, the pause time is... , It can be dynamically adjusted based on network conditions.

[0120] The nearest unit delay on a momentarily congested link The transmission time of data packets arriving within the specified time is ,exist After a certain time, the destination switch calculates the arrival rate of the current data stream. If the arrival rate of the current data stream decreases, then transmission resumes with the nearest unit delay. If a data packet arrives from outside, it will trigger a PFC pause and be handled according to the PFC pause handling method.

[0121] In some embodiments of this application, the above method is as follows: Figure 2 As shown, part 'a' represents the rerouting process, including the source switch and the destination switch. After the destination switch sends a congestion notice to the source switch, if the congestion is momentary, it forwards the source switch's inbound port queue to the source switch's outbound port and isolates the queue, suspending the transmission of data packets arriving outside a unit delay 'd', and only transmitting data packets arriving within 'd'. In the destination switch's inbound port queue... This is the queue length warning value. This represents the current queue length; if congestion is persistent, the most active congested traffic will be routed to a new path. The b section illustrates the interaction process between switches: the source switch receives congestion notices, processes packets based on the destination switch's congestion status, the destination switch detects the queue length, calculates the queue length change rate, the queue length threshold triggering PFC pause, and the probability that the congestion type is instantaneous congestion. Based on the queue length and congestion probability, it determines the reception status. The spine layer switch connects the source and destination switches.

[0122] It is worth mentioning that the congested links are determined based on the queue length change rate, queue length warning value, and instantaneous congestion probability. This takes into account the queue length changes and congestion status of the destination switch, which improves the rationality of determining the congested links. Rerouting on reasonable congested links effectively improves the reliability of load balancing.

[0123] Furthermore, the method of this application can perceive differentiated congestion situations, distinguish between continuous congestion and momentary congestion, and when continuous congestion and momentary congestion occur, it can determine whether to reroute based on the current link congestion changes. For continuous congestion that has been present for a long time and severe momentary congestion that may trigger PFC suspension, it can determine that the current link is difficult to alleviate through congestion control, and thus adopt corresponding load balancing strategies to ensure multi-path transmission efficiency and reduce traffic completion time.

[0124] The congestion-aware load balancing device provided in this application is described below by way of example.

[0125] like Figure 3 As shown, this application embodiment provides a congestion-aware load balancing device, the congestion-aware load balancing device 300 including:

[0126] The acquisition module 301 is used to acquire the data packet arrival rate of the ingress port of the destination switch;

[0127] The first calculation module 302 is used to calculate the queue length change rate and queue length warning value of the destination switch based on the data packet arrival rate; the queue length warning value is the queue length that triggers PFC pause.

[0128] The second calculation module 303 is used to calculate the instantaneous congestion probability of the destination switch based on the data packet arrival rate and the degree of change in queue length; the instantaneous congestion probability is the probability that the destination switch will experience instantaneous congestion.

[0129] The determination module 304 is used to determine the congested links that need to be rerouted from all links of the source switch based on the queue length change degree, queue length warning value and instantaneous congestion probability, and to perform load balancing on the congested links.

[0130] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0132] like Figure 4 As shown, an embodiment of this application provides a terminal device, wherein the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 4 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 executes the computer program D102 to implement the steps in any of the above method embodiments.

[0133] Specifically, when the processor D100 executes the computer program D102, it obtains the data packet arrival rate of the destination switch's ingress port, then calculates the queue length variation and queue length warning value of the destination switch based on the data packet arrival rate. Next, it calculates the instantaneous congestion probability of the destination switch based on the data packet arrival rate and queue length variation. Finally, based on the queue length variation, queue length warning value, and instantaneous congestion probability, it identifies the congested links requiring rerouting from all links of the source switch and performs load balancing on these congested links. The method of identifying congested links based on queue length variation, queue length warning value, and instantaneous congestion probability considers the queue length variation and congestion status of the destination switch, improving the rationality of identifying congested links. Rerouting on reasonable congested links effectively improves the reliability of load balancing.

[0134] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0135] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0136] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0137] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a congestion-aware load balancing method apparatus / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.

[0139] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0140] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0141] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A congestion-aware load balancing method, characterized in that, include: Obtain the packet arrival rate at the destination switch's inbound port; The queue length variation and queue length warning value of the destination switch are calculated based on the data packet arrival rate; the queue length warning value is the queue length that triggers PFC pause, and the queue length variation is the difference between the data packet arrival rate and the bottleneck link bandwidth. The instantaneous congestion probability of the destination switch is calculated based on the data packet arrival rate and the queue length variation rate; the instantaneous congestion probability is the probability that the destination switch will experience instantaneous congestion. Based on the queue length variation, the queue length warning value, and the instantaneous congestion probability, the congested links that need to be rerouted are determined from all links of the source switch, and load balancing is performed on the congested links. The step of calculating the instantaneous congestion probability of the destination switch based on the packet arrival rate and the queue length variation includes: Through the formula: Calculate instantaneous congestion probability ; in, This indicates the number of new data streams added per unit of latency. Indicates the total number of data streams. The degree of queue length change when the destination switch inbound port queue length reaches the queue warning value. , The degree of change in queue length of the destination switch's ingress port before a unit delay. , , , All are preset weighting coefficients. Indicates the data packet arrival rate. Average arrival rate; unit delay is the transmission delay from the source switch to the destination switch; The process of determining congested links requiring rerouting from all links of the source switch based on the queue length variation rate, the queue length warning value, and the instantaneous congestion probability includes: The receiving state of the destination switch is determined based on the queue length variation, the queue length warning value, and the instantaneous congestion probability; the receiving state is either a non-congestion state, a continuous congestion state, or an instantaneous congestion state. When the receiving state is a continuous congestion state, the activity level of each link is calculated, and the link with the highest activity level is marked as a congested link that needs to be rerouted; the activity level is the ratio of the data packet arrival rate to the bottleneck link bandwidth, multiplied by the data stream size. When the receiving state is momentarily congested, all links are marked as congested links that require rerouting.

2. The load balancing method according to claim 1, characterized in that, The calculation of the queue length variation and queue length warning value of the destination switch based on the data packet arrival rate includes: The degree of change in queue length of the destination switch is calculated based on the data packet arrival rate; The average arrival rate is calculated based on the packet arrival rate and the queue length variation, and the queue length warning value is calculated based on the average arrival rate. The calculation of the queue length variation of the destination switch based on the packet arrival rate includes: Through the formula: Calculate the degree of change in queue length ; in, Indicates the data packet arrival rate. Indicates the bottleneck link bandwidth; The step of calculating the average arrival rate based on the data packet arrival rate and the queue length variation includes: Through the formula: Calculate the average arrival rate ; in, Indicates the weighting coefficient. Indicates the first The estimated packet arrival rate of each link. ; The calculation of the queue length warning value based on the average arrival rate includes: Through the formula: Calculate the queue length warning value ; in, This indicates the PFC pause trigger threshold. Indicates unit delay. This is the queue buffer value.

3. The load balancing method according to claim 1, characterized in that, Determining the receiving status of the destination switch based on the queue length variation rate, the queue length warning value, and the instantaneous congestion probability includes: When the current queue length of the destination switch is less than the queue length warning value, the receiving state of the destination switch is non-congested. When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change is greater than 0, and the instantaneous congestion probability is less than the probability threshold, the receiving state of the destination switch is a continuous congestion state. When the current queue length of the destination switch is greater than or equal to the queue length warning value, the queue length change degree is greater than 0, and the instantaneous congestion probability is greater than or equal to the probability threshold, the receiving state of the destination switch is instantaneous congestion state; in other cases, the receiving state of the destination switch is non-congestion state.

4. The load balancing method according to claim 1, characterized in that, The load balancing of the congested links includes: Links with queue lengths less than the queue length warning value at the source switch's outgoing port will be used as load balancing links. When the receiving state of the destination switch is in a state of continuous congestion, the data packets to be sent on the congested link are sent to the destination switch through the load balancing link. When the destination switch is in a momentary congestion state, the data packets to be sent on all congested links of the source switch's outgoing port are divided into a transmission data packet set and a paused data packet set according to time sequence, and the transmission data packet set is sent to the destination switch using the load balancing link; the transmission data packet set includes all data packets to be sent that arrive at the source switch's outgoing port at a time greater than a preset time, and the paused data packet set includes all data packets to be sent that arrive at the source switch's outgoing port at a time less than or equal to a preset time.

5. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the congestion-aware load balancing method as described in any one of claims 1 to 4.