Message transmission method and apparatus
By acquiring the packet's endpoint and network latency, the packet sending rate at the flow level is determined. Combined with the priority and weight scheduling of the sending queue, the problem of congestion control lag in large-scale cloud service cluster interconnection scenarios is solved, achieving differentiated network performance improvement.
Patent Information
- Application Number
- PCT/CN2024/144645
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-17
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-30
AI Technical Summary
Existing explicit congestion control mechanisms suffer from lagging congestion control and coarse granularity in large-scale cloud service cluster interconnection scenarios, failing to meet differentiated network performance requirements.
By obtaining the endpoint latency and network latency of the packets, the packet sending rate at the flow level is determined, enabling differentiated congestion control for each packet flow. Combined with the priority and weight scheduling of the sending queue, latency-sensitive or bandwidth-sensitive traffic is sent first.
It achieves flow-level congestion control, solves the problem of lagging congestion regulation, meets the network performance requirements of large-scale cloud service cluster interconnection scenarios, and improves the efficiency and reliability of network transmission.
Smart Images

Figure CN2024144645_30102025_PF_FP_ABST
Abstract
Description
Message transmission method and apparatus
[0001] This application claims priority to Chinese Patent Application No. 202410486856.8, filed on April 22, 2024, entitled "A method, apparatus and other equipment for data processing", and to Chinese Patent Application No. 202410780555.6, filed on June 17, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of cloud computing technology, and in particular to a message transmission method and apparatus. Background Technology
[0003] With the explosive growth of tenants and applications, cloud data centers are undergoing tremendous changes in both service models and hardware / software organizational structures, evolving into large-scale interconnected cloud service clusters. Due to the continuous increase in cloud data center transmission bandwidth and the large influx of tenants, traffic congestion problems are inevitable.
[0004] Current network protocols generally employ two types of congestion control mechanisms. One type is the implicit congestion control mechanism, represented by the Transmission Control Protocol (TCP). This type typically uses implicit, coarse-grained signals such as round-trip time (RTT) delay and packet loss as triggers for traffic congestion control. Typically, the sending side only receives the congestion signal when severe congestion occurs, such as packet timeouts or packet loss, and then triggers packet rate control based on this signal. The other type is the explicit congestion control mechanism, represented by port-level congestion control. This type typically uses switches in the data center network (DCN) to mark data packets with explicit congestion notification (ECN) tags. Upon receiving a data packet carrying the ECN tag, the receiving side sends the ECN tag back to the sending side via an acknowledgment character (ACK) packet. Upon receiving the ECN tag, the sending side then reduces its own transmission rate.
[0005] Compared to implicit congestion control mechanisms, explicit congestion control mechanisms can detect congestion more accurately and proactively, adjusting packet transmission rates accordingly. However, current explicit congestion control mechanisms are port-level, meaning their granularity is coarse. Coarse-grained congestion control mechanisms cannot solve the network performance bottlenecks in large-scale cloud service cluster interconnection scenarios. Therefore, a congestion control mechanism that can improve network performance is urgently needed. Summary of the Invention
[0006] This application provides a message transmission method and apparatus, which can achieve congestion control at the flow level.
[0007] The technical solution provided in this application is as follows:
[0008] Firstly, this application provides a message transmission method. This method is applied to a source end sending multiple message streams, where a target message stream is any one of the multiple message streams. The target message stream includes a first message that has already been sent and a second message to be sent. The method includes: acquiring the endpoint delay and network delay of the first message; determining a first packet transmission rate based on the endpoint delay and network delay of the first message; and transmitting the second message at the first packet transmission rate. The endpoint delay of the first message includes the delay of the source end processing the first message, the delay of the destination end of the target message stream processing the first message, and the delay of the source end processing a first acknowledgment character (ACK) message. The first ACK message originates from the destination end of the first message and is an ACK message of the first message. The network delay of the first message is the delay of transmitting the first message and the first ACK message via the communication link between the source and destination ends of the first message.
[0009] The method described in this application enables the regulation of the packet transmission rate of a target data stream. When this method is applied to each packet stream sent from the source end, it can predict and regulate the subsequent packet transmission rate of each packet stream based on the end-side latency and network latency of the packets already sent, thereby achieving flow-level congestion control. The flow-level congestion control mechanism implemented through the scheme provided in this application solves the problem of lagging congestion control in current industry congestion control mechanisms. For example, current industry congestion control mechanisms perform flow control by feeding back signals such as packet loss and RTT latency after severe congestion, or by feeding back ECN markers after mild congestion for the next round of rate regulation. On the other hand, when adjusting the packet sending rate of the message flow, this application not only refers to the network latency on the communication link between the source and destination to predict the subsequent packet sending rate of the source, but also refers to the latency (i.e., network latency) caused by the source's own limitations in resource computing power, etc., to predict the subsequent packet sending rate of the source. This avoids the problem of a mismatch between the controlled packet sending rate and the actual data flow packet sending rate during congestion control. Therefore, the flow control scope of this application is larger than that of related technologies. Based on this, the flow-level congestion control mechanism implemented by the solution provided in this application solves the problem of a mismatch between the controlled packet sending rate and the actual data flow packet sending rate caused by the current industry's focus on network-side congestion while ignoring end-side congestion.
[0010] In one possible design approach, determining the first packet transmission rate based on the endpoint delay and network delay of the first message includes: determining the endpoint packet transmission rate based on the endpoint delay of the first message and the size of the historical endpoint congestion window (CWND); determining the network packet transmission rate based on the network delay of the first message and the size of the historical network-side CWND; and determining the smaller of the endpoint packet transmission rate and the network-side packet transmission rate as the first packet transmission rate. Here, the historical endpoint CWND is the CWND when the source end sent packets in the target message stream before the current time, and the historical network-side CWND is the CWND when the communication link transmitted packets in the target message stream before the current time.
[0011] In another possible design approach, determining the end-side packet transmission rate based on the end-side delay of the first packet and the historical end-side CWND size includes: calculating a first factor and a second factor based on the end-side delay of the first packet and the historical end-side CWND size; and calculating the end-side packet transmission rate based on the first factor, the second factor, and the historical end-side CWND size. Here, the first factor represents the congestion state of the source end, and the second factor represents the state attribute of the target packet flow at the source end.
[0012] In another possible design approach, determining the network-side packet transmission rate based on the network latency of the first packet and the historical network-side CWND size includes: calculating a third factor and a fourth factor based on the network latency of the first packet and the historical network-side CWND size; and calculating the network-side packet transmission rate based on the third factor, the fourth factor, and the historical network-side CWND size. Here, the third factor represents the congestion state of the communication link, and the fourth factor represents the state attributes of the target packet flow on the communication link.
[0013] Through the above-described possible designs, when this method is executed for each flow sent from the source end, it is possible to predict and regulate the packet sending rate of each flow based on its historical state data (including the latency corresponding to the packet sending rate of historically regulated packet flows (e.g., the end-side latency and network latency of the first packet), historical end-side CWND, historical network-side CWND, etc.), thereby achieving flow-level granular congestion control. Based on this, it can solve the performance bottleneck problems of the implicit congestion control and port-level explicit congestion control mechanisms commonly used in the industry. Furthermore, the flow-level congestion control mechanism implemented by the scheme provided in this application can achieve differentiated congestion control (or flow control) for each data flow based on its attributes and network state (characterized by parameters such as the first factor, second factor, third factor, and fourth factor), and this fine-grained flow-level congestion control can simultaneously meet the diverse needs of numerous applications.
[0014] In another possible design, determining the first packet transmission rate based on the terminal delay and network delay of the first message includes: in response to receiving the first ACK message, determining the first packet transmission rate based on the terminal delay and network delay of the first message.
[0015] In another possible design, the method further includes: obtaining the endpoint latency and network latency of the third packet already sent in the target packet stream; in response to receiving the second ACK packet, determining a second packet transmission rate based on the endpoint latency and network latency of the third packet; and sending the packets to be sent in the target packet stream at the second packet transmission rate. Here, the third packet is the packet sent by the source end after sending the first packet, and the second ACK packet is the ACK packet for the third packet.
[0016] Through these two possible designs, the packet sending rate of the target packet flow can be predicted and controlled at the granularity of ACK packets in the target packet flow.
[0017] In another possible design, the first packet transmission rate is represented based on a first CWND. Sending the second message at the first packet transmission rate includes: determining the target transmission queue in the source network interface card (NIC) corresponding to the target packet flow; scheduling data packets from the packets to be sent in the target packet flow that include the second message, up to a number satisfying the first CWND size, to the target transmission queue; and sending the data packets of the target transmission queue according to its priority. Here, the source NIC includes multiple transmission queues, each including a target transmission queue. These multiple transmission queues have different priorities, and the priority of a transmission queue indicates the order in which packets are scheduled for transmission.
[0018] In another possible design approach, determining the target sending queue corresponding to the target packet flow in the source network interface card includes: determining the size of the packets already sent in the target packet flow; determining the sending priority of the target packet flow based on the size of the packets already sent in the target packet flow; and determining the sending queue corresponding to the sending priority of the target packet flow among the multiple sending queues included in the source network interface card as the target sending queue.
[0019] In another possible design approach, when packets in a high-priority transmission queue are scheduled for transmission first, the aforementioned transmission of data packets to the target transmission queue according to its priority includes: when the target transmission queue belongs to a first transmission queue set, scheduling the transmission packets of the transmission queues in the first transmission queue set according to a priority queue (PQ) strategy. Here, the priorities of all transmission queues in the first transmission queue set are higher than or equal to a preset priority; or, in the descending order of priorities among the multiple transmission queues included in the source network interface card, the priorities of all transmission queues in the first transmission queue set are ranked in the top m positions, where m is an integer greater than or equal to 1. The PQ priority strategy means that data packets in high-priority transmission queues are transmitted only after the data packets in low-priority transmission queues have been transmitted.
[0020] Through the above possible designs, when the size of the target message flow that has already been sent is small, it indicates that the target message flow is latency-sensitive traffic. If the transmission priority of the target message flow determined at this time is a high priority indicating priority for sending the target message flow, then this scheme can achieve priority transmission of the target message flow. In this way, low latency can be guaranteed for latency-sensitive traffic.
[0021] In another possible design approach, when packets in a high-priority sending queue are scheduled for priority transmission, the aforementioned transmission of data packets to the target sending queue according to its priority includes: when the target sending queue belongs to a second sending queue set, scheduling the transmission packets of sending queues in the second sending queue set according to a weighted fair queuing (WFQ) mechanism. Here, the sending queues in the second sending queue set are each preset with different weights, and the priorities of all sending queues in the second sending queue set are lower than or equal to the preset priorities. Alternatively, in the descending priority order of multiple sending queues included in the source network interface card, the priorities of all sending queues in the second sending queue set are ranked m positions after the preset priority, where m is an integer greater than or equal to 1.
[0022] In another possible design, the lower the priority of a sending queue in the second sending queue set, the more data packets that sending queue are scheduled to be sent at one time.
[0023] Through the above possible designs, when the size of the target packet flow that has already sent packets is large, it indicates that the target packet flow is not latency-sensitive traffic, but bandwidth-sensitive traffic. If the transmission priority of the target packet flow determined at this time is a low priority indicating that the target packet flow will be sent later, this scheme can allocate more transmission bandwidth to the target packet flow. This is because the weight of the low-priority (indicating later transmission) transmission queue indicates that a larger number of data packets will be sent at one time. In this way, it can be ensured that bandwidth-sensitive traffic can obtain more transmission bandwidth.
[0024] In another possible design, the target message flow is the message flow that accesses the target service, which is deployed on at least one server of the DCN.
[0025] In another possible design approach, the target message stream is the message stream used for communication between different nodes in a distributed storage system.
[0026] These two possible designs demonstrate the diverse application scenarios of the proposed solution.
[0027] In another possible design, the delay of the source end processing the first message is represented by the difference between a first time and a second time. The first time is the time when the source end generates the first data packet of the first message, and the second time is the time when the source end sends the last data packet of the first message. The delay of the destination end processing the first message is represented by the difference between a third time and a fourth time. The third time is the time when the destination end receives the first data packet of the first message, and the fourth time is the time when the destination end sends the first ACK message. The delay of the source end processing the first ACK message is represented by the difference between a fifth time and a sixth time. The fifth time is the time when the source end receives the first ACK message, and the sixth time is the time when the source end completes processing the first ACK message.
[0028] Secondly, this application provides a message transmission apparatus. This apparatus is applied to a source end sending multiple message streams, where a target message stream is any one of the multiple message streams. The target message stream includes a first message that has already been sent and a second message to be sent. The apparatus includes: an acquisition unit for acquiring the end-side delay and network delay of the first message; a determination unit for determining a first packet transmission rate based on the end-side delay and network delay of the first message; and a transmission unit for transmitting the second message at the first packet transmission rate. The end-side delay of the first message includes the delay of the source end processing the first message, the delay of the destination end of the target message stream processing the first message, and the delay of the source end processing a first ACK message. The first ACK message originates from the destination end of the first message and is an ACK message of the first message. The network delay of the first message is the delay of the communication link between the source and destination ends of the first message for transmitting the first message and the first ACK message.
[0029] In one possible design, the determining unit is specifically configured to: determine the end-side packet transmission rate based on the end-side delay of the first message and the size of the historical end-side CWND; determine the network-side packet transmission rate based on the network delay of the first message and the size of the historical network-side CWND; and determine the smaller of the end-side packet transmission rate and the network-side packet transmission rate as the first packet transmission rate. Here, the historical end-side CWND is the CWND when the source end transmitted packets in the target message stream before the current time, and the historical network-side CWND is the CWND when the communication link transmitted packets in the target message stream before the current time.
[0030] In another possible design, the determining unit is further specifically used to calculate a first factor and a second factor based on the end-side delay of the first message and the size of the historical end-side CWND; and to calculate the end-side packet transmission rate based on the first factor, the second factor, and the size of the historical end-side CWND. Here, the first factor represents the congestion state of the source end, and the second factor represents the state attribute of the target message flow at the source end.
[0031] In another possible design, the determining unit is further specifically used to calculate the third factor and the fourth factor based on the network latency of the first message and the size of the historical network-side CWND; and to calculate the network-side packet transmission rate based on the third factor, the fourth factor, and the size of the historical network-side CWND. Here, the third factor represents the congestion state of the communication link, and the fourth factor represents the state attributes of the target message flow on the communication link.
[0032] In another possible design, the determining unit is also specifically used to determine the first packet transmission rate in response to receiving the first ACK message, based on the end-side delay and network delay of the first message.
[0033] In another possible design, the acquisition unit is further configured to acquire the end-side latency and network latency of the third packet already sent in the target packet stream. The determination unit is further configured to determine a second packet transmission rate based on the end-side latency and network latency of the third packet in response to receiving the second ACK packet. The sending unit is further configured to send the packets to be sent in the target packet stream at the second packet transmission rate. Here, the third packet is a packet sent by the source end after sending the first packet, and the second ACK packet is an ACK packet for the third packet.
[0034] In another possible design, the first packet transmission rate is represented based on the first CWND. The determining unit is also used to determine the target transmission queue in the source network interface card (NIC) corresponding to the target packet flow. The sending unit is specifically used to schedule data packets from the packets to be sent in the target packet flow, including the second packet, to the target transmission queue in a number that satisfy the first CWND size; and to send the data packets of the target transmission queue according to the priority of the target transmission queue. Here, the source NIC includes multiple transmission queues, each including the target transmission queue, and each transmission queue has a different priority, where the priority of the transmission queue indicates the order in which packets are scheduled for transmission.
[0035] In another possible design, the determining unit is also specifically used to determine the size of the sent packets in the target packet stream; determine the sending priority of the target packet stream based on the size of the sent packets in the target packet stream; and determine the sending queue corresponding to the sending priority of the target packet stream among the multiple sending queues included in the source network interface card as the target sending queue.
[0036] In another possible design, when packets in a high-priority transmission queue are scheduled for transmission first, the transmission unit, specifically when the target transmission queue belongs to the first transmission queue set, schedules the transmission data packets of the transmission queues in the first transmission queue set according to the PQ strategy. Here, the priorities of all transmission queues in the first transmission queue set are higher than or equal to a preset priority; or, in the order of priorities of multiple transmission queues included in the source network interface card from highest to lowest, the priorities of all transmission queues in the first transmission queue set are ranked in the top m positions, where m is an integer greater than or equal to 1.
[0037] In another possible design, when packets in a high-priority transmission queue are scheduled for transmission first, the transmission unit is also specifically used to schedule the transmission data packets of the transmission queues in the second transmission queue set according to the WFQ mechanism when the target transmission queue belongs to the second transmission queue set. Here, the transmission queues in the second transmission queue set are each preset with different weights, and the priorities of all transmission queues in the second transmission queue set are lower than or equal to the preset priorities. Alternatively, in the order of priorities of multiple transmission queues included in the source network interface card from high to low, the priorities of all transmission queues in the second transmission queue set are ranked m positions after the preset priority, where m is an integer greater than or equal to 1.
[0038] In another possible design, the lower the priority of a sending queue in the second sending queue set, the more data packets that sending queue are scheduled to be sent at one time.
[0039] In another possible design, the target message flow is the message flow that accesses the target service, which is deployed on at least one server of the DCN.
[0040] In another possible design approach, the target message stream is the message stream used for communication between different nodes in a distributed storage system.
[0041] In another possible design, the delay of the source end processing the first message is represented by the difference between a first time and a second time. The first time is the time when the source end generates the first data packet of the first message, and the second time is the time when the source end sends the last data packet of the first message. The delay of the destination end processing the first message is represented by the difference between a third time and a fourth time. The third time is the time when the destination end receives the first data packet of the first message, and the fourth time is the time when the destination end sends the first ACK message. The delay of the source end processing the first ACK message is represented by the difference between a fifth time and a sixth time. The fifth time is the time when the source end receives the first ACK message, and the sixth time is the time when the source end completes processing the first ACK message.
[0042] It is understood that the beneficial effects of the message transmission device provided by the second aspect and any possible design method in the second aspect can be seen from the technical effects of the corresponding solutions provided by the first aspect and any possible design method in the first aspect, and will not be repeated here.
[0043] Thirdly, this application provides a computing device comprising: a memory, a communication interface, and one or more processors, the one or more processors receiving or transmitting data through the communication interface, and the one or more processors being configured to read program instructions stored in the memory to perform the methods provided by the first aspect and any possible design of the first aspect.
[0044] Fourthly, this application provides a computing device cluster including at least one computing device, each computing device including a processor and a memory. The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, causing the computing device cluster to perform the methods provided by the first aspect and any possible design of the first aspect.
[0045] Fifthly, this application provides a chip that includes a processor. When the processor executes program instructions or code, the chip including the processor or the device including the chip performs the methods provided by the first aspect and any possible design of the first aspect. Exemplarily, the chip further includes an input interface, an output interface, and a memory. The chip's input interface, output interface, processor, and memory are connected via internal interconnection paths. The memory in the chip stores program instructions or code executed by the processor, and the input and output interfaces are used for communication between the chip and other chips or devices.
[0046] In a sixth aspect, this application provides a computer-readable storage medium that is a non-volatile computer-readable storage medium, the computer-readable storage medium including computer program instructions that, when executed by a computing device or processor, perform the methods provided by the first aspect and any possible design of the first aspect.
[0047] In a seventh aspect, this application provides a computer program product comprising instructions that, when executed by a processor, cause a computing device or processor to perform the methods provided by the first aspect and any possible design of the first aspect.
[0048] It is understood that any of the message transmission devices, computing devices, computing device clusters, computer-readable storage media, computer program products or chips provided above can be applied to the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0049] In this application, the names of the aforementioned message transmission devices, etc., do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those in this application, they all fall within the protection scope of this application. Attached Figure Description
[0050] Figure 1 is a schematic diagram of an explicit congestion control mechanism according to an embodiment of this application;
[0051] Figure 2 is a schematic diagram of another explicit congestion control mechanism described in an embodiment of this application;
[0052] Figure 3 is a schematic diagram of an implementation environment for the method provided in the embodiments of this application;
[0053] Figure 4 is a schematic diagram of a distributed storage system according to an embodiment of this application;
[0054] Figure 5 is a flowchart illustrating a message transmission method provided in an embodiment of this application;
[0055] Figure 6 is a schematic diagram of the end-side delay and network delay of a source end obtaining a first message according to an embodiment of this application;
[0056] Figure 7 is a schematic diagram illustrating the relationship between the first time point and the sixth time point provided in the embodiments of this application;
[0057] Figure 8 is a comparison diagram of the flow control range in the method provided in the embodiments of this application and related technologies;
[0058] Figure 9 is a flowchart illustrating another message transmission method provided in an embodiment of this application;
[0059] Figure 10 is a schematic diagram of the priority threshold values provided in an embodiment of this application;
[0060] Figure 11 is a schematic diagram of a process for scheduling data packets of each sending queue in a second sending queue set using a WFQ mechanism, according to an embodiment of this application.
[0061] Figure 12 is a flowchart illustrating another message transmission method provided in an embodiment of this application;
[0062] Figure 13 is a schematic diagram illustrating the relationship between packet transmission rate and latency in real-time message flow control according to an embodiment of this application;
[0063] Figure 14 is a schematic diagram of a message transmission device provided in an embodiment of this application;
[0064] Figure 15 is a schematic diagram of another message transmission device provided in an embodiment of this application;
[0065] Figure 16 is a schematic diagram of the structure of a computing device provided in an embodiment of this application;
[0066] Figure 17 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of this application;
[0067] Figure 18 is a schematic diagram of one or more computing devices in a computing device cluster provided in an embodiment of this application being connected via a network. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0069] With the explosive growth of tenants and applications, and the emergence of new service models and technologies, cloud data centers are undergoing tremendous changes in both service models and hardware and software organizational structures. Due to the continuous increase in cloud data center transmission bandwidth and the large-scale migration of tenants, traditional coarse-grained congestion control and traffic scheduling schemes are finding it difficult to provide satisfactory network transmission performance.
[0070] Furthermore, with the increasing prevalence of computationally intensive applications (such as generative intelligence-generated content (AIGC) training, high-performance computing (HPC), autonomous driving, and advanced databases), cloud storage architectures are evolving towards a compute-storage separation architecture, where compute clusters and storage clusters are deployed separately within the storage system. On one hand, compute-storage separation architectures increase network traffic and network system architecture complexity, leading to a surge in data traffic in data center networks (DCNs) where storage systems are deployed. On the other hand, compute-storage separation architectures also drive the evolution of distributed systems towards ultra-large-scale clusters, where more applications with diverse needs require sharing limited network system resources, making it difficult for existing coarse-grained congestion control mechanisms to simultaneously meet numerous differentiated demands.
[0071] The congestion control mechanisms used in current network protocols are generally divided into two categories.
[0072] One type is implicit congestion control mechanisms, represented by the Transmission Control Protocol (TCP), such as the Bottleneck Bandwidth and Round-Trip Time (BBR) congestion control algorithm and the CUBIC congestion control mechanism. These mechanisms typically use implicit, coarse-grained signals like round-trip time (RTT) delay and packet loss as triggers for traffic congestion control. However, these mechanisms usually only receive the corresponding congestion signal when severe congestion occurs, such as packet timeouts or packet loss, and then trigger congestion control based on this signal to regulate the sending rate. Therefore, these congestion control mechanisms are widely used in wide area networks (WANs) or DCN scenarios where latency requirements are not high.
[0073] Another type is explicit congestion control mechanisms, represented by port-level congestion control, such as the data center quantized congestion notification (DCQCN) and data center TCP (DCTCP) congestion control mechanisms used in the Remote Direct Memory Access (RDMA) protocol. Network transport protocols employing port-level congestion control mechanisms include, but are not limited to, TCP, User Datagram Protocol (UDP), and RDMA.
[0074] In one example, referring to Figure 1, a schematic diagram of an explicit congestion control mechanism is shown. As shown in Figure 1, in a system supporting explicit congestion notification (ECN), for a switch on the communication link between the sender and receiver, when the switch receives a data packet sent by the sender to the receiver, the switch determines whether the length of the sending queue containing the data packet exceeds a preset ECN threshold. It should be understood that when the length of the sending queue exceeds the preset ECN threshold, it indicates that network congestion has occurred. Conversely, when the length of the sending queue does not exceed the preset ECN threshold, it indicates that network congestion has not occurred. Therefore, when the switch determines that the length of the sending queue containing the data packet exceeds the preset ECN threshold, it sets an ECN flag in the data packet to carry the ECN flag. Then, when the receiver receives the data packet carrying the ECN flag, it sets a congestion response (echo of congestion encountered, ECE) flag in the ACK packet of that data packet. Subsequently, the ACK packet carrying the ECE flag is returned from the receiver to the sender via the switch. When the sender determines that the received ACK packet carries the ECE flag, it can be confirmed that the ACK packet also carries the ECN flag. In this case, the sender performs flow rate reduction control on the port that received the ACK to reduce network congestion on the communication link between the sender and receiver. Conversely, when the sender determines that the received ACK packet does not carry the ECE flag (i.e., does not carry the ECN flag), it indicates that there is no congestion on the communication link between the sender and receiver. Therefore, the sender performs flow rate acceleration control on the port that received the ACK to improve the utilization of the communication link. This flow rate acceleration control can be rapid, accelerated, or slow, and will not be detailed further.
[0075] As can be seen, the congestion control mechanism shown in Figure 1 can instruct the sender to reduce the packet sending rate of the sending port when network congestion occurs, and instruct the sender to increase the packet sending rate of the sending port when network congestion does not occur, thereby achieving network congestion control.
[0076] In another example, referring to Figure 2, a schematic diagram of another explicit congestion control mechanism is shown. As shown in Figure 2, in a network system applying the priority flow control (PFC) explicit congestion control mechanism, after receiving data packets from data flow 1 and data flow 2, the ingress port 1 of switch 210 in the network system schedules data packets from data flow 1 to egress port 1 and data packets from data flow 2 to egress port 2. Thus, data packets from data flow 1 are forwarded via egress port 1, and data packets from data flow 2 are forwarded via egress port 2. Switch 210 sets a PFC threshold value for the transmission queue of each egress port. It should be understood that when the length of the data packets to be sent in the transmission queue of an egress port exceeds the PFC threshold value, it indicates that too many data packets are waiting to be sent, i.e., congestion has occurred. Conversely, when the length of the data packets to be sent in the transmission queue of an egress port does not exceed the PFC threshold value, it indicates that fewer data packets are waiting to be sent, i.e., no congestion has occurred.
[0077] Taking the forwarding of data packets from data stream 1 via outgoing port 1 as an example, as shown in Figure 2(a), when switch 210 determines that the length of the data packets to be sent in the outgoing port 1's sending queue is less than the PFC threshold, switch 210 normally sends the data packets to be sent in the outgoing port 1's sending queue without performing any additional operations. As shown in Figure 2(b), when switch 210 determines that the length of the data packets to be sent in the outgoing port 1's sending queue exceeds the PFC threshold, in addition to normally sending the data packets to be sent in the outgoing port 1's sending queue, switch 210 also sends a pause frame to the upstream port of incoming port 1 to instruct the upstream port of incoming port 1 to stop sending data packets. In response, the upstream port of incoming port 1 stops sending data packets after receiving the pause frame. Thus, ingoing port 1 of switch 210 will no longer receive data packets sent by the upstream port, and therefore will no longer schedule data packets to be sent in the outgoing port 1's sending queue. Furthermore, as shown in Figure 2(c), when switch 210 determines that the length of the data packet to be sent in the outgoing port 1 transmission queue is less than the PFC threshold, in addition to sending the data packet to be sent in the outgoing port 1 transmission queue normally, switch 210 can also send a resume frame to the upstream port of incoming port 1 to instruct the upstream port of incoming port 1 to resume sending data packets. In response, the upstream port of incoming port 1 resumes sending data packets after receiving the resume frame. In this way, incoming port 1 of switch 210 will receive data packets sent by the upstream port again, and then resume scheduling the data packets to be sent in the outgoing port 1 transmission queue. Alternatively, the upstream port that receives the stop frame sends probe data packets to switch 210 at regular intervals to detect whether it can resume sending data packets, and resumes sending data packets when it detects that it can resume sending data packets.
[0078] It can be seen that the PFC congestion control mechanism achieves congestion control by pressuring the upstream port to stop sending data packets.
[0079] Therefore, both of the above explicit congestion control mechanisms can achieve flow rate regulation (referred to as flow control) when network congestion occurs, thereby alleviating network congestion. Compared with implicit congestion control mechanisms, explicit congestion control mechanisms can detect and adjust congestion more accurately and in advance.
[0080] However, most explicit congestion control mechanisms in related technologies (as shown in Figures 1 and 2) are port-level congestion control mechanisms. Port-level congestion control mechanisms cannot provide differentiated flow control services to different data flows and can lead to data flow collateral damage: that is, if a data flow (referred to as flow 1) becomes congested in the network, the sender's port traffic is slowed down (as shown in Figure 1), or the upstream port of the switch stops sending traffic (as shown in Figure 2). In this case, other data flows (referred to as flow 2) sent through that port will also be forced to slow down or stop sending, even if there is no congestion in the network. Therefore, port-level congestion control mechanisms have a coarse-grained congestion control granularity, making it difficult to provide satisfactory network transmission performance. For example, coarse-grained congestion control mechanisms cannot solve the network performance bottleneck problem in large-scale cloud service cluster interconnection scenarios. These large-scale cloud service cluster interconnection scenarios include, but are not limited to, scenarios involving large-scale model training for artificial intelligence (AI) and ultra-large-scale cloud services.
[0081] Based on this, embodiments of this application provide a message transmission method that can achieve flow-level congestion control, that is, the method provides a flow-level congestion control mechanism (or simply a flow-level congestion control mechanism). Here, the flow-level congestion control mechanism refers to a congestion control mechanism with data flow / message flow as the granularity.
[0082] Referring to Figure 3, Figure 3 shows a schematic diagram of an implementation environment for the method provided in the embodiments of this application. As shown in Figure 3, the implementation environment includes a source end for sending message streams, a message forwarding device for forwarding message streams, and a destination end for receiving message streams.
[0083] This application does not limit the network transmission protocol used when the source sends a message stream to the destination via a message forwarding device. For example, network transmission protocols include, but are not limited to, TCP, UDP, and RDMA protocols. When the congestion control mechanism provided by the embodiments of this application is applied to the network transmission protocol, flow-level congestion control can be achieved.
[0084] This application embodiment does not specifically limit the specific implementation of the message flow, source end, message forwarding device and destination end in the implementation environment shown in Figure 3.
[0085] In one example, when the implementation environment shown in Figure 3 is implemented in a distributed storage system, refer to Figure 4, which shows a schematic diagram of a distributed storage system. As shown in Figure 4, the storage system 400 using a compute-storage separation architecture includes a compute cluster and a storage cluster. The storage cluster includes an index layer cluster and a persistent layer cluster. The compute cluster communicates with the index layer cluster (denoted as front-end communication) and provides service interfaces to upper-layer applications. The index layer cluster communicates with both the compute cluster and the persistent layer cluster, providing metadata storage and management services. Here, metadata refers to data describing the data stored in the persistent layer cluster. The persistent layer cluster communicates with the index layer cluster (denoted as back-end communication) and provides persistent storage services for the data. The storage system 400 also includes a control cluster for controlling and managing the compute cluster and the storage cluster. It should be understood that communication between different clusters in the storage system 400 is achieved through communication between the network interface cards (NICs) of different devices within the cluster. It should also be understood that any cluster in Figure 4 includes at least one compute device, which can be implemented as a physical device or a virtual machine (VM), etc., without limitation.
[0086] Typically, when storage system 400 is a distributed storage system, the compute clusters, index layer clusters, persistent layer clusters, and control clusters within storage system 400 are deployed separately and interconnected via a network (such as the Internet). Storage system 400 is usually required to provide low-latency, high-concurrency, and high-bandwidth services to upper-layer applications. Therefore, communication between different clusters in storage system 400 (such as front-end communication and back-end communication) is implemented using high-performance network protocols. These high-performance network protocols include, but are not limited to, TCP, RDMA, and UBoE (Unit Bus Over Ethernet) protocols. When the congestion control mechanism provided by the embodiments of this application is applied to the high-performance network protocol used for communication between different clusters in the storage system 400, it can realize flow-level congestion control of communication (for example, realizing flow-level congestion control of communication between the computing cluster (as the source end) and the index layer cluster (as the destination end), and for example, realizing flow-level congestion control of communication between the index layer cluster (as the source end) and the persistence layer cluster (as the destination end), thereby avoiding congestion during communication, and further improving the communication performance between different clusters in the storage system, such as realizing low latency, high concurrency, and high bandwidth of communication, such as reducing the packet loss rate of communication, such as providing smooth network jitter during communication, and such as providing the processing capabilities of many-to-one input / output (IO) model, many-to-many IO model, and one-to-many IO model, etc.
[0087] Furthermore, this application embodiment does not specifically limit the storage services provided by the aforementioned storage system. For example, the storage services provided by the storage system include, but are not limited to: Elastic Volume Service (EVS) (or cloud disk service), Object Storage Service (OBS), Scalable File Service (SFS), and Key-Value Store (KVStore) services, etc.
[0088] In another example, the implementation environment shown in Figure 3 is applied to a scenario of accessing a DCN. In this case, the destination shown in Figure 3 is a device (such as a server) deployed in the DCN, and the source shown in Figure 3 is a node / device / equipment that needs to access the destination in the DCN via a network (such as the Internet). The message stream is the message stream from the source to the destination in the DCN. Optionally, the source uses the Hypertext Transfer Protocol (HTTP) to send the message stream when accessing the DCN. In related technologies, the HTTP protocol has been updated to HTTP 3.0. HTTP 3.0 uses the Quick UDP Internet Connections (QUIC) protocol, and the essence of the QUIC protocol is HTTP 2.0 + Transport Layer Security (TLS) + UDP + Internet Protocol (IP). When the congestion control mechanism provided by the embodiments of this application is applied in the QUIC protocol, flow-level congestion control can be achieved between the source end and the destination end deployed in the DCN to avoid congestion, thereby improving the communication performance between the source end and the destination end deployed in the DCN, such as achieving low latency, high concurrency, and high bandwidth between the source end and the destination end deployed in the DCN.
[0089] In another example, the implementation environment shown in Figure 3 is applied to a scenario of large-scale model training (such as AI large model training). Optionally, the source and destination ends shown in Figure 3 are two processes within a computing device used to train the model, and these two processes communicate across a network. That is, in this example, the source and destination ends are actually located in the same device / node / organization.
[0090] It should be understood that the above content is an exemplary description of the implementation environment of the method provided in the embodiments of this application, and does not constitute a limitation on the implementation environment of the method. As those skilled in the art know, as business needs change, the implementation environment can be adjusted according to application requirements, and the embodiments of this application do not list them one by one.
[0091] This application also provides a message transmission system, which includes a source end for sending message streams and a destination end for receiving message streams. When the method provided in this application is applied to this transmission system, flow-level congestion control can be achieved in the communication between the source end and the destination end.
[0092] This application also provides a message transmission apparatus, which is applied to the source end of sending a message stream and is used to execute the message transmission method described in this application to realize flow-level congestion control for communication between the source end and the destination end of the message stream.
[0093] Optionally, the message transmission device is a computing device that implements the aforementioned source end, or a functional module within that computing device; there is no limitation on this. As an example, the computing device includes, but is not limited to, general-purpose computers, laptops, mobile phones, tablets, etc., or, the computing device may be implemented as a server or server cluster, etc., and is not limited to these.
[0094] The implementation process of the message transmission method provided in the embodiments of this application will be described below.
[0095] Referring to Figure 5, Figure 5 shows a schematic flowchart of a message transmission method provided in an embodiment of this application. Optionally, the method is applied to the implementation environment shown in Figure 3 or Figure 4. As shown in Figure 5, the method includes the following steps.
[0096] Step 101: The source end obtains the end-side latency of the first packet already sent in the target packet stream, and obtains the network latency of the first packet.
[0097] In this process, the source can send multiple message streams, and the destination message stream is any one of these multiple message streams. That is, the source address of the messages in the destination message stream is the source's IP address, and the destination address is the destination's IP address.
[0098] This application does not specifically limit the type of the target message stream. For example, the target message stream is a service message stream provided by a client (as the source) accessing a server (as the destination) in a DCN. Another example is a control stream sent by a device (as the source) in a distributed storage system's control cluster to a computing cluster or storage cluster (as the destination). Yet another example is an I / O data stream where a device (as the source) in a distributed storage system's control cluster writes data to a storage cluster. And so on.
[0099] In the embodiments of this application, when the source end generates and sends the target message stream to the destination end, for any sent message in the target message stream, such as the first message, the source end can obtain the end-side latency and network latency of the first message.
[0100] The endpoint latency of the first message includes the latency of the source processing the first message, the latency of the destination processing the first message, and the latency of the source processing the first ACK message. Here, the first ACK message is the ACK message returned by the destination to the source after receiving the first message, to notify the source that the destination has received the first message. That is, the first ACK message comes from the destination of the first message, and the first ACK message is the ACK message of the first message. It can be seen that the endpoint latency of the first message is the time delay (i.e., latency) incurred by the source and destination of the target message flow when processing the first message and its ACK message. In some examples, the endpoint latency of the first message is also referred to as the host latency of the first message.
[0101] The network latency of the first message is the latency of transmitting the first message and the first ACK message through the communication link between the source and destination. In other words, the network latency of the first message is the RTT latency of the first message.
[0102] The specific process of the source end obtaining the end-side latency and network latency of the first packet is described below. Referring to Figure 6, Figure 6 shows a schematic diagram of a process for the source end to obtain the end-side latency and network latency of the first packet according to an embodiment of this application. Optionally, this process is applied to the implementation environment shown in Figure 3 or Figure 4. As shown in Figure 6, the process includes the following steps.
[0103] Step 1011: Extract the first and second timestamps from the source end. The first timetamp is the time when the source end generates the first data packet of the first message, and the second timetamp is the time when the source end sends the last data packet of the first message.
[0104] It should be understood that at the application layer, a message is also called a data packet, which includes complete data to be sent. During transmission, messages are typically encapsulated into at least one data packet (or group) for transmission. Each data packet is configured with a message identifier (ID) to indicate that the data packet belongs to the message identified by that ID. The message ID can be any character and / or number that can uniquely identify a message; there are no restrictions on this.
[0105] For any message in the target message stream, such as the first message, based on the data size to be sent in the first message, the source can encapsulate the first message into at least one data packet; that is, the first message includes at least one data packet. For any data packet in the first message, this data packet includes the message ID of the first message. This data packet also includes the total number of data packets included in the first message, and the packet's number (or packet number) within the total number of data packets. For example, if the source encapsulates the first message into 5 data packets, then for the first data packet of the first message, this first data packet includes "1 / 5", where "5" indicates that the first message includes a total of 5 data packets, and "1" indicates that the current data packet is the first of the 5 data packets.
[0106] Therefore, during the process of generating and sending the target message stream from the source end to the destination end, when the source end generates the first data packet in the first message, the source end records the time of generating the first data packet as the first time and stores it. Optionally, when recording and storing the first time, the source end also records and stores the message ID of the first message so as to distinguish which message the first time corresponds to in subsequent events.
[0107] Furthermore, after generating at least one data packet included in the first message, the source end schedules the at least one data packet to its own network interface card (NIC), which then sends the at least one data packet to the destination end. When the source end's NIC sends the last data packet among the at least one data packets, the source end records the time of sending the last data packet as the second time and stores the second time. For example, the source end records the second time, the already recorded and stored first time, and the message ID of the first message as a single piece of information (such as a log entry). Optionally, the source end can determine whether a data packet is the last data packet of the first message by the packet number of the data packets included in the first message; this will not be elaborated further.
[0108] Step 1012: The destination extracts the third and fourth times and sends them to the source. The third time is the time when the destination receives the first data packet of the first message, and the fourth time is the time when the destination sends the first ACK message.
[0109] After the source sends the data packets included in the first message through its own network card, these data packets are transmitted to the destination via the communication link between the source and the destination.
[0110] At the destination end, when it determines that the received data packet is the first data packet of the first message (based on the packet number), it records the time of receiving the data packet as the third time. Subsequently, when the destination end determines that the received data packet is the last data packet of the first message (based on the packet number), it determines that it has completed receiving all data packets of the first message, that is, the destination end determines that the reception of the first message is complete. At this time, the destination end generates the first ACK packet and returns the first ACK packet to the source end to notify the source end that the reception of the first message is complete. The destination end also records the time when it sends the first ACK packet through the network card as the fourth time.
[0111] Next, the destination sends the third and fourth timestamps to the source.
[0112] In one possible implementation, the first ACK packet carries a third and a fourth time. For example, after the destination records the third time, it adds the third time to the first ACK packet when generating it, and adds its own transmission time to the first ACK packet when sending it, that is, adding the fourth time to the first ACK packet when sending it. Through this implementation, the destination sends the third and fourth times to the source via the first ACK packet.
[0113] In another possible implementation, the destination generates a notification message including a third time and a fourth time, and sends the notification message to the source. In this implementation, the notification message also includes the message ID of the first message, so that after receiving the notification message, the source can determine that the time information carried in the notification message is the third time and the fourth time corresponding to the first message based on the message ID of the first message carried in the notification message. This application does not specifically limit the format and type of the notification message.
[0114] Step 1013: The source receives the third and fourth times.
[0115] Optionally, when the third and fourth times are carried in the first ACK message, the source end extracts the third and fourth times from the first ACK message after receiving it from the destination end. Then, the source end records the third and fourth times, along with the message ID of the first message carried in the first ACK message, as a single piece of information. For example, the source end records the third and fourth times, along with the previously recorded first and second times and the message ID of the first message, as a single piece of information based on the message ID of the first message carried in the first ACK message.
[0116] Optionally, when the third and fourth times are carried in the notification message, the source end extracts the third and fourth times from the notification message after receiving it from the destination end. Then, the source end records the third and fourth times, along with the message ID of the first message carried in the notification message, as a single piece of information. For example, the source end records the third and fourth times, along with the previously recorded first and second times and the message ID of the first message, as a single piece of information based on the message ID of the first message carried in the notification message.
[0117] Step 1014: The source end extracts the fifth and sixth times. The fifth time is the time when the source end receives the first ACK packet, and the sixth time is the time when the source end finishes processing the first ACK packet.
[0118] After receiving the first ACK packet sent by the destination in response to the completion of receiving the first packet, the source end records the time of receiving the first ACK packet as the fifth time and stores the fifth time. For example, the source end records the fifth time, the previously recorded and stored first time, second time, third time, fourth time, and the packet ID of the first packet as a single piece of information.
[0119] Furthermore, the source end processes the first ACK packet, for example, in response to the first ACK packet, deleting the data sent via the first packet from local storage. After processing the first ACK packet, the source end records the time of processing the first ACK packet as the sixth time and stores the sixth time. For example, the source end records the sixth time, along with the previously recorded and stored first, second, third, fourth, and fifth times, and the packet ID of the first packet, as a single piece of information.
[0120] Referring to steps 1011 to 1014 and Figure 7, Figure 7 illustrates the relationship between the first to sixth time points provided in this embodiment of the application. As shown in Figure 7, at the first time point, the source end generates the first data packet of the first message. At the second time point, the network card at the source end sends the data packet of the first message. At the third time point, the destination end receives the data packet of the first message. At the fourth time point, the destination end returns an ACK message (first ACK message) to the source end. At the fifth time point, the source end receives the first ACK message. At the sixth time point, the source end completes processing the first ACK message. It can be understood that because the network card sends and receives data packets at extremely high speeds, the time when the network card sends the first or last data packet in a message can be approximated as the same time, i.e., considered as the sending time of the message. Similarly, the time when the network card receives the first or last data packet in a message can be approximated as the same time, i.e., considered as the receiving time of the message.
[0121] Thus, through steps 1011 to 1014, the source end has obtained several time nodes from the generation of the first message to its transmission, to the receipt of the corresponding ACK, and the completion of the processing of the ACK. Based on these time nodes, the end-side latency and network latency of the first message can be calculated.
[0122] Step 1015: The source determines the end-side delay and network delay of the first message based on the first time, second time, third time, fourth time, fifth time and sixth time.
[0123] Taking the first time as t1, the second time as t2, the third time as t3, the fourth time as t4, the fifth time as t5, and the sixth time as t6 as an example, in one example, the source end calculates the end-side delay E of the first message according to the following formula (1). delay .
[0124] Formula (1) E delay =E delay_send +E delay_receive = (t2-t1)+(t4-t3)+(t6-t5)
[0125] Among them, E delay_send E represents the time delay (t2-t1) for the source to process the first packet and the time delay (t6-t5) for processing the first ACK packet. delay_receive This represents the processing delay (t4-t3) of the first message at the destination. That is, the processing delay of the first message at the source is represented by the difference between the first and second times, the processing delay of the first ACK message at the source is represented by the difference between the fifth and sixth times, and the processing delay of the first message at the destination is represented by the difference between the third and fourth times.
[0126] In another example, the source calculates the network delay F of the first message according to the following formula (2). delay .
[0127] Formula (2) F delay =F delay_packet +F delay_ack = (t3-t2)+(t5-t4)
[0128] Among them, F delay_packet F represents the delay (t3-t2) in the transmission of the first message in the communication link between the source and destination. delay_ackThis represents the delay (t5-t4) in the transmission of the first ACK packet between the source and destination. It should be understood that the network interface card (NIC) sends data packets at an extremely high rate; therefore, the time taken for multiple data packets within a single packet to be sent by the NIC can be approximated as the same time. Thus, even if t2 is the time when the source sends the last data packet of the first packet, and t3 is the time when the destination receives the first data packet of the first packet, (t3-t2) can still be considered the transmission time of the first packet.
[0129] Step 102: The source determines the first packet sending rate based on the end-side delay of the first packet and the network delay of the first packet.
[0130] The first packet sending rate is the packet sending rate required when controlling the target message stream sending rate.
[0131] It should be understood that the endpoint latency and network latency of the first packet already sent by the source can be regarded as historical state data of the target packet flow. Therefore, the process by which the source determines the first packet transmission rate based on the endpoint latency and network latency of the first sent packet can be understood as the source predicting the packet transmission rate (i.e., the first packet transmission rate) needed to adjust the current packet transmission rate of the target packet flow based on the historical state data of the target packet flow. This process can also be understood as a prediction process based on machine learning.
[0132] In this embodiment, the packet sending rate can be represented by the congestion window (CWND). CWND is an important concept in TCP, specifically referring to the number of data packets sent to the network in a single round, primarily used to control the amount of data sent to the network by the packet sender. Therefore, the first packet sending rate predicted by the source end based on the historical state data of the target packet flow can be understood as the number of data packets in the target packet flow that the source end will send to the network in the next round.
[0133] Specifically, upon receiving the first ACK packet, the source determines a first packet transmission rate based on the endpoint latency and network latency of the first packet. The source determines the first packet transmission rate based on the endpoint latency and network latency of the first packet, including: determining the endpoint packet transmission rate based on the endpoint latency of the first packet and the size of the historical endpoint congestion window (CWND); and determining the network packet transmission rate based on the network latency of the first packet and the size of the historical network-side CWND. Then, the source determines the smaller of the endpoint packet transmission rate and the network-side packet transmission rate as the first target packet rate.
[0134] The historical end-side CWND is the CWND of the source end when it sent packets in the target packet stream before the current time. Alternatively, the size of the historical end-side CWND can be understood as the number of packets in the target packet stream sent by the source end to the network in one or more rounds before the current time. The historical network-side CWND is the CWND of the communication link between the source and destination ends when it transmitted packets in the target packet stream before the current time. Alternatively, the size of the historical network-side CWND can be understood as the number of packets in the target packet stream transmitted by the communication link between the source and destination ends in one or more rounds before the current time. It can be seen that both the historical end-side CWND and the historical network-side CWND are historical state data of the target packet stream.
[0135] The endpoint packet transmission rate refers to the number of data packets the source end needs to send in the target packet flow in the next round, as predicted by the source end based on historical state data of the target packet flow (such as the endpoint delay of the first packet and historical endpoint CWND). It should be understood that the endpoint (i.e., the host side) also faces congestion risks when processing packets due to resource and computing power limitations, and the endpoint packet rate predicted by the source end can prevent congestion at the source end.
[0136] Network-side packet transmission rate refers to the number of data packets in the target message stream that the source end predicts, based on historical state data of the target message stream (such as the network latency of the first message and historical network-side CWND), will need to transmit in the next round of communication between the source and destination. Since communication links in the network are subject to congestion risk, the network-side packet transmission rate predicted by the source end can help avoid congestion in the communication link between the source and destination.
[0137] Since a slower / lower packet transmission rate reduces the likelihood of network congestion, the smaller of the source-side packet transmission rate and the network-side packet transmission rate is chosen as the first packet transmission rate. This ensures that network congestion is prevented and avoids a mismatch between the predicted and actual packet transmission rates. For example, in related technologies, the packet transmission rate is determined by considering only the impact of communication links in the network when preventing network congestion. However, due to limitations in the sender's own computing power, significant latency occurs. Therefore, even if the sender is configured to transmit packets at the determined rate, in reality, the sender cannot achieve the required transmission rate due to its own latency.
[0138] Specifically, the source determines the end-side packet transmission rate based on the end-side latency of the first packet and the historical end-side CWND size, including: the source calculates a first factor and a second factor based on the end-side latency of the first packet and the historical end-side CWND size, and calculates the end-side packet transmission rate based on the first factor, the second factor, and the historical end-side CWND size. Here, the first factor represents the congestion state of the source, and the second factor represents the state attribute of the target packet flow at the source. Furthermore, the source determines the network-side packet transmission rate based on the network latency of the first packet and the historical network-side CWND size, including: the source calculates a third factor and a fourth factor based on the network latency of the first packet and the historical network-side CWND size, and determines the network-side packet transmission rate based on the third factor, the fourth factor, and the historical network-side CWND size. Here, the third factor represents the congestion state of the communication link between the source and destination, and the fourth factor represents the state attribute of the target packet flow on that communication link. The state attributes of the target message flow at the source end can be understood as the sending status of the target message flow at the source end (e.g., the number of messages sent and processing delay). The state attributes of the target message flow on the communication link can be understood as the transmission status of the target message flow on the communication link (e.g., the number of messages transmitted and transmission delay).
[0139] It should be understood that experimental simulations of the relationship between latency and end-side congestion windows show that when the source communicates with the destination via the network, the end-side congestion state is inversely proportional to the square of the number of data streams sent through the ports of the end-side devices, and also inversely proportional to the square of the number of data packets in a single data stream (such as the target message stream) sent from the end to the network. The end-side congestion state can be represented by the size of the end-side congestion window. Similarly, experimental simulations of the relationship between latency and network-side congestion windows show that when the source communicates with the destination via the network, the network congestion state is inversely proportional to the square of the number of data streams sent through the ports of message forwarding devices (such as switches) in the network, and also inversely proportional to the square of the number of data packets in a single data stream (such as the target message stream) transmitted over the network. The network congestion state can be represented by the size of the network-side congestion window.
[0140] Based on the above correspondence, by way of example, the following formulas (3) to (8) can be obtained to calculate the packet sending rate on the terminal side and the packet sending rate on the network side.
[0141] Formula (3)
[0142] Formula (4)
[0143] Formula (5)
[0144] Formula (6)
[0145] Formula (7)
[0146] Formula (8)
[0147] Where R is a preset coefficient. delay i α represents the delay. CWND represents the congestion window. α represents the congestion state, and β represents the state attribute of the target packet flow. k represents the number of rounds of adjusting the packet rate before the current time, and i represents the i-th transmission rate adjustment in k rounds of adjusting the packet rate. For example, k takes the value 2, representing two rounds of adjustment of the packet rate before the current time. In this case, i takes values in [1,2]. In this case, it represents the relevant data (i.e., delay1 and CWND) when adjusting the packet rate of the target packet flow using the two rounds before the current time in formulas (3) to (7). i The coefficients A, B, C, and D used to calculate the first packet transmission rate when calculating the target packet flow transmission rate for this adjustment are: For example, when i is 1, delay1 is the end-side delay or network delay obtained after the previous round of packet transmission rate adjustment; that is, delay1 is the end-side delay and network delay of the first packet obtained for predicting the first packet transmission rate. CWND1 is the packet transmission rate adjusted in the previous round; that is, CWND1 is the number of data packets sent from the source end to the current time after the previous round of packet transmission rate adjustment. For another example, when i is 2, delay2 is the end-side delay or network delay obtained after the previous round of packet transmission rate adjustment; that is, delay2 is the end-side delay or network delay of the packets in the target packet flow obtained when predicting the packet transmission rate in the previous round. CWND2 is the packet sending rate controlled in the previous round, that is, the number of data packets in the target message stream sent by the source end from the packet sending rate controlled in the previous round to the packet sending rate controlled in the previous round.
[0148] It should be understood that CWND i This refers to the historical end-side CWND or historical network-side CWND mentioned above. In this embodiment, the values of k and i in formulas (3) to (7) are pre-configured. Based on this, during the transmission of the target packet stream, the source end statistically analyzes and stores in real time the end-side latency, network latency, historical end-side CWND, and historical network-side CWND corresponding to k times when adjusting the packet transmission rate of the target packet stream, so as to use them when determining the first packet transmission rate.
[0149] Furthermore, by inputting the end-side delay of the first packet obtained from the source end and the pre-statistical historical end-side CWND size into formulas (3) to (7), the corresponding end-side coefficients A1, B1, C1, and D1 can be obtained. Then, the source end inputs the pre-statistical historical end-side CWND size and coefficients A1, B1, C1, and D1 into formula (8) to obtain α1, which represents the source end's congestion state, and β1, which represents the state attribute of the target packet flow at the source end. Here, α1 is the first factor, and β1 is the second factor.
[0150] Similarly, by inputting the network delay of the first message obtained from the source end and the pre-statistical size of the network-side CWND into formulas (3) to (7), the corresponding coefficients A2, B2, C2, and D2 can be obtained. Then, the source end inputs the pre-statistical size of the historical network-side CWND and the coefficients A2, B2, C2, and D2 into formula (8) to obtain α2, which represents the congestion state of the communication link between the source and destination ends, and β2, which represents the state attribute of the target message flow on the communication link. Here, α2 is the third factor, and β2 is the fourth factor.
[0151] Furthermore, in some embodiments, the source end can calculate the predicted packet sending rate based on the calculated first factor, second factor, third factor and fourth factor, and by the following formula (9).
[0152] Formula (9)
[0153] Wherein, CWND represents the terminal-side packet sending rate or network-side packet sending rate calculated when adjusting the packet sending rate of the target message flow in the previous round.
[0154] In one example, when the source side substitutes the calculated first factor, second factor, and the packet sending rate of the target message flow in the previous round of regulation into formula (9), the end-side packet sending rate calculated (or understood as "predicted") can be obtained, denoted as CWND_endhost, as shown in formula (10) below.
[0155] Formula (10)
[0156] In another example, when the source side substitutes the calculated third factor, fourth factor, and the network-side packet sending rate (represented by the congestion window, denoted as CWND2) calculated when the target packet flow of the previous round of regulation is controlled into formula (9), the network-side packet sending rate calculated (or understood as "predicted") when the target packet flow of the current regulation is controlled can be calculated, denoted as CWND_fabric, as shown in the following formula (11).
[0157] Formula (11)
[0158] Then, the source determines the smaller of the calculated end-side packet sending rate and the network-side packet sending rate as the first packet sending rate. For example, the source takes the smaller of the calculated end-side packet sending rate and the network-side packet sending rate as the first packet sending rate based on the following formula (12), denoted as CWND_target.
[0159] Formula (12) CWND_target=mix(CWND_endhost, CWND_fabric)
[0160] Step 103: The source end sends the second message to be sent in the target message stream at the first packet sending rate.
[0161] After predicting the first packet sending rate based on the historical state data of the target packet flow (including the latency, congestion window, and other data corresponding to the historical adjustment of the target packet flow's packet sending rate), the source end sends the data packets of the packets in the target packet flow that have not yet been sent at the first packet sending rate.
[0162] Since the packet transmission rate can be represented by CWND, the first packet transmission rate can be represented as the first CWND. At this time, the source end schedules a number of packets that meet the size of the first CWND from the unsent packets in the target packet stream to the network card's transmission queue, and the network card sends the packets scheduled to the transmission queue.
[0163] Optionally, the process of the source scheduling data packets of the target message stream to be sent to the network card's sending queue according to the first packet sending rate, and the network card scheduling and sending data packets in the sending queue, can be referred to the process described in Figure 9 below, and will not be repeated here.
[0164] Thus, the congestion control mechanism implemented based on the methods described in steps 101 to 103 achieves the regulation of the packet transmission rate of the target data stream. When the methods described in steps 101 to 103 are executed for each stream sent from the source end, the packet transmission rate of each stream can be regulated according to the historical state data of each stream (including the latency, congestion window, and other data corresponding to the historical regulation of the packet transmission rate of the packet stream), that is, flow-level granular congestion control is achieved. Based on this, the performance bottleneck problem of the implicit congestion control and port-level explicit congestion control mechanisms commonly used in the industry can be solved. Furthermore, the flow-level congestion control mechanism implemented by the scheme provided in this application embodiment can achieve differentiated congestion control (or flow control) for each data stream based on the attributes and network state (characterized by historical state data), and the fine-grained flow-level congestion control can simultaneously meet the differentiated needs of many applications.
[0165] Furthermore, on the one hand, since the packet sending rate of the flow is adjusted based on the historical state data of the flow, the required packet sending rate is predicted in the embodiments of this application. Consequently, when the flow is sent based on the adjusted packet sending rate (such as the first packet sending rate mentioned above), congestion on the end side and the network side can be avoided, thereby improving the transmission performance of the flow. Based on this, the flow-level congestion control mechanism implemented by the scheme provided in the embodiments of this application solves the problem of congestion control lag in current industry congestion control mechanisms. For example, current industry congestion control mechanisms perform flow control by feeding back signals such as packet loss and RTT delay after severe congestion, or by feeding back ECN tags after mild congestion for the next round of rate adjustment.
[0166] On the other hand, when regulating the packet sending rate of the message flow, this application embodiment, in addition to referencing the latency and congestion window of the communication link between the source and destination during historical data transmission to predict the subsequent packet sending rate of the source, also refers to the latency and congestion window of the source itself due to resource and computing power limitations to predict the subsequent packet sending rate of the source. This avoids the problem of a mismatch between the regulated packet sending rate and the actual data flow packet sending rate during congestion control. It can be seen that the flow control range of this application embodiment is larger than that in related technologies. Based on this, the flow-level congestion control mechanism implemented by the solution provided in this application embodiment solves the problem of a mismatch between the packet sending rate after congestion control and the actual data flow packet sending rate, which is caused by the current industry focusing only on network-side congestion while ignoring end-side congestion.
[0167] Referring to Figure 8, Figure 8 shows a comparison of the flow control range of the method provided in this application embodiment and related technologies. As shown in Figure 8, t1 to t6 are the first time to the sixth time mentioned above, respectively. It can be seen from Figure 8 that in related technologies, the flow control range of the congestion control mechanism is only the source network interface card (NIC) - transmission network - destination NIC. However, the flow control range of the congestion control mechanism implemented by the method provided in this application embodiment extends from the source host - source NIC - transmission network - destination NIC - destination host. For example, the flow control in this application embodiment considers the latency caused by the source host generating data packets and processing ACKs, and also considers the latency caused by the destination host generating and sending ACKs in response to received data packets. Therefore, since the solution provided in this application embodiment uses the end-side latency and congestion state, as well as the network latency and congestion state of the transmission network, as inputs to flow control, the flow control implemented in this way can avoid end-side congestion and network-side congestion. That is, the congestion control mechanism implemented by the solution provided in this application embodiment has a larger flow control range and more accurate flow control precision.
[0168] The following describes the process of the source scheduling data packets of the target message stream to the network card's sending queue according to the first packet sending rate, and the network card scheduling and sending data packets in the sending queue.
[0169] Referring to Figure 9, Figure 9 shows a schematic flowchart of another message transmission method provided by an embodiment of this application. Optionally, this method is applied to the source end of the implementation environment shown in Figure 3 or Figure 4. As shown in Figure 9, the method includes the following steps 201 to 203. Optionally, steps 201 to 203 can be executed after step 102 to implement the above-described step 103. Optionally, the method shown in Figure 9 can also be used alone, that is, the source end can use the method shown in Figure 9 to schedule data packets of the target message stream to be sent to the network card's sending queue according to any packet sending rate, and to implement the network card's scheduling of data packets in the sending queue.
[0170] Step 201: The source determines the target sending queue in its own network card that corresponds to the target packet flow.
[0171] It is understandable that for any given device, the network interface card (NIC) can include multiple transmit queues.
[0172] In this embodiment, the source network interface card (NIC) includes multiple transmission queues, including a target transmission queue corresponding to the target packet flow, and each transmission queue has a different priority. The priority of a transmission queue indicates the priority of scheduling packets within that queue for transmission. This embodiment does not specifically limit the correspondence between priority levels and the order in which different transmission queues are scheduled for transmission. For example, packets from high-priority transmission queues are scheduled for transmission first, and packets from low-priority transmission queues are scheduled for transmission later. Or, for another example, packets from low-priority transmission queues are scheduled for transmission first, and packets from high-priority transmission queues are scheduled for transmission later. This is not a limitation.
[0173] In one possible implementation, the source end pre-defines the correspondence between different types of services and transmission queues with different priorities in the network interface card (NIC). For example, type 1 services correspond to transmission queue 1 with first priority, type 2 services correspond to transmission queue 2 with second priority, and so on. In this case, after determining the first packet transmission rate (i.e., the first CWND), the source end determines the transmission queue corresponding to the service type to which the target packet flow belongs as the target transmission queue.
[0174] In another possible implementation, the source end pre-defines the correspondence between different Quality of Service (QoS) levels and transmission queues with different priorities in the network interface card (NIC). For example, the service requiring the highest QoS level corresponds to transmission queue 1 with first priority, the service requiring the second highest QoS level corresponds to transmission queue 2 with second priority, and so on. In this case, after determining the first packet transmission rate (i.e., the first CWND), the source end, based on the QoS level required by the service in the target packet flow, determines the transmission queue corresponding to that QoS level as the target transmission queue for the target packet flow.
[0175] In another possible implementation, the source end determines the target transmission queue corresponding to the target packet flow in its own network interface card (NIC). This includes: the source end first determining the size of the packets already transmitted in the target packet flow; then, the source end determining the transmission priority of the target packet flow based on the size of the packets already transmitted; and finally, the source end determining the transmission queue corresponding to the transmission priority of the target packet flow from among the multiple transmission queues included in the NIC as the target transmission queue. Optionally, the higher the transmission priority of the packet flow, the higher the priority of the packet flow; the lower the transmission priority of the packet flow, the later the packet flow is transmitted. Therefore, optionally, the higher the transmission priority of the packet flow, the higher the priority of the corresponding transmission queue; and the lower the transmission priority of the packet flow, the lower the priority of the corresponding transmission queue. Optionally, the higher the sending priority of the message stream, the lower the priority of the corresponding sending queue, and vice versa. No such limitation applies.
[0176] It should be understood that latency-sensitive traffic generally requires a relatively small amount of data to be transmitted, thus requiring low latency. Bandwidth-sensitive traffic, on the other hand, requires a large amount of data to be transmitted, thus necessitating high bandwidth. Therefore, to ensure the low latency required by latency-sensitive traffic, it needs to be set to a high transmission priority. This requires scheduling latency-sensitive traffic into a transmission queue configured for priority transmission, ensuring its low latency. Based on this, in this embodiment, after determining the first packet transmission rate (i.e., the first CWND), the source end counts the size of the packets already transmitted in the target packet stream and determines the transmission priority of the target packet stream based on the size of the transmitted packets. Then, the transmission queue corresponding to the transmission priority of the target packet stream from the multiple transmission queues included in the source end network interface card is determined as the target transmission queue.
[0177] In this implementation, the source end is configured with at least one priority threshold value indicating the data size. This priority threshold value can be divided into multiple threshold value intervals, each corresponding to a transmission priority. For example, four priority threshold values can be divided into five threshold value intervals, each of which corresponds to a transmission priority, for a total of five transmission priorities. As an example, the multiple priority threshold values configured on the source end are represented as: P k =w(KB)*2 k k∈[0, N-2], where N is an integer greater than 2. Here, w is a preset value, KB represents the data length unit kilobyte, N represents the number of transmit queues included in the network card, or the number of priorities, and k is an integer between [0, N-2].k This is the k-th priority threshold value. It can be seen that P... k The value of increases as k increases; that is, the larger the value of k, the higher the priority threshold value P. k The larger.
[0178] Referring to Figure 10, which illustrates a schematic diagram of the priority threshold values provided in an embodiment of this application, taking N as 5 as an example, then k∈[0, 3]. In this case, the source network interface card (NIC) includes 5 transmission queues, namely transmission queue 0 to transmission queue 4. The source NIC is configured with (5-1) = 4 priority threshold values. As shown in Figure 10, when k is 0, the priority threshold value P0 = w(KB)*2 0 =w(KB). When k is 1, the priority threshold P1 = w(KB) * 2 1 =2w(KB). When k is 2, the priority threshold P2 = w(KB) * 2 2 =4w(KB). When k is 3, the priority threshold P3 = w(KB) * 2 3 = 8w (KB). In this case, threshold interval 0 for data size less than or equal to P0 corresponds to a sending priority, denoted as sending priority 0. Threshold interval 1 for data size between P0 and P1 corresponds to a sending priority, denoted as sending priority 1. Threshold interval 2 for data size between P1 and P2 corresponds to a sending priority, denoted as sending priority 2. Threshold interval 3 for data size between P2 and P3 corresponds to a sending priority, denoted as sending priority 3. Threshold interval 4 for data size greater than or equal to P3 corresponds to a sending priority, denoted as sending priority 4. In one example, sending priorities 0 to 4 correspond one-to-one with sending queues 0 to 4.
[0179] It should be noted that, in this embodiment of the application, when k takes the maximum value (N-2), and the size of the packets already sent in the packet stream is greater than or equal to P. N- 2 indicates that the message stream has sent a large amount of data, therefore it can be determined that the message stream is not a delay-sensitive message stream, and thus greater than or equal to P. N-The transmission priority corresponding to the threshold range of 2 needs to instruct the last scheduler to send the message in the transmission queue corresponding to that transmission priority. When k takes the minimum value of 0, and the size of the messages already sent in the message stream is less than or equal to P0, it indicates that the message stream has sent very little data. Therefore, it can be determined that the message stream is a latency-sensitive message stream. Thus, the transmission priority corresponding to the threshold range of less than or equal to P0 needs to instruct the first scheduler to send the message in the transmission queue corresponding to that transmission priority. Let's take the example of the transmission priority corresponding to the first scheduled transmission queue being the highest priority and the transmission priority corresponding to the last scheduled transmission queue being the lowest priority. That is, the higher the transmission priority corresponding to the transmission queue, the more likely the messages in that transmission queue are scheduled to be sent. Conversely, the lower the transmission priority corresponding to the transmission queue, the later the messages in that transmission queue are scheduled to be sent. For example, referring to Figure 10, transmission priority 0 is the highest priority, and the messages in transmission queue 0 corresponding to transmission priority 0 are sent by the first scheduler. Sending priority 4 is the lowest priority, and the message in sending queue 4 corresponding to the highest sending priority 4 is the last one scheduled to be sent.
[0180] For simplicity, the following description assumes that the higher the sending priority of the message stream, the more likely the corresponding sending queue is to be scheduled for sending, and the higher the priority of that sending queue. Conversely, the lower the sending priority of the message stream, the later the corresponding sending queue is scheduled for sending, and the lower the priority of that sending queue. In some examples, the sending queue corresponding to the sending priority of the message stream is simply the sending queue with that sending priority.
[0181] In this way, after the source end calculates the size of the packets already sent in the target packet flow, it determines the sending queue corresponding to the sending priority of the threshold value range to which the size of the packets already sent in the target packet flow belongs as the target sending queue. For example, if the packets already sent in the target packet flow belong to threshold value range 0 in the example shown in Figure 10, the source end determines sending queue 0 in its own network card corresponding to the highest priority (i.e., sending priority 0) as the target sending queue. As another example, if the packets already sent in the target packet flow belong to threshold value range 4 in the example shown in Figure 10, the source end determines sending queue 4 in its own network card corresponding to the lowest priority (i.e., sending priority 4) as the target sending queue.
[0182] Optionally, in this embodiment, the source end also configures a weight for each transmission queue of the network interface card.
[0183] Optionally, priority indicators assign greater weight to the sending queues that are scheduled to be sent first (i.e., high priority), and assign less weight to the sending queues that are scheduled to be sent later (i.e., low priority).
[0184] Optionally, high-priority sending queues are configured with lower weights, and low-priority sending queues are configured with higher weights. In this case, as mentioned above, since the flow to which the data packets scheduled to the high-priority sending queue belong is latency-sensitive traffic, the flow to which the data packets scheduled to the low-priority sending queue belong is bandwidth-sensitive traffic. Therefore, if a higher weight is assigned to the low-priority sending queue, then when scheduling data packets from different sending queues using WFQ, the low-priority sending queue can be scheduled with more data packets in each round of scheduling; that is, the bandwidth-sensitive traffic to which the data packets scheduled to the low-priority sending queue belong can obtain more transmission bandwidth.
[0185] Step 202: The source end schedules data packets from the unsent packets in the target message stream that meet the first CWND to the target sending queue.
[0186] The first CWND is the first packet transmission rate.
[0187] After determining the target sending queue corresponding to the target packet stream, the source end schedules a number of data packets that meet the first CWND size from the packets to be sent in the target packet stream (such as packets including the second packet mentioned above) to the target sending queue, so as to wait for the network card to schedule and send them.
[0188] For ease of description, the "data packets in the target message stream that meet the first CWND size" are denoted as the first group of data packets. Optionally, since the length of the sending queue in the network card is limited, when the length of the first group of data packets is greater than the length of the target sending queue, the source will schedule the data packets in the first group of data packets that are longer than the length of the target sending queue (denoted as redundant data packets) to a sending queue with a priority one level lower than that of the target sending queue.
[0189] Step 203: The source end sends the data packets of the target sending queue according to the priority of the target sending queue.
[0190] In the first possible implementation, the source network interface card (NIC) is configured to schedule the transmission of data packets from multiple transmission queues according to the PQ (Priority Queuing) policy. In this case, after the source has scheduled the transmission of data packets (or messages) from transmission queues with higher priority than the target transmission queue, it schedules the transmission of data packets from the target transmission queue until all data packets in the target transmission queue have been transmitted.
[0191] In the second possible implementation, when the target sending queue belongs to the first sending queue set, the source network interface card (NIC) schedules the transmission of data packets from each sending queue in the first sending queue set according to the PQ (Priority Queuing) strategy. Here, the first sending queue set is a set of at least one sending queue, where the priority of each of these at least one sending queue is higher than or equal to a preset priority, or, in the descending priority order of the multiple sending queues included in the source NIC, the priority of each of these at least one sending queue is among the top m, where m is an integer greater than or equal to 1. It can be seen that the sending queues in the first sending queue set are all sending queues with higher priority than the target sending queue in the source NIC. In this case, after the source has scheduled the transmission of data packets from the sending queues in the first sending queue set whose priority is higher than the target sending queue's priority, it schedules the transmission of data packets from the target sending queue until all data packets in the target sending queue have been transmitted.
[0192] As shown in steps 201 and 202, data packets scheduled to higher-priority sending queues belong to message flows that have already sent relatively little data. Therefore, these message flows are latency-sensitive traffic, meaning they have a higher sending priority, and consequently, their corresponding sending queues have a higher priority. In this case, the second possible implementation, by prioritizing the sending of data packets in higher-priority sending queues, ensures that latency-sensitive traffic is prioritized, thereby guaranteeing low latency for latency-sensitive traffic.
[0193] In the third possible implementation, when the target sending queue belongs to the second sending queue set, the source end schedules the sending of data packets from each sending queue in the second sending queue set according to the WFQ mechanism. Specifically, the source end schedules the sending of data packets from each sending queue in descending order of priority, according to the weight of each sending queue in the second sending queue set, and so on in a cyclical manner. The second sending queue set is a set of at least two sending queues, each with a preset weight. The description of the preset weights can be found in the relevant description of step 202, and will not be repeated here. Furthermore, the priority of each of the at least two sending queues is lower than or equal to the preset priority, or, in the descending order of priority of the multiple sending queues included in the source end network interface card, the priority of each of the at least two sending queues is after the m-th position. It can be seen that the sending queues in the first sending queue set belong to the lower priority sending queues among the multiple sending queues of the source end network interface card.
[0194] Referring to Figure 11, Figure 11 illustrates a process of scheduling data packets in each of the second sending queues in the WFQ mechanism according to an embodiment of this application. Taking the second sending queue set including sending queues 100 to 102 as an example, when the priorities of sending queues 100 to 102 decrease sequentially, and the weight 0 of sending queue 100 indicates that 1 data packet is scheduled to be sent at a time, the weight 1 of sending queue 101 indicates that 3 data packets are scheduled to be sent at a time, and the weight 2 of sending queue 102 indicates that 5 data packets are scheduled to be sent at a time, in this case, the source network card first schedules 1 data packet from sending queue 100 to send, then schedules 3 data packets from sending queue 101 to send, and then schedules 5 data packets from sending queue 102 to send. Then, the source again schedules 1 data packet from sending queue 100 to send, then schedules 3 data packets from sending queue 101 to send, and then schedules 5 data packets from sending queue 102 to send, and so on, until all data packets in sending queues 100 to 102 have been sent.
[0195] In some examples, during the process of the source network interface card (NIC) scheduling data packets for each sending queue in the second sending queue set using the WFQ mechanism, the actual number of data packets scheduled for a certain sending queue by the source may differ in different rounds of scheduling. Taking the source NIC as a certain sending queue, and assuming that the pre-configured weight P1 of the first sending queue indicates the number of data packets to be sent in one round is C, let's assume that after deducting the number of data packets included in the first sending queue before the kth round of scheduling from the number of data packets scheduled to be sent by weight P1, the remaining number of data packets is denoted as C(k):
[0196] In one possible scenario, when C(k) is greater than or equal to 0, it indicates that before the k-th round of scheduling of the first sending queue, the number of data packets included in the first sending queue is less than the number of data packets C indicated by weight P1. In this case, the source network card schedules and sends all the data packets of the first sending queue in the k-th round of scheduling, and in the (k+1)-th round of scheduling, the source network card still schedules and sends the data packets of the first sending queue according to the number of data packets C indicated by P1. Let C(k+1) represent the number of data packets that the source network card schedules from the first sending queue in the (k+1)-th round of scheduling, then: C(k+1) = C, and C(k) is greater than or equal to 0.
[0197] In another possible scenario, when C(k) is less than 0, it indicates that before the k-th round of scheduling for the first sending queue, the number of data packets in the first sending queue is greater than the number of data packets C indicated by weight P1. In this case, the source network card schedules all data packets in the first sending queue for transmission in the k-th round of scheduling, and in the (k+1)-th round of scheduling, the source network card schedules [C+C(k)] data packets from the first sending queue. Let C(k+1) represent the number of data packets that the source network card schedules from the first sending queue in the (k+1)-th round of scheduling. Then: C(k+1) = C+C(k), and C(k) is less than 0. This is equivalent to the source network card deducting the data packets that were over-scheduled in the k-th round in the (k+1)-th round of scheduling, thus ensuring fair scheduling of the sending queue.
[0198] The third possible implementation enables fair transmission of data packets in lower-priority transmission queues. Furthermore, as seen in steps 201-202, a lower priority transmission queue means a lower transmission priority for the message stream to which the data packets scheduled to that queue belong. Consequently, the message stream to which the data packets scheduled to that queue belong has already transmitted more data, making it less sensitive to latency and more sensitive to bandwidth—in other words, it is bandwidth-sensitive traffic. In this case, when the transmission queue in this embodiment has a lower priority, a weight is set to indicate how many data packets are sent in a single scheduling, thus ensuring that bandwidth-sensitive traffic receives more transmission bandwidth.
[0199] It should be understood that for the source network interface card (NIC), the second and third possible implementations described above can be used in combination. That is, the source NIC first uses a Priority Queuing (PQ) mechanism to schedule transmission for the first set of transmission queues, which includes higher-priority transmission queues, to ensure that latency-sensitive packet flows are sent first. Then, after all data packets in the first set of transmission queues have been sent, the source NIC uses a Wired Frequency Queuing (WFQ) mechanism to schedule transmission for the second set of transmission queues, which includes the remaining lower-priority transmission queues, to ensure that bandwidth-sensitive packet flows receive more transmission bandwidth.
[0200] Steps 201 to 203 achieve the implementation of scheduling and sending based on the size of the sent packets in the packet stream, selecting a suitable scheduling strategy for the packet stream, thereby enabling priority transmission of latency-sensitive traffic and providing more transmission bandwidth for bandwidth-sensitive traffic.
[0201] In other embodiments, referring to FIG12, FIG12 shows a schematic flowchart of another message transmission method provided by an embodiment of the present application. Optionally, the method is applied to the implementation environment shown in FIG3 or FIG4. As shown in FIG12, after step 103, the method further performs steps 104 to 106.
[0202] Step 104: The source end obtains the end-side latency and network latency of the third packet that has been sent in the target packet stream.
[0203] For a detailed explanation of how the source obtains the end-side latency and network latency of the third packet already sent in the target packet stream, please refer to the description of "the source obtains the end-side latency and network latency of the first packet already sent in the target packet stream" in step 101, which will not be repeated here.
[0204] The third message is a message sent by the source after sending the first message. For example, the third message is the second message mentioned above, or a message sent after the second message. There is no limitation on this.
[0205] Step 105: The source determines the second packet transmission rate based on the end-side delay and network delay of the third message.
[0206] Specifically, upon receiving the second ACK packet, the source determines the second packet transmission rate based on the end-side latency and network latency of the third packet. The second ACK packet is the ACK packet for the third packet.
[0207] For a detailed explanation of how the source determines the second packet transmission rate based on the end-side delay and network delay of the third message, please refer to the description of "the source determines the first packet transmission rate based on the end-side delay and network delay of the first message" in step 102, which will not be repeated here.
[0208] Step 106: The source end sends the packets to be sent in the target packet stream at the second packet sending rate.
[0209] For a detailed explanation of how the source sends the target message stream at the second packet sending rate, please refer to the description of "the source sends the second message to be sent in the target message stream at the first packet sending rate" in step 103, which will not be repeated here.
[0210] It should be noted that, in one possible implementation, when the second ACK packet is the next ACK packet received from the source end after receiving the first ACK packet, it indicates that the source end can respond to each ACK packet in the target packet stream and adjust the packet transmission rate of the target packet stream in real time, thereby achieving real-time control of the packet transmission rate of the target packet stream and thus achieving real-time congestion control at the flow level. In other words, the scheme described in steps 101 to 106 provided in this application embodiment can avoid packet stream congestion, thereby improving the transmission performance of the packet stream and meeting the low-latency transmission performance requirements of the packet stream.
[0211] As an example, taking the flow control scheme provided in this application embodiment for flow 1 to achieve congestion control as an example, firstly, for each packet of flow 1, the source end executes step 101, so that the source end can obtain the terminal latency and network latency of each packet. Next, in response to the first ACK packet received from flow 1, the source end executes step 102 according to the corresponding terminal latency and network latency to calculate the packet transmission rate 1, and then the source end sends the packets of flow 1 at the packet transmission rate 1 (refer to step 103). Next, in response to the second ACK packet received from flow 1, the source end executes step 102 again according to the corresponding terminal latency and network latency to calculate the packet transmission rate 2, and then the source end sends the packets of flow 1 at the packet transmission rate 2 (refer to step 103). Next, in response to the third ACK packet received from Flow 1, the source end executes step 102 again based on the corresponding end-side latency and network latency to calculate the packet transmission rate 3. Then, the source end transmits Flow 1 at the packet transmission rate 3 (refer to step 103). This process is repeated to achieve real-time control of the packet transmission rate of Flow 1. This avoids congestion in Flow 1, thereby improving the transmission performance of Flow 1 and meeting its low-latency transmission performance requirements.
[0212] Referring to Figure 13, Figure 13 illustrates a schematic diagram of the relationship between packet transmission rate and latency in real-time packet flow control according to an embodiment of this application. As shown in Figure 13, when the packet transmission rate of the target packet flow is controlled in a certain round (e.g., the i-th round, where i is a positive integer), the points in Figure 13 (latency) represent the latency. i Congestion window iThis represents the relationship between the endpoint packet transmission rate calculated according to steps 101-102 and the endpoint latency used to calculate the transmission rate, or the relationship between the network packet transmission rate calculated according to steps 101-102 and the network latency used to calculate the transmission rate. For example, as shown in Figure 13, when the source executes step 102 for the first packet of the target packet flow, and calculates a first factor of 49.998 and a second factor of 100.174 based on the endpoint latency and the size of the historical endpoint CWND, and a third factor of 50 and a fourth factor of 100 based on the network latency and the size of the historical network CWND, the source can calculate the endpoint packet transmission rate CWND_endhost and the network packet transmission rate CWND_fabric shown in Figure 13. Then, the source can choose the smaller of CWND_endhost and CWND_fabric as the first transmission rate and send the target packet flow at the first transmission rate. Subsequently, the source continues to respond to ACK packets (such as the second ACK packet) received from the target packet stream, calculates (or predicts) a new packet transmission rate, and sends the target packet stream at the new rate. This achieves the goal of real-time control of the target packet stream's transmission rate. Figure 13 shows the relationship between the real-time controlled transmission rate (i.e., congestion window) and latency for the target packet stream. As can be seen from Figure 13, as the transmission rate of the target packet stream increases, the latency decreases and tends to stabilize. Therefore, the proposed solution can improve network transmission performance (such as low latency) and provide stable network jitter.
[0213] In another possible implementation, when the second ACK packet is another ACK packet received by the source end from a packet in the target packet stream after a preset time has elapsed since the source end received the first ACK packet, or when the second ACK packet is another ACK packet received by the source end from a packet in the target packet stream after the source end received the first ACK packet, and there is a preset number of ACK packets between them, this indicates that the source end can respond to ACK packets spaced several ACK packets apart to determine the packet rate required to adjust the packet rate of the target packet stream, thereby achieving a slightly coarser granularity of packet rate adjustment for the target packet stream compared to real-time adjustment. Since it is not necessary to respond to every ACK packet in the target packet stream to adjust the packet rate, this method can save the source end's computing power to a certain extent. In other words, by providing the scheme described in steps 101 to 106 in the embodiments of this application, it is possible to save the source end's computing power while minimizing congestion and meeting the transmission performance requirements of packet streams that are not sensitive to latency.
[0214] The above mainly describes the solution provided by the embodiments of this application from a methodological perspective.
[0215] To achieve the above functions, refer to FIG14, which shows a schematic diagram of a message transmission device provided in an embodiment of this application. As shown in FIG14, the message transmission device 1400 is applied to a source end that sends multiple message streams. The target message stream is any one of the multiple message streams, and the target message stream includes a first message that has been sent and a second message to be sent. The message transmission device 1400 is specifically used to execute the message transmission method described above, for example, to execute the steps performed by the source end in the methods shown in FIG5, FIG6, FIG9 or FIG12. The message transmission device 1400 may include an acquisition unit 1401, a determination unit 1402 and a sending unit 1403.
[0216] Acquisition unit 1401 is used to acquire the endpoint delay and network delay of the first message. Determination unit 1402 is used to determine a first packet transmission rate based on the endpoint delay and network delay of the first message. Sending unit 1403 is used to send a second message at the first packet transmission rate. The endpoint delay of the first message includes the delay of the source end processing the first message, the delay of the destination end of the target message stream processing the first message, and the delay of the source end processing the first ACK message. The first ACK message originates from the destination end of the first message and is an ACK message of the first message. The network delay of the first message is the delay of the communication link between the source and destination ends of the first message in transmitting the first message and the first ACK message.
[0217] As an example, referring to Figure 5, the acquisition unit 1401 can be used to perform step 101, the determination unit 1402 can be used to perform step 102, and the sending unit 1403 can be used to perform step 103.
[0218] Optionally, the determining unit 1402 is specifically configured to: determine the end-side packet transmission rate based on the end-side delay of the first message and the size of the historical end-side CWND; determine the network-side packet transmission rate based on the network delay of the first message and the size of the historical network-side CWND; and determine the smaller of the end-side packet transmission rate and the network-side packet transmission rate as the first packet transmission rate. Wherein, the historical end-side CWND is the CWND when the source end transmitted the message in the target message stream before the current time, and the historical network-side CWND is the CWND when the communication link transmitted the message in the target message stream before the current time.
[0219] As an example, referring to Figure 5, it is determined that unit 1402 can be used to perform step 102.
[0220] Optionally, the determining unit 1402 is further configured to calculate a first factor and a second factor based on the end-side delay of the first message and the size of the historical end-side CWND; and to calculate the end-side packet transmission rate based on the first factor, the second factor, and the size of the historical end-side CWND. Here, the first factor represents the congestion state of the source end, and the second factor represents the state attribute of the target message flow at the source end.
[0221] Optionally, the determining unit 1402 is further configured to calculate a third factor and a fourth factor based on the network latency of the first message and the size of the historical network-side CWND; and to calculate the network-side packet transmission rate based on the third factor, the fourth factor, and the size of the historical network-side CWND. The third factor represents the congestion state of the communication link, and the fourth factor represents the state attribute of the target message flow on the communication link.
[0222] Optionally, the determining unit 1402 is further configured to, in response to receiving the first ACK message, determine the first packet transmission rate based on the end-side delay of the first message and the network delay of the first message.
[0223] Optionally, the acquisition unit 1401 is further configured to acquire the end-side delay and network delay of the third packet already sent in the target packet stream. The determination unit 1402 is further configured to determine a second packet transmission rate based on the end-side delay and network delay of the third packet in response to receiving the second ACK packet. The sending unit 1403 is further configured to send the packets to be sent in the target packet stream at the second packet transmission rate. The third packet is a packet sent by the source end after sending the first packet, and the second ACK packet is an ACK packet for the third packet.
[0224] As an example, referring to Figure 12, the acquisition unit 1401 can be used to perform step 104, the determination unit 1402 can be used to perform step 105, and the sending unit 1403 can be used to perform step 106.
[0225] Optionally, the first packet transmission rate is represented based on the first CWND. The determining unit 1402 is further configured to determine the target transmission queue in the source network interface card (NIC) corresponding to the target packet flow. The sending unit 1403 is specifically configured to schedule data packets satisfying the first CWND size from the packets to be sent in the target packet flow, including the second packet, to the target transmission queue; and to send the data packets of the target transmission queue according to the priority of the target transmission queue. The source NIC includes multiple transmission queues, each including a target transmission queue. Each transmission queue has a different priority, and the priority of a transmission queue indicates the order in which packets in that transmission queue are scheduled for transmission.
[0226] As an example, referring to Figure 9, the determining unit 1402 can be used to perform step 201, and the sending unit 1403 can be used to perform steps 202 to 203.
[0227] Optionally, the determining unit 1402 is further specifically used to determine the size of the sent packets in the target packet stream; determine the sending priority of the target packet stream based on the size of the sent packets in the target packet stream; and determine the sending queue corresponding to the sending priority of the target packet stream among the multiple sending queues included in the source network interface card as the target sending queue.
[0228] Optionally, when packets in a high-priority transmission queue are scheduled for transmission first, the transmission unit 1403 is specifically used to schedule the transmission data packets of the transmission queues in the first transmission queue set according to the PQ strategy when the target transmission queue belongs to the first transmission queue set. Wherein, the priorities of all transmission queues in the first transmission queue set are higher than or equal to a preset priority, or, in the order of priorities of multiple transmission queues included in the source network interface card from high to low, the priorities of all transmission queues in the first transmission queue set are ranked in the top m positions, where m is an integer greater than or equal to 1.
[0229] Optionally, when packets in a high-priority sending queue are scheduled for priority sending, the sending unit 1403 is further specifically used to schedule the sending data packets of the sending queues in the second sending queue set according to the WFQ mechanism when the target sending queue belongs to the second sending queue set. Here, the sending queues in the second sending queue set are each preset with different weights, and the priorities of all sending queues in the second sending queue set are lower than or equal to the preset priorities. Alternatively, in the order of priorities of multiple sending queues included in the source network interface card from high to low, the priorities of all sending queues in the second sending queue set are ranked m positions after the preset priority, where m is an integer greater than or equal to 1.
[0230] Optionally, the lower the priority of a sending queue in the second sending queue set, the more data packets that sending queue are scheduled to be sent in one go.
[0231] Optionally, the target message flow is a message flow that accesses the target service, which is deployed on at least one server of the DCN.
[0232] Optionally, the target message stream is a message stream used for communication between different nodes in a distributed storage system.
[0233] Optionally, the delay of the source end processing the first message is represented by the difference between a first time and a second time, where the first time is the time when the source end generates the first data packet of the first message, and the second time is the time when the source end sends the last data packet of the first message. The delay of the destination end processing the first message is represented by the difference between a third time and a fourth time, where the third time is the time when the destination end receives the first data packet of the first message, and the fourth time is the time when the destination end sends the first ACK message. The delay of the source end processing the first ACK message is represented by the difference between a fifth time and a sixth time, where the fifth time is the time when the source end receives the first ACK message, and the sixth time is the time when the source end completes processing the first ACK message.
[0234] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the message transmission devices 1400 provided above, as well as the description of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.
[0235] As an example, referring to FIG16 described below, the functions implemented by the acquisition unit 1401 and the determination unit 1402 in the message transmission device 1400 can be implemented by the processor 1604 in FIG16 executing the program code in the memory 1606 in FIG16. The functions implemented by the sending unit 1403 in the message transmission device 1400 can be implemented by the communication interface 1608 shown in FIG16.
[0236] Referring to Figure 15, Figure 15 shows a schematic diagram of another message transmission device provided in an embodiment of this application. As shown in Figure 15, the message transmission device 1500 is applied to a source end that sends multiple message streams, and is specifically used to execute the message transmission method described above, for example, to execute the steps performed by the source end in the methods shown in Figures 5, 6, 9, or 12. The message transmission device 1500 may include an end-to-end decoupling module 1501, a flow-level congestion prediction module 1502, a flow-level congestion control module 1503, and a transmission priority determination module 1504.
[0237] The end-to-end decoupling module 1501 is used to obtain the end-side delay and network delay of the sent packets in any packet stream (such as stream 1) (refer to the process described in step 101).
[0238] Flow-level congestion prediction module 1502 and flow-level congestion control module 1503 are used to obtain the target packet transmission rate of flow 1 (refer to the first packet transmission rate obtained in step 102). Specifically, flow-level congestion prediction module 1502 can be used to predict the end-side packet transmission rate of flow 1 based on the end-side delay and historical end-side CWND determined by end-network decoupling module 1501, and can also be used to predict the network-side packet transmission rate of flow 1 based on the network delay and historical network-side CWND determined by end-network decoupling module 1501. Furthermore, flow-level congestion control module 1503 selects the smaller of the end-side packet transmission rate and the network-side packet transmission rate predicted by flow-level congestion prediction module 1502 as the subsequent packet transmission rate for sending packets to be sent in flow 1.
[0239] The sending priority determination module 1504 is used to determine the sending priority of stream 1 based on the size of the sent messages in stream 1, and to determine the sending queue corresponding to the sending priority as the target sending queue.
[0240] Subsequently, the network card of the source device where the message transmission device 1500 is located can schedule the data packets of the message to be sent in stream 1 to the target sending queue and send them according to the target packet sending rate.
[0241] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the message transmission devices 1500 provided above, as well as the description of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.
[0242] As an example, referring to Figure 16 below, the functions implemented by the end-to-end decoupling module 1501, the flow-level congestion prediction module 1502, the flow-level congestion control module 1503, and the transmission priority determination module 1504 in the message transmission device 1500 can be implemented by the processor 1604 in Figure 16 executing the program code in the memory 1606 in Figure 16.
[0243] Those skilled in the art will readily recognize that, based on the units and algorithm steps described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0244] It should be noted that the module / unit division in Figure 14 or Figure 15 is illustrative and represents only one logical functional division. In actual implementation, other division methods are possible. For example, two or more functions can be integrated into a single processing module. The integrated module described above can be implemented in hardware or as a software functional module.
[0245] For example, the implementation of the determination unit 1402 of the message transmission device 1400 shown in FIG14 will be described below. Similarly, the implementation of the acquisition unit 1401 and the sending unit 1403 shown in FIG14 can refer to the implementation of the determination unit 1402.
[0246] As an example of a software functional unit, unit 1402 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, unit 1402 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0247] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0248] As an example of a hardware functional unit, unit 1402 may include at least one computing device, such as a server. Alternatively, unit 1402 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0249] The multiple computing devices included in the determining unit 1402 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the determining unit 1402 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the determining unit 1402 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0250] It should be noted that, in other embodiments, the determining unit 1402 can be used to execute any step related to determining the packet transmission rate in the message transmission method described in the embodiments of this application, the acquiring unit 1401 can be used to execute any step related to the acquiring operation in the message transmission method described in the embodiments of this application, and the sending unit 1403 can be used to execute any step related to the sending operation in the message transmission method described in the embodiments of this application. The steps implemented by the acquiring unit 1401, the determining unit 1402, and the sending unit 1403 can be specified as needed. The message transmission device can realize all functions by implementing different steps in the message transmission method described in the embodiments of this application through the acquiring unit 1401, the determining unit 1402, and the sending unit 1403 respectively.
[0251] This application also provides a message transmission system, which includes a source end for sending multiple message streams and a destination end for receiving message streams. The source end is used to execute the portion of the message transmission method described above that is performed by the source end. The destination end is used to execute the portion of the message transmission method described above that is performed by the destination end.
[0252] Both the source and destination ends can be implemented in software or hardware. For example, the implementation of the source end will be described below. Similarly, the implementation of the destination end can be referenced from the implementation of the source end.
[0253] As an example of a software functional unit, a module can include code running on a compute instance. This compute instance can be at least one of a physical host (compute device), virtual machine, container, or other compute device. Furthermore, the aforementioned compute device can be one or more. For example, the source end can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application can be distributed within the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code can be distributed within the same Availability Zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.
[0254] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a single region. Communication between two VPCs within the same region, and between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0255] As an example of a hardware functional unit, the source end of a module can include at least one computing device, such as a server. Alternatively, the source end can also be a device implemented using an ASIC or a PLD. The aforementioned PLD can be implemented using a CPLD, FPGA, GAL, or any combination thereof.
[0256] The multiple computing devices included in the source end can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the source end can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the source end can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0257] This application provides a computing device. This computing device can be implemented as a source or destination as described above.
[0258] As shown in Figure 16, the computing device 1600 includes a bus 1602, a processor 1604, a memory 1606, and a communication interface 1608. The processor 1604, the memory 1606, and the communication interface 1608 are interconnected via the bus 1602.
[0259] Bus 1602 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 16, but this does not imply that there is only one bus or one type of bus. Bus 1602 can include pathways for transmitting information between various components of computing device 1600 (e.g., memory 1606, processor 1604, communication interface 1608).
[0260] Processor 1604 may include a general-purpose processor and / or a dedicated hardware chip. A general-purpose processor may include a central processing unit (CPU), a microprocessor (MP), or a graphics processing unit (GPU). A CPU may be a single-core processor or a multi-core processor. A dedicated hardware chip is a high-performance processing hardware module. Dedicated hardware chips include at least one of the following: digital signal processing (DSP), data processing unit (DPU), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, neural processing unit (NPU), tensor processing unit (TPU), artificial intelligence chip, or network processor (NP). Processor 1604 may also be an integrated circuit chip with signal processing capabilities. In the implementation process, some or all of the functions of the method provided in the embodiments of this application can be accomplished by the integrated logic circuit of the hardware in the processor 1604 or by instructions in the form of software.
[0261] Memory 1606 may include volatile memory, such as random access memory (RAM). Memory 1606 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0262] The memory 1606 stores executable program code. In one example, the processor 1604 executes the executable program code to implement the functions of the acquisition unit 1401, the determination unit 1402, and the sending unit 1403 shown in FIG. 14, thereby implementing the method portion executed by the source end in the message transmission method described in this application embodiment. That is, the memory 1606 stores instructions for executing the methods implemented by the acquisition unit 1401, the determination unit 1402, and the sending unit 1403 in the message transmission method described in this application embodiment. In another example, the processor 1604 executes the executable program code to implement the functions of the end-to-end decoupling module 1501, the flow-level congestion prediction module 1502, the flow-level congestion control module 1503, and the sending priority determination module 1504 shown in FIG. 15, thereby implementing the method portion executed by the source end in the message transmission method described in this application embodiment. That is, the memory 1606 stores instructions for executing the functions implemented by the end-to-end decoupling module 1501, the flow-level congestion prediction module 1502, the flow-level congestion control module 1503, and the transmission priority determination module 1504 in the message transmission method described in the embodiments of this application. In another example, the processor 1604 can implement the method portion of the message transmission method described in the embodiments of this application executed by the destination end by executing this executable program code.
[0263] Communication interface 1608 uses transceiver modules, such as, but not limited to, transceivers, to enable communication with other devices or communication networks. For example, communication interface 1608 can be any one or any combination of the following devices: network interfaces (such as Ethernet interfaces), wireless network cards, and other devices with network access capabilities. Communication interface 1608 includes a receiving unit for receiving data / messages and a sending unit for sending data / messages.
[0264] It should be noted that the aforementioned devices can be disposed on separate chips, or at least partially or entirely on the same chip. Whether to dispose of the devices independently on different chips or integrate them on one or more chips often depends on the needs of the product design. This application does not limit the specific implementation of the aforementioned devices. Furthermore, the descriptions of the processes corresponding to the various figures above each have their own emphasis; for parts of a process not described in detail in one figure, please refer to the relevant descriptions of other processes.
[0265] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, in the form of a computer program product. The computer program product providing the program development platform includes one or more computer instructions. When these computer program instructions are loaded and executed on the computing device 1600, they implement, in whole or in part, some or all of the functions of the message transmission method provided in the embodiments of this application.
[0266] Furthermore, computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium stores computer program instructions that provide a program development platform.
[0267] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0268] As shown in Figure 17, the computing device cluster includes at least one computing device 1600. The memory 1606 of one or more computing devices 1600 in the computing device cluster may store the same instructions for executing the message transmission method described above.
[0269] In some possible implementations, the memory 1606 of one or more computing devices 1600 in the computing device cluster may also store instructions for executing the message transmission method described above. In other words, a combination of one or more computing devices 1600 can jointly execute instructions for executing the message transmission method described above.
[0270] It should be noted that the memory 1606 in different computing devices 1600 within the computing device cluster can store different instructions, which are used to execute some functions of the message transmission device described in Figure 14 above. That is, the instructions stored in the memory 1606 of different computing devices 1600 can implement the functions of one or more unit modules in the acquisition unit 1401, determination unit 1402, and sending unit 1403 shown in Figure 14.
[0271] Alternatively, the memory 1606 in different computing devices 1600 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the message transmission device described in Figure 15 above. That is, the instructions stored in the memory 1606 of different computing devices 1600 can implement the functions of one or more unit modules among the end-to-end decoupling module 1501, flow-level congestion prediction module 1502, flow-level congestion control module 1503, and transmission priority determination module 1504 shown in Figure 15.
[0272] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 18 illustrates one possible implementation. As shown in Figure 18, two computing devices 1600A and 1600B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, referring to Figure 14, the memory 1606 in computing device 1600A stores instructions that implement the functions of the acquisition unit 1401 and the determination unit 1402 shown in Figure 14. Simultaneously, the memory 1606 in computing device 1600B stores instructions that implement the functions of the transmission unit 1403 shown in Figure 14.
[0273] The connection method between the computing device clusters shown in Figure 18 can be considered in the message transmission method provided in this application embodiment, where the method steps executed by the source end need to obtain the end-side latency and network latency of the sent messages in the message stream, and need to determine the target packet sending rate (such as the first packet sending rate or the second packet sending rate described in the method embodiment). Therefore, it is considered that the functions implemented by the acquisition unit 1401 and the determination unit 1402 are handed over to the computing device 1600A for execution, and other operations (such as sending operations) are handed over to the computing device 1600B for execution.
[0274] It should be understood that the functions of computing device 1600A shown in Figure 18 can also be performed by multiple computing devices 1600. Similarly, the functions of computing device 1600B can also be performed by multiple computing devices 1600, without limitation.
[0275] This application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similarly referred to the connection method of the computing device cluster described in Figures 17 and 18. The difference is that the memory 1606 in one or more computing devices 1600 in this computing device cluster can store the same instructions for executing the message transmission method described in this application embodiment.
[0276] In some possible implementations, the memory 1606 of one or more computing devices 1600 in the computing device cluster may also store partial instructions for executing the message transmission method described in the embodiments of this application. In other words, a combination of one or more computing devices 1600 can jointly execute instructions for executing the message transmission method described in the embodiments of this application.
[0277] It should be noted that the memory 1606 in different computing devices 1600 within the computing device cluster can store different instructions for executing some functions of the message transmission system described in this application embodiment. That is, the instructions stored in the memory 1606 of different computing devices 1600 can implement the functions of one or more device modules in the source and destination ends described above.
[0278] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device or processor, it causes the at least one computing device or processor to execute the message transmission method described in this application.
[0279] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the message transmission method provided in this application.
[0280] This application also provides a chip that includes a processor. When the processor executes program instructions or code, the chip including the processor or the device including the chip performs the message transmission method described above. Exemplarily, the chip further includes an input interface, an output interface, and a memory. The chip's input interface, output interface, processor, and memory are connected via internal interconnection paths. The memory in the chip stores program instructions or code executed by the processor, and the input and output interfaces are used for communication between the chip and other chips or devices.
[0281] In the embodiments of this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The term "at least one" refers to one or more, and the term "multiple" refers to multiples, unless otherwise expressly defined.
[0282] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0283] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0284] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0285] It should be understood that the term "comprising" (also referred to as "includes", "including", "comprises" and / or "comprising") as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0286] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0287] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the concept and principles of this application should be included within the protection scope of this application.
[0288] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0289] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this invention.
Claims
1. A message transmission method, characterized in that, The method is applied to a source end that sends multiple message streams, where the target message stream is any one of the multiple message streams, and the target message stream includes a first message that has been sent and a second message to be sent; the method includes: The endpoint delay of the first message is obtained; the endpoint delay of the first message includes the delay of the source end processing the first message, the delay of the destination end of the target message stream processing the first message, and the delay of the source end processing the first acknowledgment character ACK message, wherein the first ACK message comes from the destination end and the first ACK message is the ACK message of the first message; The network latency of the first message is obtained, where the network latency of the first message is the latency of the communication link between the source end and the destination end for transmitting the first message and the first ACK message. The first packet transmission rate is determined based on the terminal delay of the first message and the network delay of the first message; The second message is sent at the first packet sending rate.
2. The method according to claim 1, characterized in that, Determining the first packet transmission rate based on the endpoint latency and network latency of the first packet includes: The terminal packet sending rate is determined based on the terminal delay of the first message and the size of the historical terminal congestion window (CWND). The historical terminal CWND is the CWND of the source end when it sent the message in the target message stream before the current time. The network-side packet transmission rate is determined based on the network latency of the first message and the size of the historical network-side CWND. The historical network-side CWND is the CWND of the communication link when transmitting the message in the target message stream before the current time. The smaller of the terminal-side packet sending rate and the network-side packet sending rate is determined as the first packet sending rate.
3. The method according to claim 1 or 2, characterized in that, Determining the first packet transmission rate based on the endpoint latency and network latency of the first packet includes: In response to receiving the first ACK message, the first packet transmission rate is determined based on the terminal delay and network delay of the first message.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain the end-side latency and network latency of the third packet that has been sent in the target packet stream, wherein the third packet is a packet sent by the source end after sending the first packet; In response to receiving the second ACK packet, a second packet transmission rate is determined based on the end-side delay and network delay of the third packet, wherein the second ACK packet is the ACK packet of the third packet; The packets to be sent in the target packet stream are sent at the second packet sending rate.
5. The method according to any one of claims 1 to 4, characterized in that, The first packet transmission rate is represented based on the first congestion window (CWND), and sending the second message at the first packet transmission rate includes: The target sending queue corresponding to the target packet flow is determined in the network interface card (NIC) of the source end. The NIC includes multiple sending queues, each with a different priority. The priority of the sending queue indicates the priority of scheduling the sending of packets in the sending queue. The multiple sending queues include the target sending queue. From the target message stream, a number of data packets satisfying the first CWND size are scheduled from the messages to be sent, including the second message, to the target sending queue; Data packets of the target sending queue are sent according to the priority of the target sending queue.
6. The method according to claim 5, characterized in that, The step of determining the target transmission queue in the network interface card at the source end that corresponds to the target packet stream includes: Determine the size of the packets already sent in the target packet stream; The sending priority of the target message stream is determined based on the size of the messages already sent in the target message stream; The sending queue corresponding to the sending priority among the plurality of sending queues is determined as the target sending queue.
7. The method according to claim 5 or 6, characterized in that, The step of sending data packets to the target sending queue according to its priority includes: When the target sending queue belongs to the first sending queue set, the data packets of the sending queues in the first sending queue set are scheduled to be sent according to the priority queue (PQ) policy; wherein, the priority of the sending queues in the first sending queue set is higher than or equal to the preset priority, or, in the sorting of the priorities of the multiple sending queues from high to low, the priority of the sending queues in the first sending queue set is ranked in the first m positions, where m is an integer greater than or equal to 1.
8. The method according to any one of claims 5 to 7, characterized in that, Sending data packets to the target sending queue according to its priority includes: When the target sending queue belongs to the second sending queue set, the data packets of the sending queues in the second sending queue set are scheduled to be sent according to the weighted fair queue (WFQ) mechanism. The sending queues in the second sending queue set are each preset with different weights, and the priority of the sending queues in the second sending queue set is lower than or equal to the preset priority. Alternatively, in the sorting of the priorities of the multiple sending queues from high to low, the priority of the sending queues in the second sending queue set is ranked after m positions, where m is an integer greater than or equal to 1.
9. The method according to any one of claims 1 to 8, characterized in that, The target message flow is a message flow that accesses the target service, which is deployed on at least one server in the data center network (DCN).
10. The method according to any one of claims 1 to 8, characterized in that, The target message stream is the message stream used for communication between different nodes in a distributed storage system.
11. A message transmission device, characterized in that, An apparatus used at a source end for sending multiple message streams, wherein the target message stream is any one of the multiple message streams, and the target message stream includes a first message that has been sent and a second message to be sent; the apparatus includes: The acquisition unit is used to acquire the end-side delay of the first message; the end-side delay of the first message includes the delay of the source end processing the first message, the delay of the destination end of the target message stream processing the first message, and the delay of the source end processing the first acknowledgment character ACK message, wherein the first ACK message comes from the destination end and the first ACK message is the ACK message of the first message; The acquisition unit is further configured to acquire the network delay of the first message, wherein the network delay of the first message is the delay of the communication link between the source end and the destination end in transmitting the first message and the first ACK message; The determining unit is configured to determine the first packet transmission rate based on the end-side delay of the first packet and the network delay of the first packet; The sending unit is configured to send the second message at the first packet sending rate.
12. The apparatus according to claim 11, characterized in that, The determining unit is specifically used for, The terminal packet sending rate is determined based on the terminal delay of the first message and the size of the historical terminal congestion window (CWND). The historical terminal CWND is the CWND of the source end when it sent the message in the target message stream before the current time. The network-side packet transmission rate is determined based on the network latency of the first message and the size of the historical network-side CWND. The historical network-side CWND is the CWND of the communication link when transmitting the message in the target message stream before the current time. The smaller of the terminal-side packet sending rate and the network-side packet sending rate is determined as the first packet sending rate.
13. The apparatus according to claim 11 or 12, characterized in that, The determining unit is also specifically used for, In response to receiving the first ACK message, the first packet transmission rate is determined based on the terminal delay and network delay of the first message.
14. The apparatus according to any one of claims 11 to 13, characterized in that, The acquisition unit is further configured to acquire the end-side delay and network delay of the third packet that has been sent in the target packet stream, wherein the third packet is a packet sent by the source end after sending the first packet; The determining unit is further configured to, in response to receiving the second ACK packet, determine the second packet transmission rate based on the end-side delay and network delay of the third packet, wherein the second ACK packet is the ACK packet of the third packet; The sending unit is further configured to send the messages to be sent in the target message stream at the second packet sending rate.
15. The apparatus according to any one of claims 11 to 14, characterized in that, The first packet transmission rate is represented based on the first congestion window (CWND). The determining unit is further configured to determine the target sending queue in the network interface card (NIC) of the source end corresponding to the target packet stream. The NIC includes multiple sending queues, each of which has a different priority. The priority of the sending queue indicates the priority of scheduling the sending of packets in the sending queue. The multiple sending queues include the target sending queue. The sending unit is specifically configured to schedule a number of data packets satisfying the first CWND size from the messages to be sent in the target message stream, including the second message, to the target sending queue; and to send the data packets of the target sending queue according to the priority of the target sending queue.
16. The apparatus according to claim 15, characterized in that, The determining unit is also specifically used for, Determine the size of the packets already sent in the target packet stream; The sending priority of the target message stream is determined based on the size of the messages already sent in the target message stream; The sending queue corresponding to the sending priority among the plurality of sending queues is determined as the target sending queue.
17. The apparatus according to claim 15 or 16, characterized in that, The sending unit is further specifically configured to schedule and send data packets of the sending queues in the first sending queue set according to the priority queue (PQ) strategy when the target sending queue belongs to the first sending queue set; wherein, the priority of the sending queues in the first sending queue set is higher than or equal to the preset priority, or, in the order of the priorities of the multiple sending queues from high to low, the priority of the sending queues in the first sending queue set is ranked in the first m positions, where m is an integer greater than or equal to 1.
18. The apparatus according to any one of claims 15 to 17, characterized in that, The sending unit is further specifically used to schedule the sending of data packets of the sending queues in the second sending queue set according to the weighted fair queue (WFQ) mechanism when the target sending queue belongs to the second sending queue set; wherein the sending queues in the second sending queue set are preset with different weights, and the priority of the sending queues in the second sending queue set is lower than or equal to the preset priority, or, in the sorting of the priorities of the multiple sending queues from high to low, the priority of the sending queues in the second sending queue set is ranked after m positions, where m is an integer greater than or equal to 1.
19. The apparatus according to any one of claims 11 to 18, characterized in that, The target message flow is a message flow that accesses the target service, which is deployed on at least one server in the data center network (DCN).
20. The apparatus according to any one of claims 11 to 18, characterized in that, The target message stream is the message stream used for communication between different nodes in a distributed storage system.
21. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 10.
22. A computer program product containing instructions, characterized in that, When the instructions are executed by the computing device, the computing device performs the method as described in any one of claims 1 to 10.
23. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computing device, cause the computing device to perform the method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
Time delay measurement method and device
CN113824607A
RDMA (Remote Direct Memory Access) network QoS (Quality of Service) coordination method based on user mode
CN116723550A
Network rate adjustment method and device, storage medium and electronic equipment
CN117376212A
System and method for congestion control using a flow level transmit mechanism
US20230059755A1