A method and system for long-distance communication retransmission in RDMA
By accurately comparing data packet sequence numbers and performing intelligent reordering and replacement management in RDMA long-distance communication, the overreaction problem of packet loss retransmission mechanism is solved, achieving more efficient network transmission and bandwidth utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2024-01-22
- Publication Date
- 2026-05-26
AI Technical Summary
In RDMA long-distance communication, existing packet loss retransmission mechanisms suffer from overreaction and long waiting times for the sender, resulting in performance overhead and reduced bandwidth utilization.
The receiver checks the data packet sequence number and performs reordering queue management. It determines whether to reorder based on queue length, sequence number start, and sequence number continuity. The quicksort algorithm and replacement algorithm are used to optimize queue management. The sender dynamically adjusts the retransmission strategy according to network conditions.
This reduces unnecessary retransmissions, improves network transmission efficiency and bandwidth utilization, and ensures communication reliability and high performance.
Smart Images

Figure CN117879768B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of RDMA long-distance communication technology, and in particular to an RDMA long-distance communication retransmission method and system. Background Technology
[0002] Data center networks are the infrastructure that supports the rapid storage and efficient processing of massive amounts of data. As the scale of data center computing clusters expands, increasingly higher demands are placed on the network performance of the interconnection between clusters. However, the high latency and high CPU load inherent in traditional TCP / IP protocol stacks are gradually failing to meet the needs of high-performance computing services. To reduce latency and CPU load in data center networks, Redirect DMA (Redirect Data Interchange) technology has emerged.
[0003] RDMA technology enables direct data buffer transfer between two nodes without the need for CPU, operating system, or network protocol stack, thus achieving low-latency data processing and high-throughput data transmission. Currently, RDMA technology is widely used in data center networks, but only within the data center network itself, i.e., a communication distance of up to 1 km.
[0004] However, current cross-data center communication (communication distance approximately 1000km) still requires WAN (Wide Area Network) communication, accompanied by two layers of conversion between RDMA and TCP / IP protocols. This conversion incurs significant overhead, resulting in very low network transmission efficiency. To address this issue, one solution is to directly employ long-distance link connection for RDMA communication, i.e., RDMA long-distance communication. This approach avoids conversion overhead and improves network transmission efficiency. Implementing RDMA long-distance communication can bring lower latency and higher throughput to cross-data center communication, further meeting the high-performance requirements of data center networks. Summary of the Invention
[0005] Given that existing packet loss retransmission mechanisms can lead to overreaction and long waiting times for the sender, resulting in additional performance overhead and reduced bandwidth utilization, this invention is proposed.
[0006] Therefore, the problem to be solved by this invention is how to improve the retransmission method in RDMA long-distance communication to improve the efficiency and performance of network transmission.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] In a first aspect, embodiments of the present invention provide a long-distance RDMA communication retransmission method, which includes a receiver receiving a data packet and checking the sequence number of the data packet; comparing the sequence number of the data packet with the expected sequence number es to determine whether the data packet arrived in order; if the data packet is ordered, the receiver increments the expected sequence number es and sends an ACK to the sender to indicate that the data packet has been successfully received; if the data packet is out of order, the data packet is placed in a queue in the reordering area, and a judgment mechanism is used to determine whether the data packets in the queue can be restored to an ordered state through reordering.
[0009] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the judgment mechanism includes queue length judgment, sequence number start judgment, and sequence number continuity judgment. The specific formula for queue length judgment is as follows:
[0010] cur_size <Thresh
[0011] Here, cur_size represents the current number of packets in the reordering queue, and Thresh represents the maximum capacity of the reordering queue.
[0012] The specific formula for determining the starting serial number is as follows:
[0013] min_seq = expect_seq
[0014] Here, min_seq represents the smallest data packet sequence number in the queue, and expect_seq represents the expected sequence number es recorded when an out-of-order data packet is received.
[0015] The specific formula for determining the continuity of serial numbers is as follows:
[0016] max_seq - min_seq + 1 = cur_size
[0017] Here, cur_size represents the current number of packets in the reordering queue, min_seq represents the smallest packet sequence number in the queue, and max_seq represents the largest packet sequence number in the queue.
[0018] If the queue length condition is met, and the sequence number start condition and sequence number continuity condition are also met, the data packets in the queue are determined to be reorderable. In this case, the quicksort algorithm is used to reorder the data packets in the queue. If the queue length condition is met, but the sequence number start condition and sequence number continuity condition are not met, the queue is determined to continue waiting. In this state, the queue continues to perform the next round of judgment as new data packets enter. If the queue length condition is not met, the queue is determined to be non-reorderable. In this case, the reordering queue is cleared, and a NACK with PSN of expect_seq is sent to the sender. PSN represents the data packet sequence number. When facing a high number of concurrent streams, if the number of out-of-order streams exceeds the preset reordering queue capacity, an appropriate replacement algorithm is used to manage the queue. The receiver enters the wait-for-retransmission mode, in which all data packets with PSN not equal to expect_seq are discarded. The receiver exits the wait-for-retransmission mode and returns to the normal send / receive mode after receiving a data packet with PSN equal to expect_seq.
[0019] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the following steps are included in determining whether data packets in the queue can be restored to an ordered state through reordering: if it is determined that the data packets can be restored to an ordered state through reordering, the receiver reorders the data packets and puts them into a buffer; the current reordering queue is cleared, and an ACK is sent to the sender to confirm successful reception of the data packets; if the data packets cannot be restored to an ordered state through reordering, the receiver sends a NACK to the sender and clears the current reordering queue; for all subsequently received data packets, the receiver continues to compare the sequence number of the data packets with the expected sequence number es; if the sequence numbers match, the data packets are put into the buffer; if the sequence numbers do not match, these data packets are discarded directly.
[0020] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the Thresh setting includes the following steps: estimating the out-of-order degree of data packets Thresh based on RTT and RTT jitter. g The specific formula is as follows:
[0021] Thresh g =α(RTT*sqrt(Var)) / MSS+β
[0022] Where RTT represents round-trip time, Var represents the variance of RTT, MSS represents the maximum segment length, α represents the multiplicative factor, and β represents the additive factor.
[0023] Eliminate excessive Thresh using EWMA g The formula for calculating the jitter caused by the estimated value is as follows:
[0024] Thresh(k+1)=(1-δ)·Thresh g +δ·Thresh(k)
[0025] Where Thresh(k+1) represents the Thresh value at time k+1, Thresh(k) represents the Thresh value at time k, δ represents the weight, and Thresh... g The RTT and RTT jitter estimate the degree of packet out-of-order delivery.
[0026] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the replacement algorithm includes the following steps: Within the reordering zone of RDMA communication, a comprehensive scoring mechanism is implemented for each queue. This scoring mechanism is based on three key dimensions: the existence of the first packet in the queue, the total number of data packets, and the timestamp of the latest data packet in the queue. In the RDMA Write operation, the first data packet contains the crucial RETH. If the queue contains the first packet, then this queue is assigned a high score in the scoring mechanism. The timestamp of the latest data packet in the queue determines the timeliness of the queue. Queues that have not been updated for a long time are identified by sorting the timestamps in descending order. If a queue has not been updated for a long time, then this queue is assigned a low score in the scoring mechanism and is given priority for elimination. The queues within the reordering zone are evaluated according to the above scoring mechanism to determine whether each queue should be retained or eliminated.
[0027] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the specific formula for the scoring mechanism is as follows:
[0028]
[0029] Where λ1, λ2, and λ3 represent the weights of the three key dimensions, N represents the length of the queue, n represents the number of data packets in the queue, R represents the number of queues in the reordering area, and r represents the ranking of the timestamp of the most recent data packet in the current queue among all queues. If the first packet exists, then f(x) = 1; if the first packet does not exist, then f(x) = 0.
[0030] As a preferred embodiment of the RDMA long-distance communication retransmission method described in this invention, the sending party's processing flow is as follows: The sending party initializes data transmission, assigns a unique sequence number to each data packet, and sends them to the receiving party in sequence; after transmission is completed, it waits for the receiving party to respond with ACK or NACK, where ACK indicates that the data packet was successfully received, and NACK indicates that retransmission is performed for data packets after a specific sequence number; upon receiving NACK, the sending party retransmits the corresponding data packet according to the provided sequence number; the sending party dynamically adjusts the transmission strategy according to network conditions and receiving party feedback, and continuously monitors network conditions to adjust the retransmission strategy in real time; a timeout mechanism is set, and if no ACK is received from the receiving party within the predetermined timeout range, retransmission is triggered; after confirming that all data packets have been received, the current transmission task is completed; if there is subsequent data, the above process continues.
[0031] Secondly, embodiments of the present invention provide an RDMA long-distance communication retransmission system, which includes a receiving module for receiving data packets and checking the sequence number of the data packets; a comparison module for comparing the sequence number of the data packets with the expected sequence number es to determine whether the data packets arrived in order; an ordering module for performing an increment operation on the expected sequence number es and sending an ACK to the sender to indicate that the data packets have been successfully received; and an unordered module for placing the data packets into a queue in the reordering area and using a judgment mechanism to determine whether the data packets in the queue can be restored to an ordered state through reordering.
[0032] Thirdly, embodiments of the present invention provide a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, they implement the steps of the RDMA long-distance communication retransmission method as described in the first aspect of the present invention.
[0033] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, they implement the steps of the RDMA long-distance communication retransmission method as described in the first aspect of the present invention.
[0034] The beneficial effects of this invention are as follows: By accurately comparing the received data packet sequence number with the expected sequence number, this invention reduces unnecessary retransmissions and avoids excessive retransmissions in the traditional go-back-n mechanism; the designed storage replacement algorithm can effectively manage data packets in the out-of-order queue, and improves the utilization efficiency of limited space through intelligent scoring and replacement mechanisms, ensuring higher processing capabilities; the linear correlation probability mechanism determines the behavior of sending non-cumulative acknowledgment signals, allowing for more flexible and rapid handling of out-of-order and lost data packets; by retransmitting only the required data packet sequence, rather than the entire window of data packets, unnecessary network traffic and retransmissions are significantly reduced, optimizing the use of network resources; the strategy of introducing a three-retransmission limit reduces the sender's waiting time, allowing the sender to continue sending new data as soon as possible, thereby effectively improving bandwidth utilization and overall communication reliability. Attached Figure Description
[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0036] Figure 1 This is a flowchart of the overall process for the RDMA long-distance communication retransmission method.
[0037] Figure 2 The default retransmission method for long-distance RDMA communication is go-back-n.
[0038] Figure 3 A redesigned retransmission method for long-distance RDMA communication.
[0039] Figure 4 This is a diagram illustrating the overall framework of the RDMA long-distance communication retransmission method.
[0040] Figure 5 This is the pseudocode for an algorithm used in RDMA long-distance communication retransmission methods to determine whether order can be restored through reordering.
[0041] Figure 6 A comparison of the sender retransmission mechanism and go-back-n in RDMA long-distance communication retransmission methods.
[0042] Figure 7 An example of a permutation algorithm designed for the reordering region in a long-distance RDMA communication retransmission method.
[0043] Figure 8This is a receiver state transition diagram for an embodiment of an RDMA long-distance communication retransmission method.
[0044] Figure 9 This diagram illustrates the changes in the transmit buffer and reordering area in the case of successful reordering in the RDMA long-distance communication retransmission method.
[0045] Figure 10 A schematic diagram illustrating the method for calculating the NACK probability in RDMA long-distance communication retransmission.
[0046] Figure 11 This is a network topology diagram for the RDMA long-distance communication retransmission method.
[0047] Figure 12 This is a comparison chart showing the proportion of each data packet in the simulation results of the RDMA long-distance communication retransmission method.
[0048] Figure 13 The graph shows a comparison of throughput between two methods in the simulation results of the RDMA long-distance communication retransmission method. Detailed Implementation
[0049] 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.
[0050] 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.
[0051] 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.
[0052] Example 1
[0053] Reference Figures 1-10 This is the first embodiment of the present invention, which provides an RDMA long-distance communication retransmission method, including:
[0054] S1: The receiver receives the data packet and checks the sequence number of the data packet.
[0055] Preferably, compared to the default go-back-n retransmission mechanism, the retransmission mechanism of this invention has... Figure 2 and Figure 3A comparison was made. It is clear that the retransmission mechanism of this invention reduces the number of retransmissions, thereby reducing performance overhead.
[0056] Furthermore, the basic framework of the RDMA long-distance communication retransmission method of the present invention is as follows: Figure 4 As shown in the diagram, a reordering region is pre-allocated within the SRAM of the RDMA network card. Because the reordering region is located within the SRAM, very low random access latency, reaching nanosecond levels, can be achieved. However, the SRAM space on the RDMA network card is very limited, so only about a few hundred KB of space can be allocated, the specific size depending on the SRAM capacity.
[0057] Furthermore, within the reordering region, there are multiple reordering queues, each corresponding to a data stream. These queues are used to store out-of-order data packets, and storage resources are managed using a novel storage replacement algorithm. This algorithm is designed to optimize the utilization efficiency of storage resources to meet the high-performance requirements of long-distance communication.
[0058] S2: Compare the sequence number of the data packet with the expected sequence number es to determine whether the data packet arrived in order.
[0059] Specifically, when the receiver buffer receives a data packet sent by the sender, it first checks whether the packet sequence number (PSN) of the data packet is the same as the expected sequence number (es) of the received data packet. If they are the same, it means that the received data packet is ordered.
[0060] S3: If the data packet is ordered, the receiver increments the expected sequence number es and sends an ACK to the sender to indicate that the data packet has been successfully received.
[0061] S4: If the data packet is out of order, put the data packet into the queue of the reordering area and use a judgment mechanism to determine whether the data packets in the queue can be restored to an ordered state through reordering.
[0062] It should be noted that the judgment mechanism for determining whether data packets in the queue can be restored to an ordered state through reordering includes the following steps: If it is determined that the data packets can be restored to an ordered state through reordering, the receiver reorders the data packets and puts them into the buffer; the current reordering queue is cleared, and an ACK is sent to the sender to confirm successful reception of the data packets; if the data packets cannot be restored to an ordered state through reordering, the receiver sends a NACK to the sender and clears the current reordering queue; for all subsequently received data packets, the receiver continues to compare the sequence number of the data packets with the expected sequence number es; if the sequence numbers match, the data packets are put into the buffer; if the sequence numbers do not match, these data packets are discarded directly.
[0063] Preferably, the judgment mechanism includes queue length judgment (condition 1), sequence number start judgment (condition 2), and sequence number continuity judgment (condition 3), as follows:
[0064] Condition 1: cur_size <Thresh;
[0065] Condition 2: min_seq=expect_seq;
[0066] Condition 3: max_seq - min_seq + 1 = cur_size;
[0067] Where, cur_size represents the current number of packets in the reordering queue, Thresh represents the maximum capacity of the reordering queue, min_seq represents the smallest packet sequence number in the queue, max_seq represents the largest packet sequence number in the queue, and expect_seq represents the expected sequence number es recorded when an out-of-order packet is received.
[0068] It should be noted that cur_size increases as data packets enter the queue, and a check is performed every time a new data packet enters the reordering queue.
[0069] Furthermore, if the queue length judgment (condition 1) is satisfied, and the sequence number start judgment (condition 2) and sequence number continuity judgment (condition 3) are also satisfied, the system is determined to be in a reorderable state. In this case, the quicksort algorithm is used to reorder the data packets in the queue. If the queue length judgment (condition 1) is satisfied, but the sequence number start judgment (condition 2) and sequence number continuity judgment (condition 3) are not satisfied, the system is determined to be in a waiting state. In this state, the queue continues to perform the next round of judgment as new data packets enter. If the queue length judgment (condition 1) is not satisfied, the system is determined to be in a non-reorderable state. In this case, the reordering queue is cleared, and a NACK with PSN of expect_seq is sent to the sender. When facing a high number of concurrent streams, if the number of out-of-order streams exceeds the preset reordering queue capacity, an appropriate replacement algorithm is used to manage the queue. The receiver enters a wait-for-retransmission mode, in which all data packets with PSN not equal to expect_seq are discarded. The receiver exits the wait-for-retransmission mode and returns to the normal send / receive mode after receiving a data packet with PSN equal to expect_seq. Here, PSN represents the data packet sequence number.
[0070] Preferably, the quicksort algorithm has three significant advantages. First, it is an in-place sorting algorithm, meaning it does not require additional memory space to store intermediate results, making it ideal for situations where SRAM space is scarce. Second, quicksort employs a divide-and-conquer strategy, breaking down the sorting problem into multiple subproblems, resulting in very fast sorting speed with a time complexity of O(nlogn). Finally, this algorithm is relatively simple to implement and very convenient to use.
[0071] Furthermore, according to Figure 9 The illustrated operation flow is as follows: First, the reordering operation places the ordered data packets back into the receive buffer and clears the original reordering queue. Then, the receiver sends an acknowledgment (ACK) with the maximum sequence number (PSN) to the sender to confirm that the receiver has successfully received and processed the data packet. At this point, both parties resume normal data transmission and reception mode and continue subsequent data transmission.
[0072] It should be noted that in condition 1, the maximum queue length Thresh represents the tolerance of the retransmission judgment mechanism in this invention for out-of-order data packets. When the queue reaches Thresh, if it is determined that reordering is impossible, i.e., out-of-order data packets cannot be effectively organized, then the data packets in the current queue will be discarded directly, and the queue will be cleared. Subsequently, the receiver will send a non-cumulative acknowledgment (NACK) to the sender to indicate the retransmission request.
[0073] Furthermore, the Thresh value setting is crucial. On a stable network link, without packet loss, the degree of packet out-of-order delivery (Thresh) is estimated by measuring RTT and RTT jitter. g The specific formula is as follows:
[0074] Thresh g =α(RTT*sqrt(Var)) / MSS+β
[0075] Where RTT represents round-trip time, Var represents the variance of RTT, MSS represents the maximum segment length, α represents the multiplicative factor, and β represents the additive factor, with default settings of 0.6 and 3.
[0076] It should be noted that by adjusting these α and β factors, the estimated value can be made to continuously approach the true value, which can be obtained by collecting the number of out-of-order packets and the total number of packets during the data packet transmission process.
[0077] Furthermore, based on the degree of disorder, EWMA (Exponentially Weighted Moving Average) is used to eliminate the impact caused by an excessively large Thresh. gThe formula for calculating the jitter caused by the estimated value is as follows:
[0078] Thresh(k+1)=(1-δ)·Thresh g +δ·Thresh(k)
[0079] Where Thresh(k+1) represents the Thresh value at time k+1, Thresh(k) represents the Thresh value at time k, δ represents the weight (generally taken as [0.4, 0.6]), and Thresh... g The RTT and RTT jitter estimate the degree of packet out-of-order delivery.
[0080] It is important to note that in the above method, a non-cumulative acknowledgment (NACK) is only sent when the queue length exceeds the threshold Thresh; otherwise, no acknowledgment is sent.
[0081] Furthermore, according to Figure 10 As shown, two thresholds, kmin and kmax, are introduced, and the non-cumulative acknowledgment (NACK) mechanism is determined by a linearly correlated probability. Specifically, when the queue length is less than kmin, the probability of sending NACK is 0; once the queue length exceeds kmin, the probability of sending NACK is calculated based on the linear correlation of the queue length; when the queue length reaches kmax, the probability of sending NACK is 100%. By adopting a mechanism based on the probability of sending NACK, a more flexible and rapid NACK triggering method can be achieved.
[0082] Furthermore, since the storage space in the reordering area is limited (typically a few hundred KB), appropriate storage management methods must be employed. One method mentioned earlier is to directly empty the entire queue to perform storage eviction when the queue length exceeds a threshold. However, eviction methods alone are insufficient, especially when facing high-concurrency traffic, where the number of out-of-order packets may exceed the capacity of the reordering area queue. Therefore, in such cases, a corresponding replacement algorithm is needed to perform a replacement operation on the queue, clearing the old queue of packets and placing the new packets into it.
[0083] Specifically, the basic idea of the replacement algorithm is to score each queue and eliminate queues with low scores. This includes the following steps: Within the reordering area of RDMA communication, a comprehensive scoring mechanism is implemented for each queue. This scoring mechanism is based on three key dimensions: the existence of the first packet in the queue, the total number of data packets, and the timestamp of the latest data packet in the queue. In the RDMA Write operation, the first data packet contains the crucial RETH. If a queue contains the first packet, it is assigned a high score in the scoring mechanism. The timestamp of the latest data packet in the queue determines the queue's timeliness. Queues that have not been updated for a long time are identified by sorting the timestamps in descending order. If a queue has not been updated for a long time, it is assigned a low score in the scoring mechanism and is given priority for elimination. The queues within the reordering area are evaluated according to the above scoring mechanism to determine whether each queue should be retained or eliminated.
[0084] It's important to note that these three dimensions were chosen for the following reasons: In an RDMA Write operation, the operation may be split into multiple packets limited by the MTU size, and only the first packet contains the remote address information (RETH, RDMAExtended Transport Header). If the first packet is lost, other packets will be unable to obtain the DMA destination address. Therefore, the first packet is extremely important and will significantly impact the queue's score. All other things being equal, the more packets a queue contains, the higher the likelihood of packet loss leading to out-of-order delivery, thus lowering the queue's score. Furthermore, each queue records the timestamp of its most recent packet and sorts the queues in descending order of timestamps. Queues at the back of the queue indicate that their internal packets were updated more frequently, similar to the Least Recently Used (LRU) algorithm. Therefore, such queues should be emptied first, resulting in lower scores.
[0085] Preferably, the specific formula for the scoring mechanism is as follows:
[0086]
[0087] Where λ1, λ2, and λ3 represent the weights of the three key dimensions, N represents the length of the queue, n represents the number of data packets in the queue, R represents the number of queues in the reordering area, and r represents the ranking of the timestamp of the most recent data packet in the current queue among all queues. If the first packet exists, then f(x) = 1; if the first packet does not exist, then f(x) = 0.
[0088] Specifically, Figure 7This is an example of the permutation algorithm designed in this paper. Data packet 7 in queues 1, 2, and 4, and data packet 6 in queue 3 are the most recent data packets in their respective queues. Data packet 1 in queue 4 is the first packet in the RDMA data packet sequence. We set λ1, λ2, and λ3 to 0.4, 0.3, and 0.3 respectively, with a queue length N of 8 and a queue number R of 4. Using the scoring mechanism formula, we calculate the scores: queue 1 has a score of 0.88, queue 2 has a score of 0.108, queue 3 has a score of 1.80, and queue 4 has a score of 1.28. Queue 1 has the lowest score. If a new out-of-order data packet needs to enter the reordering area, queue 1 will be evicted, queue 1 will be cleared, a NACK will be sent, and the new out-of-order data packet will be placed in queue 1.
[0089] Furthermore, the sender's processing flow is as follows: The sender initializes data transmission, assigns a unique sequence number to each data packet, and sends them to the receiver in sequence; after transmission is complete, it waits for the receiver to respond with ACK or NACK, where ACK indicates that the data packet was successfully received, and NACK indicates that retransmission is performed for data packets after a specific sequence number; upon receiving NACK, the sender retransmits the corresponding data packet according to the provided sequence number; the sender dynamically adjusts the transmission strategy based on network conditions and receiver feedback, and continuously monitors network conditions to adjust the retransmission strategy in real time; a timeout mechanism is set, and if no ACK is received from the receiver within the predetermined timeout period, retransmission is triggered; after confirming that all data packets have been received, the current transmission task is completed; if there is subsequent data, the above process continues.
[0090] It should be noted that, in the sending part, this invention has improved the retransmission mechanism of the sending side, specifically as follows: Figure 6 As shown. The default go-back-n retransmission mechanism of RDMA retransmits all data packets within the current window after receiving an RDMA request, and then starts a timeout timer. The timeout period is set according to network latency, and the specific formula is as follows:
[0091] RTO = RTT + 4 * RTTVar
[0092] Where RTO represents the timeout period, RTT represents the round-trip time, and RTTVar represents the range of RTT.
[0093] Furthermore, after retransmission, the sender will wait for an ACK from the receiver. If no ACK is received before the timer expires, all data packets within the window will be retransmitted until an ACK is received.
[0094] Furthermore, this invention makes two improvements: First, instead of sending the entire window of data packets, it sends NACK sequence numbers to data packets within the MSPS range. This is because sending the entire window of data packets would retransmit both sent and unsent packets. Sending NACK sequence numbers to data packets within the MSPS range only retransmits the sent data portion, avoiding the need to retransmit unsent packets, thus significantly reducing the number of retransmitted packets and retransmission overhead. Second, after three consecutive retransmissions, it directly exits the retransmission process and begins sending new data, instead of waiting for an ACK. This reduces the sender's waiting time, better utilizes the sender's bandwidth, and improves bandwidth utilization. The number of consecutive retransmissions before exiting the retransmission process can be determined based on network conditions; for most network conditions, three retransmissions are sufficient to ensure reliability.
[0095] Furthermore, this embodiment also provides an RDMA long-distance communication retransmission system, including a receiving module for receiving data packets and checking the sequence number of the data packets; a comparison module for comparing the sequence number of the data packets with the expected sequence number es to determine whether the data packets arrived in order; an ordering module for performing an increment operation on the expected sequence number es and sending an ACK to the sender to indicate that the data packets have been successfully received; and an unordered module for placing the data packets into a queue in the reordering area and using a judgment mechanism to determine whether the data packets in the queue can be restored to an ordered state through reordering.
[0096] This embodiment also provides a computer device applicable to the RDMA long-distance communication retransmission method, including a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the RDMA long-distance communication retransmission method proposed in the above embodiment.
[0097] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0098] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements the RDMA long-distance communication retransmission method proposed in the above embodiments.
[0099] In summary, this invention reduces unnecessary retransmissions by accurately comparing the received data packet sequence number with the expected sequence number, avoiding excessive retransmissions in the traditional go-back-n mechanism. The designed storage replacement algorithm effectively manages data packets in the out-of-order queue, improving the utilization efficiency of limited space and ensuring higher processing capacity through intelligent scoring and replacement mechanisms. The linear correlation probability mechanism determines the behavior of sending non-cumulative acknowledgment signals, allowing for more flexible and rapid handling of out-of-order and lost data packets. By retransmitting only the required data packet sequence, rather than the entire window of data packets, unnecessary network traffic and retransmissions are significantly reduced, optimizing the use of network resources. The strategy of introducing a three-retransmission limit reduces the sender's waiting time, allowing the sender to continue sending new data as soon as possible, thereby effectively improving bandwidth utilization and overall communication reliability.
[0100] Example 2
[0101] Reference Figures 11-13 This is the second embodiment of the present invention, which provides a long-distance communication retransmission method for RDMA. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0102] Furthermore, to further verify the effectiveness of the present invention, experiments were conducted based on the NS3 network simulation platform. NS3, as one of the widely used and recognized network simulation platforms, possesses powerful functions and is widely used in research and development in fields such as network performance evaluation and protocol optimization.
[0103] Furthermore, the experiment used the following basic configuration: the network topology adopted... Figure 11 The structure shown has four nodes (A, B, C, and D). Node A is the sending node, nodes B and C are intermediate nodes, and node D is the receiving node. The link bandwidth is set to 10Gbps, the packet loss rate is set to 0.01%, and the latency is set to 30ms. These link parameters are designed to closely resemble real-world scenarios. Whether at 100Gbps bandwidth or with higher packet loss rates and link latency, this invention can yield similar experimental results.
[0104] Furthermore, the main indicators of this experiment include two aspects: the first is the proportion of retransmitted data packets to the total data packets, which can intuitively reflect whether the present invention has truly reduced retransmissions; the second is the throughput of the sending node, which can intuitively reflect whether the present invention has improved bandwidth utilization.
[0105] Specifically, at the start of the experiment, data packets were continuously sent from node A to node D. These packets arrived at node D via two paths: A→B→D and A→C→D. Throughout the experiment, the number of retransmitted data packets, the total number of data packets, and the throughput of the sending node were recorded over time.
[0106] Furthermore, according to Figure 12 The results show that when using the default go-back-n retransmission method, the proportion of invalid data packets (i.e., retransmitted data packets) is 12.5%; while after using the retransmission method of this invention, the proportion of invalid data packets drops to 3.6%, which is 8.9% less than the default method.
[0107] Furthermore, according to Figure 13 The results show that the average throughput is 5.06 Gbps when using the default go-back-n retransmission method; while after using the retransmission method of the present invention, the average throughput increases to 6.44 Gbps, which is 27% higher than the default method. In addition, it can be observed from the figure that the throughput jitter of the retransmission method of the present invention is significantly smaller than that of the default go-back-n retransmission method, indicating that the throughput of the present invention is more stable.
[0108] In summary, the simulation results above fully demonstrate that the present invention has significant advantages over the default method in reducing retransmissions and improving bandwidth utilization, and similar experimental results can be obtained in real-world environments.
[0109] Preferably, the advantages of this invention are mainly reflected in the following aspects. First, the receiver does not immediately send a NACK to trigger the go-back-n retransmission mechanism. Instead, it further determines whether out-of-order data can be recovered through reordering, thereby effectively reducing retransmitted data packets (approximately 8.9%) and significantly improving network transmission efficiency. Second, this invention sets up a reordering area on the SRAM of the RDMA network card, achieving a rapid increase in data read and write speed, and introduces a new storage replacement algorithm to solve the problem of storage resource shortage. Finally, this invention improves the existing sender go-back-n retransmission mechanism, reduces retransmission overhead, reduces the sender's waiting time, and greatly improves throughput (approximately 27%).
[0110] 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 kind The long-distance communication retransmission method is characterized by: include, The receiver receives the data packet and checks its sequence number. The sequence number of the data packet is compared with the expected sequence number es to determine whether the data packet arrived in order; If the data packets are ordered, the receiver increments the expected sequence number es and sends the data. This indicates to the sender that the data packet has been successfully received; If the data packets are out of order, they are placed in the queue of the reordering area, and a judgment mechanism is used to determine whether the data packets in the queue can be restored to an ordered state through reordering. The judgment mechanism includes queue length judgment, sequence number start judgment, and sequence number continuity judgment. The specific formula for determining the queue length is as follows: cur_size < Thresh; Where, cur_size represents the current number of packets in the reordering queue, and Thresh represents the maximum capacity of the reordering queue; The specific formula for determining the starting serial number is as follows: min_seq = expect_seq; Where min_seq represents the smallest data packet sequence number in the queue, and expect_seq represents the expected sequence number es recorded when an out-of-order data packet is received; The specific formula for determining the continuity of serial numbers is as follows: max_seq - min_seq + 1 = cur_size; Where, cur_size represents the current number of packets in the reordering queue, min_seq represents the smallest packet sequence number in the queue, and max_seq represents the largest packet sequence number in the queue; If the queue length condition is met, and the sequence number start condition and sequence number continuity condition are also met, then the queue is determined to be reorderable. In this case, the quicksort algorithm is used to reorder the data packets in the queue. If the queue length judgment is satisfied, but the sequence number start judgment and sequence number continuity judgment are not satisfied, then it is determined to continue waiting. In this state, the queue continues to perform the next round of judgment as new data packets enter. If the queue length condition is not met, the system is determined to be in a non-reorderable state. In this case, the reordering queue is cleared, and the message is sent. For expect_seq To the sender, Indicates the data packet sequence number; When faced with a high number of concurrent streams, if the number of out-of-order streams exceeds the preset capacity of the reordering queue, an appropriate replacement algorithm should be used to manage the queue. The receiver enters a wait-for-retransmission mode, in which all data is discarded. Data packets that are not equal to expect_seq; Until received After receiving a data packet equal to expect_seq, exit the wait-for-retransmission mode and return to normal send / receive mode.
2. As described in claim 1 The long-distance communication retransmission method is characterized by: The step of determining whether data packets in the queue can be restored to an ordered state through reordering includes the following steps: If it is determined that the data packets can be restored to their original order through reordering, the receiver will reorder the data packets and place them into the buffer. Clear the current reordering queue and send it to the sender. To confirm that the data packet was successfully received; If the order cannot be restored through reordering, the receiver sends the data to the sender. And clear the current reorder queue; For all subsequent data packets received, the receiver continues to compare the sequence number of the data packet with the expected sequence number es; If the sequence number matches, the data packet is placed in the buffer; if the sequence number does not match, the data packet is discarded.
3. As described in claim 1 The long-distance communication retransmission method is characterized by: The Thresh setup includes the following steps: pass and The jitter is used to estimate the degree of packet out-of-order delivery. The specific formula is as follows: ; in, Indicates round-trip time delay. express variance Indicates the maximum segment length. Indicates the multiplicative factor. Indicates an additive factor; pass Eliminate due to an excessively large The formula for calculating the jitter caused by the estimated value is as follows: ; in, Indicates in Thresh value at time 10:00 express Moment value, Indicates weight, express and The jitter is used to estimate the degree of data packet out-of-order delivery.
4. As described in claim 1 The long-distance communication retransmission method is characterized by: The permutation algorithm includes the following steps: exist Within the communication reordering area, a comprehensive scoring mechanism is implemented for each queue. This scoring mechanism is based on three key dimensions: the existence of the first packet in the queue, the total number of data packets, and the timestamp of the latest data packet in the queue. exist During the operation, the first data packet contains the key... If a queue contains the first packet, the queue is given a high score in the scoring mechanism. The timestamp of the latest data packet in the queue determines the timeliness of the queue. The queue that has not been updated for a long time can be identified by sorting the timestamps in descending order. If a queue has not been updated for a long time, it will be given a low score in the scoring mechanism and will be given priority for elimination. The queues in the reordering area are evaluated based on the above scoring mechanism to determine whether each queue should be retained or eliminated.
5. As described in claim 4 The long-distance communication retransmission method is characterized by: The specific formula for the scoring mechanism is as follows: ; in, These represent the weights of the three key dimensions. Indicates the length of the queue. This indicates the number of data packets in the queue. This indicates the number of queues within the reordering region. This indicates the rank of the timestamp of the most recent data packet in the current queue among all queues; If the first packet exists, then If the first package does not exist, then .
6. As described in claim 5 The long-distance communication retransmission method is characterized by: The sending party's processing flow is as follows: The sender initializes data transmission, assigns a unique sequence number to each data packet, and sends them to the receiver in sequence; After sending, wait for the recipient's feedback. or ,in This indicates that the data packet was successfully received. This indicates that retransmission will be performed on data packets following a specific sequence number; Upon receiving In the event of this, the sender retransmits the corresponding data packet based on the provided sequence number; The sender dynamically adjusts its transmission strategy based on network conditions and receiver feedback, and continuously monitors network conditions to adjust the retransmission strategy in real time. Set a timeout mechanism; if no response is received from the recipient within the predetermined timeout period... If so, a retransmission will be triggered; Once all data packets have been received, the current transmission task is complete. If subsequent data is available, continue with the above process.
7. A kind Long-distance communication retransmission system, based on any one of claims 1 to 6 The long-distance communication retransmission method is characterized by: It also includes, The receiving module is used by the receiver to receive data packets and check the sequence number of the data packets; The comparison module is used to compare the sequence number of the data packet with the expected sequence number es to determine whether the data packet arrived in order; The ordered module is used to increment the expected sequence number es and send it. This indicates to the sender that the data packet has been successfully received; The unordered module is used to put data packets into the queue of the reordering area and uses a judgment mechanism to determine whether the data packets in the queue can be restored to an ordered state through reordering.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements any one of claims 1 to 6. The steps of a long-distance communication retransmission method.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements any one of claims 1 to 1. The steps of a long-distance communication retransmission method.