Congestion control method, device and equipment for data center scene
By constructing a congestion notification message based on the average delay and message characteristics of the business flow in the data center scenario, and using the DQN reinforcement learning model to determine the number to send, and directly sending it to the business flow sending end, it solves the problem that the sending end cannot in the existing technology. Real-time sensing of network congestion and inaccurate rate adjustment enables efficient congestion control.
Patent Information
- Application Number
- CN202410771173.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Existing RDMA congestion control solutions in data center scenarios have problems such that the sender cannot sense network congestion in a timely manner and the rate adjustment is inaccurate. This is mainly due to the delay in notification message transmission and the fact that ECN marking is not flow-based.
By constructing a congestion notification message in the switch based on the average delay and message characteristics of the service flow, and using the DQN reinforcement learning model to determine the number of messages to send, and sending them directly from the switch to the sending end of the target service flow, the granularity of the service flow is achieved. Congestion risk identification and rapid rate scaling.
It improves the efficiency of the service flow sending end's perception of network congestion and the accuracy of rate adjustment, and quickly solves congestion problems.
Smart Images

Figure CN118764433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a congestion control method, device and equipment for a data center scenario. Background Art
[0002] Currently, RDMA (remote direct memory access) in data center networks is the mainstream solution for achieving high-speed network communication in data centers. The congestion control mechanism of RDMA-enabled data center networks has attracted much attention in recent years.
[0003] The existing RDMA congestion control scheme mainly senses the local congestion situation through the intermediate node, encapsulates the ECN mark for the service message, and the service message receiver sends a congestion control message to the service message sender after receiving the ECN mark, notifying the sender to update the service message sending rate. As the network traffic transmission distance continues to increase, this algorithm has two problems: 1. The sender can only reduce the speed after receiving the congestion notification message. When the data transmission delay is long, it takes a long time for the sender to receive the congestion notification message and then reduce the speed, which will cause the sender to fail to perceive the network congestion situation in time and adjust the rate. 2. When the receiver receives the ECN mark of the service message, it encapsulates the congestion notification message and sends it. At present, the ECN mark is encapsulated according to the WRED algorithm when the queue is congested, rather than based on the flow. Therefore, the receiver cannot accurately identify the congestion situation of the flow, nor can it generate an appropriate number of congestion control messages based on the flow, which will also cause inaccurate rate adjustment at the sender.
[0004] Therefore, how to achieve high-precision and fine-grained congestion control in a data center scenario is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] The present application provides a congestion control method, device and equipment for a data center scenario, which can solve the technical problem in the prior art that when there is a congestion risk, the service message sending rate of the service flow sending end is not adjusted in time and the switch cannot correctly identify the service flow with congestion risk, resulting in inaccurate rate adjustment.
[0006] In a first aspect, an embodiment of the present application provides a congestion control method in a data center scenario, the method comprising:
[0007] In the switch, the target service flow with congestion risk is determined according to the average delay of each service flow in the switch;
[0008] and constructing a congestion notification message according to the message characteristics of the target service flow, and sending the congestion notification message to the sending end of the target service flow;
[0009] The number of congestion notification messages sent is determined according to the average delay of the target service flow, the data sending rate of the switch port, and the number of congestion notification messages sent in the previous period.
[0010] In combination with the first aspect, in one implementation, before determining the target service flow with a congestion risk according to the average delay of each service flow in the switch, the method further includes:
[0011] Determine the delay of each data packet in the switch according to the timestamp of each data packet entering and leaving the switch in each service flow;
[0012] The average delay of the data packets of each service flow in the switch is taken as the average delay of each service flow.
[0013] In one implementation, determining a target service flow with a congestion risk according to an average delay of each service flow in a switch includes:
[0014] Determine whether the average delay of each service flow is greater than the preset average delay threshold;
[0015] Determine the service flow whose average delay is greater than the average delay threshold as the target service flow.
[0016] In one embodiment, constructing a congestion notification message according to the message characteristics of the target service flow, and sending the congestion notification message to the sending end of the target service flow includes:
[0017] The congestion notification message is constructed according to the SIP, DIP, UDP SPORT, SQP and DQP of the service flow, and the constructed congestion notification message is sent to the sending end of the target service flow at one time.
[0018] In one implementation, determining the number of congestion notification messages to be sent according to the average delay of the target service flow, the data sending rate of the switch port, and the number of congestion notification messages sent in the previous cycle includes:
[0019] The average delay of the target service flow, the data transmission rate of the switch port and the number of congestion notification messages sent in the previous cycle are input into the trained DNQ reinforcement learning model to obtain the output number of congestion notification messages sent.
[0020] In one embodiment, training a DNQ reinforcement learning model includes:
[0021] Define the average delay of the service flow, the data transmission rate of the switch port, and the transmission rate of the congestion notification message as state parameters, define the number of congestion notification messages sent for each service flow as action parameters, and initialize the evaluation network and target network of the DQN reinforcement learning model;
[0022] Collect state parameters at the last moment, input the state parameters at the last moment and various preset action parameters into the DNQ reinforcement learning model, obtain action value functions corresponding to various action parameters, convert the action parameter corresponding to the maximum action value function into the number of congestion notification messages sent, and send the corresponding number of congestion notification messages to the sender;
[0023] Collect action parameters and link utilization at the current moment, calculate the reward parameters of the previous moment based on the link utilization of the current moment and the average delay of the business flow, and construct the state parameters, action parameters, reward parameters of the previous moment and the state parameters of the current moment into a four-tuple and put it into the experience storage pool;
[0024] Selecting M quadruples from the experience storage pool to calculate the target value and loss function of the DNQ reinforcement learning model;
[0025] The parameters of the evaluation network in the DNQ reinforcement learning model are adjusted by the gradient descent function so that the action value function is close to the target value, and the parameters of the adjusted evaluation network are used to update the target network in the DNQ reinforcement learning model to complete N times of training for the DNQ reinforcement learning model to obtain a trained DNQ reinforcement learning model.
[0026] In one embodiment, before determining the target service flow with congestion risk according to the average delay of each service flow in the switch, the method further includes:
[0027] Establish a service flow information table based on the message characteristics, data packet quantity, number of congestion notification messages sent in the previous period, and average delay of each service flow;
[0028] The service flow information table is updated according to the information of the received new data packet.
[0029] In one implementation, updating the service flow information table according to the information of the received new data packet includes:
[0030] Determine in each cycle whether a new data packet is received;
[0031] If a new data packet is received and the new data packet belongs to a new service flow, a new service flow is established in the service flow information table, and the message characteristics and average delay of the new service flow are added to the service flow information table;
[0032] If a new data packet is received and the new data packet belongs to an existing service flow, the average delay corresponding to the existing service flow is calculated according to the delay of the new data packet in the switch, and the average delay and the number of data packets corresponding to the existing service flow are updated in the service flow information table;
[0033] Delete the service flow whose number of data packets has not changed within P cycles from the service flow information table.
[0034] In a second aspect, an embodiment of the present application provides a congestion control device for a data center scenario, the method is set in a switch, and the device includes:
[0035] A determination module, which is used to determine a target service flow with a congestion risk according to the average delay of each service flow in the switch;
[0036] A notification module is used to construct a congestion notification message according to the message characteristics of the target business flow, and send the congestion notification message to the sending end of the target business flow, wherein the number of congestion notification messages sent is determined according to the average delay of the target business flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous cycle.
[0037] In a third aspect, an embodiment of the present application provides a congestion control device for a data center scenario, wherein the congestion control device for the data center scenario comprises a processor, a memory, and a congestion control program for the data center scenario stored on the memory and executable by the processor, wherein when the congestion control program for the data center scenario is executed by the processor, the steps of the congestion control method for the data center scenario as described in any one of the above items are implemented.
[0038] The embodiments of the present application provide a congestion control method, apparatus and device for a data center scenario, which determines a target business flow with a congestion risk in a switch according to the average delay of each business flow in the switch; and constructs a congestion notification message according to the message characteristics of the target business flow, and sends the congestion notification message to the sending end of the target business flow; and wherein the number of congestion notification messages sent is determined according to the average delay of the target business flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous cycle, thereby realizing congestion risk identification at the granularity of business flows, so that the business flow sending end can more accurately adjust the business message sending rate of each business flow, and reasoning about the number of congestion messages sent can quickly reduce the business message sending rate of the business flow sending end to an ideal value, thereby quickly solving the congestion problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic diagram of the topological structure of a data transmission network;
[0040] Figure 2 This is a flow chart of an embodiment of a congestion control method for a data center scenario of the present application;
[0041] Figure 3 This is a schematic diagram of the format of the business flow information table for this application;
[0042] Figure 4 This is a schematic diagram of the management process of the business flow information table for this application;
[0043] Figure 5 This is a schematic diagram of the specific process of congestion control in the data center scenario of this application;
[0044] Figure 6 This is a functional module diagram of an embodiment of a congestion control device for a data center scenario of the present application;
[0045] Figure 7 This is a schematic diagram of the hardware structure of a congestion control device for a data center scenario involved in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] In order to help better understand the congestion control method of the data center scenario of the present application, the process of congestion control based on the DCQCN algorithm in the prior art is first described. Figure 1 As shown in the figure, the service message is sent by the sending end server1, transmitted through multiple switches and finally reaches the receiving end server2.
[0048] The processing process of the DCQCN algorithm includes: 1. The switch Device2 finds that the egress queue cache exceeds the threshold, that is, it considers that congestion has occurred. Device2 marks the service message with an ECN mark according to the linear drop probability in the WRED policy to indicate that there is congestion in the network. 2. After receiving the service message, the receiving end server2 finds that the service message carries the ECN mark, and then knows that there is congestion in the network, so it sends a CNP message (congestion notification message) to the sending end server1 to notify the sending end server1 to reduce the traffic speed. The congestion notification message sending algorithm in the prior art is that when the receiving end receives a service message with an ECN mark within a certain period, it constructs a CNP message and sends it to the sending end. 3. Every time the sending end server1 receives a CNP message, it reduces the current service message sending rate according to the calibration. If the receiving end server1 does not receive the CNP message within a certain period of time, the service message sending rate will be increased.
[0049] In the prior art, the congestion control by the DCQCN algorithm has the following problems: 1. When the data transmission delay is long, the sender will slow down after receiving the CNP message. Then, when the network is already congested, the data transmission delay is long, and the sender is heuristically slowing down, that is, the sender does not know the ideal value of the current sending rate, but relies on the feedback of the receiving end after each speed reduction to adjust it. Therefore, it takes a long time to receive multiple CNPs and then slow down multiple times to achieve the ideal effect. This will cause the sender to be unable to perceive the network congestion in a timely and accurate manner and adjust the rate. 2. Inaccurate rate adjustment: When the switch egress queue reaches the threshold, the switch will mark the service message in the queue with ECN according to the WRED algorithm, so that there will be a situation where the short service flow with many messages has more ECN marks, and the long service flow with few messages has fewer ECN marks. Therefore, the receiving end cannot accurately identify the congestion of the service flow, nor can it generate an appropriate number of congestion control messages based on the service flow, which will also cause the service message sending rate of the sender to be inaccurately adjusted. Therefore, the present application provides a congestion control method, device and equipment for a data center scenario to solve the above technical problems.
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0051] In a first aspect, an embodiment of the present application provides a congestion control method for a data center scenario, which can be implemented in a switch.
[0052] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the congestion control method for the data center scenario of this application. Figure 1 As shown in the figure, the congestion control methods in the data center scenario include:
[0053] Step S101: In a switch, a target service flow with a congestion risk is determined according to an average delay of each service flow in the switch.
[0054] Step S102: construct a congestion notification message according to the message characteristics of the target service flow, and send the congestion notification message to the sending end of the target service flow;
[0055] The number of congestion notification messages sent is determined according to the average delay of the target service flow, the data sending rate of the switch port, and the number of congestion notification messages sent in the previous period.
[0056] In this embodiment, the congestion risk of each service flow on the current switch is judged according to the average service flow delay, so that the congestion risk identification of the service flow granularity can be achieved, and the sending end can also adjust the rate for each service flow more accurately. The number of congestion notification messages sent at present can be inferred according to the average delay of the target service flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous cycle, so that the service message sending end can quickly reduce the sending rate of the service message to quickly solve the congestion problem.
[0057] In one embodiment, before determining the target business flow with congestion risk based on the average delay of each business flow in the switch, it also includes: establishing a business flow information table based on the message characteristics, number of data packets, number of congestion notification messages sent in the previous cycle and average delay of each business flow; updating the business flow information table based on the information of the received new data packet.
[0058] It should be understood that a service flow is data traffic from the same sender (source) to the same receiver (destination), which contains multiple data packets (service messages), and the number of data packets is the number of packets.
[0059] Exemplarily, the switch periodically detects the data packets of the service flow and calculates the average delay of each service flow inside the switch. The message features in this embodiment include SIP (source address), DIP (destination address), UDP SPORT (UDP source port), SQP (source QP) and DQP (destination QP). Figure 3 As shown, the parameters in the service flow information table include: SIP, DIP, UDP SPORT, SQP, DQP, number of data packets (number of packets), number of congestion notification messages sent in the last period, and average delay of the service flow.
[0060] Specifically, the updating of the service flow information table according to the information of the received new data packet includes: determining whether a new data packet is received in each cycle; if a new data packet is received and the new data packet belongs to a new service flow, then establishing a new service flow in the service flow information table, and adding the message characteristics and average delay of the new service flow to the service flow information table; if a new data packet is received and the new data packet belongs to an existing service flow, then calculating the average delay of the corresponding existing service flow according to the delay of the new data packet in the switch, and updating the average delay and the number of data packets of the corresponding existing service flow in the service flow information table; deleting the service flow whose number of data packets has not changed within P cycles from the service flow information table. Among them, the value of P can be set according to demand. When the number of data packets of a service flow has not changed within P cycles, it means that the service flow has no message to send and may be in a deactivated state. Therefore, the information of the service flow is deleted from the service flow information table to release memory.
[0061] Exemplary, such as Figure 4 As shown, updating the service flow information table specifically includes the following steps:
[0062] Step S201, determine whether a new data packet (new message) is received; if so, go to step S202; otherwise, go to step S207.
[0063] Step 202 , record the time when the data packet arrives at the switch inlet and the time when the data packet arrives at the switch outlet, and then go to step 203 .
[0064] Step S203, determine whether the message belongs to a new service flow; if so, go to step 205; otherwise, go to step S204.
[0065] Step S204 , update the number of data packets corresponding to the service flow in the service flow information table (flow table), and then go to step 206 .
[0066] Step S205: Create a new service flow information table in the service flow information table, extract and record the SIP, DIP, UDP SPORT, DQP and other information of the data packet.
[0067] Step S206: Calculate the average delay of the corresponding service flow according to the time when the data packet arrives at the inlet of the switch and the time when it reaches the outlet, record it in the service flow information table, and go to step S207.
[0068] Step S207, read the number of data packets of each service flow in the service flow information table, and then go to step S208;
[0069] Step S208, determine whether the number of data packets of the service flow changes within P cycles; if yes, go to step S201; otherwise, go to step S209;
[0070] Step S209: Delete this service flow from the service flow information table.
[0071] In one embodiment, calculating the average delay of a service flow includes: determining the delay of each data packet in the switch according to the timestamp of each data packet in each service flow entering and leaving the switch; and taking the average delay of the data packets of each service flow in the switch as the average delay of each service flow.
[0072] Exemplarily, for each data packet of a business flow, the switch times the data packet at the inlet and outlet respectively, and calculates the delay T of the data packet inside the switch device based on the two timestamps at the outlet, and then calculates the average delay of the business flow in the switch according to the average delay calculation formula Tavg = (Tavg'*(n-1)+T) / n, and records the average delay in the flow table.
[0073] Among them, Tavg is the average delay of the business flow in the switch, which is the average delay of all data packets in this business flow. Assuming that the delay of the nth packet is T, and the average delay of the first n-1 data packets is Tavg', then the total delay of the first n-1 data packets is Tavg'*(n-1), the total delay of the first n packets is Tavg'*(n-1)+T, and the average delay of the first n packets is (Tavg'*(n-1)+T) / n, from which the average delay of the data flow in the switch can be calculated.
[0074] In one embodiment, in step S101, a target service flow with a congestion risk is determined based on the average delay of each service flow in the switch, including: the switch determines whether the average delay of each service flow is greater than a preset average delay threshold; and determines that the service flow with an average delay greater than the average delay threshold is the target service flow.
[0075] Among them, the average delay threshold can be set according to the network topology and business scenario factors. The more complex the network topology and business scenario, the larger the average delay threshold value of the flow. For example, in a three-layer clos architecture, the more devices the message passes through, the greater the delay of the business flow. In this embodiment, the average delay threshold can be set to 10 microseconds.
[0076] Furthermore, in step S102, a congestion notification message is constructed according to the message characteristics of the target service flow, and the congestion notification message is sent to the sender of the target service flow, including: constructing the congestion notification message according to the SIP, DIP, UDPSPORT, SQP and DQP of the service flow, and sending the constructed congestion notification message to the sender of the target service flow at one time. The sender receives a congestion notification message and starts to reduce the speed according to the calibrated amount. In order to make the sender reduce the speed quickly, all congestion notification messages are sent out at one time, so that the sender (source end) of the service message can respond to the rate adjustment as soon as possible, thereby solving the congestion problem.
[0077] As a preferred real-time method, the number of congestion notification messages sent is determined based on the average delay of the target business flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous period. The specific steps include: the switch collects and calculates the data sending rate of the switch port, reads data such as the average delay of the target business flow and the number of congestion notification messages sent in the previous period from the business flow information table, and normalizes these data as state input into a pre-trained DNQ (Deep Q-Network) reinforcement learning model, so that the DNQ reinforcement learning model outputs a suitable action A, that is, the number of congestion notification messages sent for the corresponding business flow.
[0078] It is worth noting that in the prior art, after the switch determines that there is congestion, it encapsulates the ECN mark on the service message, and then needs to send the service message to the corresponding receiving end, and then the receiving end generates a congestion notification message according to the ECN mark in the service message, and then the receiving end of the service message sends the congestion notification message to the sending end of the service message. This method causes the congestion notification message to be extended during transmission, the sending end responds slowly, and the service message sending rate cannot be adjusted in time, and multiple adjustments are required to reach the ideal state. The present application directly encapsulates the congestion notification message by the switch, and the switch directly sends the congestion notification message to the sending end of the service message, without the need for processing by the receiving end of the service message, thereby improving the efficiency of the sending end of the service message to perceive congestion, and then improving the efficiency of adjusting the sending rate of the service message, and inferring the number N of congestion notification messages that need to be sent, constructing a congestion notification message and sending N congestion notification messages to the sending end of the service message at one time, so that the sending end can adjust the sending rate of the service message as soon as possible, and achieve a more efficient solution to the congestion problem.
[0079] It is worth noting that the DQN reinforcement learning model is used to calculate the number of congestion notification messages that need to be sent for each service flow. The DNQ reinforcement learning model needs to be trained before reasoning.
[0080] In one embodiment, training the DNQ reinforcement learning model includes the following steps:
[0081] Step S301: define the average delay of the service flow, the data transmission rate of the switch port and the transmission rate of the congestion notification message as state parameters, define the number of congestion notification messages sent for each service flow as an action parameter, and initialize the evaluation network and target network of the DQN reinforcement learning model.
[0082] For example, training the DQN reinforcement learning model requires state parameters S, action parameters A, and reward parameters R.
[0083] The state parameter S is used to indicate the current network situation. The state parameter S includes the average delay Tavg of the service flow, the data transmission rate txRate of the switch port, and the transmission rate txNRate of the congestion notification message. The statistical data of these three parameters can be collected from the switch chip to obtain the state parameter S. The action parameter A is the number of congestion notification messages sent for each service flow, where the action parameter A is composed of multiple actions a.
[0084] Among them, the average delay Tavg of the business flow is the average delay of all data packets in the business flow; the data transmission rate txRate of the switch port is collected and calculated from the switch port; the transmission rate txNRate of the congestion notification message: calculated based on the number of congestion notification messages sent in each period and the detection period recorded in the business flow information table.
[0085] Next, set the number of layers and the number of neurons in each layer of the DQN reinforcement learning model, set the initial weights, and initialize two networks with exactly the same structure: the evaluation network and the target network.
[0086] Step S302: collect state parameters at the previous moment, input the state parameters at the previous moment and various preset action parameters into the DNQ reinforcement learning model, obtain action value functions corresponding to various action parameters respectively, and convert the action parameters corresponding to the maximum action value function into the number of congestion notification messages sent, and send a corresponding number of congestion notification messages to the sending end.
[0087] For the sake of illustration and convenience of description, in this embodiment, time t is defined as the previous time, and time t+1 is defined as the current time. At time t, the state parameter S is collected to obtain the state parameter St at time t. After normalizing the data in the state parameter St, the state parameter St and the preset action parameter At are input into the DQN reinforcement learning model, and the action value function Q value of the DQN reinforcement learning model is calculated. Under the state St at time t, all possible actions a are found, the Q value of each action a is calculated and compared, and the action a with the largest Q value is found as the action At at time t:
[0088]
[0089] Among them, A t represents the action at time t, θ i It is the parameter of the current evaluation network (including weights and offsets, etc.), and the Q value is used to represent the expected reward for taking a specific action a under a given state parameter S.
[0090] Then At is converted into the number of congestion notification messages sent, and a corresponding number of congestion notification messages are generated and sent to the service message sending end.
[0091] Step S303: collect action parameters and link utilization at the current moment, calculate the reward parameters at the previous moment according to the link utilization at the current moment and the average delay of the business flow, and construct the state parameters, action parameters, reward parameters of the previous moment and the state parameters of the current moment into a four-tuple and put it into the experience storage pool.
[0092] Exemplarily, the action parameter St+1 and link utilization at time t+1 are collected, and the reward parameter Rt at time t is calculated based on the link utilization at time t+1 and the average delay of the service flow, and then a quaternary group (St, At, Rt, St+1) is generated, and the quaternary group is stored as a sample in the experience storage pool D. It should be understood that based on the above method, corresponding quaternary groups can be generated in multiple cycles, that is, the experience storage pool D stores multiple quaternary groups as described above.
[0093] The reward parameter R represents the instantaneous effectiveness of the action. In the data center scenario, the reward is measured from two aspects: the current link utilization and the average delay of the service flow. A high link utilization means that the link is used more fully, and a low average delay means that the risk of congestion is low. This can be calculated by the formula
[0094]
[0095] To define the reward, ω is the delayed reward factor.
[0096]
[0097] The value of ω needs to consider two factors: business scenarios and network scale. When the total system bandwidth is constant, if there are many business flows in the network, in order to reduce the long-tail effect, it is necessary to ensure the latency of the business flows, that is, the latency needs to account for a larger proportion of the reward. If there are few business flows in the network, it is necessary to ensure the link utilization, that is, the link utilization needs to account for a larger proportion of the reward. Therefore, the parameter ns_flow is the number of business flows read from the flow table at regular intervals for a certain period of time, ns_flow_min is the minimum number of business flows per unit time in the network, and ns_flow_min is the maximum number of business flows per unit time in the network.
[0098] Among them, is the baseline value of ω. Considering that when the network scale is large, the delay of a single device should be as small as possible to ensure appropriate end-to-end delay, the delay reward should be increased. Therefore, according to the network scale, the baseline value of ω is enlarged times. Where N is the number of devices that the packet passes through in the actual network topology. N=4 means that the data packet passes through 4 switch devices from sending to receiving. Na is the number of devices that the reference packet passes through. For example, Na=3 means that in the reference network topology, the data packet passes through 3 switch devices from sending to receiving.
[0099] in the formula is the delay reward mapping function, Tmin is the minimum delay on the device, Tmax is the maximum delay allowed on the device, Tavg is the average delay of the service flow, calculated as Tavg = (Tavg'*(n-1)+T) / n. Since most network congestion occurs at shorter delays, it is necessary to use a fine-grained interval reward mapping for short delays and a coarse-grained interval reward mapping for long delays. So use Fitting delayed rewards.
[0100] R is the average throughput of the port, which is calculated based on the number of packets collected from the port. BW is the link bandwidth, and R / BW is the link utilization.
[0101] Step S304: Select M quadruples from the experience storage pool to calculate the target value and loss function of the DNQ reinforcement learning model.
[0102] For demonstration, 32 sets of quadruples are randomly selected from D and the target value y of the DNQ reinforcement learning model is calculated. j And the loss function L.
[0103] Target value y j for:
[0104]
[0105] Among them, j is the sequence number of the four-tuple, and the training is carried out from 32 groups of four-tuples. The value of j ranges from 1 to 32, and r j is the immediate reward in the jth group of data. j+1 is the state parameter in the j+1th group of data. γ is a discount factor, which is used to balance the importance of immediate rewards and future rewards. The value range of γ is usually between 0 and 1. A value close to 1 indicates that future rewards are more valued. is the expected (future) maximum reward.
[0106] The loss function L is:
[0107]
[0108] S j The state in the jth group of data, A j Actions in the jth set of data.
[0109] Step S305: adjust the parameters of the evaluation network in the DNQ reinforcement learning model by using a gradient descent function so that the action-value function is close to the target value, and use the adjusted parameters of the evaluation network to update the target network in the DNQ reinforcement learning model.
[0110] For example, to make Q as close as possible to the target value yj, the parameters of the evaluation network need to be adjusted and updated using gradient descent. The gradient descent function is:
[0111]
[0112] The gradient descent function is used to measure the difference between the predicted Q value (output by the main network) and the target value. i The target value can be the actual reward, Q is the value obtained by evaluating the network in state S j And the predicted Q value output under action at, use the gradient descent function to adjust the network parameters to make the target value and the expected value as close as possible, so that the Q value calculated by the evaluation network is as accurate as possible.
[0113] Step S306: complete N trainings for the DNQ reinforcement learning model to obtain a trained DNQ reinforcement learning model.
[0114] Exemplarily, this embodiment is set to update the target network using the evaluation network parameters every 10 training times, and train the DNQ reinforcement learning model 100 times to obtain the trained DNQ reinforcement learning model.
[0115] In a specific embodiment, the process of the switch sending the congestion control message is as follows: Figure 5 As shown, the specific steps include:
[0116] Step S401, set the average delay threshold of the service flow, and then go to step S402.
[0117] Step S402: regularly monitor and calculate the average delay of each service flow in the service flow information table, and then go to step S403.
[0118] Step S403, determine whether the average delay of the service flow exceeds the average delay threshold; if so, go to step S404; otherwise, go to step S402.
[0119] Step S404: read the message characteristics of the service flow in the service flow information table, construct a congestion notification message, and go to step S405.
[0120] Step S405, collect the exchange chip parameters, calculate the state, input the DQN reinforcement learning model, and go to step S406.
[0121] Step 4S06: The DQN reinforcement learning model infers the number of congestion control messages that need to be sent, and then goes to step S407.
[0122] Step S407: Send a specified number of congestion notification messages to the service message sender.
[0123] The congestion control method for the data center scenario provided by the embodiment of the present application monitors and calculates the average delay of each business flow inside the switch, and judges the congestion risk of each business flow on the current switch based on the average delay of the business flow, rather than judging by the queue cache usage. This can identify the congestion risk at the business flow granularity, and also allow the sender to adjust the rate of each business flow more accurately. In order to reduce the transmission time of congested messages in the network and slow down the sender as soon as possible, the switch uses the DQN reinforcement learning model to infer the number of congestion notification messages that need to be sent and send them quickly, so that the sender can receive multiple congestion notification messages at one time and quickly slow down the sending rate of business messages to the ideal value.
[0124] In a second aspect, an embodiment of the present application also provides a congestion control device for a data center scenario, which is used in a switch.
[0125] In one embodiment, referring to Figure 6 , Figure 6 This is a functional module diagram of an embodiment of a congestion control device for a data center scenario of the present application. Figure 6 As shown, the congestion control device in the data center scenario includes:
[0126] A determination module, which is used to determine a target service flow with a congestion risk according to the average delay of each service flow in the switch;
[0127] A notification module is used to construct a congestion notification message according to the message characteristics of the target business flow, and send the congestion notification message to the sending end of the target business flow, wherein the number of congestion notification messages sent is determined according to the average delay of the target business flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous cycle.
[0128] Furthermore, in one embodiment, the determining module is further configured to:
[0129] Determine the delay of each data packet in the switch according to the timestamp of each data packet entering and leaving the switch in each service flow;
[0130] The average delay of the data packets of each service flow in the switch is taken as the average delay of each service flow.
[0131] Furthermore, in one embodiment, the determining module is further configured to:
[0132] Determine whether the average delay of each service flow is greater than the preset average delay threshold;
[0133] Determine the service flow whose average delay is greater than the average delay threshold as the target service flow.
[0134] Furthermore, in one embodiment, the notification module is also used to:
[0135] The congestion notification message is constructed according to the SIP, DIP, UDP SPORT, SQP and DQP of the service flow, and the constructed congestion notification message is sent to the sending end of the target service flow at one time.
[0136] Furthermore, in one embodiment, the notification module is also used to:
[0137] The average delay of the target service flow, the data transmission rate of the switch port and the number of congestion notification messages sent in the previous cycle are input into the trained DNQ reinforcement learning model to obtain the output number of congestion notification messages sent.
[0138] Furthermore, in one embodiment, the device is also used for:
[0139] Define the average delay of the service flow, the data transmission rate of the switch port, and the transmission rate of the congestion notification message as state parameters, define the number of congestion notification messages sent for each service flow as action parameters, and initialize the evaluation network and target network of the DQN reinforcement learning model;
[0140] Collect state parameters at the last moment, input the state parameters at the last moment and various preset action parameters into the DNQ reinforcement learning model, obtain action value functions corresponding to various action parameters, convert the action parameter corresponding to the maximum action value function into the number of congestion notification messages sent, and send the corresponding number of congestion notification messages to the sender;
[0141] Collect action parameters and link utilization at the current moment, calculate the reward parameters of the previous moment based on the link utilization of the current moment and the average delay of the business flow, and construct the state parameters, action parameters, reward parameters of the previous moment and the state parameters of the current moment into a four-tuple and put it into the experience storage pool;
[0142] Selecting M quadruples from the experience storage pool to calculate the target value and loss function of the DNQ reinforcement learning model;
[0143] The parameters of the evaluation network in the DNQ reinforcement learning model are adjusted by the gradient descent function so that the action value function is close to the target value, and the parameters of the adjusted evaluation network are used to update the target network in the DNQ reinforcement learning model to complete N times of training for the DNQ reinforcement learning model to obtain a trained DNQ reinforcement learning model.
[0144] Furthermore, in one embodiment, the device is also used for:
[0145] Establish a service flow information table based on the message characteristics, data packet quantity, number of congestion notification messages sent in the previous period, and average delay of each service flow;
[0146] The service flow information table is updated according to the information of the received new data packet.
[0147] Furthermore, in one embodiment, the device is also used for:
[0148] Determine in each cycle whether a new data packet is received;
[0149] If a new data packet is received and the new data packet belongs to a new service flow, a new service flow is established in the service flow information table, and the message characteristics and average delay of the new service flow are added to the service flow information table;
[0150] If a new data packet is received and the new data packet belongs to an existing service flow, the average delay corresponding to the existing service flow is calculated according to the delay of the new data packet in the switch, and the average delay and the number of data packets corresponding to the existing service flow are updated in the service flow information table;
[0151] Delete the service flow whose number of data packets has not changed within P cycles from the service flow information table.
[0152] Among them, the functional implementation of each module in the congestion control device for the above-mentioned data center scenario corresponds to the steps in the congestion control method embodiment for the above-mentioned data center scenario, and its functions and implementation processes will not be repeated here one by one.
[0153] In a third aspect, an embodiment of the present application provides a congestion control device for a data center scenario. The congestion control device for a data center scenario may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0154] Reference Figure 7 , Figure 7 The hardware structure diagram of the congestion control device in the data center scenario involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the congestion control device in the data center scenario may include a processor, a memory, a communication interface, and a communication bus.
[0155] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0156] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to interconnect devices within the congestion control device in the data center scenario, and interfaces used to interconnect the congestion control device in the data center scenario with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0157] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0158] The processor may be a general-purpose processor, and the general-purpose processor may call the congestion control program of the data center scenario stored in the memory, and execute the congestion control method of the data center scenario provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the congestion control program of the data center scenario is called may refer to the various embodiments of the congestion control method of the data center scenario of the present application, which will not be repeated here.
[0159] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0160] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0161] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0162] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0163] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0164] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0166] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A congestion control method for a data center scenario, characterized in that: The method includes: In the switch, the target service flow with congestion risk is determined according to the average delay of each service flow in the switch; and constructing a congestion notification message according to the message characteristics of the target service flow, and sending the congestion notification message to the sending end of the target service flow; The number of congestion notification messages sent is determined according to the average delay of the target service flow, the data sending rate of the switch port, and the number of congestion notification messages sent in the previous period.
2. The congestion control method for a data center scenario according to claim 1, characterized in that: Before determining the target service flow with congestion risk according to the average delay of each service flow in the switch, the following steps are also included: Determine the delay of each data packet in the switch according to the timestamp of each data packet entering and leaving the switch in each service flow; The average delay of the data packets of each service flow in the switch is taken as the average delay of each service flow.
3. The congestion control method for a data center scenario according to claim 1, characterized in that: Based on the average delay of each service flow in the switch, determine the target service flow with congestion risk, including: Determine whether the average delay of each service flow is greater than the preset average delay threshold; Determine the service flow whose average delay is greater than the average delay threshold as the target service flow.
4. The congestion control method for a data center scenario according to claim 1, characterized in that: Constructing a congestion notification message according to the message characteristics of the target service flow, and sending the congestion notification message to the sending end of the target service flow, including: The congestion notification message is constructed according to the SIP, DIP, UDP SPORT, SQP and DQP of the service flow, and the constructed congestion notification message is sent to the sending end of the target service flow at one time.
5. The congestion control method for a data center scenario according to claim 1, characterized in that: Determining the number of congestion notification messages to be sent according to the average delay of the target service flow, the data sending rate of the switch port, and the number of congestion notification messages sent in the previous cycle, including: The average delay of the target service flow, the data transmission rate of the switch port and the number of congestion notification messages sent in the previous cycle are input into the trained DNQ reinforcement learning model to obtain the output number of congestion notification messages sent.
6. The congestion control method for a data center scenario according to claim 5, characterized in that: Training the DNQ reinforcement learning model includes: Define the average delay of the service flow, the data transmission rate of the switch port, and the transmission rate of the congestion notification message as state parameters, define the number of congestion notification messages sent for each service flow as action parameters, and initialize the evaluation network and target network of the DQN reinforcement learning model; Collect state parameters at the last moment, input the state parameters at the last moment and various preset action parameters into the DNQ reinforcement learning model, obtain action value functions corresponding to various action parameters, convert the action parameter corresponding to the maximum action value function into the number of congestion notification messages sent, and send the corresponding number of congestion notification messages to the sender; Collect action parameters and link utilization at the current moment, calculate the reward parameters of the previous moment based on the link utilization of the current moment and the average delay of the business flow, and construct the state parameters, action parameters, reward parameters of the previous moment and the state parameters of the current moment into a four-tuple and put it into the experience storage pool; Selecting M quadruples from the experience storage pool to calculate the target value and loss function of the DNQ reinforcement learning model; The parameters of the evaluation network in the DNQ reinforcement learning model are adjusted by the gradient descent function so that the action value function is close to the target value, and the parameters of the adjusted evaluation network are used to update the target network in the DNQ reinforcement learning model to complete N times of training for the DNQ reinforcement learning model to obtain a trained DNQ reinforcement learning model.
7. The congestion control method for a data center scenario according to claim 1, characterized in that: Before determining the target service flow with congestion risk according to the average delay of each service flow in the switch, the following steps are also included: Establish a service flow information table based on the message characteristics, data packet quantity, number of congestion notification messages sent in the previous period, and average delay of each service flow; The service flow information table is updated according to the information of the received new data packet.
8. The congestion control method for a data center scenario according to claim 7, characterized in that: The updating of the service flow information table according to the information of the received new data packet comprises: Determine in each cycle whether a new data packet is received; If a new data packet is received and the new data packet belongs to a new service flow, a new service flow is established in the service flow information table, and the message characteristics and average delay of the new service flow are added to the service flow information table; If a new data packet is received and the new data packet belongs to an existing service flow, the average delay corresponding to the existing service flow is calculated according to the delay of the new data packet in the switch, and the average delay and the number of data packets corresponding to the existing service flow are updated in the service flow information table; Delete the service flow whose number of data packets has not changed within P cycles from the service flow information table.
9. A congestion control device for a data center scenario, characterized in that: The method is arranged in a switch, and the device comprises: A determination module, which is used to determine a target service flow with a congestion risk according to the average delay of each service flow in the switch; A notification module is used to construct a congestion notification message according to the message characteristics of the target business flow, and send the congestion notification message to the sending end of the target business flow, wherein the number of congestion notification messages sent is determined according to the average delay of the target business flow, the data sending rate of the switch port and the number of congestion notification messages sent in the previous cycle.
10. A congestion control device for a data center scenario, characterized in that: The congestion control device of the data center scenario includes a processor, a memory, and a congestion control program of the data center scenario stored on the memory and executable by the processor, wherein when the congestion control program of the data center scenario is executed by the processor, the steps of the congestion control method of the data center scenario as described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Explicit congestion control method based on queuing delay
CN108965151A
Congestion control method, device and system
CN110784417A
Network congestion control method and device and communication system
CN115914115A
Network congestion control method and device, equipment and storage medium
CN116545933A
Congestion notification message sending method and device
CN117201419A
