Load balancing method, device, system and medium in lossless network of data center
By updating the priority division threshold and port priority in the data center lossless network, the problem that the packet forwarding path may encounter PFC pause is solved, and efficient forwarding of traffic and optimization of average task completion time is achieved.
Patent Information
- Application Number
- CN202211628933.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-12-19
AI Technical Summary
When selecting the forwarding path, the load balancing mechanism in the existing data center lossless network cannot correctly and promptly sense whether the path may have PFC pause, resulting in traffic becoming a stagnant flow, seriously damaging the average task completion time.
By detecting the time difference between the packet arrival time and the current cycle start time, timely update the priority division threshold and the current cycle start time, perform port priority division, determine the target port with the highest priority as the routing forwarding port, and reduce traffic encounters PFC Probability of pause.
Effectively avoid traffic becoming stagnant flow, optimize the average task completion time, and significantly improve the link transmission efficiency of Coflow.
Smart Images

Figure CN116055404B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a load balancing method, device, system and medium in a lossless network of a data center. Background Art
[0002] In the existing load balancing mechanism, the selected forwarding path is suspended by PFC (Priority-based Flow Control) due to sudden congestion, and the data packets on this path will be blocked. It may cause other flows in the coflow to reach the output end, but a certain flow is suspended by PFC and stagnated. The user must wait for the data of this flow before proceeding to the next operation, which seriously damages the average task completion time and causes the problem of stagnant flow.
[0003] Due to the limited memory capacity on the network card, the data center lossless network adopts a simple Go-back-N retransmission mechanism. In this mechanism, the receiving network card discards out-of-order packets and notifies the sender to retransmit all packets sent after the last confirmed received packet, which leads to a serious decrease in throughput and an increase in the average task completion time limit.
[0004] Therefore, how to prevent traffic from becoming stagnant, improve throughput, and effectively reduce task completion time becomes a problem that needs to be solved.
[0005] The above information disclosed in the background section is only for enhancing understanding of the background of the present application and therefore it may contain information that does not form the prior art known to a person of ordinary skill in the art. Summary of the invention
[0006] The present application provides a load balancing method, device, system and medium in a lossless network of a data center, so as to solve the problems existing in the prior art.
[0007] In the first aspect, the present application provides a load balancing method in a lossless network of a data center, which is applied to a switch and includes the following steps: S1. In response to detecting the arrival of a data packet in a lossless network of a data center, obtaining the data packet arrival time, the current priority division threshold and the current cycle start time; S2. Determining whether the time difference between the data packet arrival time and the current cycle start time is greater than or equal to the priority division threshold update period; S3. If the time difference is greater than or equal to the priority division threshold update period, updating the current priority division threshold and updating the data packet arrival time to the new current cycle start time; S4. Performing port priority division according to the updated current priority division threshold, and determining the target port with the highest priority as the routing forwarding port; S5. Forwarding the data packet through the routing forwarding port.
[0008] In some embodiments, the step S1, obtaining a current priority classification threshold and a current cycle start time, includes:
[0009] If the data packet is the first data packet, obtaining a preset priority classification threshold and a start time;
[0010] If the data packet is not the first data packet, the priority classification threshold and the start time used after the previous data packet arrives are obtained.
[0011] In some embodiments, the S3 further includes:
[0012] If the time difference is less than the priority classification threshold update period, the current priority classification threshold and the current period start time are not updated.
[0013] In some embodiments, the S4 includes:
[0014] S41, obtaining a port queue size and a derivative change rate of the port queue size;
[0015] S42, performing port priority division according to the port queue size, the derivative change rate and the updated current priority division threshold to obtain a port priority order;
[0016] S43: According to the port priority order, determine the target port with the highest priority as the routing forwarding port.
[0017] In some embodiments, the derivative change rate is calculated as follows:
[0018]
[0019] in, and They are the queue lengths of the corresponding ports detected twice by the switch within a unit of time, and Δt is a unit time interval.
[0020] In some embodiments, the prioritization threshold The calculation formula is:
[0021]
[0022] in, is the PFC pause threshold, is the length of the buffer queue of port i in time period t, n is the total number of outbound ports on the switch, and t1 and t2 are the time lengths of the update cycle that are greater than or equal to the priority division threshold Q.
[0023] In some embodiments, the S43 further includes: if there are multiple target ports, selecting a port through which traffic passes the least or not at all as a routing forwarding port.
[0024] In a second aspect, the present application provides a load balancing device in a lossless network of a data center, applied to a switch, including:
[0025] A detection module, configured to obtain a packet arrival time, a current priority division threshold, and a current cycle start time in response to detecting a packet arrival in a lossless network of a data center;
[0026] A determination module, used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period;
[0027] An updating module, used for updating the current priority classification threshold and updating the data packet arrival time to a new current cycle start time;
[0028] A priority division module, used for performing port priority division according to the updated current priority division threshold value, and determining the target port with the highest priority;
[0029] A forwarding module is used to forward the data packet through the target port.
[0030] In a third aspect, the present application provides a load balancing system in a lossless network of a data center, comprising:
[0031] A transmitter in a lossless network of a data center, used for sending data packets to a switch in the lossless network of a data center;
[0032] The switch is used to obtain the arrival time of the data packet, the current priority classification threshold and the current cycle start time in response to detecting the arrival of the data packet;
[0033] The switch is further used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period;
[0034] The switch is further used to update the current priority classification threshold and update the data packet arrival time to a new current cycle start time;
[0035] The switch is further used to perform port priority division according to the updated current priority division threshold value and determine the target port with the highest priority;
[0036] The switch is further used to forward the data packet through the target port;
[0037] A receiver in a data center lossless network is used to receive the data packet forwarded by the switch.
[0038] In a fourth aspect, the present application provides a load balancing storage medium in a lossless network of a data center, wherein the computer-readable storage medium stores computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the load balancing method in the lossless network of a data center as described.
[0039] The load balancing method, device, system and medium in the data center lossless network provided by the present application are applied to switches and include the following steps: S1, in response to detecting the arrival of a data packet in the data center lossless network, obtaining the data packet arrival time, the current priority division threshold and the current cycle start time; S2, judging whether the time difference between the data packet arrival time and the current cycle start time is greater than or equal to the priority division threshold update period; S3, if the time difference is greater than or equal to the priority division threshold update period, updating the current priority division threshold and updating the data packet arrival time to the new current cycle start time; S4, performing port priority division according to the updated current priority division threshold, and determining the target port with the highest priority as the routing forwarding port; S5, forwarding the data packet through the routing forwarding port. The present application compares the time difference between the data packet arrival time and the current cycle start time with the priority division threshold update period, promptly confirms and updates the current priority division threshold and the current cycle start time, performs port priority division, determines the target port with the highest priority as the routing forwarding port, and performs routing forwarding on the data packet. The forwarding path selected by the present application can greatly reduce the probability of encountering PFC pause, avoid traffic from becoming stagnant flow, and optimize the average task completion time. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] Figure 1 A flow chart of a load balancing method in a lossless network of a data center provided in an embodiment of the present application;
[0042] Figure 2 A test scenario topology diagram of the load balancing method in a lossless network of a data center provided in an embodiment of the present application;
[0043] Figure 3(a) shows the average flow completion time of coflows of the Map-Reduce Application workload under the test topology;
[0044] Figure 3(b) shows the proportion of stalled flows in the entire transmission process of the Map-Reduce Application workload under the test topology;
[0045] Figure 4(a) shows the average flow completion time of coflows of the Cloud Storage Application workload under the test topology;
[0046] Figure 4(b) shows the proportion of stalled flows in the entire transmission process for the Cloud Storage Application workload under the test topology;
[0047] Figure 5(a) shows the average flow completion time of coflows of the Web Search Application workload under the test topology;
[0048] Figure 5(b) shows the proportion of stalled flows in the entire transmission process for the Web Search Application workload under the test topology;
[0049] Figure 6 A schematic diagram of updating the current priority classification threshold and the current cycle start time involved in the load balancing method in a lossless network of a data center provided in an embodiment of the present application.
[0050] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "an" and "the" used in the embodiments of the present application are also intended to include plural forms, unless the context clearly indicates other meanings.
[0053] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.
[0054] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.
[0055] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0056] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.
[0057] Detailed analysis of background technology issues:
[0058] Modern data center applications such as online data-intensive services and remote direct memory access in aggregated Ethernet networks require low-latency reliable transmission to improve user experience. The communication phase in data-parallel applications usually involves a collection of parallel flows, and a communication phase cannot end until all its flows are completed. Even if only one of the parallel flows is stalled, it will significantly increase the task completion time. In order to prevent switch buffer overflow, the PFC mechanism is widely deployed in Ethernet data center networks. That is, when the inlet queue length reaches the PFC trigger threshold, the PFC pause frame will be sent to the upstream device and suspend the relevant upstream port or queue. When the inlet queue length is reduced to the PFC threshold, the data transmission of the upstream port is restored through the PFC recovery frame.
[0059] The collection of these parallel flows is abstracted as the concept of coflow, and the load balancing mechanism of the existing data center network will have serious stagnant flow problems in the lossless network deployed with PFC. This is because these load balancing mechanisms cannot correctly and timely perceive whether the path may have PFC pause phenomenon when selecting the forwarding path of the data packet. For example, the load balancing mechanism that uses the local queue length as the routing signal cannot perceive the port on the downstream switch that is paused by PFC; the load balancing mechanism that uses the link utilization as the routing signal will mistake the path with low link utilization due to PFC pause as a non-congested path; and some other load balancing mechanisms that use ECN (Explicit Congestion Notification) and RTT (Round Trip Time) as routing signals find it difficult to timely feedback the hop-by-hop PFC pause signal. Therefore, once the forwarding path selected by these load balancing mechanisms is suspended by PFC due to sudden congestion, the data packets on this path will be blocked, which may cause other flows in the coflow to reach the output end, but a certain flow is stagnant due to PFC suspension. The user must wait for the data of this flow before proceeding to the next step, which seriously damages the average task completion time and causes the problem of stagnant flow.
[0060] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0061] Figure 1 A flow chart of a load balancing method in a lossless network of a data center provided in an embodiment of the present application, such as Figure 1 As shown, the present application provides a load balancing method in a lossless network of a data center, which is applied to a switch and includes the following steps:
[0062] S1, in response to detecting the arrival of a data packet in a lossless network of a data center, obtaining a data packet arrival time, a current priority division threshold, and a current cycle start time;
[0063] In some embodiments, the step S1, obtaining a current priority classification threshold and a current cycle start time, includes:
[0064] If the data packet is the first data packet, obtaining a preset priority classification threshold and a start time;
[0065] If the data packet is not the first data packet, the priority classification threshold and the start time used after the previous data packet arrives are obtained.
[0066] Specifically, in the embodiment of the present application, the preset priority division threshold is 158KB, and the preset start time t is 0;
[0067] More specifically, in the embodiment of the present application, the link basic delay d from the source edge switch to the destination edge switch is set to 10 μs, the priority division threshold update period Tth is set to 100 μs, and the PFC trigger threshold is set to 10 μs. Set to 256KB and the number of coflow streams n is set to 0.
[0068] S2, determining whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period;
[0069] Figure 6 A schematic diagram of updating the current priority division threshold and the current cycle start time involved in the load balancing method in the data center lossless network provided in the embodiment of the present application, such as Figure 6 As shown, S3, if the time difference is greater than or equal to the priority division threshold update period, then update the current priority division threshold, and update the data packet arrival time to the new current period start time;
[0070] In some embodiments, the S3 further includes:
[0071] If the time difference is less than the priority classification threshold update period, the current priority classification threshold and the current period start time are not updated.
[0072] Table 1 shows the update status of the current priority classification threshold and the current cycle start time, which is specifically expressed as follows:
[0073]
[0074] S4, performing port priority division according to the updated current priority division threshold, and determining the target port with the highest priority as the routing forwarding port;
[0075] In some embodiments, the S4 includes:
[0076] S41, obtaining a port queue size and a derivative change rate of the port queue size;
[0077] In some embodiments, the derivative change rate is calculated as follows:
[0078]
[0079] in, and They are the queue lengths of the corresponding ports detected twice by the switch within a unit of time, and Δt is a unit time interval.
[0080] S42, performing port priority division according to the port queue size, the derivative change rate and the updated current priority division threshold to obtain a port priority order;
[0081] S43: According to the port priority order, determine the target port with the highest priority as the routing forwarding port.
[0082] In some embodiments, the prioritization threshold The calculation formula is:
[0083]
[0084] in, is the PFC pause threshold, is the length of the buffer queue of port i in time period t, n is the total number of outbound ports on the switch, and t1 and t2 are the time lengths of the update cycle that are greater than or equal to the priority division threshold Q.
[0085] Specifically, in the embodiment of the present application, all ports are divided into four priorities according to the port queue size, the derivative change rate and the priority division threshold, and the division strategy is:
[0086] PathA port: port queue size Less than the switch's priority threshold And the derivative change rate of the port queue size Less than or equal to 0;
[0087] PathB port: port queue size Less than the switch's priority threshold And the derivative change rate of the port queue size Greater than 0;
[0088] PathC port: port queue size Greater than or equal to the switch's priority threshold And the derivative change rate of the port queue size Less than or equal to 0;
[0089] PathD port: port queue size Greater than the switch's priority threshold And the derivative change rate of the port queue size Greater than 0.
[0090] According to the port priority order, the port with the highest priority and reachable to the receiver is added to the candidate port set.
[0091] In some embodiments, the S43 further includes: if there are multiple target ports, selecting a port through which traffic passes the least or not at all as a routing forwarding port.
[0092] Specifically, in an embodiment of the present application, it is determined whether the number of ports in the candidate port set is multiple, that is, more than one port can be used as a forwarding port, and all have the same priority. If the number of ports is multiple, a port with less traffic passing through the coflow where the data packet is located is selected from the candidate port set, and other ports are discarded;
[0093] If the number of ports is one, the only port in the candidate port set is set as the data packet routing forwarding port.
[0094] S5. Forward the data packet through the routing forwarding port.
[0095] Specifically, in the embodiment of the present application, after the routing forwarding port forwards the data packet, the traffic status record of the port for this coflow will be updated and S1 will be executed.
[0096] The present application compares the time difference between the arrival time of the data packet and the start time of the current cycle with the priority division threshold update cycle, timely confirms and updates the current priority division threshold and the start time of the current cycle, performs port priority division, determines the target port with the highest priority as the routing forwarding port, and routes and forwards the data packet; divides the port into four priorities according to the probability of encountering PFC pause through the queue size of the switch output port and its change rate, reduces the probability and risk of traffic encountering PFC pause, and reduces the possibility of traffic becoming stagnant flow; when there is more than one port in the candidate port set of the same priority, selects the parallel flow set to which the traffic belongs and the port with the least traffic in this port set to achieve load balancing within the parallel flow set, greatly reduces the probability of encountering PFC pause, avoids traffic from becoming stagnant flow, and optimizes the average task completion time.
[0097] The following are specific embodiments:
[0098] This application was implemented using the NS-3 network simulation platform and a performance test was performed.
[0099] The experimental setup is as follows: Figure 2 The test scenario topology diagram of the load balancing method in the data center lossless network provided by the embodiment of the present application is as follows: Figure 2 As shown in the figure, a leaf-spine network topology is adopted, where there are 6 leaf switches and 6 spine switches. 6 equal-cost paths are provided between every two leaf switches, and each leaf switch is connected to 12 hosts and 12 spine switches. The network propagation delay of each link is 5 microseconds, and the link bandwidth is 40Gbps. The PFC function is enabled on the switch, and the size of the shared cache is 6MB. DCQCN is used as the default transmission protocol in the experiment. The experiment generates three typical application environment loads, namely Map-Reduce Application, Cloud Storage Application, and Web SearchApplication.
[0100] Map-Reduce Application Experimental Settings: Set up 30 Coflows with the same number of flows. The size of each flow is set to the same 16KB. The flow arrival time follows the Poisson distribution with parameter λ=2.5. The number of flows in each Coflow gradually increases from 5 flows to 30 flows.
[0101] Cloud Storage Application experimental settings: Each Coflows is fixed to contain only 15 flows, and all flows are randomly distributed among senders. The flow arrival time follows the Poisson distribution with parameter λ=2.5. The flow size distribution follows the Pareto distribution with the size limit between 10KB and 2MB. The number of coflows increases from 5 to 30.
[0102] Web Search Application Experimental Settings: Set 30 concurrent Coflows, the flow size is set to 2MB / n, where n is the number of flows in each coflow, all flow arrival times are randomly distributed, and the flows are also randomly distributed between senders. The number of flows n in each coflow gradually increases from 5 to 30.
[0103] The present application is tested respectively with two existing load balancing mechanisms (Hermes and CONGA) and a coflow scheduling mechanism Varys, and the test results are compared with the performance of the two separate load balancing mechanisms.
[0104] Figure 3(a) shows the average flow completion time of coflows of the Map-Reduce Application workload under the test topology, and Figure 3(b) shows the proportion of stalled flows in the entire transmission process of the Map-Reduce Application workload under the test topology. As shown in Figures 3(a) and 3(b), this application names it CLB. In the Map-Redcuce application scenario, compared with CONGA, Hermes, and Varys, the average completion time of coflows can be reduced by 39%, 30.2%, and 15.6% at different load levels, and the proportion of stalled flows can be reduced by 34.4%, 25.3%, and 14.3% at different load levels.
[0105] Figure 4(a) shows the average flow completion time of coflows of the Cloud Storage Application workload under the test topology, and Figure 4(b) shows the proportion of stalled flows in the entire transmission process of the Cloud Storage Application workload under the test topology. As shown in Figures 4(a) and 4(b), this application is named CLB. In the Cloud Storage Application application scenario, compared with CONGA, Hermes, and Varys, the average completion time of coflows can be reduced by 47.7%, 34.1%, and 23.6% at different load levels, and the proportion of stalled flows can be reduced by 42%, 29.4%, and 20.3% at different load levels.
[0106] Figure 5(a) shows the average flow completion time of coflows of the Web Search Application workload under the test topology, and Figure 5(b) shows the proportion of stalled flows in the entire transmission process of the Web Search Application workload under the test topology. As shown in Figures 5(a) and 5(b), this application is named CLB. In the Web Search Application application scenario, compared with CONGA, Hermes, and Varys, the average completion time of coflows can be reduced by 46.2%, 33.1%, and 19.1% at different load levels, and the proportion of stalled flows can be reduced by 41.5%, 31.5%, and 17.2% at different load levels.
[0107] Judging from the results, CLB can significantly improve the link transmission efficiency of Coflow compared to Hermes, CONGA, and Varys in three typical application scenarios. It can effectively avoid the situation where traffic encounters PFC pauses on the link and becomes stagnant flow, thereby reducing the average flow completion time of coflows. It has excellent performance in lossless data center networks with PFC mechanisms. The key reason is that CONGA makes load balancing decisions based on link utilization. However, a link encountering a PFC pause will also lead to low link utilization, thereby misleading CONGA to make incorrect load balancing decisions, causing more traffic to become stagnant flows and the worst performance. Hermes uses ECN and RTT information to make load balancing decisions, and it is difficult to timely feedback the hop-by-hop PFC pause signal, which inevitably leads to the generation of stagnant flows. Although Varys makes traffic scheduling decisions based on Coflow and has better performance than Hermes and Conga, it does not consider the possibility that the link may encounter a PFC pause, nor can it prevent the traffic from becoming a stagnant flow. CLB has a strong sense of the possibility that the link may encounter a PFC pause, and has extremely strong dynamic adjustment performance. At the same time, it considers the traffic characteristics of Coflows to further realize load balancing within the coflow traffic. Even if a link encounters a PFC pause, it may avoid the phenomenon that most of the traffic becomes a stagnant flow at the same time, significantly improving the transmission efficiency of Coflows in lossless data center networks.
[0108] The present application also provides a load balancing device in a lossless network of a data center, which is applied to a switch, including:
[0109] A detection module, configured to obtain a packet arrival time, a current priority division threshold, and a current cycle start time in response to detecting a packet arrival in a lossless network of a data center;
[0110] A determination module, used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period;
[0111] An updating module, used for updating the current priority classification threshold and updating the data packet arrival time to a new current cycle start time;
[0112] A priority division module, used for performing port priority division according to the updated current priority division threshold value, and determining the target port with the highest priority;
[0113] A forwarding module is used to forward the data packet through the target port.
[0114] The present application also provides a load balancing system in a lossless network of a data center, comprising:
[0115] A transmitter in a lossless network of a data center, used for sending data packets to a switch in the lossless network of a data center;
[0116] The switch is used to obtain the arrival time of the data packet, the current priority classification threshold and the current cycle start time in response to detecting the arrival of the data packet;
[0117] The switch is further used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period;
[0118] The switch is further used to update the current priority classification threshold and update the data packet arrival time to a new current cycle start time;
[0119] The switch is further used to perform port priority division according to the updated current priority division threshold value and determine the target port with the highest priority;
[0120] The switch is further used to forward the data packet through the target port;
[0121] A receiver in a data center lossless network is used to receive the data packet forwarded by the switch.
[0122] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the load balancing method in the lossless network of the data center.
[0123] It should be understood that, although the various steps in the flowcharts in the above-described embodiments are sequentially displayed according to the indications of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and they can be executed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily to be carried out sequentially, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0125] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0126] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A load balancing method in a lossless network of a data center, characterized in that: Applied to switches, including the following steps: S1, in response to detecting the arrival of a data packet in a lossless network of a data center, obtaining a data packet arrival time, a current priority division threshold, and a current cycle start time; S2, determining whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period; S3, if the time difference is greater than or equal to the priority division threshold update period, then update the current priority division threshold, and update the packet arrival time to the new current cycle start time; the priority division threshold Q thr The calculation formula is: Among them, Q PFC is the PFC pause threshold, Q i (t) is the length of the buffer queue of port i in time period t, n is the total number of outbound ports on the switch, t1 and t2 are the time lengths of the update cycle that is greater than or equal to the priority division threshold Q; S4, performing port priority division according to the updated current priority division threshold, and determining the target port with the highest priority as the routing forwarding port; S4, including: S41, obtaining a port queue size and a derivative change rate of the port queue size; S42, performing port priority division according to the port queue size, the derivative change rate and the updated current priority division threshold to obtain a port priority order; S43, according to the port priority order, determining the target port with the highest priority as the routing forwarding port; S5. Forward the data packet through the routing forwarding port.
2. The load balancing method according to claim 1, characterized in that: The step S1, obtaining the current priority classification threshold and the current cycle start time, includes: If the data packet is the first data packet, obtaining a preset priority classification threshold and a start time; If the data packet is not the first data packet, the priority classification threshold and the start time used after the previous data packet arrives are obtained.
3. The load balancing method according to claim 1 or 2, characterized in that: The S3 further includes: If the time difference is less than the priority classification threshold update period, the current priority classification threshold and the current period start time are not updated.
4. The load balancing method according to claim 1, characterized in that: The calculation formula of the derivative change rate is: Among them, Qa and Qb are the queue lengths of the corresponding ports detected twice by the switch within a unit time interval, and Δt is a unit time interval.
5. The load balancing method according to claim 1, characterized in that: The S43 further includes: if there are multiple target ports, selecting a port through which traffic passes the least or not at all as a routing forwarding port.
6. A load balancing device in a lossless network of a data center, characterized in that: Applicable to switches, including: A detection module, configured to obtain a packet arrival time, a current priority division threshold, and a current cycle start time in response to detecting the arrival of a packet in a lossless network of a data center; A determination module, used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period; An updating module is used to update the current priority classification threshold and update the arrival time of the data packet to the new current cycle start time; the priority classification threshold Q thr The calculation formula is: Among them, Q PFC is the PFC pause threshold, Q i (t) is the length of the buffer queue of port i in time period t, n is the total number of outbound ports on the switch, t1 and t2 are the time lengths of the update cycle that is greater than or equal to the priority division threshold Q; The priority division module is used to divide the port priorities according to the updated current priority division threshold value and determine the target port with the highest priority; specifically comprising: obtaining the port queue size and the derivative change rate of the port queue size; dividing the port priorities according to the port queue size, the derivative change rate and the updated current priority division threshold value to obtain the port priority order; according to the port priority order, determining the target port with the highest priority as the routing forwarding port; A forwarding module is used to forward the data packet through the target port.
7. A load balancing system in a lossless network of a data center, characterized in that: include: A transmitter in a lossless network of a data center, used for sending data packets to a switch in the lossless network of a data center; The switch is used to obtain the arrival time of the data packet, the current priority classification threshold and the current cycle start time in response to detecting the arrival of the data packet; The switch is further used to determine whether the time difference between the arrival time of the data packet and the start time of the current cycle is greater than or equal to the priority division threshold update period; The switch is also used to update the current priority classification threshold and update the data packet arrival time to the new current cycle start time; the priority classification threshold Q thr The calculation formula is: Among them, Q PFC is the PFC pause threshold, Q i (t) is the length of the buffer queue of port i in time period t, n is the total number of outbound ports on the switch, t1 and t2 are the time lengths of the update cycle that is greater than or equal to the priority division threshold Q; The switch is further used to perform port priority division according to the updated current priority division threshold value, and determine the target port with the highest priority; specifically comprising: obtaining the port queue size and the derivative change rate of the port queue size; performing port priority division according to the port queue size, the derivative change rate and the updated current priority division threshold value to obtain a port priority order; and determining the target port with the highest priority as the routing forwarding port according to the port priority order; The switch is further used to forward the data packet through the target port; A receiver in a data center lossless network is used to receive the data packet forwarded by the switch.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the load balancing method in a lossless network of a data center as described in any one of claims 1-5.
Citation Information
Patent Citations
Predication-based switch PFC control method and control system
CN107948103A
Message processing method and device
CN111108728A