Data Center Traffic Control Method, System and Storage Medium Based on Linear Programming
By using the output queue length to trigger the congestion mitigation process in the data center switch, a linear planning model is built to optimize the input port pause time, which solves the problems of slow response and excessive granularity of traditional flow control mechanisms, and improves the transmission performance of the data center.
Patent Information
- Application Number
- CN202510505850.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-22
AI Technical Summary
Traditional flow control mechanisms respond slowly in data centers and are difficult to determine the optimal threshold, resulting in reduced congestion-independent flow performance, excessive control granularity, and affecting service performance.
By sorting statistical packets in the switch, using the output queue length to trigger the congestion mitigation process, a linear planning model aimed at minimizing throughput loss during input port pause is built, and the optimal pause time for each input port is obtained, and the pause frame is sent.
It achieves faster congestion response speed, reduces the loss of irrelevant flow, avoids the granularity problem of traditional flow control mechanisms, simplifies threshold setting, and reduces buffer requirements.
Smart Images

Figure CN120075141B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and particularly to a data center traffic control method, system, and storage medium based on linear programming. Background Art
[0002] With the rapid development of emerging applications such as big data and artificial intelligence, the traffic between machines in data centers has shown a trend of rapid increase. Data centers generally use remote direct memory access (RDMA) technology to achieve high-throughput and low-overhead message transmission between machines. The RDMA technology requires a lossless network with zero packet loss to ensure high performance. For this reason, data centers widely adopt a flow control mechanism to ensure lossless transmission of the network. The flow control mechanism plays a role at the link level and can quickly respond to congestion. However, the traditional flow control mechanism pauses all traffic of a certain priority on the link each time, and the control granularity is relatively coarse. While alleviating congestion, it will also have an adverse impact on other congestion-unrelated flows, thereby damaging service performance.
[0003] The traditional flow control mechanism uses the length of the switch input queue as an indicator for sending pause frames. This scheme is simple, intuitive, and easy to implement. However, when congestion occurs, the length of the output queue corresponding to the congested port will first rise to a high level, and then it will be reflected in the growth of the corresponding input port and input queue length. Therefore, the length of the input queue cannot directly represent the congestion occurring at the output port. The traditional flow control mechanism using this as an indicator for sending pause frames has problems such as slow response to congestion and difficulty in determining the optimal threshold.
[0004] Using the output queue length as an indicator for sending pause frames and inversely inferring the input ports that need to be paused according to the congestion degree of the output queue can not only solve the above problems, but also realize the overall arrangement of the pause time for each input port, thereby minimizing the loss of congestion-unrelated flows, and further alleviating the problem of performance degradation of congestion-unrelated flows caused by the too coarse granularity of the traditional flow control mechanism. However, if the output queue length is used as an indicator to pause, an additional algorithm is required to determine the input ports that need to be paused and the corresponding pause time. Summary of the Invention
[0005] To solve the above technical problems, the present invention provides a data center traffic control method, system, and storage medium based on linear programming. The present invention improves the transmission performance of the data center under high load by minimizing the throughput loss caused by the flow control mechanism as much as possible.
[0006] To solve the above technical problems, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a data center traffic control method based on linear programming, comprising the following steps:
[0008] Classify and count the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculate the length of each queue;
[0009] For any queue priority, aggregate the queue lengths with the same output port to obtain the queue lengths of each output port of the queue length When exceeds the set threshold, trigger the congestion mitigation process;
[0010] Congestion mitigation process: Construct a linear programming model with the goal of minimizing the throughput loss during the pause of the input port. The constraint conditions include: the amount of data received by the queues of each output port within a single control cycle is less than the amount of data sent by the output port, and the pause time of each input port is non-negative and does not exceed the control cycle;
[0011] Solve the linear programming model to obtain the optimal pause time of each input port, and send a pause frame carrying the pause time to the corresponding input port.
[0012] In one embodiment, the aggregating the queue lengths with the same output port to obtain the queue lengths of each output port of the queue length , specifically including:
[0013] ;
[0014] represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0015] In one embodiment, the constructing a linear programming model with the goal of minimizing the throughput loss during the pause of the input port specifically includes:
[0016] Use the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause: to represent the pause time of the input port
[0017] ;
[0018] represents the pause time of the input port , represents the total output rate of all data packets input from the input port and output from the output port , Indicates the output port The corresponding queue length;
[0019] Superimpose the throughput losses of all possible input ports, and at the same time change the summation order to obtain the objective function of the linear programming model :
[0020] ;
[0021] Indicates the control period, Indicates the output port that triggers the congestion mitigation process.
[0022] In one embodiment, to meet the requirement of real-time solution, the linear programming model is simplified according to the different value characteristics of the queue length between the congested port and the non-congested port to obtain the final objective function:
[0023] ;
[0024] Wherein, Indicates the output port where the queue length is less than the set congestion threshold, Indicates the input port The pause time of, Indicates from the input port Input and from the output port The total output rate of all data packets output.
[0025] In one embodiment, the sending of the pause frame carrying the pause time to the corresponding input port specifically includes:
[0026] The quanta value specified in the pause frame is obtained by multiplying the solution result of the linear programming model by the total input rate of all data packets of the current input port and performing conversion.
[0027] In a second aspect, the present invention provides a data center traffic control system based on linear programming, including:
[0028] Statistics module: Classify and count the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculate the length of each queue;
[0029] Congestion trigger module: For any queue priority, aggregate the queue lengths of the queues with the same output port to obtain the queue lengths of each output port of, When Exceeds the set threshold, trigger the congestion mitigation process of the congestion mitigation module;
[0030] Congestion Mitigation Module: Construct a linear programming model with the goal of minimizing throughput loss during the pause of the input port. The constraints include: the amount of data received by the queues of each output port within a single control cycle is less than the amount of data sent by the output port, and the pause time of each input port is non-negative and does not exceed the control cycle;
[0031] Pause Frame Sending Module: Solve the linear programming model to obtain the optimal pause time for each input port, and send a pause frame carrying the pause time to the corresponding input port.
[0032] In one embodiment, in the congestion trigger module, the aggregation of the queue lengths with the same output port obtains the queue lengths of each output port of the queue length , specifically including:
[0033] ;
[0034] represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0035] In one embodiment, in the congestion mitigation module, the construction of the linear programming model with the goal of minimizing throughput loss during the pause of the input port specifically includes:
[0036] Use the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause: ;
[0037] ;
[0038] represents the pause time of the input port , represents the total output rate of all data packets input from the input port and output from the output port , represents the queue length corresponding to the output port ;
[0039] Superimpose the throughput losses of all possible input ports, and at the same time change the summation order to obtain the objective function of the linear programming model :
[0040] ;
[0041] represents the control cycle.
[0042] In one embodiment, in the congestion mitigation module, to meet the requirements of real-time solution, the linear programming model is simplified according to the different value characteristics of the queue length between the congested ports and the non-congested ports, and the final objective function is obtained:
[0043] ;
[0044] wherein, represents the output port where the queue length is less than the set congestion threshold, represents the input port pause time of, represents from the input port input and from the output port total output rate of all data packets output.
[0045] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in any one of the embodiments in the first aspect are implemented.
[0046] Compared with the prior art, the beneficial technical effects of the present invention are:
[0047] (1) The present invention uses the length of the output queue to trigger the congestion mitigation process, and has a faster response speed compared with the traditional flow control mechanism that triggers the process according to the length of the input queue; at the same time, the length of the output queue is also the basis for explicit congestion notification (ECN) marking. As long as there is a fixed margin left between the ECN marking threshold and the pause threshold, the hop-by-hop flow control will not conflict with the end-to-end ECN mechanism, greatly simplifying the setting and tuning of the threshold.
[0048] (2) It realizes the overall arrangement of the pause time of each input port, so that the loss of congestion-independent flows can be minimized by using an optimization algorithm, and further alleviates the problem that the performance of congestion-independent flows is reduced due to the too coarse control granularity of the traditional flow control mechanism; at the same time, the method of pre-computing the pause time eliminates the waiting time for pause recovery and reduces the requirement for buffer size. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is the flowchart of the method in the embodiment of the present invention;
[0050] Figure 2 is the schematic diagram of the switch processing flow in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] A preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
[0052] The present invention obtains queue information from a switch, classifies and counts the data packets backlogged in the switch queue according to the triple of (input port, output port, priority queue), and obtains the respective queue lengths and change rates; combines the queue lengths with the same output port to obtain the queue length of the output port; when the queue length of the output port exceeds a threshold, triggers a congestion mitigation process, constructs and solves a corresponding linear programming model with the goal of minimizing the throughput loss caused by the flow control mechanism to the victim flow, obtains the input ports that need to be paused and the corresponding pause times; finally, sends pause frames to the corresponding input ports.
[0053] As Figure 1 shown, a data center traffic control method based on linear programming in the present invention includes the following steps:
[0054] S1, classify and count the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculate the length of each queue;
[0055] S2, for any queue priority, aggregate the queue lengths with the same output port to obtain the queue lengths of each output port ; when exceeds the set threshold, trigger a congestion mitigation process;
[0056] S3, congestion mitigation process: construct a linear programming model with the goal of minimizing the throughput loss during the pause of the input port, and the constraint conditions include: the amount of data received by the queues of each output port within a single control period is less than the amount of data sent by the output port, and the pause time of each input port is non-negative and does not exceed the control period;
[0057] S4, solve the linear programming model to obtain the optimal pause time of each input port, and send a pause frame carrying the pause time to the corresponding input port.
[0058] In one embodiment, the aggregating the queue lengths with the same output port to obtain the queue lengths of each output port specifically includes:
[0059] ;
[0060] represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0061] Specifically, since different priorities are isolated from each other and have the same algorithm, in the following description, the present invention considers any one of the priorities and omits the subscript of the priority in the variables. For the input port and the output port , define and collect the basic queue metrics shown in Table 1 in the switch.
[0062] Table 1 Symbols and Meanings of Basic Queue Metrics
[0063]
[0064] At the same time, define the rate of change over time .
[0065] Next, define the aggregated queue metrics. Add the basic queue metrics in different ways to obtain the aggregated queue metrics shown in Table 2.
[0066] Table 2 Symbols and Meanings of Aggregated Queue Metrics
[0067]
[0068] In a P4 programmable switch, the statistics of the basic queue metrics can be implemented through an array of register type. Every control period T, the local control plane of the switch reads from the data plane and calculates all other metrics.
[0069] In one embodiment, the construction of the linear programming model in step S3 with the goal of minimizing the throughput loss during the input port pause specifically includes:
[0070] Use the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause:
[0071] ; ;
[0072] represents the pause time corresponding to the input port , represents the total output rate of all data packets input from the input port and output from the output port , represents the queue length corresponding to the output port ;
[0073] Superimpose the throughput losses of all possible input ports, and at the same time change the summation order to obtain the objective function of the linear programming model :
[0074] 。
[0075] Specifically, the present invention models this pause time allocation problem as an optimization problem aiming to minimize the performance loss of all flows. The optimization variables are the pause times corresponding to each input port , and obviously, should be non - negative values. In addition, define to indicate that the input port is not selected as the pause port and does not need to be paused. Use the throughput loss caused during the pause period at the input port to represent the performance loss of the victim flow caused by the pause.
[0076] According to the collected queue information, the switch can use the control plane running on the local CPU to construct the aforementioned linear programming model. This problem has a small scale and sparse constraints, and solving tools such as GLPK (GNU Linear Programming Kit) can be used to quickly obtain the optimal solution.
[0077] In the linear programming model, the determination regarding the output port can be made by comparing the output queue length of output port j with a relatively small fixed threshold (such as 10 kB), and if it exceeds, it is determined that the port is congested.
[0078] In one of the embodiments, to meet the requirement of real - time solution, according to the different value characteristics of the queue length between congested ports and non - congested ports, the linear programming model is simplified to obtain the final objective function:
[0079] ;
[0080] Among them, represents the pause time corresponding to the input port , represents the total output rate of all data packets input from the input port and output from the output port .
[0081] is a very complex piece - wise linear function, which is difficult to meet the requirement of real - time solution. Therefore, in actual implementation, the model needs to be further simplified according to the different value characteristics of the queue length between congested and non - congested ports. To prevent the further growth of the queue length, we need to add corresponding constraint conditions to ensure that the amount of received data within a single control cycle is less than the amount of sent data, and thus the final linear programming model is obtained:
[0082] ;
[0083] ;
[0084] 。
[0085] In one embodiment, sending a pause frame carrying a pause time to a corresponding input port in step S4 specifically includes:
[0086] The specified quanta value in the pause frame is obtained by multiplying the solution result of the linear programming model by the total input rate of all data packets of the current input port and performing conversion.
[0087] Specifically, the switch sends pause frames to all input ports that need to be paused upstream. In the lossless Ethernet commonly used in data centers, the pause frames sent upstream can use the standard PFC pause frame format. By multiplying the solution result of the previous linear programming model by the total input rate of the current port and converting it into the corresponding quanta value, the specified quanta pause time in the frame is obtained. For the common 25Gbps terminal link bandwidth in data centers, the control period T can be selected as 10 us and can be finely adjusted according to the CPU performance.
[0088] The working process of the switch of the present invention is shown in Figure 2 。
[0089] It should be understood that although the steps in the flowchart of the accompanying drawings of the specification are sequentially shown as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings of the specification may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0090] Based on the description of the above method embodiments, the present disclosure also provides a system. Based on the same inventive concept, the systems in one or more embodiments provided by the present disclosure are as described in the following embodiments. Since the implementation solutions of the system for solving problems are similar to those of the method, the implementation of the specific system in the embodiments of this specification can refer to the implementation of the foregoing method, and the repeated parts will not be elaborated. As used hereinafter, the term "module" or "modular unit" is a combination of software and / or hardware that can implement a predetermined function. Although the systems described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0091] A data center traffic control system based on linear programming, comprising:
[0092] A statistics module: classifies and statistically analyzes the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculates the length of each queue;
[0093] A congestion trigger module: for any queue priority, aggregates the queue lengths of queues with the same output port to obtain the queue lengths of each output port of the queue lengths , and when exceeds a set threshold, triggers the congestion mitigation process of the congestion mitigation module;
[0094] A congestion mitigation module: constructs a linear programming model with the goal of minimizing the throughput loss during the pause of the input port, and the constraint conditions include: the amount of data received by the queues of each output port within a single control period is less than the amount of data sent by the output port, and the pause time of each input port is a non-negative value and does not exceed the control period;
[0095] A pause frame sending module: solves the linear programming model to obtain the optimal pause time of each input port, and sends a pause frame carrying the pause time to the corresponding input port.
[0096] In one embodiment, in the congestion trigger module, the aggregating the queue lengths of queues with the same output port to obtain the queue lengths of each output port of the queue lengths , specifically includes:
[0097] ;
[0098] represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0099] In one embodiment, in the congestion mitigation module, constructing a linear programming model aiming to minimize the throughput loss during the pause of the input port specifically includes:
[0100] Using the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause:
[0101] ;
[0102] represents the pause time corresponding to the input port , represents the total output rate of all data packets input from the input port and output from the output port , represents the queue length corresponding to the output port ;
[0103] Superimposing the throughput losses of all possible input ports and changing the summation order to obtain the objective function of the linear programming model :
[0104] .
[0105] In one embodiment, in the congestion mitigation module, to meet the requirement of real-time solution, the linear programming model is simplified according to the different value characteristics of the queue length between the congested port and the non-congested port to obtain the final objective function:
[0106] ;
[0107] wherein, represents the pause time corresponding to the input port , represents the total output rate of all data packets input from the input port and output from the output port .
[0108] The present invention also provides a computer-readable storage medium including instructions, such as a memory including instructions, and the above instructions can be executed by a processor to complete the above method. The storage medium can be a computer-readable storage medium. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0109] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, in any aspect, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention, and any reference signs in the claims should not be regarded as limiting the claims involved.
[0110] In addition, it should be understood that although this specification is described in terms of embodiments, not every embodiment only contains an independent technical solution. This narrative manner of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A data center traffic control method based on linear programming, characterized in that It includes the following steps: Classify and count the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculate the length of each queue; For any queue priority, aggregate the queue lengths of queues with the same output port to obtain the queue lengths of each output port of the queue lengths , when exceeds the set threshold, trigger the congestion mitigation process; Congestion mitigation process: Construct a linear programming model with the goal of minimizing the throughput loss during the pause of the input port, specifically including: Using the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause: ; ; represents the pause time of the input port , represents the total output rate of all data packets input from the input port and output from the output port ; represents the queue length corresponding to the output port ; Superimpose the throughput losses of all possible input ports, and at the same time change the summation order to obtain the objective function of the linear programming model : ; represents the control period represents the output port that triggers the congestion mitigation process; The constraint conditions include: the amount of data received by the queues of each output port within a single control period is less than the amount of data sent by the output port, and the pause time of each input port is non - negative and does not exceed the control period; Solve the linear programming model to obtain the optimal pause time for each input port, and send a pause frame carrying the pause time to the corresponding input port.
2. The data center traffic control method based on linear programming according to claim 1, wherein Aggregating the queue lengths of queues with the same output port to obtain the queue lengths of each output port of the queue , specifically including: ; Indicates the buffer size occupied by all data packets input from the input port and output from the output port 3. A data center traffic control method based on linear programming according to claim 1, characterized in that To meet the requirement of real - time solution, simplify the linear programming model according to the different value characteristics of the queue length between congested ports and non - congested ports, and obtain the final objective function: ; Among them, represents the output port where the queue length is less than the set congestion threshold, represents the input port 's pause time, represents the total output rate of all data packets input from the input port and output from the output port output.
4. A data center traffic control method based on linear programming according to claim 1, characterized in that The sending of the pause frame carrying the pause time to the corresponding input port specifically includes: The quanta value specified in the pause frame is obtained by multiplying the solution result of the linear programming model by the total input rate of all data packets of the current input port and performing conversion.
5. A data center traffic control system based on linear programming, characterized in that It includes: Statistics module: Classify and count the data packets in each queue of the switch according to the input port, output port, and queue priority, and calculate the length of each queue; Congestion trigger module: For any queue priority, aggregate the queue lengths of queues with the same output port to obtain the queue lengths of each output port of the queue , when exceeds the set threshold, trigger the congestion mitigation process of the congestion mitigation module; Congestion mitigation module: Build a linear programming model aiming to minimize the throughput loss during the pause of the input port, specifically including: Using the throughput loss caused during the pause of the input port to represent the performance loss caused by the pause: ; represents the pause time of the input port , represents the total output rate of all data packets input from the input port and output from the output port ; represents the queue length corresponding to the output port ; Superimpose the throughput losses of all possible input ports and change the summation order to obtain the objective function of the linear programming model : ; represents the control period, represents the output port that triggers the congestion mitigation process; The constraint conditions include: the amount of data received by the queues of each output port within a single control period is less than the amount of data sent by the output port, and the pause time of each input port is non - negative and does not exceed the control period; Pause frame sending module: Solve the linear programming model to obtain the optimal pause time for each input port, and send a pause frame carrying the pause time to the corresponding input port.
6. The data center traffic control system based on linear programming according to claim 5, wherein In the congestion trigger module, the queue lengths of queues with the same output port are aggregated to obtain the queue lengths of each output port of the queue , specifically including: ; Indicates the buffer size occupied by all data packets input from the input port and output from the output port 7. The data center traffic control system based on linear programming according to claim 5, wherein, In the congestion mitigation module, to meet the requirement of real - time solution, simplify the linear programming model according to the different value characteristics of the queue length between congested ports and non - congested ports, and obtain the final objective function: ; Among them, represents the output port where the queue length is less than the set congestion threshold, represents the input port of the pause time, represents the total output rate of all data packets input from the input port and output from the output port output.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Predication-based switch PFC control method and control system
CN107948103A
FLOW CONTROL TECHNOLOGIES
DE102022103981A1