Data transmission method and system
By reserving data volume in the switch, the computing node sends data within the forwarding capacity of the switch, which solves the packet loss problem caused by switch latency, improves throughput and transmission efficiency, simplifies parameter adjustment, and adapts to the needs of various applications and services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, when a switch detects congestion, the process of sending CNP or PFC messages to the sending end for response is delayed, resulting in packet loss, reduced network bandwidth, decreased throughput, and complex parameter adjustments that are difficult to adapt to the resource requirements of different applications and services.
By reserving an allowable amount of data through the switch, the computing nodes send data according to the forwarding capacity of the switch, avoiding congestion, reducing packet loss, improving throughput and transmission efficiency, and adapting to the needs of different applications and services without the need for parameter adjustments.
It enables data transmission within the forwarding capacity of the switch, avoiding congestion, reducing packet loss, improving throughput and transmission efficiency, simplifying parameter maintenance, and adapting to the needs of various applications and services.
Smart Images

Figure CN122316992A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a data transmission method and system. Background Technology
[0002] To ensure data transmission performance, congestion control can be performed based on Congestion Notification Packet (CNP) messages and Priority-based Flow Control (PFC) messages.
[0003] However, there is a certain delay in the process from when the switch detects congestion to when it sends a CNP or PFC message, and then to when the sending end responds with the CNP and PFC messages and suspends data transmission. During this time, the sending end may continue to send data. If this data exceeds the switch's maximum buffering capacity, it will lead to packet loss. This packet loss will cause a decrease in network bandwidth, further leading to a decrease in throughput. Summary of the Invention
[0004] This application provides a data transmission method and system. The switch reserves a certain amount of data that a first computing node can use to transmit access data. The first computing node sends access data according to the amount of data reserved by the switch. It can send access data within the forwarding capacity of the switch, thereby avoiding congestion before it occurs, reducing packet loss, maximizing bandwidth transmission, and improving throughput and efficiency of transmitting access data.
[0005] In a first aspect, this application provides a data transmission method applied to a first computing node. The method includes: receiving a first data packet sent by a second computing node, the first data packet including a first data amount of access data that a switch allows the first computing node to send; generating a second data packet based on the first data packet, the second data packet including first access data and a first credit value, wherein the data amount of the first access data is less than or equal to the first data amount, and the first credit value is used to instruct the switch to determine the second data amount that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the switch's forwarding capability; and sending the second data packet.
[0006] In this implementation, the first access data is determined by the first data volume of the access data that the switch allows the first node to send. Furthermore, the first access data volume is less than or equal to the first data volume. Sending the access data within the forwarding capacity of the switch can prevent congestion before it occurs, eliminating the need to locate the congested device, thus improving congestion control efficiency. Simultaneously, it reduces packet loss, maximizes bandwidth transmission, and improves throughput and the efficiency of transmitting access data. For example, in scenarios involving storing access data, it avoids congestion, reduces the time required to store access data, and improves the efficiency of storing access data.
[0007] Furthermore, the data transmission method provided in this application does not require parameter adjustment and can adapt to the different resource requirements of various applications and services for latency, bandwidth, etc., thus avoiding the difficulty of parameter maintenance.
[0008] In one possible implementation, generating a second data message based on a first data message includes: obtaining third access data to be sent; obtaining a first credit value and first access data based on the data volume of the third access data and the first data volume, wherein the first access data is all or part of the data of the third access data.
[0009] In the implementation of this application, after obtaining the third access data, the first access data is determined from the third access data based on the first data volume. The first access data to be sent is determined according to the forwarding capacity of the switch and the third access data to be sent. The access data is sent within the forwarding capacity of the switch, which avoids congestion, reduces packet loss, and improves throughput.
[0010] In one possible implementation, obtaining a first credit value based on the amount of data in the third access data and the amount of data in the first data includes: when the amount of data in the third access data is greater than the amount of data in the first data, the first credit value is of a first type, which is used to request the amount of data in the second access data from the switch for transmitting the second access data, wherein the second access data is a portion of the third access data; when the amount of data in the third access data is less than or equal to the amount of data in the first data, the second credit value is of a second type, which is used to return the amount of data in the first access data to the switch.
[0011] In this implementation, if the amount of the third access data is greater than the amount of the first data (i.e., the third access data cannot be sent all at once within the forwarding capacity of the switch), the switch is requested to transfer the remaining access data (i.e., the second access data) that was not transmitted in the third access data. This ensures that subsequent data transmission can continue and the third access data can be transmitted completely without data loss. If the amount of the third access data is less than or equal to the amount of the first data (i.e., the third access data can be sent all at once within the forwarding capacity of the switch), the previously requested amount of data for transmitting the first access data is returned to the switch. This allows the switch to allocate access data to other devices when they request it, ensuring that other devices can transmit access data normally.
[0012] In one possible implementation, before receiving the first data packet sent by the second computing node, the method further includes: sending a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine the first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
[0013] In the implementation of this application, before sending the third access data, a request is made to the switch for the first amount of data that the switch is allowed to send, based on the amount of data in the third access data. The switch is instructed to reserve the amount of data for transmitting access data to the first computing node in advance according to the forwarding capacity of the switch. This maximizes bandwidth transmission while avoiding congestion, improves throughput and the efficiency of transmitting access data, and further improves the transmission performance of the entire network.
[0014] In one possible implementation, the method further includes: generating a third data packet, the third data packet including fifth access data, the amount of the fifth access data being less than the amount of the second data packet; and sending the third data packet.
[0015] In the implementation of this application, when the amount of the third access data is greater than the amount of the first data, that is, when the third access data cannot be sent all at once within the forwarding capacity of the switch, the fifth access data to be sent is determined from the second access data based on the amount of access data (i.e., the second access data) that was not transmitted in the third access data and the forwarding capacity of the switch. Within the forwarding capacity of the switch, the access data is sent, and while continuing to transmit the part of the access data (i.e. the fifth access data) that was not transmitted in the third access data, congestion is avoided, packet loss is reduced, and throughput is improved.
[0016] Secondly, this application provides a data transmission method applied to a switch. The method includes: generating a second control message based on a first control message sent by a first computing node; the first control message including a second credit value, the second credit value indicating that the switch determines a first data volume allowed to be sent by the first computing node based on third access data to be sent by the first computing node and the switch's forwarding capability; the second control message including the first data volume of access data allowed to be sent by the first computing node by the switch; sending the second control message; and updating the switch's forwarding capability in response to a second data packet sent by the first computing node, the second data packet including first access data and the first credit value, the data volume of the first access data being less than or equal to the first data volume, and the first credit value indicating that the switch determines a second data volume allowed to be sent by the first computing node based on the second access data to be sent by the first computing node and the switch's forwarding capability.
[0017] In the implementation of this application, based on the third access data to be sent by the first computing node and the forwarding capability of the switch, a first data volume that the first computing node is allowed to send is determined, so as to instruct the first computing node to send access data according to the first data volume. By reserving the data volume for transmitting access data for the first computing node in advance, bandwidth is maximized while avoiding congestion, thereby further improving the transmission performance of the entire network.
[0018] Furthermore, by using the second access data and the forwarding capability of the switch, the amount of second data that the first computing node is allowed to send is determined, allowing the first computing node to continue sending the access data that was not transmitted in the third access data (i.e., the second access data), ensuring that the first computing node can continue to transmit data subsequently, that is, ensuring that the first computing node can completely transmit the third access data without data loss.
[0019] In one possible implementation, updating the forwarding capacity of the switch in response to the second data packet includes: if the amount of the third access data is greater than the amount of the first data, determining the amount of the second data that the first computing node is allowed to send based on the amount of the second access data and the forwarding capacity of the switch; and updating the forwarding capacity of the switch based on the amount of the second data.
[0020] In the implementation of this application, when the amount of the third access data is greater than the amount of the first data, that is, when the first computing node does not send all the third access data at once, the switch allows the first computing node to continue transmitting access data so that the first computing node can continue to transmit the access data that was not transmitted in the third access data, ensuring that the first computing node can transmit the third access data completely without data loss.
[0021] In one possible implementation, the method further includes updating the forwarding capacity of the switch based on the first data volume when the data volume of the third access data is less than or equal to the first data volume.
[0022] In the implementation of this application, when the amount of the third access data is less than or equal to the amount of the first data, that is, when the first computing node sends the third access data in one go, the switch reclaims the amount of the first data previously allocated to the first computing node, so that when other devices request the amount of data to transmit access data in the future, the switch can continue to allocate the amount of data to transmit access data to other devices, ensuring that other devices can transmit access data normally.
[0023] In one possible implementation, a second control message is generated based on the first control message, including: determining the first amount of data that the first computing node is allowed to send based on the third access data and the forwarding capability of the switch.
[0024] In the implementation of this application, when determining the first data volume allowed for the first computing node to send, the forwarding capacity of the switch is taken into account. This avoids the data volume of the access data sent by the first computing node exceeding the forwarding capacity of the switch, thereby preventing congestion and further leading to packet loss and decreased throughput. Furthermore, the data volume of the third access data is also considered. Within the forwarding capacity of the switch, as much data volume as possible is allocated to the first computing node for transmitting access data, reducing the number of times the first computing node must completely transmit the third access data, maximizing bandwidth transmission, and improving the efficiency of access data transmission.
[0025] In one possible implementation, determining the first data amount that the first computing node is allowed to send based on the third access data and the forwarding capacity of the switch includes: if the forwarding capacity of the switch is greater than a threshold, determining the first data amount based on the data amount of the third access data.
[0026] In the implementation of this application, when the forwarding capacity of the switch is greater than the threshold, that is, when the switch has enough data volume to allocate to the first computing node for transmitting access data, the first data volume is determined according to the data volume of the third access, and the data volume allowed to transmit the third access data is allocated to the first computing node, thereby reducing the number of times the first computing node completely transmits the third access data, maximizing bandwidth transmission, and improving the efficiency of transmitting access data.
[0027] In one possible implementation, the method further includes: if the forwarding capacity of the switch is less than or equal to the threshold, reclaiming the allocated forwarding capacity from other data streams to update the forwarding capacity of the switch; and determining the first data volume based on the updated forwarding capacity of the switch and the data volume of the third access data.
[0028] In the implementation of this application, when the forwarding capacity of the switch is less than or equal to the threshold, that is, when the switch does not have enough data volume to allocate to the first computing node for transmitting access data, a portion of the already allocated forwarding capacity is reclaimed from other data streams before allocating the first computing node with the amount of data volume allowed to transmit access data. This avoids the first computing node being unable to obtain the amount of data volume for transmitting access data for a long time, which would prevent the third access data from being sent.
[0029] Thirdly, this application provides a data transmission system comprising a first computing node and a switch. The first computing node is configured to send a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine a first data volume allowed to be sent by the first computing node based on a third access data to be sent by the first computing node and the forwarding capability of the switch. The switch is configured to generate a second control message based on the first control message, the second control message including the first data volume of access data allowed to be sent by the first computing node by the switch. The switch is also configured to send the second control message. The first computing node is also configured to generate a second data message based on the first data message, the second data message including first access data and a first credit value, the data volume of the first access data being less than or equal to the first data volume, the first access data being all or part of the third access data, the first credit value being used to instruct the switch to determine a second data volume allowed to be sent by the first computing node based on the second access data to be sent by the first computing node and the forwarding capability of the switch. The first computing node is also configured to send the second data message. The switch is also configured to update the forwarding capability of the switch in response to the second data message sent by the first computing node.
[0030] The effect of the data transmission system of this embodiment is similar to that of the data transmission method of the first aspect or any possible implementation of the first aspect, or similar to that of the data transmission method of the second aspect or any possible implementation of the second aspect, and will not be repeated here.
[0031] Fourthly, embodiments of this application provide a data transmission apparatus applied to a first computing node. The apparatus includes: a receiving module for receiving a first data packet sent by a second computing node, the first data packet including a first data amount of access data that a switch allows the first computing node to send; a first generating module for generating a second data packet based on the first data packet, the second data packet including first access data and a first credit value, the data amount of the first access data being less than or equal to the first data amount, the first credit value being used to instruct the switch to determine the second data amount that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch; and a first sending module for sending the second data packet.
[0032] In one possible implementation, the first generation module is specifically used to: obtain the third access data to be sent; and based on the data volume of the third access data and the first data volume, obtain the first credit value and the first access data, wherein the first access data is all or part of the third access data.
[0033] In one possible implementation, the first generation module is specifically used for: when the amount of data in the third access data is greater than the amount of data in the first access data, the first credit value is of the first type, the first type is used to request the amount of data to be transmitted for the second access data from the switch, the second access data being a portion of the third access data; when the amount of data in the third access data is less than or equal to the amount of data in the first access data, the second credit value is of the second type, the second type is used to return the amount of data to be transmitted for the first access data to the switch.
[0034] In one possible implementation, the device further includes: a second sending module for sending a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine a first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
[0035] In one possible implementation, the device further includes: a second generation module for generating a third data packet, the third data packet including fifth access data, the amount of the fifth access data being less than the amount of the second data; and a third sending module for sending the third data packet.
[0036] The effects of the data transmission devices in the above-described implementations are similar to those of the data transmission method in the first aspect or any implementation of the first aspect, and will not be repeated here.
[0037] Fifthly, embodiments of this application provide a data transmission apparatus applied to a switch. The apparatus includes: a generation module, configured to generate a second control message based on a first control message sent by a first computing node, the first control message including a second credit value, the second credit value being used to indicate to the switch, based on third access data to be sent by the first computing node and the forwarding capability of the switch, a first data amount allowed to be sent by the first computing node, the second control message including the first data amount of access data allowed to be sent by the first computing node by the switch; a sending module, configured to send the second control message; and an updating module, configured to update the forwarding capability of the switch in response to a second data message sent by the first computing node, the second data message including first access data and a first credit value, the data amount of the first access data being less than or equal to the first data amount, the first credit value being used to indicate to the switch, based on the second access data to be sent by the first computing node and the forwarding capability of the switch, a second data amount allowed to be sent by the first computing node.
[0038] In one possible implementation, the update module is specifically used to: determine the second amount of data that the first computing node is allowed to send, based on the amount of data of the second access data and the forwarding capacity of the switch, when the amount of data of the third access data is greater than the amount of data of the first access data; and update the forwarding capacity of the switch based on the second amount of data.
[0039] In one possible implementation, the update module is specifically used to: update the switch's forwarding capacity based on the first data volume when the data volume of the third access data is less than or equal to the first data volume.
[0040] In one possible implementation, the generation module is specifically used to: determine the first amount of data that the first computing node is allowed to send, based on the third access data and the forwarding capability of the switch.
[0041] In one possible implementation, the generation module is specifically used to: determine the first data volume based on the data volume of the third access data when the forwarding capacity of the switch is greater than the threshold.
[0042] In one possible implementation, the generation module is specifically used to: reclaim allocated forwarding capacity from other data streams to update the forwarding capacity of the switch when the forwarding capacity of the switch is less than or equal to the threshold; and determine the first data volume based on the updated forwarding capacity of the switch and the data volume of the third access data.
[0043] The effects of the data transmission devices in the above-described implementations are similar to those of the data transmission method in the first aspect or any implementation of the first aspect, and will not be repeated here.
[0044] Sixthly, embodiments of this application provide 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 data transmission method in the first aspect or any possible implementation of the first aspect, or to perform the data transmission method in the second aspect or any possible implementation of the second aspect.
[0045] The effect of the computing device cluster in this embodiment is similar to that of the data transmission method of the first aspect or any possible implementation of the first aspect, or similar to that of the data transmission method of the second aspect or any possible implementation of the second aspect, and will not be repeated here.
[0046] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when executed by a computing device cluster, cause the computing device cluster to perform the data transmission method in the first aspect or any possible implementation of the first aspect, or to perform the data transmission method in the second aspect or any possible implementation of the second aspect.
[0047] The effect of the computer program product of this embodiment is similar to that of the data transmission method of the first aspect or any possible implementation of the first aspect, or similar to that of the data transmission method of the second aspect or any possible implementation of the second aspect, and will not be repeated here.
[0048] Eighthly, embodiments of this application provide a computer-readable storage medium including computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the data transmission method in the first aspect or any possible implementation of the first aspect, or executes the data transmission method in the second aspect or any possible implementation of the second aspect.
[0049] The effect of the computer-readable storage medium of this embodiment is similar to that of the data transmission method of the first aspect or any possible implementation of the first aspect, or similar to that of the data transmission method of the second aspect or any possible implementation of the second aspect, and will not be repeated here. Attached Figure Description
[0050] Figure 1 This is a schematic diagram illustrating the relationship between RDMA throughput and packet loss rate as an example.
[0051] Figure 2 A flowchart of a data transmission method is shown as an example;
[0052] Figure 3This is a schematic diagram illustrating an RDMA message header as an example;
[0053] Figure 4 This is a schematic diagram illustrating a reserved field 1 as an example;
[0054] Figure 5 This is a schematic diagram illustrating the forwarding capability of a switch as an example.
[0055] Figure 6 This is a schematic diagram illustrating the forwarding capability of another switch as an example.
[0056] Figure 7 A schematic diagram illustrating another data transmission method as an example;
[0057] Figure 8 This is a schematic diagram illustrating another data transmission method as an example;
[0058] Figure 9 A schematic diagram illustrating an example of a smart network interface card;
[0059] Figure 10 This is a schematic diagram of a data transmission device as an example.
[0060] Figure 11 A schematic diagram of another data transmission device as an example;
[0061] Figure 12 This is a schematic diagram illustrating an exemplary data transmission system;
[0062] Figure 13 This is a schematic diagram of the structure of a computing device as an example.
[0063] Figure 14 This is a schematic diagram illustrating the structure of a computing device cluster as an example.
[0064] Figure 15 This is an exemplary schematic diagram illustrating the structure of interaction between computing devices. Detailed Implementation
[0065] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0066] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0067] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first target object" and "second target object," etc., are used to distinguish different target objects, not to describe a specific order of target objects.
[0068] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0069] Before describing the technical solutions of the embodiments of this application, a brief introduction to the background technology and technical terms involved in the embodiments of this application will be given first:
[0070] High-performance computing (HPC) refers to the use of supercomputers and computing clusters to solve complex computational tasks. The main characteristic of HPC systems is their powerful computing capabilities. They typically consist of a large number of processors or computing nodes that collaborate to process data through high-speed network connections.
[0071] A checkpoint is a point in time where the model's state is saved. This state includes the model's weights, training progress information, and more. Checkpoints are saved during model training so that the model can be restored to that state when needed.
[0072] Pulsating services refer to applications or services that exhibit significant temporal unevenness. These services are characterized by a sudden surge in network resources required to transmit data within specific timeframes. For example, during model training, starting a new training cycle may require reading a large dataset from storage and writing the results back, a process that consumes significant bandwidth in a short period.
[0073] When large amounts of data need to be frequently transmitted between nodes, network congestion can occur due to insufficient network bandwidth, improper routing, or other factors. This can lead to increased data transmission latency, decreased throughput, and negatively impact overall system performance. To ensure data transmission performance, congestion control is necessary.
[0074] On the one hand, with the development of artificial intelligence and high-performance computing, scenarios involving data reading and writing are becoming increasingly common. Data reading and writing typically involve frequent and high-bandwidth data transmission between a large number of nodes. Therefore, congestion control is necessary to ensure the performance and stability of the entire system. In particular, in Remote Direct Memory Access (RDMA), due to its direct memory access characteristics, it bypasses the operating system and the central processing unit (CPU). Any network congestion can lead to severe performance degradation, making congestion control even more critical.
[0075] For example, the training process of large models includes stages such as data acquisition, data cleaning, data training, and data application. Among these, data acquisition, data training, and data transmission are closely related. In the entire large model training process, only about 30% of the time is spent on data training, while the remaining 70% is spent on data processing. Data acquisition is a long-term and continuous high-bandwidth data storage process. Specifically, the equipment or components used to manage the entire data acquisition process need to efficiently process data from multiple channels and ensure that this data can be reliably stored. During data training, to prevent the loss of training data in the event of a graphics processing unit (GPU) failure, the training results are typically checked and saved at preset intervals, usually between 2 and 4 hours. Typically, the amount of checkpoints saved for models with millions of parameters is on the order of terabytes (TB). In the training of large models, untimely congestion resolution can lead to low training efficiency and may even cause the training to stop midway.
[0076] On the other hand, as data centers become increasingly larger and more complex, nodes are connected by multiple switches, increasing the number of network links between nodes. The longer the network links, the greater the likelihood of network congestion when faced with sudden surges in bandwidth traffic.
[0077] Congestion control is typically achieved through Congestion Notification Packets (CNPs) and Priority-based Flow Control (PFC) messages. Specifically, the sending node sends a message to the receiving node, which is then forwarded by the switch. When the switch detects congestion, it sets the Congestion Experienced (CE) flag in the message to 1. Upon receiving a message with a CE flag of 1, the receiving node generates a CNP and sends it to the sending node through the switch. Upon receiving the CNP, the sending node reduces its data transmission rate according to the CNP's indication. If network congestion worsens instead of improving, the accumulated packets in the switch may reach the PFC threshold. In this case, the switch generates and sends a PFC message to the sending node to suspend the transmission of packets with a specific priority.
[0078] However, there is a certain delay in the process from when the switch detects that the accumulated packets have reached the PFC threshold, to when it generates and sends a PFC message, and then to when the sending node responds to the PFC message and suspends transmission. During this time, the sending node may continue to send packets of a specific priority. If the number of these packets exceeds the maximum buffering capacity of the PFC queue, the PFC queue in the switch will be unable to receive new packets, resulting in packet loss. This packet loss leads to a decrease in network bandwidth, further reducing throughput. Especially in scenarios with bursty services such as Artificial Intelligence (AI) and high-performance computing, which can occupy all network bandwidth in a short period of time, congestion can severely impact network bandwidth and throughput.
[0079] For example, in environments involving large amounts of data read and write operations, packet loss can significantly reduce network bandwidth utilization. In particular, RDMA has extremely high requirements for packet loss rate, such as... Figure 1 As shown, as the packet loss rate increases, the RDMA throughput gradually decreases. A packet loss rate of 0.1% will cause the RDMA throughput to drop sharply, and a packet loss rate of 1% will cause the RDMA throughput to approach 0.
[0080] RDMA throughput includes write throughput, send throughput, and read throughput. Write throughput refers to the speed at which data is directly written from one node to the memory of another node via RDMA Write operations. Send throughput refers to the speed at which data is transmitted via standard message passing mechanisms (such as Send / Receive operations). Read throughput refers to the speed at which data is read from the memory of one node and transmitted to another node via RDMA Read operations. Please refer to [further details omitted]. Figure 1 As the packet loss rate increases, the write throughput, send throughput, and read throughput all gradually decrease, with the write throughput and send throughput decreasing at the same rate. During the process of increasing the packet loss rate from 0.00001 to 0.0001, the decrease rate of each of these three rates is the same. During the process of increasing the packet loss rate from 0.0001 to 0.001, the decrease rate of read throughput is greater than the decrease rate of write and send throughput, and both decrease rates 2 and 3 are greater than decrease rate 1. During the process of increasing the packet loss rate from 0.001 to 0.01, the decrease rates of read throughput (4), write throughput, and send throughput (5) are significantly greater than decrease rates 1, 2, and 3, respectively. When the packet loss rate reaches 0.01, the read throughput, write throughput, and send throughput all tend to 0.
[0081] Furthermore, in existing technologies, DCQCN and PFC require parameter adjustments to meet the varying resource requirements of different applications and services, such as latency and bandwidth. For example, adjusting thresholds and response speeds can complicate data center maintenance. For instance, a certain smart network interface card (NIC) provides over 20 configurable DCQCN parameters. Moreover, with increasingly complex network topologies, these 20+ DCQCN parameters need to be debugged to find the optimal settings under different network topologies. Furthermore, as services change, the optimal parameters may change again, requiring re-tuning to obtain new optimal parameters. For large-scale data centers, this necessitates investing significantly more time in data center maintenance.
[0082] To address the numerous problems existing in the aforementioned related technologies, this application provides a data transmission method and system. The system includes a first computing node and a switch. Based on the third access data to be sent by the first computing node and the switch's forwarding capability, the switch determines a first data volume that the first computing node is allowed to send. This instructs the first computing node to send access data according to the first data volume. By reserving a certain amount of access data for the first computing node in advance, bandwidth is maximized while avoiding congestion, further improving the overall network transmission performance. Furthermore, based on the second access data and the switch's forwarding capability, a second data volume is determined that the first computing node is allowed to send. This allows the first computing node to continue sending the untransmitted access data (i.e., the second access data) from the third access data, ensuring that the first computing node can continue data transmission subsequently, that is, ensuring that the first computing node can completely transmit the third access data without data loss.
[0083] The first computing node determines the first access data by determining the first data volume of the access data that the switch allows the first node to send. Furthermore, the first access data volume is less than or equal to the first data volume. The first computing node sends the access data within the forwarding capacity of the switch. Compared to existing technologies that use DCQCN and PFC to perform congestion control only after congestion occurs, making it difficult to determine the specific device experiencing congestion, this embodiment avoids congestion before it occurs, eliminating the need to locate the congested device, thus improving the efficiency of congestion control. Simultaneously, it reduces packet loss, maximizes bandwidth transmission, and improves throughput and the efficiency of transmitting access data. For example, in scenarios involving storing access data, it avoids congestion, reduces the time spent storing access data, and improves the efficiency of storing access data.
[0084] Furthermore, unlike existing technologies where DCQCN and PFC require parameter adjustments to meet the different resource requirements of various applications and services, such as adjusting thresholds and response speeds, the embodiments of this application do not require parameter adjustments to adapt to the needs of various applications and services, thus avoiding the difficulty of parameter maintenance.
[0085] Example 1
[0086] Figure 2 This is a flowchart illustrating an exemplary data transmission method. Please refer to [the provided text]. Figure 2 The method may include, but is not limited to, the following steps:
[0087] S201. The first computing node sends a first control message, which includes a second credit value. The second credit value is used to instruct the switch to determine the first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
[0088] In an optional embodiment, the second credit value includes a type and a magnitude, and the first computing node determines the type and magnitude of the second credit value based on the third access data. For example, the first computing node determines the magnitude of the second credit value based on the amount of data in the third access data.
[0089] In one embodiment, when the amount of third access data is greater than 0, the first computing node determines the type of the second credit value as type 1, wherein type 1 is used to request the amount of data to transmit the third access data from the switch.
[0090] In another embodiment, when the amount of data for the third access data is equal to 0, that is, when the first computing node has no data to send, the first computing node determines the type of the second credit value to be type 2, wherein type 2 is used to indicate that the first computing node does not request the amount of data to transmit the third access data.
[0091] In optional embodiments, the messages involved in this application (such as the first control message, the second control message, the first data message, etc.) all include an RDMA message header. The RDMA message header includes a reserved field, which is used to carry a credit value type. The credit value type is used to indicate whether a credit value is carried and whether the credit value has changed. For example, the length of the credit value type is 2 bits.
[0092] In one example, a credit value type of "00" indicates that the message does not carry a credit value, a credit value type of "01" indicates that the credit value is increased, a credit value type of "10" indicates that the credit value is decreased, and a credit value type of "11" indicates that the credit value remains unchanged.
[0093] In another example, a credit value type of "00" indicates an increase in credit value, a credit value type of "01" indicates a decrease in credit value, a credit value type of "10" indicates that the credit value remains unchanged, and a credit value type of "11" indicates that the message does not carry a credit value.
[0094] The correspondence between the specific numerical values of the credit value types and the indicative meanings of the credit value types mentioned above is merely illustrative and does not constitute a limitation in the embodiments of this application.
[0095] In an optional embodiment, the reserved field is also used to carry indication information, which indicates that the first computing node, the switch and the second computing node have used the data transmission method provided in the embodiments of this application. For example, the indication information is "0x3", and the embodiments of this application do not limit this.
[0096] For specific embodiments, please refer to Figure 3 It shows a schematic diagram of an RDMA message header provided in an embodiment of this application, such as... Figure 2 As shown, the RDMA message header includes Reserved Field 1, Reserved Field 2, Reserved Field 3, and Reserved Field 4. Among them, Reserved Field 1 has a length of 7 bits, Reserved Field 2 and Reserved Field 3 each have a length of 1 bit, and Reserved Field 4 has a length of 6 bits.
[0097] In specific embodiments, such as Figure 4 As shown, Figure 4 This is a schematic diagram of a reserved field 1 provided in an embodiment of this application. The reserved field 1 includes indication information, the type of credit value, and a reserved subfield.
[0098] In an optional embodiment, reserved field 2 can also be set to a fence flag (F) to indicate that the sender requires the receiver to complete all previous messages before processing the current message; reserved field 3 can also be set to a Receiver Not Ready Retry Count (RNR / B) to specify the number of times the sender should attempt to retransmit when the receiver is temporarily unable to receive a message (i.e., when the receiver's resources are insufficient or the queue is full).
[0099] like Figure 3As shown, the RDMA message header also includes the following fields: Operation Code (Opcode), Signaled Completion (SE), Migration State Bit (M), Padding Count (Pad), Transport Header Version (TVer), Partition Key (PKey), Destination Queue Pair (DQP), Acknowledge (ACK) field, and Packet Sequence Number (PSN). Specifically, the Operation Code is 8 bits long, the Signaled Completion (SE), Migration State Bit (M), and Acknowledge (PKey) are each 1 bit long, the Padding Count is 3 bits long, the Transport Header Version is 4 bits long, the Partition Key is 16 bits long, and the Destination Queue Pair and Packet Sequence Number are both 24 bits long.
[0100] The message type indicates the specific type of the transport layer message; the flag indicates whether the current message needs to trigger a completion event on the receiver; the state transition bit indicates whether the queue pair (QP) has migrated from one port to another; the padding count indicates the number of padding bytes added to ensure that the packet size is a multiple of 8 bytes; the transport header version indicates the version of the message header; the partition key indicates the partition to which it belongs; the destination queue pair number indicates the queue pair; and the packet sequence number ensures that messages are transmitted and processed in the correct order.
[0101] In an optional embodiment, a field 1 is added after the RDMA header to indicate the credit value. The length of field 1 is set according to the RDMA semantics, and this embodiment does not limit this. For example, the length of field 1 is 32 bits.
[0102] In this embodiment, the RDMA protocol is extended by using reserved fields in the RDMA header to carry indication information and credit value type. This allows computing nodes and switches to recognize the data transmission method provided in this embodiment and execute its steps without requiring device replacement. This prevents congestion before it occurs, reduces packet loss, maximizes bandwidth transmission, and improves throughput and data access efficiency. Simultaneously, it is compatible with existing RDMA protocols, allowing existing applications and services to continue operating normally, reducing user perception, lowering equipment replacement costs, and achieving ecosystem compatibility benefits.
[0103] In an optional embodiment, before instructing the switch to determine the first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capacity of the switch, the first computing node can typically send a maximum transmission unit (MTU) size.
[0104] It should be noted that the data transmission method provided in this application embodiment can be determined based on whether the above-mentioned instruction information, the type of credit value, and the size of the credit value are present in the message.
[0105] It should be noted that the basic semantics of RDMA can be combined with other protocols according to standards such as Network File System (NFS) and Non-volatile Memory Host Controller Interface Specification (NVMe over Fabrics, NOF), and this application does not impose any restrictions on this.
[0106] S202. The switch generates a second control message based on the first control message. The second control message includes a first amount of data that the switch allows the first computing node to send access data.
[0107] The switch can also be a switching device or a network device with forwarding function, such as a router or switch. This application embodiment does not limit this.
[0108] In an optional embodiment, the switch determines the first amount of data that the first computing node is allowed to send based on the third access data and the switch's forwarding capabilities.
[0109] Here, the forwarding capacity of a switch refers to the amount of data that the switch can still process within the round-trip time (RTT); the total forwarding capacity of a switch refers to the total amount of data that the switch can process within the RTT; and the used forwarding capacity of a switch refers to the amount of data that the switch has already processed within the RTT.
[0110] RTT (Round-Trip Time) refers to the total time it takes for a message to travel from the sender to the receiver, and then from the receiver's response to the sender, after which the message receives an acknowledgment. RTT is typically measured in milliseconds (ms). RTT is related to network architecture; different network architectures correspond to different RTTs. More complex network architectures result in longer RTTs, while simpler network architectures result in shorter RTTs. The same network architecture typically has the same RTT, usually 8ms or 10ms. This application does not impose any restrictions on network architecture or its corresponding RTT.
[0111] The switch determines its forwarding capacity based on its total forwarding capacity and its used forwarding capacity within the round-trip time (RTT). In some embodiments, the switch determines its forwarding capacity as the difference between the total forwarding capacity and the used forwarding capacity. In other embodiments, the switch determines its forwarding capacity using a forwarding capacity formula based on the total forwarding capacity and the used forwarding capacity. The forwarding capacity formula is: Z = SR (Formula 1). In Formula 1, Z represents the switch's forwarding capacity, S represents the switch's total forwarding capacity, and R represents the switch's used forwarding capacity. For example, if the switch's total forwarding capacity is 3.2 Gbps and its used forwarding capacity is 1.8 Gbps within the RTT, the switch's forwarding capacity is "3.2 - 1.8 = 1.4 Gbps".
[0112] In optional embodiments, the switch determines its total forwarding capacity based on its switching capacity and round-trip time. In some embodiments, the switch determines its total forwarding capacity by multiplying the switching capacity and the round-trip time. In other embodiments, the switch determines its total forwarding capacity using a formula based on the switching capacity and the round-trip time. The formula is: C = A × B, Formula 2. In Formula 2, C represents the switch's total forwarding capacity, A represents the switch's switching capacity, and B represents the round-trip time. For example, if the switch's switching capacity is 400 gigabits per second (Gbps) and its round-trip time is 8 ms, the switch's total forwarding capacity is "400 × 0.008 = 3.2 Gbps".
[0113] In some embodiments, when the switch's forwarding capacity exceeds a threshold, the switch determines the first data volume based on the amount of data in the third access data. For example, the switch determines the amount of data in the third access data as the first data volume.
[0114] In a specific embodiment, Figure 5 This is a schematic diagram illustrating the forwarding capabilities of a switch, such as... Figure 5 As shown, the total forwarding capacity of the switch = the used forwarding capacity of the switch + the forwarding capacity of the switch. If the forwarding capacity of the switch (that is, the amount of data the switch can still process in the round-trip time) is greater than this threshold, the amount of data that the switch has allocated to the first computing node is data volume 1, and the amount of data that the first computing node requests to send is data volume 2. Based on the forwarding capacity of the switch, the amount of data allocated to the first computing node is data volume 2, that is, the first data volume determined by the switch is data volume 2.
[0115] In an optional embodiment, the switch determines the threshold based on the switch's total forwarding capacity and a first ratio. For example, the switch determines the threshold as the product of the total forwarding capacity and the first ratio. Typically, the first ratio is 20%, and this embodiment does not limit this.
[0116] In other embodiments, if the forwarding capacity of the switch is less than or equal to a threshold, the switch reclaims the allocated forwarding capacity from other data streams to update the switch's forwarding capacity. The switch determines the first data volume based on the updated forwarding capacity of the switch and the data volume of the third access data.
[0117] In an optional embodiment, the switch determines the target data stream from which forwarding capacity is to be reclaimed, and reclaims the allocated forwarding capacity from the target data stream. For example, the switch reclaims forwarding capacity from the target data stream according to a second ratio, where the second ratio is typically 5% to 10%. In one example, the switch determines the target data stream as a data stream with allocated forwarding capacity greater than a preset forwarding capacity. In another example, the switch randomly determines the target data stream from data streams with allocated forwarding capacity.
[0118] In an optional embodiment, the switch determines the updated forwarding capacity of the switch by summing the total forwarding capacity recovered and the switch's own forwarding capacity. For example, if the switch recovers 0.1G of forwarding capacity from data stream 1 and 0.15G of forwarding capacity from data stream 3, the total forwarding capacity recovered by the switch is "0.1 + 0.15 = 0.25G", the switch's own forwarding capacity is 0.4G, and the updated forwarding capacity of the switch is "0.4 + 0.25 = 0.65G".
[0119] In an optional embodiment, the switch determines the size of the third access data based on the updated switch's forwarding capacity and the data volume of the third access data. If the data volume of the third access data is less than the updated switch's forwarding capacity, the switch determines the data volume of the third access data as the first data volume. If the data volume of the third access data is greater than or equal to the updated switch's forwarding capacity, the switch determines the first data volume based on a third ratio and the updated switch's forwarding capacity. For example, the switch determines the first data volume as the product of the third ratio and the updated switch's forwarding capacity.
[0120] In an optional embodiment, the switch determines the first data volume according to a fourth ratio and the updated forwarding capacity of the switch. For example, the switch determines the first data volume as the product of the fourth ratio and the updated forwarding capacity of the switch.
[0121] In a specific embodiment, Figure 6 This is a schematic diagram illustrating the forwarding capabilities of another type of switch, such as... Figure 6As shown, the total forwarding capacity of the switch = the used forwarding capacity of the switch + the forwarding capacity of the switch. If the forwarding capacity of the switch (that is, the amount of data the switch can still process in the round-trip time) is less than this threshold, the amount of data that the switch has allocated to the first compute node is data volume 1, the amount of data that the switch has allocated to data flow 1 is data volume 3, and the amount of data that the first compute node requests to send is data volume 2. The switch reclaims a portion of data volume 4 from data flow 1 and allocates data volume 4 to the first compute node. That is, the first data volume determined by the switch is data volume 4.
[0122] It should be noted that after the switch allocates a first amount of access data that the first computing node is allowed to send, the amount of access data that the switch allows other devices to send will decrease, that is, the switch's forwarding capacity will decrease.
[0123] S203. The switch sends a second control message.
[0124] The switch looks up the target path from itself to the second computing node according to the routing table. The target path includes the outgoing port of the switch and the target node. The target node can be the next-hop switch or the second computing node. The switch sends the second control message to the target node indicated by the target path through the outgoing port.
[0125] In an optional embodiment, the target node is a next-hop switch. The next-hop switch looks up the target path from the next-hop switch to the second computing node according to the routing table, and sends the second control message to the target node of the next-hop switch through the outgoing port indicated by the target path, until the second control message is sent to the second computing node.
[0126] S204. The second computing node responds to the second control message by sending a third control message.
[0127] After receiving the second control message, the second computing node parses the second control message to obtain the first data volume of access data that the switch allows the first computing node to send. The second computing node then generates a third control message that includes the first data volume and sends the third control message to the first computing node through the switch.
[0128] In an optional embodiment, the second computing node uses a third credit value to indicate the first data volume. The third credit value includes the type of the third credit value and the size of the third credit value. The second computing node determines the size of the third credit value based on the first data volume. The second computing node determines the type of the third credit value as type 3, where type 3 is used to indicate that the credit value remains unchanged.
[0129] In an optional embodiment, the second computing node can determine whether the first computing node can transmit all the third access data in this transmission based on the amount of the third access data and the amount of the first data. If the first computing node can transmit all the third access data in this transmission, the second computing node can send information to the upper-layer application or other control devices, indicating that the transmission of the third access data can be completed. If the first computing node cannot transmit all the third access data in this transmission, the second computing node waits for the first computing node to transmit the remaining access data in the third access data.
[0130] S205. The second computing node sends the first data packet.
[0131] The second computing node generates a first data packet, which includes a first data amount of access data that the switch allows the first computing node to send. The second computing node generates a first data packet including the first data amount and sends the first data packet to the first computing node through the switch.
[0132] S206. The first computing node generates a second data packet based on the first data packet. The second data packet includes first access data and a first credit value. The amount of data in the first access data is less than or equal to the amount of data in the first data packet. The first access data is all or part of the data in the third access data packet. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch.
[0133] In an optional embodiment, the first computing node obtains the third access data to be sent. Based on the data volume of the third access data and the first data volume, the first computing node obtains a first credit value and first access data, where the first access data is all or part of the third access data. For example, the first computing node generates the third access data.
[0134] In an optional embodiment, the first computing node determines the first access data from the third access data based on the data volume of the third access data and the first data volume.
[0135] In one embodiment, the amount of third access data is greater than the amount of first data. The first computing node determines the first access data from the third access data based on the first data amount. For example, the first computing node slices the third access data to obtain multiple slice data. The first computing node selects at least one target slice data based on the first data amount, and the first computing node determines the target slice data as the first access data.
[0136] In another embodiment, the amount of data in the first access data is less than or equal to the first data amount, and the first computing node determines the third access data as the first access data.
[0137] In an optional embodiment, the credit value includes the type of the credit value and the size of the credit value. The first computing node obtains the type of the first credit value and the size of the first credit value based on the amount of data in the third access data and the first data amount.
[0138] In one embodiment, when the amount of data in the third access data is greater than the amount of data in the first data, the first computing node determines the type of the first credit value as a first type, and the first computing node determines the difference between the amount of data in the third access data and the amount of data in the first data as the size of the first credit value. The first type is used to request the amount of data from the switch to transmit the second access data, and the second access data is a portion of the third access data.
[0139] In another embodiment, when the amount of data in the third access data is less than or equal to the amount of data in the first data, the first computing node determines the type of the second credit value as the second type, and the first computing node determines the amount of data in the first data as the size of the first credit value, wherein the second type is used to return the amount of data used to transmit the first access data to the switch.
[0140] S207. The first computing node sends the second data packet.
[0141] The first compute node looks up the target path from the first compute node to the switch according to the routing table. The target path includes the output port of the first compute node, and the first compute node sends the second data packet to the switch through the output port.
[0142] S208. In response to the second data packet sent by the first computing node, the switch updates its forwarding capabilities.
[0143] In one embodiment, if the amount of data in the third access data is greater than the amount of data in the first access data, the switch determines the amount of data in the second access data that the first computing node is allowed to send based on the amount of data in the second access data and the switch's forwarding capacity; the switch then updates its forwarding capacity based on the amount of data in the second access data. For example, the switch determines the updated forwarding capacity of the switch based on the difference between the amount of data in the second access data and the switch's forwarding capacity.
[0144] In an optional embodiment, if the switch's forwarding capacity exceeds a threshold, the switch determines the second data volume based on the amount of data in the second access data. For example, the switch determines the amount of data in the second access data as the second data volume.
[0145] In an optional embodiment, if the forwarding capacity of the switch is less than or equal to a threshold, the switch reclaims the allocated forwarding capacity from other data streams to update the forwarding capacity of the switch. The switch determines the second data volume based on the updated forwarding capacity of the switch and the second access data volume.
[0146] In a specific embodiment, the switch determines the target data stream from which forwarding capacity should be reclaimed, and then reclaims the allocated forwarding capacity from the target data stream. For example, the switch reclaims forwarding capacity from the target data stream according to a fifth ratio, where the fifth ratio is typically 5% to 10%. In one example, the switch determines the target data stream as a data stream whose allocated forwarding capacity is greater than a preset forwarding capacity. In another example, the switch randomly determines the target data stream from data streams with allocated forwarding capacity.
[0147] In a specific embodiment, the switch determines its updated forwarding capacity by summing the total reclaimed forwarding capacity with its own forwarding capacity. The switch then determines the size of the updated forwarding capacity and the amount of data accessed in the second access. If the amount of data accessed in the second access is less than the updated forwarding capacity, the switch determines the amount of data accessed in the second access as the second data amount. If the amount of data accessed in the second access is greater than or equal to the updated forwarding capacity, the switch determines the second data amount based on a sixth ratio and the updated forwarding capacity. For example, the switch determines the second data amount as the product of the sixth ratio and the updated forwarding capacity.
[0148] In a specific embodiment, the switch determines the second data volume based on the seventh ratio and the updated forwarding capacity of the switch. For example, the switch determines the second data volume as the product of the seventh ratio and the updated forwarding capacity of the switch.
[0149] In another embodiment, if the amount of data in the third access is less than or equal to the amount of data in the first access, the switch's forwarding capacity is updated based on the amount of data in the first access. For example, the switch determines the updated forwarding capacity of the switch by summing the amount of data in the first access and the switch's forwarding capacity.
[0150] S209. In response to the second data packet, the switch generates a fourth data packet.
[0151] The fourth data packet includes a third data volume of access data that the switch allows the first computing node to send.
[0152] In one embodiment, if the amount of the third access data is greater than the amount of the first data, that is, if the first computing node cannot send the third access data to the second computing node at once, the switch determines the amount of the second data as the amount of the third data.
[0153] In another embodiment, when the amount of the third access data is less than or equal to the amount of the first data, that is, when the first computing node can send the third access data to the second computing node at once, the switch allows the amount of the third data of the access data sent by the first computing node to be 0.
[0154] S210. The switch sends the fourth data packet.
[0155] The switch looks up the target path from itself to the second computing node according to the routing table. The target path includes the outgoing port of the switch and the target node. The target node can be the next-hop switch or the second computing node. The switch sends the fourth data packet to the target node indicated by the target path through the outgoing port.
[0156] In an optional embodiment, the target node is a next-hop switch. The next-hop switch looks up the target path from the next-hop switch to the second computing node according to the routing table, and sends the fourth data packet to the target node of the next-hop switch through the outgoing port indicated by the target path, until the third data packet is sent to the second computing node.
[0157] Example 2
[0158] It should be noted that the above embodiment uses the example of the first computing node sending the third access data all at once. If the amount of the third access data is greater than the amount of the first data, the first computing node needs to send the third access data in multiple parts, such as... Figure 8 As shown, Figure 8 This is a schematic diagram of another data transmission method provided in an embodiment of this application. Please refer to it. Figure 8 The method process also includes, but is not limited to, the following steps:
[0159] S211. The second computing node responds to the fourth data packet by sending the fifth data packet.
[0160] The second computing node parses the fourth data packet and obtains the third data volume contained in the fourth packet, which is the access data that the switch allows the first computing node to send.
[0161] With the third data volume being 0, the first computing node has sent all the third access data, and the data transmission process ends here.
[0162] If the third data quantity is not zero, that is, if the third data quantity is equal to the second data quantity, the second computing node responds to the fourth data packet by generating and sending a fifth data packet, wherein the fifth data packet includes the second data quantity of access data that the switch allows the first computing node to send.
[0163] S212. The first computing node generates a third data packet based on the fifth data packet.
[0164] The third data packet includes fifth access data and a fifth credit value. The amount of fifth access data is less than that of second data. The fifth access data is all or part of the second access data. The fifth credit value is used to instruct the switch to determine the amount of fourth data that the first computing node is allowed to send based on the sixth access data to be sent by the first computing node and the forwarding capability of the switch.
[0165] The implementation principle of S212 is the same as that of S206 in Example 1, and will not be repeated here.
[0166] S213. The first computing node sends a third data packet.
[0167] The first compute node looks up the target path from the first compute node to the switch according to the routing table. The target path includes the output port of the first compute node, and the first compute node sends the third data packet to the switch through the output port.
[0168] S214. In response to the third data packet sent by the first computing node, the switch updates its forwarding capabilities.
[0169] The implementation principle of S214 is the same as that of S208 in Example 1, and will not be repeated here.
[0170] S215. In response to the third data packet, the switch generates a sixth data packet.
[0171] The implementation principle of S215 is the same as that of S209 in Example 1, and will not be repeated here.
[0172] S216. The switch sends the sixth data packet.
[0173] The implementation principle of S216 is the same as that of S210 in Example 1, and will not be repeated here.
[0174] If the amount of data in the second access is less than or equal to the amount of data in the third access, that is, if the first computing node can send all the second access data through this data transmission, the data transmission process ends here.
[0175] Optionally, if the amount of the second access data is greater than the amount of the third data, that is, if the first computing node only sends part of the second access data in this data transmission, the first computing node, the switch and the second computing node continue to execute the above S211 to S216 until the first computing node sends all the second access data.
[0176] It should be noted that, Figure 2 and Figure 8 The data transmission method shown takes a large I / O scenario as an example. In a large I / O scenario, the first computing node and the second computing node first exchange control information and then exchange access data. The control information includes the address, key, and amount of data to be accessed.
[0177] In this embodiment, control information is exchanged first, followed by access data exchange, in a large I / O scenario. Without changing the execution order, control information and access data are separated. By carrying the amount of access data to be sent by the first computing node and the amount of data that the switch allows the first computing node to send in the control information, the amount of access data to be sent is negotiated. This allows for early perception of network status and, within the forwarding capacity of the switch, as much access data as possible to be sent, thereby avoiding congestion and maximizing bandwidth.
[0178] Furthermore, in RDMA, data access does not require the transmission of a central processing unit (CPU) and no additional equipment needs to be configured, enabling rapid deployment in large-scale scenarios and avoiding the problem of difficult equipment maintenance.
[0179] Example 3
[0180] In small I / O scenarios, during the control information exchange between the first and second computing nodes, access data is carried in the control information, such as... Figure 9 As shown, Figure 9 This is a diagram illustrating data transfer methods in a small I / O scenario. Please refer to it. Figure 9 The method may include, but is not limited to, the following steps:
[0181] S901. The first computing node sends a data packet A, which includes a credit value A and access data A. The credit value A is used to instruct the switch to determine the amount of data A that the first computing node is allowed to send based on the access data B to be sent by the first computing node and the forwarding capability of the switch.
[0182] In an optional embodiment, the first computing node obtains an initial credit value, which is used to indicate the amount of data that the first computing node can send this time. The first computing node determines access data A and access data B based on the data amount and the size of the message header, wherein access data A and access data B together constitute access data C to be sent by the first computing node.
[0183] For example, the initial credit value typically indicates the amount of data that the first computing node can send this time, which is the size of a maximum transmission unit (MTU), to ensure that the first computing node can send basic messages normally.
[0184] The implementation principle of S901 is the same as that of S201 in Example 1, and will not be repeated here.
[0185] S902. The switch generates data packet B based on data packet A. Data packet B includes the amount of data A that the switch allows the first computing node to send access data.
[0186] The implementation principle of S902 is the same as that of S202 in Example 1, and will not be repeated here.
[0187] S903. The switch sends data packet B.
[0188] The implementation principle of S903 is the same as that of S203 in Example 1, and will not be repeated here.
[0189] S904. In response to data packet B, the second computing node sends data packet C, which includes the amount of data A that the switch allows the first computing node to send.
[0190] The implementation principle of S904 is the same as that of S211 in Example 2, and will not be repeated here.
[0191] Optionally, if the amount of data accessed by data B is less than or equal to the amount of data A, that is, if the first computing node can send all of the data accessed by data B in one data transmission, the transmission process of the data accessed by data B ends here.
[0192] Optionally, if the amount of access data B is greater than the amount of data A, that is, if the first computing node cannot transmit all the access data B in one transmission, the first computing node, the switch and the second computing node continue to execute the above S901 to S904 until the first computing node sends all the access data B.
[0193] The data transmission method provided in this application can prevent congestion before it occurs in both large I / O and small I / O scenarios, thereby reducing packet loss, maximizing bandwidth transmission, and improving throughput and the efficiency of data transmission and access.
[0194] The data transmission method and system provided in this application involve a switch determining the amount of data the first computing node is allowed to send based on the access data to be sent by the first computing node and the switch's forwarding capabilities. This instructs the first computing node to send access data according to this amount. By pre-reserving the amount of access data for the first computing node, bandwidth is maximized while avoiding congestion, further improving the overall network transmission performance. Compared to existing technologies that use DCQCN and PFC to perform congestion control only after congestion occurs, making it difficult to identify the specific device experiencing congestion, this application avoids congestion before it occurs, eliminating the need to locate the congested device. This improves the efficiency of congestion control, reduces packet loss, maximizes bandwidth transmission, and also improves throughput and the efficiency of transmitting access data. For example, in scenarios involving storing access data, congestion is avoided, the time spent storing access data is reduced, and the efficiency of storing access data is improved.
[0195] Furthermore, unlike existing technologies where DCQCN and PFC require parameter adjustments to meet the different resource requirements of various applications and services, such as adjusting thresholds and response speeds, the embodiments of this application do not require parameter adjustments to adapt to the needs of various applications and services, thus avoiding the difficulty of parameter maintenance.
[0196] It should be noted that this application embodiment uses a network architecture including a single-level switch as an example. In other embodiments, the network architecture may also include multiple levels of switches. In one example, the network architecture to which the above data transmission method is applied includes a first computing node, switch A, switch B, and switch C. Switch B is the next-hop switch of switch A, and switch C is the next-level switch of switch B. Switch A determines the amount of data A that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of switch A; switch B determines the amount of data B that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of switch B; switch C determines the amount of data C that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of switch C. The first computing node receives a first data packet including data A, data B, and data C. The first computing node determines the amount of data that the switch allows the first computing node to send based on data A, data B, and data C. For example, the first computing node determines the smallest data amount among data A, data B, and data C as the amount of data that the switch allows the first computing node to send. The other steps and principles of the data transmission methods performed by switches B and C are similar to those of the data transmission methods performed by switch A, and will not be elaborated here.
[0197] Compared to the closed technological environment and market system built around InfiniBand (IB) technology in existing technologies, the embodiments of this application can use Smart Network Interface Cards (SmartNICs) to implement the above data transmission method. For example, deploying the SmartNIC inside each computing node or switch provides greater flexibility and compatibility, allowing compatibility with mainstream manufacturers in the market. Users can choose the products and services most suitable for their needs without being locked into a closed ecosystem. Furthermore, compared to the dedicated hardware required by IB, SmartNICs can utilize existing Ethernet infrastructure, reducing the need for additional proprietary equipment purchases and lowering costs.
[0198] like Figure 9 As shown, Figure 9 This is a schematic diagram of a smart network interface card provided in an embodiment of this application. Please refer to it. Figure 9 A smart network interface card (NIC) includes a message processor, a control message processor, a congestion manager, and a message identifier.
[0199] The message processor is used to fill in specific fields in the message and forward the processed message to the switch. For example, it fills in the type of indication information and credit value in the RDMA message header, and fills in field 1 after the RDMA message header to indicate the size of the credit value. The control message processor is used to generate credit values, for example, to generate the second credit value of the first control message in Example 1. The congestion manager is used to determine the size of the message (that is, to determine the amount of data of each access data sent), for example, to determine the first access data from the third access data to be sent by the first computing node based on the first amount of access data that the switch allows the first computing node to send. The message identifier is used to identify the type of message, including Transmission Control Protocol (TCP) messages, Internet Control Message Protocol (ICMP) messages, etc.; the message identifier is also used to identify the message after it has been processed by the message processor.
[0200] like Figure 9As shown, the smart network interface card also includes an Interface Manager, a packet buffer, a network interface card manager, a Cache Manager, an Input Queue Manager, an Output Queue Manager, a Thread Scheduler Manager, a Normal Packet Processor, and Double Data Rate (DDR) storage.
[0201] The interface manager is responsible for port communication, such as sending and receiving packets between the network interface card (NIC) and the host; the packet buffer is used to buffer packets; the NIC manager is used to manage the NIC and send and receive packets; the buffer manager is used to manage the memory area shared between the NIC and the local host; the input queue manager is used to sort received packets; the output queue manager is used to sort packets to be sent; the thread scheduling process manager is used to create, allocate, and schedule multiple processing threads within the NIC; the regular packet processor is used to process and forward ordinary packets; and DDR storage is used to store data within the NIC.
[0202] It should be noted that the aforementioned smart network card can be implemented using logic devices such as field-programmable gate arrays (FPGAs) or application-specific integrated circuits (ASICs). This application does not impose any restrictions on this implementation.
[0203] Corresponding to the above data transmission method, this application also provides a data transmission apparatus. Figure 10 For an exemplary schematic diagram of a data transmission device 1000, please refer to... Figure 10 The data transmission device 1000 includes: a receiving module 1001, a first generating module 1002, and a first transmitting module 1003.
[0204] The receiving module 1001 is used to receive a first data packet sent by the second computing node. The first data packet includes a first data amount of access data that the switch allows the first computing node to send. The first generating module 1002 is used to generate a second data packet based on the first data packet. The second data packet includes first access data and a first credit value. The data amount of the first access data is less than or equal to the first data amount. The first credit value is used to instruct the switch to determine the second data amount that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch. The first sending module 1003 is used to send the second data packet.
[0205] In one possible implementation, the first generation module 1002 is specifically used to: obtain the third access data to be sent; and obtain the first credit value and the first access data based on the data volume of the third access data and the first data volume, wherein the first access data is all or part of the data of the third access data.
[0206] In one possible implementation, the first generation module 1002 is specifically used for: when the amount of data in the third access data is greater than the amount of data in the first access data, the first credit value is of the first type, the first type is used to apply to the switch for the amount of data used to transmit the second access data, the second access data being a portion of the third access data; when the amount of data in the third access data is less than or equal to the amount of data in the first access data, the second credit value is of the second type, the second type is used to return the amount of data used to transmit the first access data to the switch.
[0207] In one possible implementation, the data transmission device 1000 further includes: a second sending module 1004, configured to send a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine a first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
[0208] In one possible implementation, the data transmission device 1000 further includes: a second generation module 1005, used to generate a third data message, the third data message including fifth access data, the data volume of the fifth access data being less than the second data volume; and a third sending module, used to send the third data message.
[0209] The effect of the data transmission device described above is similar to that of the access method executed by the first computing node in the above embodiments, and will not be described again here.
[0210] Corresponding to the above data transmission method, this application also provides another data transmission device. Figure 11 For an exemplary schematic diagram of a data transmission device 1100, please refer to... Figure 11 The data transmission device 1100 includes: a generation module 1101, a transmission module 1102, and an update module 1103.
[0211] The generation module 1101 is used to generate a second control message based on the first control message sent by the first computing node. The first control message includes a second credit value, which is used to instruct the switch to determine the first data volume allowed to be sent by the first computing node based on the third access data to be sent by the first computing node and the forwarding capability of the switch. The second control message includes the first data volume of access data allowed to be sent by the first computing node by the switch. The sending module 1102 is used to send the second control message. The updating module 1103 is used to update the forwarding capability of the switch in response to the second data message sent by the first computing node. The second data message includes the first access data and the first credit value. The data volume of the first access data is less than or equal to the first data volume. The first credit value is used to instruct the switch to determine the second data volume allowed to be sent by the first computing node based on the second access data to be sent by the first computing node and the forwarding capability of the switch.
[0212] In one possible implementation, the update module 1103 is specifically used to: determine the second amount of data that the first computing node is allowed to send based on the amount of data of the second access data and the forwarding capacity of the switch when the amount of data of the third access data is greater than the amount of data of the first access data; and update the forwarding capacity of the switch based on the second amount of data.
[0213] In one possible implementation, the update module 1103 is specifically used to: update the forwarding capability of the switch based on the first data volume when the data volume of the third access data is less than or equal to the first data volume.
[0214] In one possible implementation, the generation module 1101 is specifically used to: determine the first amount of data that the first computing node is allowed to send based on the third access data and the forwarding capability of the switch.
[0215] In one possible implementation, the generation module 1101 is specifically used to: determine the first data volume based on the data volume of the third access data when the forwarding capacity of the switch is greater than the threshold.
[0216] In one possible implementation, the generation module 1101 is specifically used to: reclaim the allocated forwarding capacity from other data streams to update the forwarding capacity of the switch when the forwarding capacity of the switch is less than or equal to the threshold; and determine the first data volume based on the updated forwarding capacity of the switch and the data volume of the third access data.
[0217] The effect of the data transmission device described above is similar to that of the access method performed by the switch in the above embodiments, and will not be described again here.
[0218] Corresponding to the above data transmission method, this application also provides a data transmission system. Figure 12For an exemplary structural diagram of a data reasoning system 1200, please refer to... Figure 12 The data inference system 1200 includes a first data node 1210 and a switch 1220. The first computing node operates as follows: Figure 10 The data transmission device 1000 shown herein operates as follows: Figure 11 The data transmission device 1100 shown.
[0219] The effect of the data transmission system described above is similar to that of the data transmission methods in the above embodiments, and will not be repeated here.
[0220] All of the above modules can be implemented in software or hardware. As an example of a software functional unit, a module may include code running on a computing instance. A computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, there may be one or more computing instances. For example, the first generation module 1002 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.
[0221] 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.
[0222] As an example of a hardware functional unit, the module mentioned above may include at least one computing device, such as a server. Alternatively, the module 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.
[0223] The multiple computing devices included in the aforementioned data processing devices 1000 and 1100 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the aforementioned data processing devices 1000 and 1100 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the aforementioned data processing devices 1000 and 1100 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.
[0224] It should be noted that, in other embodiments, the above-described module can be used to execute the corresponding steps in the data transmission method to realize all the functions of the data transmission system.
[0225] This application also provides a computing device 1300. For example... Figure 13 As shown, the computing device 1300 includes a bus 1302, a processor 1304, a memory 1306, and a communication interface 1309. The processor 1304, the memory 1306, and the communication interface 1309 communicate with each other via the bus 1302. The computing device 1300 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 1300.
[0226] Bus 1302 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 13 The bus 1302 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1302 may include a path for transmitting information between various components of the computing device 1300 (e.g., memory 1306, processor 1304, communication interface 1309).
[0227] The processor 1304 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0228] The memory 1306 may include volatile memory, such as random access memory (RAM). The memory 1306 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0229] The memory 1306 stores executable program code, and the processor 1304 executes this executable program code to implement the functions of the aforementioned receiving module 1001, first generating module 1001, first sending module 1003, second sending module 1004, second generating module 1005, generating module 1101, sending module 1102, and updating module 1103, thereby realizing the data transmission method. That is, the memory 1306 stores instructions for executing the data transmission method.
[0230] The communication interface 1309 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 1300 and other devices or communication networks.
[0231] 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.
[0232] like Figure 14As shown, the computing device cluster includes at least one computing device 1400. The memory 1406 of one or more computing devices 1400 in the computing device cluster may store the same instructions for executing data transfer methods.
[0233] In some possible implementations, the memory 1406 of one or more computing devices 1400 in the computing device cluster may also store partial instructions for executing the data transfer method. In other words, a combination of one or more computing devices 1400 can jointly execute the instructions for executing the data transfer method.
[0234] It should be noted that the memory 1406 in different computing devices 1400 within the computing device cluster can store different instructions, each used to execute a portion of the data transmission system's functions. That is, the instructions stored in the memory 1406 of different computing devices 1400 can implement the functions of one or more modules among the receiving module 1001, the first generating module 1001, the first sending module 1003, the second sending module 1004, the second generating module 1005, the generating module 1101, the sending module 1102, and the updating module 1103.
[0235] 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 15 One possible implementation is shown. For example... Figure 15 As shown, two computing devices 1500A and 1500B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 1506 in computing device 1500A stores instructions for executing the functions of the receiving module 1001, the first generating module 1001, the first sending module 1003, the second sending module 1004, and the second generating module 1005. Simultaneously, the memory 1506 in computing device 1500B stores instructions for executing the functions of the generating module 1101, the sending module 1102, and the updating module 1103.
[0236] It should be understood that Figure 15 The functions of computing device 1500A shown can also be performed by multiple computing devices 1500. Similarly, the functions of computing device 1500B can also be performed by multiple computing devices 1500.
[0237] This application also provides another computing device cluster. The connection relationships between the computing devices in this computing device cluster can be similarly referred to... Figure 13 and Figure 15The connection method of the computing device cluster is different in that the memory 1506 of one or more computing devices 1500 in the computing device cluster can store the same instructions for executing data transmission methods.
[0238] In some possible implementations, the memory 1506 of one or more computing devices 1500 in the computing device cluster may also store partial instructions for executing the data transfer method. In other words, a combination of one or more computing devices 1500 can jointly execute the instructions for executing the data transfer method.
[0239] It should be noted that the memory 1506 in different computing devices 1500 within the computing device cluster can store different instructions for executing some functions of the data transmission system. That is, the instructions stored in the memory 1506 of different computing devices 1500 can implement the functions of one or more devices in the data transmission system.
[0240] 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, it causes the at least one computing device to perform the data transmission method described in the above embodiments.
[0241] 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 perform the data transmission method described in the above embodiments.
[0242] 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 application.
Claims
1. A data transmission method, characterized in that, Applied to the first computing node, the method includes: Receive a first data packet sent by the second computing node, the first data packet including a first amount of data that the switch allows the first computing node to send access data; Based on the first data packet, a second data packet is generated. The second data packet includes first access data and a first credit value. The amount of the first access data is less than or equal to the amount of the first data. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch. Send the second data packet.
2. The method according to claim 1, characterized in that, The step of generating a second data packet based on the first data packet includes: Retrieve the third access data to be sent; Based on the data volume of the third access data and the data volume of the first data, the first credit value and the first access data are obtained, wherein the first access data is all or part of the data of the third access data.
3. The method according to claim 2, characterized in that, The process of obtaining the first credit value based on the amount of data from the third access data and the amount of data from the first data includes: If the amount of the third access data is greater than the amount of the first data, the first credit value is of the first type. The first type is used to request the amount of data to transmit the second access data from the switch. The second access data is a portion of the third access data. If the amount of data in the third access data is less than or equal to the amount of data in the first access data, the second credit value is of the second type, which is used to return the amount of data used to transmit the first access data to the switch.
4. The method according to claim 2, characterized in that, Before receiving the first data packet sent by the second computing node, the method further includes: Send a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine the amount of the first data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
5. The method according to claim 1, characterized in that, The method further includes: A third data message is generated, the third data message including fifth access data, the amount of the fifth access data being less than the amount of the second data; Send a third data packet.
6. A data transmission method, characterized in that, Applied to a switch, the method includes: Based on the first control message sent by the first computing node, a second control message is generated. The first control message includes a second credit value. The second credit value is used to instruct the switch to determine the first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch. The second control message includes the first amount of access data that the switch allows the first computing node to send. Send the second control message; In response to a second data packet sent by the first computing node, the forwarding capability of the switch is updated. The second data packet includes first access data and a first credit value. The amount of the first access data is less than or equal to the amount of the first data. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch.
7. The method according to claim 6, characterized in that, The step of updating the forwarding capability of the switch in response to the second data packet includes: If the amount of data in the third access data is greater than the amount of data in the first access data, the amount of data in the second access data and the forwarding capacity of the switch are used to determine the amount of data in the second access data that the first computing node is allowed to send. Based on the second data volume, update the forwarding capability of the switch.
8. The method according to claim 7, characterized in that, The method further includes: If the amount of data in the third access data is less than or equal to the amount of data in the first access data, the forwarding capacity of the switch is updated based on the amount of data in the first access data.
9. The method according to claim 6, characterized in that, The process of generating a second control message based on the first control message includes: Based on the third access data and the forwarding capability of the switch, a first amount of data that the first computing node is allowed to send is determined.
10. The method according to claim 9, characterized in that, The step of determining the first data volume that the first computing node is allowed to send based on the third access data and the forwarding capability of the switch includes: If the forwarding capacity of the switch is greater than the threshold, the first data volume is determined based on the data volume of the third access data.
11. The method according to claim 10, characterized in that, The method further includes: If the forwarding capacity of the switch is less than or equal to the threshold, the allocated forwarding capacity is reclaimed from other data streams to update the forwarding capacity of the switch. The first data volume is determined based on the updated forwarding capacity of the switch and the data volume of the third access data.
12. A data transmission system, characterized in that, include: First computing node and switch The first computing node is configured to send a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine a first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch; The switch is configured to generate a second control message based on the first control message, the second control message including a first amount of data that the switch allows the first computing node to send access data; The switch is also used to send the second control message; The first computing node is further configured to generate a second data packet based on the first data packet. The second data packet includes first access data and a first credit value. The amount of the first access data is less than or equal to the first data amount. The first access data is all or part of the data of the third access data. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch. The first computing node is also used to send the second data packet; The switch is also configured to update its forwarding capabilities in response to a second data packet sent by the first computing node.
13. A data transmission device, characterized in that, Applied to a first computing node, the device includes: The receiving module is used to receive a first data packet sent by the second computing node, the first data packet including a first amount of data that the switch allows the first computing node to send access data; A first generation module is configured to generate a second data packet based on the first data packet. The second data packet includes first access data and a first credit value. The amount of the first access data is less than or equal to the amount of the first data. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch. The first sending module is used to send the second data packet.
14. The apparatus according to claim 13, characterized in that, The first generation module is specifically used for: Retrieve the third access data to be sent; Based on the data volume of the third access data and the data volume of the first data, the first credit value and the first access data are obtained, wherein the first access data is all or part of the data of the third access data.
15. The apparatus according to claim 14, characterized in that, The first generation module is specifically used for: If the amount of the third access data is greater than the amount of the first data, the first credit value is of the first type. The first type is used to request the amount of data to transmit the second access data from the switch. The second access data is a portion of the third access data. If the amount of data in the third access data is less than or equal to the amount of data in the first access data, the second credit value is of the second type, which is used to return the amount of data used to transmit the first access data to the switch.
16. The apparatus according to claim 14, characterized in that, The device further includes: The second sending module is used to send a first control message, the first control message including a second credit value, the second credit value being used to instruct the switch to determine the amount of the first data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch.
17. The apparatus according to claim 13, characterized in that, The device further includes: The second generation module is used to generate a third data packet, the third data packet including fifth access data, the data volume of the fifth access data being less than the data volume of the second data packet; The third sending module is used to send the third data message.
18. A data transmission device, characterized in that, Applied to a switch, the device includes: A generation module is used to generate a second control message based on a first control message sent by a first computing node. The first control message includes a second credit value, which is used to instruct the switch to determine a first amount of data that the first computing node is allowed to send based on the third access data to be sent by the first computing node and the forwarding capability of the switch. The second control message includes the first amount of access data that the switch allows the first computing node to send. The sending module is used to send the second control message; An update module is used to update the forwarding capability of the switch in response to a second data packet sent by the first computing node. The second data packet includes first access data and a first credit value. The amount of the first access data is less than or equal to the amount of the first data. The first credit value is used to instruct the switch to determine the amount of second data that the first computing node is allowed to send based on the second access data to be sent by the first computing node and the forwarding capability of the switch.
19. The apparatus according to claim 18, characterized in that, The update module is specifically used for: If the amount of data in the third access data is greater than the amount of data in the first access data, the amount of data in the second access data and the forwarding capacity of the switch are used to determine the amount of data in the second access data that the first computing node is allowed to send. Based on the second data volume, update the forwarding capability of the switch.
20. The apparatus according to claim 19, characterized in that, The update module is specifically used for: If the amount of data in the third access data is less than or equal to the amount of data in the first access data, the forwarding capacity of the switch is updated based on the amount of data in the first access data.
21. The apparatus according to claim 18, characterized in that, The generation module is specifically used for: Based on the third access data and the forwarding capability of the switch, a first amount of data that the first computing node is allowed to send is determined.
22. The apparatus according to claim 21, characterized in that, The generation module is specifically used for: If the forwarding capacity of the switch is greater than the threshold, the first data volume is determined based on the data volume of the third access data.
23. The apparatus according to claim 22, characterized in that, The generation module is specifically used for: If the forwarding capacity of the switch is less than or equal to the threshold, the allocated forwarding capacity is reclaimed from other data streams to update the forwarding capacity of the switch. The first data volume is determined based on the updated forwarding capacity of the switch and the data volume of the third access data.
24. 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 11.
25. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as described in any one of claims 1 to 11.
26. A computer-readable storage medium, characterized in that, Includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 11.