Method, device and medium for controlling remote direct memory access congestion, and reinforcement learning model chip
By employing a centralized training-distributed execution framework based on multi-agent reinforcement learning, the congestion control problem in multi-node, multi-flow networks is solved, and the visibility of switch queues and cross-link states is achieved, thereby improving network performance and data transmission efficiency.
Patent Information
- Application Number
- CN202611331849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot effectively utilize multiple nodes and multiple flows in a network, resulting in decreased network performance and increased data transmission latency. Furthermore, traditional single-agent deep reinforcement learning cannot acquire switch queue and cross-link state information, leading to short-sighted policies and difficulties in convergence.
A centralized training-distributed execution framework using Multi-Agent Reinforcement Learning (MAPPO) is adopted. A centralized Critic network is trained by obtaining global observation vectors in the NS-3 simulation environment to guide policy optimization, and a locally observation-dependent Actor network is deployed on the smart NIC to realize rate decision.
It enables visibility of switch queues and cross-link status in RDMA networks, achieving both global optimization and scalable congestion control, thereby improving network bandwidth utilization and data flow completion time.
Smart Images

Figure CN123185153A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of remote direct memory access, specifically relating to a method, apparatus, medium, and reinforcement learning model chip for controlling remote direct memory access congestion. Background Technology
[0002] Network congestion is a common phenomenon in current networks. When data traffic exceeds the processing capacity of network links, it will lead to a decrease in network performance and an increase in data transmission latency.
[0003] How to avoid network performance degradation and increased data transmission latency caused by network congestion has become one of the urgent problems to be solved. Summary of the Invention
[0004] In view of the above problems, a method, apparatus, medium, and reinforcement learning model chip for controlling remote direct memory access congestion are proposed to overcome or at least partially solve the above problems, including: A method for controlling remote direct memory access congestion, the method comprising: Determine the target local observation vector of the target smart network card, and input the target local observation vector into a preset model to obtain the target transmission rate of the smart network card; The data packets to be sent are sent according to the target sending rate; The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and intelligent agents corresponding to the smart network cards of each simulated terminal node.
[0005] In some embodiments, the step of inputting the target local observation vector into a preset model to obtain the target transmission rate of the smart network interface card includes: The target local observation vector is input into a preset model to obtain the transmission rate increment output by the preset model; The target transmission rate at the current moment is determined based on the previously determined target transmission rate and the transmission rate increment.
[0006] In some embodiments, the method further includes: If no heartbeat information is received from a smart network interface card (NIC), a loss message for the smart NIC is sent to the management server. The management server is used to determine the smart NIC with the lowest load and allocate messages for the smart NIC with the lowest load to that smart NIC.
[0007] In some embodiments, the method further includes: During each training session, a first number of simulated smart network cards are randomly taken offline with a first probability; and / or, During each training iteration, the links in the multi-agent simulation network are rewired with a second probability at a first-proportion ratio, and long, fat pipes are randomly added at a second-proportion ratio.
[0008] In some embodiments, the method further includes: Each time the expansion changes, a multidimensional graph embedding vector is generated as an input expansion for model training.
[0009] In some embodiments, the method further includes: Within a preset round duration, M concurrent remote direct memory access streams are randomly generated, where M is a positive integer; the size of the streams follows a Pareto distribution and is superimposed with burst Poisson pulses.
[0010] In some embodiments, the method further includes: The preset model is pruned to remove the minimum weight of the target proportion; Generalize the pre-defined model after pruning to fit a specific scenario. The preset model after scene generalization is retrained.
[0011] This application embodiment also provides a remote direct memory access congestion control device, the device comprising: The generation module is used to determine the target local observation vector of the target smart network card and input the target local observation vector into a preset model to obtain the target transmission rate of the smart network card; The sending module is used to send the data packets to be sent according to the target sending rate; The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and intelligent agents corresponding to the smart network cards of each simulated terminal node.
[0012] This application also provides a reinforcement learning model chip, including: The congestion notification technology module is used to check the data packets to be sent to determine whether there is congestion on the corresponding path and to determine the current congestion notification value. The round-trip delay calculation module is used to determine the round-trip delay based on the data packet to be sent; The data storage module is used to receive the current display congestion notification value and output the average display congestion notification value and the recent transmission rate; The neural network is deployed with a preset model. The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and simulated smart network cards of each simulated terminal node. The neural network is used to determine the target local observation vector of the target smart network card based on the average value of the displayed congestion notification, the round-trip time, and the most recent transmission rate, and inputs the target local observation vector into the preset model to obtain the target transmission rate.
[0013] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described remote direct memory access congestion control method.
[0014] The embodiments of this application have the following advantages: In this embodiment, the target local observation vector of the target smart network interface card (NIC) is determined, and the target local observation vector is input into a preset model to obtain the target transmission rate of the smart NIC. Data packets to be transmitted are sent according to the target transmission rate. The preset model is obtained by training the global observation vectors collected from a pre-built multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and the intelligent agents corresponding to the smart NICs of each simulated terminal node. In this embodiment, switch queues and cross-link states become visible during the training phase. The core mechanism lies in the centralized training-distributed execution framework of MAPPO. Specifically, during the training phase, training is performed in a simulation environment such as NS-3. The simulator, as a global information source, can completely acquire global observation vectors such as the instantaneous queue length of all switches and the utilization rate of all links. These global observation vectors are input into a centralized Critic network Vψ(s) to calculate the state value function and advantage function, guiding the policy optimization direction. Global visibility occurs because the simulation environment naturally possesses a global view. Execution Phase (Post-Deployment): After training, the Actor network πθ(a|o) is deployed to each smart NIC. The Actor can make rate decisions based solely on local observation vectors. At this stage, global switch queue information is not required. This application employs a centralized training-distributed execution strategy. During the training phase, the Critic is trained using a global queue, and during the execution phase, each smart NIC can make decisions based solely on local observation vectors, balancing global optimization and scalability. Attached Figure Description
[0015] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1This is a flowchart illustrating the steps of a remote direct memory access congestion control method according to an embodiment of this application; Figure 2 This is a flowchart of another method for controlling remote direct memory access congestion according to an embodiment of this application; Figure 3 This is a flowchart illustrating the steps of multi-agent reinforcement learning according to an embodiment of this application; Figure 4 This is a schematic diagram of an NS3 network simulation environment according to an embodiment of this application; Figure 5 This is a model structure diagram of a behavioral function according to an embodiment of this application; Figure 6 This is a model structure diagram of an evaluation function according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a reinforcement learning model chip according to an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a remote direct memory access congestion control device according to an embodiment of this application. Detailed Implementation
[0016] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0017] Explanation of nouns and symbols: RDMA (Remote Direct Memory Access): Servers can bypass the CPU and kernel to directly read and write remote memory, achieving 0-copy, low-latency communication.
[0018] MARL (Multi-Agent Reinforcement Learning): A reinforcement learning paradigm in which multiple agents learn simultaneously and influence each other in the same environment. The source-end smart NIC of each RDMA stream is treated as an agent, and MAPPO is used for collaborative training.
[0019] MAPPO (Multi-Agent Proximal Policy Optimization) training algorithm: Centralized Critic inputs a global queue, while distributed Actors only input local observations.
[0020] Actor networks and policy networks take local observations as input and output action distributions as outputs.
[0021] Critic networks, also known as value networks, take the global state as input and output state values.
[0022] ECN (Explicit Congestion Notification): Marks a packet in the IP header when the switch queue exceeds a threshold.
[0023] RTT (Round-Trip Time): Calculated by the hardware timestamp of the smart network interface card, with an accuracy of 1μs.
[0024] INT8 quantization compresses the 32-bit floating-point weights in an artificial intelligence model into 8-bit integers.
[0025] Magnitude-based pruning removes a specified proportion of connections by increasing the absolute value of the weights. This application prunes 15% of the smallest weights at once, and after training for 1000 rounds, the final sparsity is 30%.
[0026] NPU (Neural-network Processing Unit): A programmable accelerator embedded in a smart network interface card.
[0027] eBPF (extended Berkeley Packet Filter, kernel-programmable framework): A lightweight probe that runs on a smart network interface card, writes observations to shared memory with zero copying, and uses less than 1% CPU.
[0028] An episode is a complete sampling-reward process in reinforcement learning.
[0029] GAE (Generalized Advantage Estimation): Calculates the advantage function A to reduce variance; in this application, λ=0.95.
[0030] PPO-clip (the clipping target of Proximal Policy Optimization) prevents policy updates from becoming too large, ε=0.2.
[0031] Table 1 shows the formula compliance instructions: Table 1:
[0032] In some examples, traditional network congestion control methods primarily employ feedback-based mechanisms, such as the DCQCN (Data Center Quantized Congestion Notification) congestion control algorithm. However, these methods are typically optimized for a single end-to-end connection and cannot fully utilize multiple nodes and multiple flows in the network.
[0033] In related technologies, single-agent deep reinforcement learning can only obtain information about the current flow, and the exchange queues and cross-link states are completely invisible, leading to short-sighted policies and difficulties in convergence. The reasons why exchange queues and cross-link states are invisible in related technologies (such as DCQCN, Timely, and traditional single-agent reinforcement learning schemes) are as follows: DCQCN / Timely: This type of traditional congestion control algorithm uses an end-to-end feedback mechanism. The sending end can only sense congestion through indirect signals. DCQCN uses the switch to mark the ECN bit in the IP header and the receiving end to generate CNP to send back to the source end. Timely infers congestion levels based on changes in RTT (Round-Trip Time). The sending end cannot directly obtain the instantaneous queue length of the switch, nor can it know the congestion status of other links (links not on the current flow path), so cross-link status is completely invisible.
[0034] Traditional single-agent deep reinforcement learning models the entire transmitter as a single agent, whose observation space only contains information available to the local end (such as the current flow rate, current flow RTT, current flow ECN tag ratio, etc.). Since the agent lacks a mechanism to share information with switches or other transmitters, global information such as switch queue length and link status of other flows is completely outside its observation space.
[0035] To address this, this application provides a method for controlling remote direct memory access congestion. In this embodiment, switch queues and cross-link status become visible during the training phase. The core mechanism lies in the MAPPO (Multi-Agent Proximal Policy Optimization) framework of centralized training with decentralized execution (CTDE). Detailed explanation follows: Training Phase: Training is conducted in simulation environments such as NS-3. The simulator acts as a global information source, capable of acquiring complete global observation vectors, including instantaneous queue lengths of all switches and utilization rates of all links. These global observation vectors are input into the centralized Critic network Vψ(s) to calculate the state value function and advantage function, guiding the policy optimization direction. Global visibility at this stage is due to the inherent global view provided by the simulation environment.
[0036] Execution phase (post-deployment): After training, the Actor network πθ(a|o) is deployed to each smart NIC. The Actor can make rate decisions based solely on local observation vectors. At this stage, it is not necessary to obtain global switch queue information.
[0037] This application adopts a centralized training-distributed execution strategy. During the training phase, a global queue is used to train the Critic, and during the execution phase, each smart card can make decisions based on local observation vectors, thus balancing global optimization and scalability.
[0038] Reference Figure 1 The diagram illustrates a flowchart of a remote direct memory access congestion control method according to an embodiment of this application, which may include the following steps: Step 101: Determine the target local observation vector of the target smart network card and input the target local observation vector into the preset model to obtain the target transmission rate of the smart network card. The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and simulated smart network cards for each simulated terminal node.
[0039] In the embodiments of this application, training can be performed based on global observation vectors during the training phase, while identification and analysis can be performed based on local observation vectors during the execution phase.
[0040] For example, a multi-agent simulation network can be pre-built. For instance, an NS-3 can be used to build a Fat-Tree topology containing N simulated terminal nodes and M switches, with a link rate of 100Gbps and a switch cache of 4MB. In the simulation network, an agent can be instantiated for each simulated terminal node's simulated smart network card, resulting in a total of N agents.
[0041] Based on this multi-agent simulation network, simulations can be performed to obtain a global observation vector. The global observation vector can include the instantaneous transmission rate of each simulated smart network interface card, the most recent RTT sample, the proportion of ECN tags in the most recent 50 packets, etc.
[0042] In some embodiments, the simulated network can also be observed to detect its state values under the global observation vector, such as the Gaussian mean and standard deviation of the rate increment. The global observation vector is used as input and the state values as output for model training, thereby obtaining a preset model.
[0043] After obtaining the preset model, it can be deployed to various smart network interface cards (NICs). Taking any smart NIC as the target smart NIC, when it needs to send a data packet, the local observation vector of the target smart NIC can be determined first, i.e., the target local observation vector. The target local observation vector can include the instantaneous transmission rate of the target smart NIC, the most recent RTT sample, the proportion of ECN tags in the most recent 50 packets, etc.
[0044] After obtaining the target local observation vector, the target local observation vector can be input into the preset model; based on the target local observation vector, the preset model can make predictions and output the target transmission rate of the target smart network card for the data packets to be sent in the current scenario.
[0045] Step 102: Send the data packets to be sent according to the target sending rate.
[0046] Once the target transmission rate is determined, the smart network interface card (NIC) can transmit the data packets to be sent at the target transmission rate.
[0047] In this embodiment, the target local observation vector of the target smart network interface card (NIC) is determined, and the target local observation vector is input into a preset model to obtain the target transmission rate of the smart NIC. Data packets to be transmitted are sent according to the target transmission rate. The preset model is obtained by training the global observation vectors collected from a pre-built multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and the intelligent agents corresponding to the smart NICs of each simulated terminal node. In this embodiment, switch queues and cross-link states become visible during the training phase. The core mechanism lies in the centralized training-distributed execution framework of MAPPO. Specifically, during the training phase, training is performed in a simulation environment such as NS-3. The simulator, as a global information source, can completely acquire global observation vectors such as the instantaneous queue length of all switches and the utilization rate of all links. These global observation vectors are input into a centralized Critic network Vψ(s) to calculate the state value function and advantage function, guiding the policy optimization direction. Global visibility occurs because the simulation environment naturally possesses a global view. Execution Phase (Post-Deployment): After training, the Actor network πθ(a|o) is deployed to each smart NIC. The Actor can make rate decisions based solely on local observation vectors. At this stage, global switch queue information is not required. This application employs a centralized training-distributed execution strategy. During the training phase, the Critic is trained using a global queue, and during the execution phase, each smart NIC can make decisions based solely on local observation vectors, balancing global optimization and scalability.
[0048] Reference Figure 2 The diagram illustrates a flowchart of another method for controlling remote direct memory access congestion according to an embodiment of this application, which may include the following steps: Step 201: Determine the target local observation vector of the target smart network card.
[0049] In the embodiments of this application, training can be performed based on global observation vectors during the training phase, while identification and analysis can be performed based on local observation vectors during the execution phase.
[0050] For example, a multi-agent simulation network can be pre-constructed. Based on this multi-agent simulation network, simulations can be performed to obtain a global observation vector; wherein, the global observation vector may include the instantaneous transmission rate of each simulated smart network interface card, the most recent RTT sample, the proportion of ECN tags in the most recent 50 packets, etc.
[0051] After obtaining the preset model, it can be deployed to various smart network interface cards (NICs). Taking any smart NIC as the target smart NIC, when it needs to send a data packet, the target local observation vector of that target smart NIC can be determined first.
[0052] Step 202: Input the target local observation vector into the preset model to obtain the transmission rate increment output by the preset model.
[0053] After obtaining the target local observation vector, it can be input into a preset model. Based on the target local observation vector, the preset model can make predictions and output the incremental transmission rate of the target smart NIC for the data packets to be sent in the current scenario. Compared to DCQCN / Timely, which requires manual setting of Kp / Ki, thresholds, and rate step sizes, and becomes ineffective when the service changes, this application models rate adjustment as a continuous Gaussian strategy. The smart NIC performs online 10µs closed-loop self-update without any manual intervention, truly achieving zero-parameter deployment.
[0054] Step 203: Determine the target transmission rate at the current moment based on the previously determined target transmission rate and the transmission rate increment.
[0055] In some embodiments, after determining the data packet to be sent, the target transmission rate when the smart network interface card last sent a data packet can also be determined.
[0056] After obtaining the target transmission rate and transmission rate increment when the last data packet was sent, the sum of the target transmission rate and transmission rate increment when the last data packet was sent can be calculated to obtain the target transmission rate of the data packet to be sent by the target smart network card at the current moment.
[0057] Step 204: Send the data packets to be sent according to the target sending rate.
[0058] Once the target transmission rate is determined, the smart network interface card (NIC) can transmit the data packets to be sent at the target transmission rate.
[0059] In some embodiments of this application, any of the above methods may further include the following steps: If no heartbeat information is received from a smart network interface card (NIC), a loss message for the smart NIC is sent to the management server. The management server is used to determine the smart NIC with the lowest load and distribute the message for the smart NIC to the smart NIC with the lowest load.
[0060] In some embodiments, any smart network interface card (NIC) can send heartbeat information to the smart NIC at a preset time interval. Taking the target smart NIC as an example, if it does not receive heartbeat information from a smart NIC at the other end for a preset duration, it can be determined that the smart NIC at the other end is lost.
[0061] At this point, the target smart network card can send a loss message to the preset management server to notify the management server that the smart network card is lost and request a reassignment.
[0062] For the management server, upon receiving the lost packet, it can prioritize the lowest load, determine the smart network interface card (NIC) with the lowest load, and then allocate packets targeting the smart NIC to the smart NIC with the lowest load for processing.
[0063] For the smart network interface card with the lowest load, a conservative strategy can be implemented first to send data packets; then, through the aforementioned reasoning method, the sending rate can be determined to send data packets, ensuring continuity of cooperation.
[0064] In some embodiments of this application, any of the above methods may further include the following steps: during each training iteration, randomly taking a first number of simulated smart network cards offline with a first probability; and / or, During each training iteration, the links in the multi-agent simulation network are rewired with a second probability at a first-proportion ratio, and long, fat pipes are randomly added at a second-proportion ratio.
[0065] In some embodiments, fault injection can be performed during model training; for example, during each training session, a first number of simulated smart network cards can be randomly taken offline for a period of time with a first probability to simulate real hot-plugging / driver crash, which can be used for subsequent Mask-Agent robust training.
[0066] In other embodiments, topology randomization can be performed when training the model; for example, links in the multi-agent simulated network can be rewired with a second probability at each training iteration, and a second proportion of long, fat pipes can be randomly added.
[0067] In some embodiments of this application, any of the above methods may further include the following steps: generating a multidimensional graph embedding vector as an input extension for model training each time the expansion changes.
[0068] In some embodiments, when training the model, a multidimensional graph embedding vector can be generated as an input extension for model training at each expansion change.
[0069] In some embodiments of this application, any of the above methods may further include the following steps: randomly generating M concurrent remote direct memory access streams within a preset round duration, where M is a positive integer; the size of the streams follows a Pareto distribution and is superimposed with burst Poisson pulses.
[0070] In some embodiments, traffic augmentation can be performed during model training to improve generalization ability in bursty scenarios. For example, during each training iteration, M concurrent remote direct memory access streams can be randomly generated within a preset epoch duration; where M can be a positive integer. The size of the streams can follow a Pareto distribution and be superimposed with bursty Poisson impulses.
[0071] In some embodiments of this application, any of the above methods may further include the following steps: The preset model is pruned to remove the minimum weights of the target proportion; the pruned preset model is generalized to the scene; and the scene-generalized preset model is retrained.
[0072] In some embodiments, when deploying a preset model to a smart network interface card, the preset model can be pruned first to reduce the minimum weight of the target ratio; wherein, the target ratio can be set according to the actual situation, for example, 15%.
[0073] After pruning, the pre-defined model can be generalized to different scenarios. For example, when H_link (link utilization entropy) > 0.75 or H_flow (flow size entropy) > 0.8, meta-learning fine-tuning is automatically triggered, updating only the last two layers of the Actor. An FCT increase of < 3% is considered convergence.
[0074] After scene generalization, the pre-defined model can be retrained to restore model accuracy.
[0075] In this embodiment, the target local observation vector of the target smart NIC is determined; the target local observation vector is input into a preset model to obtain the transmission rate increment output by the preset model; the target transmission rate at the current moment is determined based on the previously determined target transmission rate and the transmission rate increment; and the data packets to be transmitted are sent according to the target transmission rate. In this embodiment, the switch queue and cross-link status become visible during the training phase. The core mechanism lies in the centralized training-distributed execution framework of MAPPO. Specifically: Training phase: Training is performed in a simulation environment such as NS-3. The simulator, as a global information source, can completely acquire global observation vectors such as the instantaneous queue length of all switches and the utilization rate of all links. These global observation vectors are input into the centralized Critic network Vψ(s) to calculate the state value function and advantage function, guiding the policy optimization direction. Global visibility occurs because the simulation environment naturally possesses a global view. Execution phase (after deployment): The trained Actor network πθ(a|o) is deployed to each smart NIC. The Actor can make rate decisions based solely on local observation vectors. At this time, it is not necessary to acquire global switch queue information. This application adopts a centralized training-distributed execution strategy. During the training phase, a global queue is used to train the Critic, and during the execution phase, each smart card can make decisions based on local observation vectors, thus balancing global optimization and scalability.
[0076] Reference Figure 3 The flowchart illustrating the steps of a multi-agent reinforcement learning method according to an embodiment of this application is shown; refer to Figure 4The diagram illustrates an NS-3 network simulation environment according to an embodiment of this application; refer to Figure 5 The diagram illustrates a model structure of a behavioral function according to an embodiment of this application; refer to... Figure 6 The diagram shows a model structure diagram of an evaluation function according to an embodiment of this application.
[0077] The following, combined with Figure 3 - Figure 6 To further illustrate the above method, the following examples are provided: I. Data Collection Phase: Step 1: Perform network simulation using streaming data.
[0078] like Figure 4 As shown, a multi-agent simulation network (Fat-Tree topology, N simulated terminal nodes, M switches, 20 total) is constructed in the NS-3 simulator. Each episode lasts 5ms, and 128 concurrent RDMA flows (Pareto distribution + Poisson bursts) are randomly generated in each episode. Faults and topology randomization are also injected into the simulation to provide diverse scenario data for training.
[0079] In the simulation environment, one agent 30 is instantiated for each simulated terminal node's simulated intelligent network interface card (RDMA Network Interface Card), for a total of N agents. Each agent deploys an eBPF probe to collect local observation information.
[0080] Additionally, an aggregate agent 10 is set up, on which a global Critic network Vψ(s) runs. The input is the concatenation of the instantaneous queue lengths (M×4-dimensional) of all switches and the local observation vectors of all agents, and the output is the global state value V(s). This is the core of MAPPO centralized training—a single Critic evaluates the quality of the global state, providing a unified optimization direction for all Actors.
[0081] A detector is deployed on the ensemble agent to collect the instantaneous queue lengths of all switches from the simulation environment. During the training phase, the simulator has global access to the states of all switches, and the detector obtains data directly from the simulation API.
[0082] Step 2: Parallel sampling (o, a, r, s′); N agents execute an episode in parallel in a simulation environment (parameters: episode=5ms, 128 flows). Each agent performs the following steps at each time step: acquire the local observation vector o=[r, τ, p_ecn, g]; sample action a (rate increment Δr) according to the Actor policy; the environment returns an immediate reward r (calculate R_total at the end of the round); record the state transition s′ (the global state at the next time step).
[0083] After an episode ends, the local observation vectors (o, a, r, s′) of all N agents are collected.
[0084] Step 3: Write to the experience pool; The trajectory data collected in step 2 is written into the experience pool (Replay Buffer, capacity = 2M samples). The experience pool serves as a training data warehouse, storing all sampling data from historical episodes for subsequent GAE calculations and network updates.
[0085] II. Training Cycle Phase (Steps 4-7 are executed in a loop).
[0086] Step 4: GAE calculates advantage A; Mini-batch data is sampled from the experience pool, and the advantage function A at each time step is calculated using generalized advantage estimation (GAE). Parameters: λ = 0.95 (GAE smoothing factor), γ = 0.99 (discount factor).
[0087] Specific calculations: Temporal difference residual: δ_t = r_t + γ·V(s_{t+1}) V(s_t); GAE advantages: A_t=Σ(γλ)^k·δ_{t+k}; The advantage function A measures how much the actual return is better than the Critic's expectations. A>0 indicates that the current action is better than expected, and A<0 indicates that it is worse than expected.
[0088] Step 5: Update CriticV_ψ(s); Update the Critic network parameters ψ using mean squared error (MSEloss): Target value: y = r + γ·V(s′); Loss function: L_critic = (V_ψ(s)) y) 2 ; The Adam optimizer is used to update ψ by calculating the gradient of L_critic, so that the state value estimate of Critic gradually approaches the actual return. Step 6: Update Actorπ_θ(a|o); Update the Actor network parameters θ using the PPO clipping objective function (parameter: PPOclipε=0.2): Probability ratio: r_t(θ)=π_θ(a_t|o_t) / π_θ_old(a_t|o_t); Clipping target: L^CLIP = min(r_t·A, clip(r_t, 0.8, 1.2)·A); Use the Adam optimizer (learning rate 3×10) -4 ) Update θ by calculating the gradient of L^CLIP; The pruning mechanism limits each policy update to no more than 20% to prevent training crashes.
[0089] Step 7: Convergence; Determine if the training has converged (average reward fluctuation <1% over 500 consecutive rounds): If convergence is not achieved, return to step 4 and continue sampling from the experience pool, calculating the advantage, updating the Critic and Actor, and iterating in a loop. If convergence occurs, proceed to step 8 and exit the training loop.
[0090] III. Model Post-processing Stage.
[0091] Step 8: INT8 quantization + sparsification; After training converges, the Actor network is compressed (target sparsity 30%): The data source is directly provided through the experience pool in step 3 (for quantitative calibration). Magnitude-based pruning: Sort the weights by absolute value from smallest to largest, prune 15% of the smallest weights at once, train for 1000 rounds to restore accuracy, and finally achieve a sparsity of 30%. INT8 symmetric quantization: Compresses 32-bit floating-point weights into 8-bit integers, calibrates the weight quantization scale according to the maximum absolute value, and uses the moving average EMA (1024 samples) for activation quantization. The final model is less than 400kB and can be burned into the NPU embedded in the smart network card.
[0092] Step 9: Output the quantized model weights; The final compressed Actor network weight file is output for burning to the smart network card during the deployment phase, completing the transition from training to deployment.
[0093] The remote direct memory access congestion control method mentioned in the embodiments of this application includes constructing a multi-agent simulation network, installing an agent on each node of the simulated smart network card in the simulation network, setting the training round time length, and constructing a data acquisition program; initializing a reinforcement learning agent and internal neural network on each node of the simulated smart network card, collecting the transmission rate and RTT of the current simulated smart network card to any smart network card, training the neural network using a reinforcement learning algorithm, and finally deploying the neural network to the actual smart network card, so that the agent can dynamically adjust the network card transmission rate according to the current network status data, thereby making the bandwidth utilization of the entire network higher and the completion time of each flow shorter.
[0094] In this context, a "round" refers to each iteration; reinforcement learning training uses rounds as the basic unit. An episode is a complete cycle of environment initialization → agent interaction with the environment → termination → reward calculation → policy update.
[0095] There are three core purposes for setting the length of a round: 1. Define the boundary of a complete sampling: MAPPO's policy update relies on the trajectory data (observations, actions, reward sequences) accumulated within each episode. A clear start and end point is required to calculate the total reward R_total (including negative rewards for flow completion time, etc.) at the end of the episode; calculate the advantage function A = R + γV(s′). V(s) guides policy gradient updates. Without turn boundaries, rewards cannot be attributed, and policy updates are impossible.
[0096] 2. Controlling training efficiency and convergence quality. The document sets the episode to 5ms. Too short (e.g., 0.1ms) and the RDMA stream won't have enough time to complete in one round, the agent won't see the final effect of its rate decision (FCT), the reward signal will be too weak, and it won't learn an effective policy. Too long (e.g., 100ms) and the computational cost per round will be high, training will be slow, and the range of network state changes will be too large, increasing gradient variance and making policy convergence difficult. 5ms is sufficient to cover the complete lifecycle of most RDMA streams (on a 100Gbps link, the completion time of a medium-volume stream is on the order of milliseconds), while maintaining the training iteration speed.
[0097] 3. Supports multi-scenario augmented training. At the start of each episode, network conditions are randomly regenerated. Many design features in the documentation rely on round boundaries, which ensure that each training sample covers different network scenarios, preventing the policy from overfitting to a single scenario. After training 20,000 episodes, the policy can generalize to various traffic patterns and topologies.
[0098] Furthermore, multi-agent collaboration avoids mass rate reduction: In traditional single-end solutions, each sender independently senses congestion and adjusts its rate concurrently, easily leading to oscillations of multiple flows simultaneously reducing speed → bandwidth idle → simultaneously increasing speed → congestion again. This application, MAPPO, utilizes global queue information during training through a centralized Critic, enabling multiple agents to learn to coordinate their respective rates (rather than simply synchronously reducing / increasing speed), resulting in a more even distribution of network bandwidth among multiple flows, avoiding bandwidth waste, and thus improving utilization. Continuous action space enables fine-grained rate control: DCQCN / Timely uses discrete rate increment / decrement steps (such as fixed percentage increments / decrements), resulting in coarse granularity. This application models rate adjustment as a continuous Gaussian strategy, where the Actor network outputs a continuous value of the rate increment Δr, which can be finely adjusted in the sub-millisecond range (10μs period), bringing each flow closer to its fair share rate and reducing queuing time. Global information guides strategy optimization: During the training phase, Critic can see the status of all switch queues. When optimizing the strategy, it not only considers the performance of the current flow, but also perceives the global congestion distribution, so that the learned strategy can actively avoid congested hotspot paths and utilize idle links, thereby shortening the overall flow completion time.
[0099] This application loads a pruned and quantized execution neural network model onto a reinforcement learning model chip in a smart network interface card (NIC). It periodically analyzes probe packets to perceive switch congestion ECN information and packet round-trip latency (network congestion is dynamic (traffic fluctuates in the μs range), requiring periodic sampling to promptly detect congestion changes. This application uses a 10μs sampling period, consistent with the control period, to ensure the policy input features always reflect the latest network state). Network flow control is then implemented by determining the appropriate rate setting based on historical ECN information and the current transmission rate.
[0100] This application introduces a three-layer mechanism of heartbeat, fault detection, and flow control, which is seamlessly integrated with the MAPPO training process to ensure the continuity of collaboration and solve the problem of collaboration interruption when the agent is offline or malfunctions.
[0101] During the training phase (step 1.2a), 1-3 RNICs are randomly taken offline for 2-10ms with a probability of 0.3. In step 2.2, 5% of the Agent gradients are randomly masked in each mini-batch, allowing the model to learn robust policies for partner absence scenarios during training. Therefore, when a real failure occurs after deployment, the takeover Agent can adapt quickly and will not cause collaborative failure.
[0102] This application proposes a "Topology-Agnostic Curriculum & Augmentation (TACA)" training pipeline to improve cross-scenario generalization ability and solve the heterogeneous topology problem in real application scenarios.
[0103] Topology randomization (step 1.2b) involves randomly rewiring 3% of the links in each training episode with a probability of 0.4, and randomly adding 2% of long fat pipes (i.e., high bandwidth × high latency links), so that the training data covers a variety of topology variations. The model does not overfit to a single fixed topology, but learns a general policy across constantly changing topologies.
[0104] Graph embedding vector g (step 1.2b): A 16-dimensional graph embedding vector g is generated synchronously with each topology change and serves as the input extension for the Actor network. Graph embedding encodes the current topology structure into a fixed-dimensional vector representation through a graph neural network, enabling the Actor to perceive the current topology type and adjust its strategy accordingly, rather than being applicable only to a certain topology.
[0105] Traffic enhancement (step 1.3a): Burst Poisson pulses are superimposed on the Pareto basic distribution to make the training traffic cover normal traffic and burst traffic scenarios, thereby improving the generalization ability to heterogeneous traffic patterns.
[0106] Meta-learning fine-tuning (step 4.7): If H_link>0.75 or H_flow>0.8 is detected after deployment (indicating that there is a significant difference between the current network environment and the training distribution), meta-learning fine-tuning is automatically triggered. Only the last two layers of the Actor are updated instead of full retraining, so as to adapt to the new topology at the lowest cost, and the convergence criterion is FCT increase <3%.
[0107] This application addresses the challenge of obtaining global information in congestion control algorithms using a multi-agent approach, thereby improving network utilization in RDMA high-speed networks and ultimately enhancing the efficiency of data center tasks. The specific implementation steps are as follows: S1. Construct a multi-agent simulation network: 1.1 Use NS-3 to build a Fat-Tree topology with N terminal nodes and M switches, with a link speed of 100Gbps and a switch buffer of 4MB; 1.2 In the simulation environment, an agent is instantiated for each terminal node's intelligent network interface card (RDMA Network Interface Card), resulting in a total of N agents. (1.2 creates the basic agent; 1.2a and 1.2b enhance the agent from two dimensions: fault injection and topology randomization, respectively. Fault injection removes some agents, while topology randomization modifies the link relationships between agents.)
[0108] 1.2a Fault Injection: In each episode, 1 to 3 RNICs (i.e., RDMA network cards) are randomly taken offline for 2 to 10 ms with a probability of 0.3 to simulate real hot-plugging / driver crash, which is used for subsequent Mask-Agent robust training.
[0109] 1.2b Topology Randomization: In each episode, 3% of the links are rewired with a probability of 0.4 and 2% of long fat pipes are randomly added. A 16-dimensional graph embedding vector g is generated simultaneously as an Actor input expansion.
[0110] 1.3 Set the episode duration to 5ms. Each episode generates 128 concurrent RDMA streams randomly, and the stream size follows a Pareto (α=1.2) distribution.
[0111] 1.3a Traffic Enhancement: Burst Poisson pulses (arrival interval 0.2ms, amplitude 10MB~1GB, width Log-Normal (2ms, 0.5ms)) are superimposed on the Pareto (α=1.2) basic distribution to improve the generalization ability of burst scenarios.
[0112] S2. Initialize the reinforcement learning agent: 2.1 For each agent, an Actor network πθ(a|o) and a Critic network Vψ(s) are created, both using a 3-layer fully connected structure (256-256-128), with the activation function ReLU: Actor network πθ(a|o): Input layer: 3-dimensional, corresponding to the observation vector o = [r, τ, p_ecn, g] r: Local instantaneous transmission rate (Gb / s), floating point; r is the instantaneous transmission rate read every 10μs from the network card register / shared memory by the eBPF probe, expressed as a floating point number (Gb / s).
[0113] τ: Most recent RTT sample (sampled every 10μs), floating point; the sender records the sending timestamp T_send when sending a data packet, and the receiver carries the receiving timestamp T_recv in the ACK / CNP message after receiving the packet. After receiving the feedback, the sender calculates RTT=T_recv. T_send (or RTT = current time) T_send (depending on the implementation). The network card hardware supports nanosecond-level timestamps; this application uses microsecond precision (1μs).
[0114] p_ecn: The proportion of ECN-tagged packets in the most recent 50 packets, a floating point value of 0 to 1; the eBPF probe maintains an ECN-tagged counter with a sliding window of 50 packets. The window statistics are updated every time a new packet is received. p_ecn = number of ECN-tagged packets in the window / 50.
[0115] g: 16-dimensional graph embedding; generated in step 1.2b during topology changes, encoding a feature representation of the current network topology.
[0116] Intermediate layer: 256 neurons fully connected (Dense) - 256 neurons fully connected (Dense) - 128 neurons fully connected (Dense); Output layer: 2 neurons, corresponding to... μ: Gaussian mean of rate increment (for continuous actions); calculated forward from the Actor network (i.e., the policy network πθ(a|o)).
[0117] σ: Gaussian standard deviation, softplus activation guarantees σ>0; output by another neuron in the Actor network output layer, after being processed by the softplus activation function (softplus(x)=ln(1+e^x)) to guarantee σ>0.
[0118] Activation functions: ReLU is used uniformly for all hidden layers; μ is linear and σ is softplus for the output layer.
[0119] Critic network Vψ(s); Input layer: dimension M×Q, where M = number of switches, Q = 4 queues per switch, totaling M×4 instantaneous queue lengths (cells), plus the concatenation of local observations from N agents, together forming the global state s; the concatenation of the two parts forms the complete global state s, with dimension M×4+N×dim(o). The Critic network Vψ(s) takes s as input and outputs a scalar state value Vψ(s) to evaluate the quality of the current global state.
[0120] Hidden layers 1 / 2 / 3: Same as Actor's 256-256-128 structure; Output layer: 1 neuron, linearly activated, outputting state value Vψ(s).
[0121] 2.2 The network weights are randomly initialized using the Xavier method, the optimizer is Adam, and the learning rate is 3×10⁻⁶. -4 The output layer weights are initialized to 0 to avoid early policy overshoot. In each mini-batch, the gradients of 5% of the agents are randomly masked, forcing the remaining agents to learn the partner absence scenario and improving fault self-healing capabilities. During each gradient update in MAPPO training, 5% of the agents are randomly selected from N agents (approximately 6 if N=128). During the gradient backpropagation of this mini-batch, the gradients of these 5% of agents are set to zero (i.e., their Actor network parameters are not updated), and only the gradients of the remaining 95% of agents are used to update the policy.
[0122] S3. Construct a data acquisition program: 3.1 Deploy a lightweight eBPF probe on each terminal node to periodically collect the following local observations: Its own transmission rate r (Gb / s); RTT sample value τ (μs); The proportion of ECN tags in the most recently received 50 packets, p_ecn; A 1-bit Heartbeat-Toggle is added to the CNP message header and toggled every 500µs for online fault detection.
[0123] 3.2 The observation vector o=[r, τ, p_ecn, g] is passed to the agent process (the agent process refers to the Actor neural network inference running on the smart network card) via shared memory, with a sampling frequency of 1MHz; the agent manager calculates the link utilization entropy H_link and flow size entropy H_flow every 1s as the basis for whether to trigger meta-learning fine-tuning. (The agent manager is a centralized software management module deployed on the network controller side (or management server) in this application, responsible for maintaining the global coordination function of the multi-agent system).
[0124] H_link (link utilization entropy) is calculated as follows: The agent manager collects the instantaneous utilization u_i (i=1, 2, ..., L, where L is the total number of links) from all switches / links every 1 second, where u_i is the utilization of the i-th link (0~1).
[0125] Calculate the normalized probability: p_i = u_i / Σu_j (the sum of the utilization rates of all links).
[0126] Calculate entropy: H_link= Σp_i×log2(p_i).
[0127] Example: If the utilization of the 8 links is even (p_i=1 / 8), H_link=log28=3 (maximum value); if the traffic is concentrated on 1 link (p_1=1, the rest are 0), H_link=0 (minimum value).
[0128] H_flow (flow size entropy): The agent manager calculates the size f_j of all concurrent RDMA streams every 1 second (j=1,2,...,K, where K is the number of streams).
[0129] Calculate the normalized probability: q_j = f_j / Σf_k.
[0130] Calculate entropy: H_flow= Σq_j×log2(q_j).
[0131] For example, if 128 flows are all the same size (q_j=1 / 128), H_flow=log2128=7; if the flow sizes differ greatly (a few elephant flows + a large number of mouse flows), H_flow is lower.
[0132] The decision logic is as follows: meta-learning fine-tuning is triggered when H_link > 0.75 (after normalization to 0-1) or H_flow > 0.8. These two thresholds are empirical values, indicating that the network environment has significantly deviated from the training distribution and an adaptive update strategy is needed.
[0133] S4. Training the neural network: 4.1 The MAPPO algorithm is adopted, with the global state s (instantaneous queue length of all switches) as the centralized Critic input and the output state value Vψ(s). 4.2 After each round, calculate the advantage function A = R + γV(s′) - V(s), where R is the negative reward for flow completion time, R_total = R_FCT + β·R_burst. α·R_fault, where R_burst = 1.5 (burst flow weighting), R_fault = 0.2·(FCT_fault) FCT_normal) / FCT_normal (fault penalty).
[0134] γ (Gamma): In reinforcement learning, the gamma factor has a value of 0 < γ ≤ 1, representing the weight of future rewards in the current decision. The closer γ is to 1, the more the strategy values long-term gains; the smaller γ is, the more short-sighted the strategy. In this application, γ is a hyperparameter (usually taken as 0.99) used to balance current rewards with future rewards.
[0135] V(s′) (Value of the next state): Calculated by the Critic network Vψ(s). s′ is the next state the network transitions to after the current round's action (the global state at the next moment), and Vψ(s′) is the Critic's long-term cumulative reward estimate for state s′. A high V(s′) means a good future prospect starting from s′.
[0136] V(s) (Value of the current state): Also calculated by the Critic network, Vψ(s) is the long-term cumulative reward estimate of the current state s.
[0137] R_total (Total Reward): The total reward value obtained by the agent at the end of an episode, used to evaluate the effectiveness of the strategy in that episode. The total reward is a weighted combination of three sub-rewards.
[0138] R_FCT (Negative Reward for Flow Completion Time): A negative reward calculated based on the flow completion time. The shorter the FCT (the faster the flow completes), the larger R_FCT (closer to 0 or a positive number); the longer the FCT (the slower the flow), the smaller R_FCT (more negative). This is the main reward term, driving the agent to learn strategies to shorten the flow completion time. Typically, R_FCT = ... mean (FCT) or a similar negative correlation form.
[0139] R_burst (burst flow reward weighting): An additional reward for burst flows, weighted by a constant of 1.5. The purpose is to provide extra positive rewards in burst flow scenarios, encouraging agents to maintain good performance even under high burst conditions.
[0140] R_fault (fault penalty): A performance penalty for fault scenarios, R_fault = 0.2 * (FCT_fault) R_fault is calculated as FCT_normal / FCT_normal. When a fault occurs, if the flow completion time is significantly increased compared to the fault-free state (FCT_fault > FCT_normal), R_fault is a positive number with a negative sign. α·R_fault) will reduce the total reward, and the performance of the penalty policy will degrade in fault scenarios.
[0141] β (Burst Reward Weight): Controls the weight of the R_burst term. R_total = R_FCT + β·R_burst In α·R_fault, β·R_burst represents the contribution of bursty flow rewards. The larger β is, the more the policy training emphasizes performance under bursty flow scenarios. In the documentation, R_burst=1.5 is a fixed base reward value, and β is used as an adjustable coefficient to control its influence.
[0142] α (Fault Penalty Weight): Controls the weight of the R_fault item. α·R_fault represents the contribution of the fault penalty (note the negative sign). The larger α is, the more the policy training pays attention to the performance degradation problem under fault scenarios, and the learned policy is more conservative and robust under faults. The smaller α is, the smaller the impact of performance degradation under fault scenarios on policy training.
[0143] By adjusting α and β, the optimization emphasis of the strategy can be flexibly controlled in different scenarios—for example, α can be increased in network environments with frequent failures, while β can be increased in scenarios with sudden surges in traffic. These two coefficients are set before training and are hyperparameters for MAPPO training.
[0144] 4.3 Update the Actor using the PPO pruning objective function and update the Critic using the mean squared error; PPO clipping, or PPO-clip, introduces a clipping mechanism into the objective function to limit the magnitude of each policy update, thus preventing training from crashing due to excessively large single-step updates.
[0145] Mathematical form: The objective function of PPO-clip is: L^CLIP(θ)=min(r_t(θ)×A_t,clip(r_t(θ),1 ε,1+ε)×A_t), where: r_t(θ) = πθ(a_t|s_t) / πθ_old(a_t|s_t) is the ratio of the probability of the new policy and the old policy taking action a_t in state s_t.
[0146] A_t is the dominant function, i.e., A = R + γV(s′) in this application. V(s).
[0147] ε is the clipping parameter (ε=0.2 in this application), restricting r_t(θ) to [1 The range is within the range of ε, 1+ε]=[0.8, 1.2].
[0148] The min operation ensures that even if A_t is positive (a good move), the policy update will not be too large.
[0149] Actor Network Update (PPO-clip): Calculate the dominance function A = R + γV(s′). V(s) (Step 4.2).
[0150] Calculate the probability ratio of the new and old strategies r_t(θ) = πθ(a_t|o_t) / πθ_old(a_t|o_t).
[0151] Calculate the PPO-clip objective function L^CLIP=min(r_t(θ)×A, clip(r_t(θ), 0.8, 1.2)×A).
[0152] Calculate the gradient of L^CLIP and use the Adam optimizer (learning rate 3×10). -4 Update the Actor parameter θ to increase the probability of a good action (A>0) and decrease the probability of a bad action (A<0).
[0153] The pruning parameter ε=0.2 limits the magnitude of a single update.
[0154] Critic network update (mean squared error MSE): The goal of Critic is to accurately predict the state value V(s). The updated target value is: y = R + γV(s′) (i.e., the actual reward received is used as a monitoring signal).
[0155] Calculate the mean squared error loss: L_critic = (Vψ(s)) y) 2 .
[0156] Calculate the gradient of L_critic and update the Critic parameter ψ using the Adam optimizer so that Vψ(s) approximates the target value y.
[0157] Mean squared error is the standard loss function for regression tasks, and here it is used to make the output state value of the Critic network as close as possible to the actual cumulative reward.
[0158] Update frequency: After each episode (lasting 5ms), collect trajectory data (observations, actions, rewards, state transitions) of all agents in that episode, and use a mini-batch method to iteratively update the parameters of the Actor and Critic networks multiple times until convergence after 20,000 training episodes.
[0159] 4.4 Train for 20,000 rounds until the average reward converges (fluctuation <1% for 500 consecutive rounds).
[0160] 4.5 Employ magnitude-based pruning, removing 15% of the minimum weights at once; 4.6 Cross-scenario generalization: When H_link>0.75 or H_flow>0.8, meta-learning fine-tuning is automatically triggered, updating only the last two layers of the Actor. Convergence is determined when the FCT increase is <3%.
[0161] 4.7 Retrain for 1000 rounds to restore accuracy; 4.8 Final sparsity 30%.
[0162] S5. Deploy to the target network environment: 5.1 The trained Actor network weights are quantized using INT8 and then burned into the embedded NPUFlash of the smart network card; The weighted quantization scale s_w is calibrated based on the maximum absolute value; Activation quantization uses a moving average EMA with a window of 1024 samples. 5.2 During the online phase, the smart network card reads the observation o every 10μs and infers the transmission rate increment Δr within 1µs through the NPU; Fault self-healing closed loop: If an RNIC does not receive a heartbeat within 1.5ms, the peer RNIC immediately sends an Agent-Loss message to the Agent-Manager; the Manager reassigns the Agent according to the "least load priority" principle and completes the QP state transition within 2ms via an RCM message; the new Agent first executes the conservative strategy μ= 0.1 r, then switch to normal MAPPO inference within 5ms to ensure collaborative continuity.
[0163] 5.3 The new rate r′=r+Δr is fed back to the smart network interface card (NIC) transmission module to complete the flow rate control. (This is done after the model training is completed, when the model is deployed to the smart NIC, and the rate is updated through the hardware module (transmission module) of the smart NIC.)
[0164] The multi-agent reinforcement learning proposed in this application can be optimized through collaborative learning and decision-making among agents. Each router (agent) adjusts its forwarding strategy by learning its own state and actions. By observing information such as network congestion and link utilization, the agents select appropriate actions to control packet forwarding. Through continuous learning and optimization, the agents can gradually adjust their forwarding strategies to avoid network congestion.
[0165] By applying multi-agent reinforcement learning in network congestion control, more efficient and adaptive congestion control strategies can be achieved. Collaboration and learning among agents enable nodes in the network to effectively allocate resources and schedule traffic, thereby improving network performance and user experience.
[0166] This application considers multi-server collaboration from the following three aspects: Multi-agent modeling: The source-end intelligent network interface card (RNIC) of each RDMA flow is modeled as an independent agent, forming a multi-agent system consisting of N agents. Each agent independently observes the local network state and decides the transmission rate, but collaborative optimization among agents is achieved through MAPPO training.
[0167] Centralized Training-Distributed Execution (CTDE): During the training phase, a centralized Critic network is used, with global state such as the global switch queue length as input, allowing all agents to share a global perspective during training and learn collaborative strategies that take into account the behavior of other servers (other agents). During the execution phase, each agent relies only on local observations for decision-making and does not need to communicate with other agents in real time.
[0168] Collaborative mechanism design: Gradient random masking (step 2.2): Randomly mask the gradients of 5% of the agents in each mini-batch, forcing the remaining agents to learn to cooperate in scenarios where partners are missing, thereby improving the cooperative robustness in failure scenarios.
[0169] Fault self-healing closed loop (step 5.2): Introduce a three-layer mechanism of heartbeat-fault detection-flow takeover. When an RNIC goes offline, Agent-Manager automatically reassigns its tasks to other Agents to ensure collaborative continuity.
[0170] Cross-scenario generalization (steps 1.2b and 4.7): Through topology randomization and meta-learning fine-tuning, the same set of training weights is adapted to multi-server environments with different topologies.
[0171] This application can achieve the following technical effects: 1. The multi-agent Actor-Critic RDMA congestion control architecture treats each smart NIC source NIC as an independent intelligent agent, which can make decisions based solely on the local observation vector o=[r, τ, p_ecn].
[0172] 2. A global-local hybrid training mechanism is adopted. During the training phase, MAPPO is used. The centralized Critic inputs the global exchange queue length, while the distributed Actor only inputs local observations. The advantage estimation adopts GAE (λ=0.95) and PPO-clipε=0.2 to ensure stable convergence of multiple agents.
[0173] 3. Data acquisition and feature design: A lightweight eBPF probe is used to sample one data packet every 10μs and retain a 50 sliding window to count the proportion of ECN tags. Shared memory is pushed to the agent process with zero copy, and CPU usage is <1%.
[0174] 4. No changes to the switch are required; only the Agent-Manager software module is needed to achieve high availability and cross-scenario self-evolution capabilities.
[0175] Cross-scenario self-evolution is supported by the diversification of the training phase: 1. Topological randomization (step 1.2b); Each episode rewires 3% of links and adds 2% long, fat pipes with a probability of 0.4. After training 20,000 episodes, the model has seen enough topology variations to avoid overfitting to any fixed topology. Simultaneously, a 16-dimensional graph embedding vector g is generated, which encodes the current topology into a fixed-dimensional vector using a graph neural network, serving as input to the Actor network. This means the policy doesn't memorize how to control speed for a particular topology, but rather learns how to control speed given topology features g—the policy is a topology-aware function, not a topology-bound lookup table.
[0176] 2. Diversified traffic patterns (steps 1.3 + 1.3a). Basic traffic: 128 concurrent RDMA flows, with flow sizes following a Pareto (α=1.2) distribution; Superimposed bursts: Poisson pulses (interval 0.2ms, amplitude 10MB~1GB, width Log-Normal); The model experiences both steady and bursty traffic during training, and the learned strategy is robust to heterogeneous traffic patterns.
[0177] 3. Diverse fault scenarios (steps 1.2a + 2.2); During training, 1-3 RNICs are randomly taken offline for 2-10ms with a probability of 0.3. 5% of the agent gradients are randomly masked per mini-batch; These two features ensure that the strategy experiences partner absence scenarios during training, preventing strategy failure when real-world failures occur after deployment.
[0178] Fault self-healing is ensured through S5.2; Fault self-healing closed loop: If an RNIC does not receive a heartbeat within 1.5ms, the peer RNIC immediately sends an Agent-Loss message to the Agent-Manager. 4. Model compression and hardware mapping: after training, magnitude-based pruning is performed by 30%, followed by 1000 rounds of training to restore accuracy; INT8 symmetric quantization is used, and both weights and activations are calibrated; the final model is <400kB and can be burned into the embedded NPU of a smart network card.
[0179] 5. Online inference and closed-loop control: The smart NIC reads observations every 10μs, completes the inference output rate increment Δr within 1µs, and updates the NIC packet sending rate, achieving sub-millisecond closed-loop control.
[0180] 6. System-level deployment solution: NS-3 simulation-training-hardware deployment integrated script, supports one-click migration of any topology in Fat-Tree / Leaf-Spine, and the same set of weights supports 100G / 200G / 400G RDMA networks simultaneously without retraining.
[0181] This application adopts the classic switch feedback-sender-end adjustment single-ended closed loop, with only the sender as the decision-making entity, belonging to a single-agent heuristic algorithm. The feedback information is the instantaneous queue length Q, and the action is simple: decrease the speed if Q>0, otherwise increase the speed. There is no learning or generalization.
[0182] This application introduces deep reinforcement learning for the first time, but it is still from a single agent perspective: the entire sender has only one DRLagent, which needs to make decisions for multiple streams at the same time. The action space expands exponentially with the number of concurrent streams, resulting in poor scalability.
[0183] Compared to related technologies, this application models the source network card of each RDMA stream as an independent intelligent agent, forming a large-scale multi-agent system with one agent per machine; it adopts the MAPPO centralized training-distributed execution framework, which utilizes a global switch queue during the training phase and relies only on local observations during the execution phase, thus solving the problem of missing global information and avoiding action space explosion; it is the first to achieve sub-RTT level multi-agent collaboration (10µs control cycle) in the field of congestion control.
[0184] The control period in this application is 10 μs, while the RTT of a typical RDMA network is in the tens to hundreds of μs range. A 10 μs control period means that the agent can complete a rate adjustment (sub-RTT) in less than one RTT, allowing for earlier congestion response. Traditional schemes typically have rate adjustment periods in the millisecond range (such as the CNP feedback + rate update period in DCQCN), which is much longer than the RTT, resulting in delayed congestion response.
[0185] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0186] Reference Figure 7 The diagram shows a structural schematic of a reinforcement learning model chip according to an embodiment of this application. The reinforcement learning model chip 70 includes: The congestion notification technology module 701 is used to check the data packets to be sent to determine whether there is congestion on the corresponding path and to determine the current congestion notification value. Round-trip delay calculation module 702 is used to determine the round-trip delay based on the data packets to be sent; The data storage module 703 is used to receive the current displayed congestion notification value and output the average value of the displayed congestion notification and the recent transmission rate; Neural network 704 is deployed with a preset model. The preset model is obtained by training the global observation vectors collected by the multi-agent simulation network after simulation based on a pre-built multi-agent simulation network. The multi-agent simulation network includes multiple simulated terminal nodes and simulated smart network cards of each simulated terminal node. The neural network is used to determine the target local observation vector of the target smart network card based on the average value of the displayed congestion notification, round-trip delay, and recent transmission rate, and inputs the target local observation vector into the preset model to obtain the target transmission rate.
[0187] In this embodiment, the reinforcement learning model chip can be set in a smart network interface card; the chip may include a congestion notification technology module, a round-trip time delay calculation module, a data storage module, and a neural network.
[0188] Among them, the outsourced data packets can be parsed by the smart network card hardware and then enter the chip through the packet parsing input port. The data stream is first sent to the display congestion notification technology module and the round-trip delay calculation module.
[0189] The congestion notification technology module checks the ECN flag in the IP header of each data packet (marked by the switch when the queue exceeds a threshold) to determine if congestion exists on the current path. It then writes the ECN value to the data storage module.
[0190] The round-trip time (RTT) calculation module examines the sequence number in the IP header of each data packet and calculates the RTT τ=T_recv by querying the smart network interface card's hardware timestamp. T_send (precision 1μs). The calculated RTT value is passed down to the Actor neural network module (arrows indicate RTT values).
[0191] The data storage module continuously receives the current congestion notification value and maintains sliding window statistics, producing two types of feature data, which are then passed to the Actor neural network: The average of the last 50 ECNs (p_ecn), i.e., the average congestion notification value: the proportion of ECNs marked in the last 50 packets, calculated by the storage module and transmitted to the Actor via a one-way arrow. Recent transmission rate (r): Interacts with the Actor via a bidirectional arrow—the Actor's historical rate decision output is sent back to the storage module for storage, and the storage module also provides the current rate to the Actor as input. The neural network receives three inputs and assembles them into a complete observation vector o=[r, τ, p_ecn, g], as shown in Table 2: Table 2:
[0192] The Actor network performs INT8 quantized sparse matrix multiplication inference (with a delay of approximately 1 μs), outputs the rate increment Δr, and calculates the new transmission rate r′ = r + Δr.
[0193] The calculated new rate r′ (i.e., the target transmission rate) is first stored in the data storage module, and then output to the smart network card transmission module through the transmission rate signal flow control output port. The network card hardware sends packets according to the new rate, completing one closed-loop control cycle. The above steps are repeated in the next 10μs cycle.
[0194] Reference Figure 8The diagram illustrates a structural schematic of a remote direct memory access congestion control device according to an embodiment of this application, which may include the following modules: The generation module 801 is used to determine the target local observation vector of the target smart network card and input the target local observation vector into a preset model to obtain the target transmission rate of the smart network card. The sending module 802 is used to send the data packets to be sent according to the target sending rate; The preset model is obtained by training the global observation vectors collected by the pre-built multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and intelligent agents corresponding to the smart network cards of each simulated terminal node.
[0195] In some embodiments, the generation module 801 is used to input the target local observation vector into a preset model to obtain the transmission rate increment output by the preset model; and to determine the target transmission rate at the current moment based on the previously determined target transmission rate and the transmission rate increment.
[0196] In some embodiments, the apparatus further includes: The redistribution module is used to send a loss message for a smart network interface card (NIC) to the management server if no heartbeat information is received from a NIC. The management server is used to determine the NIC with the least load and distribute the message to the NIC with the least load.
[0197] In some embodiments, the apparatus further includes: The training module is used to randomly take a first number of simulated smart network cards offline with a first probability during each training session; and / or, during each training session, to rewire the links in the multi-agent simulated network at a first proportion with a second probability, and randomly add a second proportion of long, thick pipes.
[0198] In some embodiments, the apparatus further includes: The training module generates multidimensional graph embedding vectors as input expansions for model training each time the expansion changes.
[0199] In some embodiments, the apparatus further includes: The training module randomly generates M concurrent remote direct memory access streams within a preset round duration, where M is a positive integer; the size of the streams follows a Pareto distribution and is superimposed with burst Poisson pulses.
[0200] In some embodiments, the apparatus further includes: The training module prunes the preset model to remove the minimum weights of the target proportion; generalizes the pruned preset model to the scene; and retrains the scene-generalized preset model.
[0201] In this embodiment, the target local observation vector of the target smart network interface card (NIC) is determined, and the target local observation vector is input into a preset model to obtain the target transmission rate of the smart NIC. Data packets to be transmitted are sent according to the target transmission rate. The preset model is obtained by training the global observation vectors collected from a pre-built multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and the intelligent agents corresponding to the smart NICs of each simulated terminal node. In this embodiment, switch queues and cross-link states become visible during the training phase. The core mechanism lies in the centralized training-distributed execution framework of MAPPO. Specifically, during the training phase, training is performed in a simulation environment such as NS-3. The simulator, as a global information source, can completely acquire global observation vectors such as the instantaneous queue length of all switches and the utilization rate of all links. These global observation vectors are input into a centralized Critic network Vψ(s) to calculate the state value function and advantage function, guiding the policy optimization direction. Global visibility occurs because the simulation environment naturally possesses a global view. Execution Phase (Post-Deployment): After training, the Actor network πθ(a|o) is deployed to each smart NIC. The Actor can make rate decisions based solely on local observation vectors. At this stage, global switch queue information is not required. This application employs a centralized training-distributed execution strategy. During the training phase, the Critic is trained using a global queue, and during the execution phase, each smart NIC can make decisions based solely on local observation vectors, balancing global optimization and scalability.
[0202] This application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described method for controlling remote direct memory access congestion.
[0203] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0204] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0205] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0206] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0207] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0208] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0209] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0210] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the statement "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0211] The above provides a detailed description of the remote direct memory access congestion control method, apparatus, medium, and reinforcement learning model chip. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for controlling congestion in remote direct memory access, characterized in that, The method includes: Determine the target local observation vector of the target smart network card, and input the target local observation vector into a preset model to obtain the target transmission rate of the smart network card; The data packets to be sent are sent according to the target sending rate; The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and intelligent agents corresponding to the smart network cards of each simulated terminal node.
2. The method according to claim 1, characterized in that, The step of inputting the target local observation vector into a preset model to obtain the target transmission rate of the smart network card includes: Input the target local observation vector into a preset model to obtain the transmission rate increment output by the preset model; The target transmission rate at the current moment is determined based on the previously determined target transmission rate and the transmission rate increment.
3. The method according to claim 1, characterized in that, The method further includes: If no heartbeat information is received from a smart network interface card (NIC), a loss message for the smart NIC is sent to the management server. The management server is used to determine the smart NIC with the lowest load and allocate messages for the smart NIC with the lowest load to that smart NIC.
4. The method according to claim 1, characterized in that, The method further includes: During each training session, a first number of simulated smart network cards are randomly taken offline with a first probability; and / or, During each training iteration, the links in the multi-agent simulation network are rewired with a second probability at a first-proportion ratio, and long, fat pipes are randomly added at a second-proportion ratio.
5. The method according to claim 4, characterized in that, The method further includes: Each time the expansion changes, a multidimensional graph embedding vector is generated as an input expansion for model training.
6. The method according to claim 1, characterized in that, The method further includes: Within a preset round duration, M concurrent remote direct memory access streams are randomly generated, where M is a positive integer; the size of the streams follows a Pareto distribution and is superimposed with burst Poisson pulses.
7. The method according to claim 1, characterized in that, The method further includes: The preset model is pruned to remove the minimum weight of the target proportion; Generalize the pre-defined model after pruning to fit a specific scenario. The preset model after scene generalization is retrained.
8. A control device for remote direct memory access congestion, characterized in that, The device includes: The generation module is used to determine the target local observation vector of the target smart network card and input the target local observation vector into a preset model to obtain the target transmission rate of the smart network card; The sending module is used to send the data packets to be sent according to the target sending rate; The preset model is obtained by training the global observation vectors collected by the pre-constructed multi-agent simulation network after simulation. The multi-agent simulation network includes multiple simulated terminal nodes and intelligent agents corresponding to the smart network cards of each simulated terminal node.
9. A reinforcement learning model chip, characterized in that, include: The congestion notification technology module is used to check the data packets to be sent to determine whether there is congestion on the corresponding path and to determine the current congestion notification value. The round-trip delay calculation module is used to determine the round-trip delay based on the data packet to be sent; The data storage module is used to receive the current display congestion notification value and output the average display congestion notification value and the recent transmission rate; The neural network is equipped with a preset model; the preset model is obtained by training the global observation vectors collected by the multi-agent simulation network after simulation based on a pre-built multi-agent simulation network. The multi-agent simulation network includes multiple simulated terminal nodes and simulated smart network cards for each simulated terminal node; the neural network is used to determine the target local observation vector of the target smart network card based on the average value of the displayed congestion notification, the round-trip time, and the most recent transmission rate, and input the target local observation vector into the preset model to obtain the target transmission rate.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the remote direct memory access congestion control method as described in any one of claims 1 to 7.
