Data center flow control method and system based on linear programming, and storage medium
By adopting a linear programming-based flow control method in the data center, the problems of excessive granularity and slow response of traditional flow control mechanisms are solved, and more efficient congestion mitigation and throughput management are achieved.
Patent Information
- Application Number
- CN202510505850.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The traditional flow control mechanism is too coarse in relieving congestion, resulting in damage to other congestion-independent flows, and responds slowly, making it difficult to determine the optimal threshold.
Using a flow control method based on linear programming, the queue length of the output port is aggregated by counting the data packets of each queue of the switch, and the congestion mitigation process is triggered when the threshold is exceeded. A linear planning model is constructed to minimize the throughput loss during the input port pause, and the model is solved to obtain the optimal pause time for each input port, and a pause frame is sent.
It achieves faster congestion response speed, reduces throughput loss, improves data center transmission performance under high loads, and simplifies threshold setting and tuning.
Smart Images

Figure CN120075141A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, 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 shows an increasing trend. Remote direct memory access (RDMA) technology is commonly used in data centers 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 input queue of the switch 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 length of the output queue 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 that the performance of congestion-unrelated flows is reduced due to the too coarse granularity of the traditional flow control mechanism. However, if the length of the output queue 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: In a first aspect, the present invention provides a data center traffic control method based on linear programming, including 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 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; 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; 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.
[0007] 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: ; represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0008] 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 including: Use 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.
[0009] 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, and the final objective function is obtained: ; wherein, represents the output port where the queue length is less than the set congestion threshold, represents the input port pause time, represents from the input port input and from the output port the total output rate of all data packets output.
[0010] In one embodiment, 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.
[0011] In a second aspect, the present invention provides a data center traffic control system based on linear programming, including: 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 the queues 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 of the congestion mitigation module; Congestion mitigation module: 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; Pause frame sending module: 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, in the congestion trigger module, the aggregating the queue lengths of the queues with the same output port to obtain the queue lengths of each output port of the queue length , specifically includes: ; represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0013] In one embodiment, in the congestion mitigation module, the construction of a linear programming model aiming to minimize the throughput loss during the input port pause specifically includes: 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.
[0014] In one embodiment, in the congestion mitigation module, to meet the demand for real-time solution, simplify the linear programming model 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: ; wherein, represents the output port where the queue length is less than the set congestion threshold, 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
[0015] .
[0016] 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 of the first aspect are implemented.
[0016] Compared with the prior art, the beneficial technical effects of the present invention are: (1) The present invention uses the length of the output queue to trigger the congestion relief process. Compared with the traditional flow control mechanism that triggers the process based on the length of the input queue, it has a faster response speed. At the same time, the length of the output queue is also the basis for the explicit congestion notification (ECN) marking. As long as a fixed margin is 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, which greatly simplifies the setting and tuning of the threshold.
[0017] (2) The pause time of each input port can be coordinated, so that the loss of congestion-independent flows can be minimized by using optimization algorithms, thereby alleviating the problem of degraded performance of congestion-independent flows caused by coarse control granularity of traditional flow control mechanisms. At the same time, the method of pre-calculating the pause time eliminates the waiting time for pause recovery and reduces the demand for buffer size. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flow chart of a method in an embodiment of the present invention; Figure 2 The figure is a schematic diagram of the switch processing flow in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] A preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings.
[0020] The present invention obtains queue information from a switch, classifies and counts the data packets accumulated in the switch queue according to the (input port, output port, priority queue) triplet, and obtains the respective queue lengths and change rates; merges the queue lengths with the same output port to obtain the queue length of the output port; triggers the congestion relief process when the queue length of the output port exceeds a threshold, and constructs and solves the corresponding linear programming model with the goal of minimizing the throughput loss caused by the flow control mechanism to the victim flow, and obtains the input port that needs to be paused and the corresponding pause time; finally, sends a pause frame to the corresponding input port.
[0021] like Figure 1 As shown, a data center flow control method based on linear programming in the present invention comprises the following steps: 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; S2, for any queue priority, aggregate the queue lengths with the same output port to obtain the lengths of each output port The queue length ,when The congestion relief process is triggered when the set threshold is exceeded; S3. Congestion mitigation process: 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 a non - negative value and does not exceed the control cycle; S4. 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.
[0022] In one embodiment, 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: ; represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0023] 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 priority subscript 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.
[0024] Table 1 Symbols and meanings of basic queue metrics
[0025] Meanwhile, define the rate of change of over time.
[0026] Next, define the aggregated queue metrics. Add the basic queue metrics in different ways to obtain the aggregated queue metrics shown in Table 2.
[0027] Table 2 Symbols and meanings of aggregated queue metrics
[0028] In a P4 programmable switch, the statistics of basic queue metrics can be implemented through an array of register types. Every control cycle T, the local control plane of the switch reads from the data plane and calculates all other metrics.
[0029] In one embodiment, the construction of the linear programming model with the goal of minimizing throughput loss during the pause of the input port in step S3 specifically includes: Using the throughput loss caused during the pause at the input port to represent the performance loss caused by the pause: ; ; represents the input port corresponding pause time, represents the total output rate of all data packets input from the input port and output from the output port ; represents the output port corresponding queue length; 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 : .
[0030] Specifically, the present invention models this pause time allocation problem as an optimization problem with the goal of minimizing the performance loss of all flows. The optimization variable is the pause time corresponding to each input port , obviously, should be non-negative. In addition, define to represent that the input port is not selected as the pause port and does not need to be paused. Using the throughput loss caused during the pause at the input port to represent the performance loss of the victim flow caused by the pause.
[0031] According to the collected queue information, the switch can use the control plane running on the local CPU to construct the above-mentioned linear programming model. The problem size is small and the constraints are sparse, and a solution tool such as GLPK (GNU Linear Programming Kit) can be used to quickly obtain the optimal solution.
[0032] The determination of the output port in the linear programming model can be made by comparing the output queue length of output port j with a small fixed threshold (such as 10 kB), and if it exceeds, it is determined that the port is congested.
[0033] 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: ; wherein, represents the input port The corresponding pause time, Indicates that from the input port Input and output ports Total output rate of all packets output.
[0034] It is a very complex piecewise linear function, which is difficult to meet the requirements of real-time solution. Therefore, in actual implementation, it is necessary to further simplify the model according to the different value characteristics of queue length between congested and non-congested ports. In order to prevent the queue length from growing further, we need to add corresponding constraints to ensure that the queue length is within a single control cycle. The amount of data received within is less than the amount of data sent, so the final linear programming model is obtained: ; ; .
[0035] In one embodiment, sending a pause frame carrying a pause time to a corresponding input port in step S4 specifically includes: The quanta value specified in the pause frame is obtained by multiplying the solution of the linear programming model by the total input rate of all data packets of the current input port and converting it.
[0036] Specifically, the switch sends a pause frame to all input ports that need to be paused upstream. In the lossless Ethernet commonly used in data centers, the pause frame sent upstream can use the standard PFC pause frame format. The solution of the previous linear programming model is multiplied by the total input rate of the current port and converted into the corresponding quanta value to obtain the quanta pause time specified in the frame. For the 25Gbps terminal link bandwidth commonly used in data centers, the control period T can be selected as 10us and can be fine-tuned according to the CPU performance.
[0037] The switch working process of the present invention is shown in Figure 2 .
[0038] It should be understood that although the steps in the flowchart of the accompanying drawings of the specification are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict sequence limit, and these steps can be executed in other sequences. 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 time, but can be executed at different times. The execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of the steps or stages in other steps or other steps.
[0039] Based on the description of the above method embodiments, the present disclosure also provides a system. Based on the same innovative concept, the systems in one or more embodiments provided by the embodiments of the present disclosure are as described in the following embodiments. Since the implementation solutions for the system to solve 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 described again. As used hereinafter, the term "module" or "modular" 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, implementations in hardware, or combinations of software and hardware are also possible and contemplated.
[0040] A data center traffic control system based on linear programming, comprising: 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 the queues 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 of the congestion mitigation module; Congestion mitigation module: 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; Pause frame sending module: 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.
[0041] In one embodiment, in the congestion trigger module, the aggregating the queue lengths of the queues with the same output port to obtain the queue lengths of each output port of the queue length , specifically including: ; represents the buffer size occupied by all data packets input from the input port and output from the output port .
[0042] In one embodiment, in the congestion mitigation module, the construction of a linear programming model aiming to minimize the throughput loss during the pause of the input port specifically includes: 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 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 ; Superimpose the throughput losses of all possible input ports and change the summation order to obtain the objective function of the linear programming model : .
[0043] In one embodiment, 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 the congested port and the non-congested port to obtain the final objective function: ; 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 .
[0044] 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 ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0045] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-described exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, in any regard, 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.
[0046] In addition, it should be understood that although this specification is described according to 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: The following steps are involved: 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 with the same output port to get the length of each output port The queue length ,when The congestion relief process is triggered when the set threshold is exceeded; Congestion relief process: A linear programming model is constructed with the goal of minimizing the throughput loss during the input port pause period. The constraints include: the amount of data received by the queue of each output port in 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; The linear programming model is solved to obtain the optimal pause time of each input port, and a pause frame carrying the pause time is sent to the corresponding input port.
2. According to claim 1, a data center flow control method based on linear programming is characterized in that: The aggregation of queue lengths with the same output port obtains the length of each output port. The queue length , including: ; Indicates that from the input port Input and output ports The size of the buffer occupied by all outgoing packets.
3. According to claim 1, a data center flow control method based on linear programming is characterized in that: The linear programming model is constructed with the goal of minimizing the throughput loss during the input port pause period, specifically including: Used in input port The throughput loss during the pause period To represent the performance loss caused by the pause: ; Indicates input port The pause time, Indicates that from the input port Input and output ports The total output rate of all packets output, Indicates output port The corresponding queue length; The throughput losses of all possible input ports are superimposed and the order of summation is changed to obtain the objective function of the linear programming model. : ; represents the control cycle, Indicates the output port that triggers the congestion relief process.
4. The data center flow control method based on linear programming according to claim 1 is characterized in that: In order to meet the needs of real-time solution, the linear programming model is simplified according to the different value characteristics of queue length between congested ports and non-congested ports, and the final objective function is obtained: ; in, Indicates the output port whose queue length is less than the set congestion threshold. Indicates input port The pause time, Indicates that from the input port Input and output ports Total output rate of all packets output.
5. The data center flow control method based on linear programming according to claim 1 is characterized in that: The sending of a pause frame carrying a pause time to the corresponding input port specifically includes: The quanta value specified in the pause frame is obtained by multiplying the solution of the linear programming model by the total input rate of all data packets of the current input port and converting it.
6. A data center traffic control system based on linear programming, characterized in that: include: Statistics module: classifies and counts 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; Congestion trigger module: For any queue priority, aggregate the queue lengths with the same output port to obtain the lengths of each output port. The queue length ,when When the set threshold is exceeded, the congestion relief process of the congestion relief module is triggered; Congestion relief module: Construct a linear programming model with the goal of minimizing the throughput loss during the input port pause period. The constraints include: the amount of data received by the queue of each output port in 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 a non-negative value and does not exceed the control cycle; 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.
7. A data center traffic control system based on linear programming according to claim 6, characterized in that: In the congestion trigger module, the queue lengths of the same output ports are aggregated to obtain the lengths of the queues of the output ports. The queue length , specifically including: ; Indicates that the input port Input and output ports The size of the buffer occupied by all outgoing packets.
8. A data center traffic control system based on linear programming according to claim 6, characterized in that: In the congestion relief module, the linear programming model is constructed with the goal of minimizing the throughput loss during the input port pause period, specifically including: Used in input port The throughput loss during the pause period To represent the performance loss caused by the pause: ; Indicates input port The pause time, Indicates that the input port Input and output ports The total output rate of all packets output, Indicates output port The corresponding queue length; The throughput losses of all possible input ports are superimposed and the order of summation is changed to obtain the objective function of the linear programming model. : ; Indicates the control period.
9. A data center traffic control system based on linear programming according to claim 6, characterized in that: In the congestion relief module, in order to meet the needs 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, and the final objective function is obtained: ; in, Indicates the output port whose queue length is less than the set congestion threshold. Indicates input port The pause time, Indicates that the input port Input and output ports Total output rate of all packets output.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Predication-based switch PFC control method and control system
CN107948103A
FLOW CONTROL TECHNOLOGIES
DE102022103981A1
Packet network output band design method, apparatus, program, and medium
JP2004320458A
Congestion controller for ethernet switch
US20040081090A1