A method for controlling a sending buffer based on network congestion
Patent Information
- Application Number
- CN202410863318.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-29
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2044-06-29
AI Technical Summary
在这一过程中,对发送缓存buffer缺乏状态监控和充分控制,同时影响调度策略,速率收敛缓慢
[0029]1、基于网络拥塞的缓存控制方法能够在不同拥塞条件下自调节发送速率,且能做到快速响应,缓解拥塞。
Smart Images

Figure CN118827554B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data communication technology in data centers, and in particular to a transmission buffer control method based on network congestion. Background Technology
[0002] RDMA, a kernel-bypass remote direct data access technology, is widely used in high-performance data centers and server clusters. RDMA technology can bypass the kernel to directly access the memory of remote servers, achieving zero-copy data transfer, reducing the CPU load, and thus improving network throughput and reducing network communication latency.
[0003] Currently, a lossless network environment is required to ensure the high performance of RDMA, and this lossless guarantee is achieved by deploying PFC and ECN functions in the RDMA network.
[0004] Priority Flow Control (PFC) uses priority queues for flow control. When congestion occurs at the switch inlet, it sends PFCPause frames to backpressure upstream devices to prevent buffer overflow and packet loss. ECN implements end-to-end congestion control. When congestion occurs at the switch egress, ECN is marked on data packets. When the receiving server detects the marked ECN, it generates a CNP packet and sends it to the source server. Upon receiving the CNP packet, the source server reduces the sending rate of the corresponding flow to alleviate network congestion and avoid packet loss. This is typically achieved by setting different buffer waterlines, allowing the server to actively reduce its packet sending rate or pause packet transmission to prevent packet loss.
[0005] When network congestion occurs, the receiving device sends a congestion message to the sending device. Upon receiving the congestion notification, the sending device reduces the message transmission rate or stops sending messages. Internally, the sending buffer flow control acts as backpressure on the upper-level scheduling unit, causing the scheduling unit to stop initiating data DMA services. Scheduling resumes once congestion is alleviated. During this process, there is a lack of state monitoring and sufficient control over the sending buffer, which also affects the scheduling strategy and results in slow rate convergence. Summary of the Invention
[0006] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] In a first aspect, the present invention provides a transmission buffer control method based on network congestion, comprising the following steps:
[0009] S1. The congestion processing unit detects and counts the CNP messages received within a unit time interval, and calculates the rate adjustment factor α and the current adjustment rate Rt using relevant formulas.
[0010] S2. The scheduling unit receives the service requests from the service units and the adjustment rate Rt from the congestion units, and calculates the scheduling margin for allocating the service requests.
[0011] S3. The cache control unit receives and parses the descriptors sent by the record service unit;
[0012] S4. The descriptor parsing module sends the cache data description information, such as the cache data size, the number of cached packets, and the packet data length, to the cache status monitoring module.
[0013] S5. The rate control module obtains the congestion unit adjustment rate Rt, calculates and updates the transmission enable req_en, and passes it to the output control module to control the transmission of buffered output packets.
[0014] S6. When the sending rate decreases or increases, if the buffered data increases monotonically, the backpressure scheduling level Lv is increased; if the buffered data decreases monotonically, the backpressure scheduling level Lv is decreased. At the same time, it is determined whether the incremental index E is non-zero. If it is non-zero, the corresponding coefficient β is added or subtracted from the current backpressure scheduling level to increase the adjustment step.
[0015] S7. Dynamically adjust according to congestion conditions, and proactively request scheduling to increase or decrease scheduling;
[0016] S8. When the congestion is relieved, the rate control module no longer judges the congestion adjustment rate and directly restores the normal transmission rate under the system set bandwidth.
[0017] S9. When the output control module receives back pressure from the lower level, it controls the transmit buffer to stop sending data, and the back pressure rate control module determines the remaining space in the transmit buffer, quickly adjusts the back pressure level in large increments, and feeds back to the scheduling unit to reduce data scheduling or stop scheduling.
[0018] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, in step S2, while calculating the scheduling margin for allocating service requests, it is necessary to analyze and process the backpressure scheduling parameters fed back by the buffer control unit and adjust the scheduling strategy.
[0019] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, wherein: in step S3, the size of the buffered data, the number of buffered packets k, the length of the packet data to be sent, and the length of the packet data to be received are obtained through the internal descriptor analysis module.
[0020] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, the main function of the buffer status monitoring module in S4 includes writing status monitoring data into the status register for reporting.
[0021] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, the main function of the buffer status monitoring module in S4 further includes calculating the time T required to send the data packet and the data increment index E based on the current transmission rate and the buffer data size, and outputting them to the rate control module.
[0022] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, wherein: in S5, the output control module generates a backpressure scheduling level Lv based on the amount of buffered data and the data increment index E, and feeds it back to the scheduling module.
[0023] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, in step S7, when the congestion is relatively light, the rate control module dynamically adjusts the backpressure scheduling level to maintain a dynamic balance in the amount of buffered data at the current transmission rate; when the congestion is heavy, the buffered data reaches the waterline, and it is determined whether there is space buffer for the next message length. If there is no space buffer, full backpressure is applied and scheduling is stopped.
[0024] As a preferred embodiment of the network congestion-based transmission buffer control method of the present invention, wherein: S8 determines the space remaining of the transmission buffer, quickly adjusts the backpressure level in large steps, and feeds back to the scheduling unit to restore normal data scheduling and increase scheduling.
[0025] Secondly, the present invention also provides a transmission buffer control system based on network congestion, specifically including:
[0026] The system includes a message parsing unit, a congestion handling unit, a service processing unit, a scheduling unit, a buffer control unit, a DMA control unit, and a transmit buffer unit.
[0027] As a preferred embodiment of the network congestion-based transmission buffer control system of the present invention, the buffer control unit includes: a descriptor analysis module, a status monitoring module, a rate control module, and an output control module.
[0028] The beneficial effects of this invention are:
[0029] 1. The network congestion-based buffer control method can automatically adjust the sending rate under different congestion conditions and can respond quickly to alleviate congestion.
[0030] 2. For simple control scheduling backpressure where the cache is not limited to being empty or about to reach the waterline overflow state, implement multi-level scheduling feedback for multiple cache states to optimize the current scheduling strategy.
[0031] 3. Analyze and process descriptors to understand the current cache state, better utilize bandwidth, avoid empty reads, and reduce transmission latency. Simultaneously, pre-analyze the size of the next scheduled data to fully utilize cache space.
[0032] 4. Provides status monitoring of the sending cache to help improve data analysis and optimize algorithm design in network environment testing.
[0033] 5. This design module is suitable for various network environments and devices, has strong versatility, and is easy to port. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0035] Figure 1 This is a flowchart of a transmission buffer control method based on network congestion proposed in this invention;
[0036] Figure 2 This is an architecture diagram of a network congestion-based transmission buffer control system proposed in this invention. Detailed Implementation
[0037] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0038] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0039] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0040] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.
[0041] Reference Figure 1-2 This invention provides a transmission buffer control method based on network congestion, comprising the following steps:
[0042] S1. The congestion processing unit detects and counts the CNP messages received within a unit time interval, and calculates the rate adjustment factor α and the current adjustment rate Rt using relevant formulas.
[0043] S2. The scheduling unit receives the service requests from the service units and the adjustment rate Rt from the congestion units, and calculates the scheduling margin for allocating the service requests.
[0044] S3. The cache control unit receives and parses the descriptors sent by the record service unit;
[0045] S4. The descriptor parsing module sends the cache data description information, such as the cache data size, the number of cached packets, and the packet data length, to the cache status monitoring module.
[0046] S5. The rate control module obtains the congestion unit adjustment rate Rt, calculates and updates the transmission enable req_en, and passes it to the output control module to control the transmission of buffered output packets.
[0047] S6. When the sending rate decreases or increases, if the buffered data increases monotonically, the backpressure scheduling level Lv is increased (a positive value indicates a reduction in scheduling); if the buffered data decreases monotonically, the backpressure scheduling level Lv is decreased (a negative value indicates an increase in scheduling). At the same time, it is determined whether the incremental index E is non-zero. If it is non-zero, the corresponding coefficient β is added or subtracted from the current backpressure scheduling level to increase the adjustment step.
[0048] S7. Dynamically adjust according to congestion conditions, and proactively request scheduling to increase or decrease scheduling;
[0049] S8. When the congestion is relieved, the rate control module no longer judges the congestion adjustment rate and directly restores the normal transmission rate under the system set bandwidth.
[0050] S9. When the output control module receives back pressure from the lower level, it controls the transmit buffer to stop sending data, and the back pressure rate control module determines the remaining space in the transmit buffer, quickly adjusts the back pressure level in large increments, and feeds back to the scheduling unit to reduce data scheduling or stop scheduling.
[0051] In step S2, while calculating the scheduling margin for allocating service requests, it is also necessary to analyze and process the backpressure scheduling parameters fed back by the cache control unit, and adjust the scheduling strategy. By analyzing the backpressure scheduling parameters, the strategy can be adjusted accordingly.
[0052] Furthermore, in S3, the size of the cached data, the number of cached packets k, the length of the packet data to be sent (descriptor 1), and the length of the packet data to be received (descriptor k+1) are obtained through the internal descriptor analysis module.
[0053] Furthermore, the main function of the cache status monitoring module in S4 includes writing status monitoring data into the status register for reporting.
[0054] Furthermore, the main functions of the cache status monitoring module in S4 also include calculating the time T required to send the data packet and the data increment index E (the increment of cached data per unit time) based on the current sending rate and the size of the cached data, and outputting them to the rate control module.
[0055] Furthermore, in S5, the output control module generates a backpressure scheduling level Lv based on the amount of cached data and the data increment index E, and feeds it back to the scheduling module.
[0056] Furthermore, in S7, when congestion is relatively mild, the rate control module dynamically adjusts the backpressure scheduling level to maintain a dynamic balance in the amount of cached data at the current sending rate; when congestion is severe and the cached data reaches the waterline, it is determined whether there is space for cache in the next message length. If there is no space for cache, backpressure is applied completely and scheduling is stopped.
[0057] Furthermore, S8 determines the remaining space of the sending buffer, quickly adjusts the backpressure level in large steps, and feeds back to the scheduling unit to restore normal data scheduling and increase scheduling.
[0058] This embodiment also provides a transmission buffer control system based on network congestion, specifically including:
[0059] The system includes a message parsing unit, a congestion handling unit, a service processing unit, a scheduling unit, a buffer control unit, a DMA control unit, and a transmit buffer unit.
[0060] Furthermore, the cache control unit includes:
[0061] The descriptor analysis module obtains the size of cached data, the number of cached packets, and the length of each packet; the status monitoring module reports cached data information, calculates the cached data transmission time, and the data increment per unit time; the rate control module obtains the adjustment rate Rt, calculates the transmission enable req_en, and provides feedback on the backpressure scheduling level; the output control module controls the output of the transmission buffer, receives backpressure from lower-level modules, and stops transmission.
[0062] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A transmission buffer control method based on network congestion, characterized in that: Includes the following steps: S1. The congestion processing unit detects and counts the CNP messages received within a unit time interval, and calculates the rate adjustment factor α and the current adjustment rate Rt using relevant formulas. S2. The scheduling unit receives the service requests from the service processing unit and the adjustment rate Rt from the congestion processing unit, and calculates the scheduling margin for allocating the service requests. S3. The cache control unit receives and parses the descriptors sent by the record service unit; S4. The descriptor analysis module sends cached data information, including cached data size, number of cached packets, and packet data length, to the cache status monitoring module. S5. The rate control module obtains the congestion unit adjustment rate Rt, calculates and updates the transmission enable req_en, and passes it to the output control module to control the transmission of buffered output packets. S6. When the transmission rate decreases or increases, if the buffered data increases monotonically, the backpressure scheduling level Lv is increased; if the buffered data decreases monotonically, the backpressure scheduling level Lv is decreased. At the same time, it is determined whether the data increment index E is non-zero. If it is non-zero, the coefficient β is adjusted on the current backpressure scheduling level, and the adjustment step is increased. The data increment index E refers to the increment of buffered data per unit time. The backpressure scheduling level Lv is a parameter generated based on the amount of buffered data and the data increment index E and fed back to the scheduling unit to control the scheduling behavior. S7. Dynamically adjust according to congestion conditions, and proactively request scheduling to increase or decrease scheduling; S8. When the congestion is relieved, the rate control module no longer judges the congestion adjustment rate and directly restores the normal transmission rate under the system set bandwidth. S9. When the output control module receives back pressure from the lower level, it controls the transmission buffer to stop sending data. The back pressure rate control module judges the remaining space of the transmission buffer and quickly adjusts the back pressure level in large steps. The feedback scheduling unit reduces data scheduling or stops scheduling. The cache control unit includes: Descriptor analysis module; cache status monitoring module; rate control module; output control module.
2. The transmission buffer control method based on network congestion according to claim 1, characterized in that: In step S2, while calculating the scheduling margin for allocating service requests, it is also necessary to analyze and process the backpressure scheduling parameters fed back by the cache control unit and adjust the scheduling strategy.
3. The transmission buffer control method based on network congestion according to claim 2, characterized in that: In S3, the size of the cached data, the number of cached packets k, the length of the packet data to be sent, and the length of the packet data to be received are obtained through the internal descriptor analysis module.
4. The transmission buffer control method based on network congestion according to claim 3, characterized in that: The cached status monitoring module in S4 includes the function of writing status monitoring data into the status register for reporting.
5. The transmission buffer control method based on network congestion according to claim 4, characterized in that: The cache status monitoring module in S4 also includes calculating the time T required to send a data packet and the data increment index E based on the current sending rate and the cache data size, and outputting them to the rate control module.
6. The transmission buffer control method based on network congestion according to claim 5, characterized in that: The output control module in S5 generates a backpressure scheduling level Lv based on the amount of cached data and the data increment index E, and feeds it back to the scheduling unit.
7. The transmission buffer control method based on network congestion according to claim 6, characterized in that: In S7, when congestion is mild, the rate control module dynamically adjusts the backpressure scheduling level to maintain a dynamic balance in the amount of cached data at the current sending rate; when congestion is severe, the cached data reaches the waterline, and it is determined whether there is space for the next message length to be cached. If there is no space for cache, backpressure is applied completely and scheduling is stopped.
8. The transmission buffer control method based on network congestion according to claim 7, characterized in that: In step S8, the remaining space of the sending buffer is determined, the backpressure level is quickly adjusted in large steps, and the feedback scheduling unit is used to restore normal data scheduling and increase scheduling.
9. A transmission buffer control system based on network congestion, and a transmission buffer control method based on network congestion according to any one of claims 1-8, characterized in that: Specifically, it includes: The system includes a message parsing unit, a congestion handling unit, a service processing unit, a scheduling unit, a buffer control unit, a DMA control unit, and a transmit buffer unit.
Citation Information
Patent Citations
Method for determining back pressure waterline value and related device
CN116204298A
CPU soft forwarding congestion processing method, system and device and readable storage medium
CN118101568A