Data transmission method and apparatus, and device and non-volatile readable storage medium
By determining the IO transmission threshold and merging sending data and completion information, the problem of high data transmission delay in RDMA operations in the existing technology is solved, and more efficient data transmission is achieved.
Patent Information
- Application Number
- PCT/CN2023/139599
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-14
- Filing Date
- 2023-12-18
- Publication Date
- 2024-09-19
AI Technical Summary
The existing TCP/IP architecture causes high data transmission delays and low transmission efficiency in high-performance computing, big data analysis, and high-concurrency IO applications. Especially during RDMA operations, the CPU needs to check the hardware transmission twice. Resulting in increased latency and CPU overhead.
By determining the IO transmission threshold, sending IO data and completion information together, and sending the combined data to the peer node based on RDMA operations, the number of RDMA operations is reduced and CPU participation is reduced.
The data transmission delay is reduced, the data transmission efficiency is improved, the CPU participation is reduced, and the transmission rate is increased.
Smart Images

Figure CN2023139599_19092024_PF_FP_ABST
Abstract
Description
Data transmission method, device, equipment and non-volatile readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 14, 2023, with application number 202310240318.6 and application name “A Data Transmission Method, Device, Equipment and Medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the technical field of data transmission, and in particular to a data transmission method, apparatus, device and non-volatile readable storage medium. Background Art
[0004] With the development of technologies such as the internet, cloud computing, the Internet of Things, and mobile internet, data is growing explosively, posing new challenges to traditional data transmission networks. For high-performance computing, big data analytics, and surge-type I / O (input / output) applications requiring high concurrency and low latency, the existing TCP / IP (Transmission Control Protocol / Internet Protocol) hardware and software architecture and its high CPU (central processing unit) consumption simply cannot meet the demands of these applications. Remote Direct Memory Access (RDMA) utilizes kernel-passing messaging to transfer data directly from the memory of one computer to another, eliminating the need for intervention from either operating system. This approach offers low latency, low CPU overhead, and high bandwidth. To achieve compatibility with existing Ethernet networks, RDMA has evolved into RDMA over Converged Ethernet (ROCE), which has significantly advanced RDMA technology.
[0005] Given the characteristics of RDMA read / write and send / receive operations, send / receive operations are often used to transmit commands and status information, while read / write operations are used to perform DMA (direct memory access) operations on data. Generally, when data is transferred, data and status are separated into two RDMA operations. The CPU needs to check the hardware transmission status twice, resulting in high latency and low transmission efficiency.
[0006] Summary of the Invention
[0007] In view of this, the purpose of this application is to provide a data transmission method, apparatus, device and non-volatile readable storage medium, which can reduce the delay of data transmission and improve the efficiency of data transmission. The specific scheme is as follows:
[0008] In a first aspect, the present application discloses a data transmission method, comprising:
[0009] Determine the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation quantity threshold;
[0010] Determine whether the IO operation meets the preset merge sending conditions based on the IO transmission threshold;
[0011] If the IO operation meets the preset merge sending condition, the data and completion information of the IO operation are merged to obtain merged data, and the merged data is sent to the peer node based on the RDMA operation.
[0012] Optionally, determine the I / O transfer threshold, including:
[0013] Determine its own combined sending capability based on its own device information; the combined sending capability includes the IO data size and the number of IO operations that can be supported for combined sending;
[0014] The IO transmission threshold is determined based on the combined sending capability of the node itself and the combined sending capability of the peer node.
[0015] Optionally, the device determines its own combined sending capabilities based on its own device information, including:
[0016] Obtain its own CPU information and memory information, and determine the number of IO operations that can be supported for combined sending based on the CPU information and memory information;
[0017] Obtain its own network card information, and determine the supported IO data size for combined sending based on the network card information.
[0018] Optionally, determine the I / O transfer threshold, including:
[0019] When establishing a ROCE connection with a peer node, negotiate with the peer node to determine the IO transmission threshold.
[0020] Optionally, when establishing a ROCE connection with a peer node, negotiate with the peer node to determine an IO transmission threshold, including:
[0021] When establishing a ROCE connection with the peer node, the peer node interacts with the peer node to combine the sending capabilities and negotiates to determine the IO transmission threshold.
[0022] Optionally, the IO transmission threshold is determined based on the combined sending capability of the own node and the combined sending capability of the peer node, including:
[0023] Determine the smaller IO data size of the IO data size for combined transmission supported by the combined transmission capability of the node itself and the combined transmission capability of the peer node as the IO data size threshold for combined transmission during IO transmission;
[0024] The smaller number of IO operations for combined sending supported by the combined sending capability of the node itself and the combined sending capability of the opposite node is determined as the threshold number of IO operations for combined sending during IO transmission.
[0025] Optionally, the preset merge sending condition includes a first preset condition and a second preset condition. Accordingly, judging whether the IO operation meets the preset merge sending condition based on the IO transmission threshold includes:
[0026] Obtaining length information of data of the IO operation, and determining whether the IO operation meets a first preset condition based on the length information and an IO data size threshold;
[0027] Determining whether the IO operation meets a second preset condition based on an IO operation quantity threshold;
[0028] If the IO operation satisfies the first preset condition and the second preset condition, it is determined that the IO operation satisfies the preset combined sending condition.
[0029] Optionally, determining whether the IO operation meets the first preset condition based on the length information and the IO data size threshold includes:
[0030] Calculate the sum of the length of the data and completion information of the IO operation based on the length information;
[0031] It is determined whether the sum of the lengths is less than or equal to an IO data size threshold; if so, it is determined that the IO operation meets a first preset condition; otherwise, it is determined that the IO operation does not meet the first preset condition.
[0032] Optionally, determining whether the IO operation meets the second preset condition based on the IO operation quantity threshold includes:
[0033] Determine whether there are currently IO resources available for combined sending based on the IO operation quantity threshold;
[0034] If there are currently IO resources available for combined sending, it is determined that the IO operation meets the second preset condition; otherwise, it is determined that the IO operation does not meet the second preset condition.
[0035] Optionally, judging whether there are currently available IO resources for combined sending based on an IO operation quantity threshold includes:
[0036] Determine whether the number of IO operations of the currently allocated IO resources has reached the IO operation threshold;
[0037] If the IO operation quantity threshold is reached, it is determined that there are currently no IO resources available for combined sending; if the IO operation quantity threshold is not reached, it is determined that there are currently IO resources available for combined sending.
[0038] Optionally, the merged data is sent to the peer node based on an RDMA operation, including:
[0039] The merged data and the identification information are sent to the opposite node based on the RDMA operation, so that the opposite node parses the merged data based on the identification information.
[0040] Optionally, also include:
[0041] Get the part number of your own equipment;
[0042] Generate an authentication private key based on the device part number.
[0043] Optionally, also include:
[0044] Send the authentication private key to the peer device so that the peer device can perform identity authentication based on the authentication private key.
[0045] Optionally, also include:
[0046] Get its own CPU information and memory information;
[0047] The number of queues for multi-queue transmission is determined based on CPU and memory information.
[0048] Optionally, after determining the combined sending capability of the device based on the device information, the following steps are further included:
[0049] Determine memory requirements based on the number of IO operations that can be combined and sent;
[0050] Request memory from the operating system based on memory demand.
[0051] Optionally, also include:
[0052] When the node starts, the RDMA-related software environment is deployed.
[0053] Optionally, also include:
[0054] If the IO does not meet the preset combined sending conditions, the IO operation data and completion information will be sent in sequence.
[0055] In a second aspect, the present application discloses a data transmission device, comprising:
[0056] The threshold determination module is configured to determine an IO transmission threshold; the IO transmission threshold includes an IO data size threshold for combined transmission during IO transmission and an IO operation quantity threshold;
[0057] A condition judgment module is configured to judge whether the IO operation meets the preset merge sending condition based on the IO transmission threshold;
[0058] a data merging module configured to merge the data of the IO operation and the completion information to obtain merged data if the condition judgment module determines that the IO operation meets the preset merge and send condition;
[0059] The data sending module is configured to send the merged data to the opposite node based on the RDMA operation.
[0060] In a third aspect, the present application discloses an electronic device, including a memory and a processor, wherein:
[0061] a memory configured to store a computer program;
[0062] The processor is configured to execute a computer program to implement the aforementioned data transmission method.
[0063] In a fourth aspect, the present application discloses a computer non-volatile readable storage medium configured to store a computer program, wherein the computer program implements the aforementioned data transmission method when executed by a processor.
[0064] It can be seen that the present application first determines the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation number threshold, and judges whether the IO operation meets the preset combined transmission condition based on the IO transmission threshold. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged to obtain the merged data, and the merged data is sent to the peer node based on the RDMA operation. That is, the present application first determines the IO transmission threshold, and judges whether the IO operation meets the preset combined transmission condition based on the IO transmission threshold. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged and sent. In this way, the number of RDMA operations is reduced, the CPU participation is reduced, the data transmission delay can be reduced, and the efficiency of data transmission can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0066] FIG1 is a flow chart of a data transmission method provided in an embodiment of the present application;
[0067] FIG2 is a schematic diagram of an optional data transmission comparison provided in an embodiment of the present application;
[0068] FIG3 is a schematic diagram of an optional ROCE network card-based data transmission system provided in an embodiment of the present application;
[0069] FIG4 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;
[0070] FIG5 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0072] Given the characteristics of RDMA read / write and send / recive operations, send / recive operations are often used to send command and status, while read / write operations are used to perform data DMA operations. Generally, when data is transmitted, data and status are separated into two RDMA operations, and the CPU needs to check the hardware transmission status twice, resulting in high latency and low transmission efficiency. Therefore, this application provides a data transmission solution that can reduce data transmission latency and improve data transmission efficiency.
[0073] As shown in FIG1 , an embodiment of the present application discloses a data transmission method, including:
[0074] Step S11: determining an IO transmission threshold; the IO transmission threshold includes an IO data size threshold for combined transmission during IO transmission and an IO operation quantity threshold.
[0075] It can be understood that the IO transmission process is the IO operation process.
[0076] In an optional embodiment, the device's own combined transmission capability can be determined based on its own device information. The combined transmission capability includes the supported IO data size and number of IO operations for combined transmission. The IO transmission threshold is determined based on the device's own combined transmission capability and the combined transmission capability of the peer node. The IO data size refers to the data size of the IO operation, which refers to the data length. The IO operation can be a read operation or a write operation.
[0077] The system can obtain its own CPU and memory information and determine the number of IO operations it can support for combined transmission based on the CPU and memory information. It can also obtain its own network card information and determine the supported IO data size for combined transmission based on the network card information. The network card information can be the network card model, and different models correspond to different supported IO data sizes for combined transmission. The network card is a ROCE network card.
[0078] Furthermore, in an embodiment of the present application, when establishing a ROCE connection with a peer node, the IO transmission threshold is determined through negotiation with the peer node. Optionally, when establishing a ROCE connection with a peer node, the sending capabilities are combined and negotiated with the peer node to determine the IO transmission threshold.
[0079] In an optional embodiment, the smaller IO data size of the IO data sizes that can be supported by the combined sending capability of the own combined sending capability and the combined sending capability of the opposite node can be determined as the IO data size threshold for combined sending during IO transmission; the smaller number of IO operations of the number of IO operations that can be supported by the combined sending capability of the own combined sending capability and the combined sending capability of the opposite node can be determined as the IO operation number threshold for combined sending during IO transmission. That is, the IO transmission threshold is determined in combination with the capabilities of both ends. It can be understood that the embodiment of the present application determines the IO transmission threshold in combination with the capabilities of both ends, and can automatically adapt to different platforms.
[0080] In addition, the embodiment of the present application can determine the memory requirement based on the number of IO operations that can be supported for combined sending after determining its own combined sending capability based on its own device information; and request memory from the operating system based on the memory requirement.
[0081] In addition, the embodiment of the present application can obtain its own CPU information and memory information; and determine the number of queues for multi-queue transmission based on the CPU information and memory information.
[0082] In an optional implementation, the memory requirement, ie, the memory pool size, may be determined based on the number of queues for multi-queue transmission, the number of IO operations that can be supported for combined transmission, and the like.
[0083] Step S12: judging whether the IO operation meets the preset merge sending condition based on the IO transmission threshold.
[0084] In an optional embodiment, the preset merge sending condition includes a first preset condition and a second preset condition. Accordingly, the embodiment of the present application can obtain the length information of the data of the IO operation, and judge whether the IO operation meets the first preset condition based on the length information and the IO data size threshold; judge whether the IO operation meets the second preset condition based on the IO operation quantity threshold; if the IO operation meets the first preset condition and the second preset condition, it is determined that the IO operation meets the preset merge sending condition.
[0085] In an optional embodiment, the sum of the lengths of the data and completion information of the IO operation can be calculated based on the length information; and it is determined whether the sum of the lengths is less than or equal to the IO data size threshold. If the sum of the lengths is less than or equal to the IO data size threshold, it is determined that the IO operation meets the first preset condition; otherwise, it is determined that the IO operation does not meet the first preset condition.
[0086] Furthermore, in an optional embodiment, it is possible to determine whether there are currently available IO resources for combined transmission based on an IO operation quantity threshold; if there are currently available IO resources for combined transmission, it is determined that the IO operation meets the second preset condition; otherwise, it is determined that the IO operation does not meet the second preset condition. It is possible to determine whether the number of IO operations to which IO resources are currently allocated reaches an IO operation quantity threshold; if the IO operation quantity threshold is reached, it is determined that there are currently no IO resources available for combined transmission; if the IO operation quantity threshold is not reached, it is determined that there are currently available IO resources for combined transmission. The IO resources may be memory resources.
[0087] Step S13: If the IO operation meets the preset merge sending condition, the data of the IO operation and the completion information are merged to obtain merged data, and the merged data is sent to the opposite node based on the RDMA operation.
[0088] In an optional implementation, embodiments of the present application can send the merged data and identification information to a peer node based on an RDMA operation, so that the peer node can parse the merged data based on the identification information. In other words, the identification information represents the merged transmission. After parsing the identification information, the peer node parses the data and completion information in the same manner as they were merged.
[0089] In addition, the embodiment of the present application can obtain its own device part number, generate an authentication private key based on the device part number, and send the authentication private key to the peer device so that the peer device can perform identity authentication based on the authentication private key.
[0090] In an optional implementation, the RDMA-related software environment, including OFED and Rdma_core, can be deployed when the node starts. OFED (OpenFabrics Enterprise Distribution), an open source software suite for high-performance computing and data centers, is a software stack maintained by OFA (OpenFabric Alliance), an open source organization, to support RDMA technology. Versions are updated as needed. Rdma_core is a user-mode library maintained by the RDMA community to support RDMA and is also updated as needed.
[0091] In addition, if the IO does not meet the preset combined sending conditions, the data and completion information of the IO operation are sent sequentially, that is, two RDMA operations are performed, first sending the data and then sending the completion information.
[0092] For example, see Figure 2, which is an optional data transmission comparison diagram provided by an embodiment of the present application. The left side of Figure 2 is the data transmission process in the prior art, and the right side is the data transmission process of the present application. The initiator sends a command, and the target end replies with ACK (Acknowledge character) after receiving the command. The prior art sends data first and then sends the completion information. This solution can merge the data and the completion information and send them when the merging conditions are met.
[0093] It can be seen that the embodiment of the present application first determines the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation number threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged to obtain the merged data, and the merged data is sent to the peer node based on the RDMA operation. That is, the embodiment of the present application first determines the IO transmission threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged and sent. In this way, the number of RDMA operations is reduced, the CPU participation is reduced, the data transmission delay can be reduced, and the efficiency of data transmission can be improved.
[0094] In an optional embodiment, a data transmission system based on a ROCE network card can be implemented, and the aforementioned data transmission method can be implemented based on the data transmission system. Referring to Figure 3, Figure 3 is a schematic diagram of an optional data transmission system based on a ROCE network card disclosed in an embodiment of the present application. The embodiment of the present application proposes an auto-completion solution, and auto-completion is a technology that merges data and status. Using auto-completion when transmitting small blocks of data has the advantages of low latency and high efficiency. In addition, the performance of auto-completion under different platforms can be utilized to automatically adapt to the platform; when the ROCE connection of the node is established, the auto-completion capability is automatically interacted and negotiated; during data transmission, the IO that meets the auto-completion conditions performs an auto-completion operation, merges the data and status together, and sends it to the other end through RDMA send; after the other end parses the auto-completion tag, it parses the data and status in the data and status merged manner. Reduce CPU participation, reduce transmission delay, and prompt the transmission rate. Below, the workflow of each module is elaborated in detail:
[0095] When the storage system node starts, the RDMA-related environments OFED and Rdma_core are deployed.
[0096] The memory management module requests memory from the OS (Operating System) and is configured to manage the memory of each internal module. It also determines the memory pool size, the number of queues for multi-queue transmission, and the number of auto-completion IO operations based on device information such as the device CPU and memory size.
[0097] The device management module is configured to read the PN (ie, part number), CPU, memory and other information of the device, and obtain the platform auto-completion capability, ie, the combined sending capability of the aforementioned embodiment, based on the device information.
[0098] The IP management module is configured to manage the ROCE network port, identify and create the ROCE port, and configure, manage, and delete the IP information of the ROCE network card; it generates a port private key based on the private key of the device management module for authentication.
[0099] The authentication management module is configured to manage and control connections with other nodes, and to interactively negotiate the auto-completion capabilities of the two nodes, determining the size and quantity limits of auto-completion IO data during IO transmission.
[0100] The IO management module is configured to manage the assembly, unpacking, assembly, sending, and receiving of local IO. When data is transmitted, if the data length meets the requirements and there are IO resources for auto-completion, the data is merged with the status and the status is marked as the auto-completion type.
[0101] Sending management module: according to the requirements of the IO management module, it sends the commands issued by the IO management; according to the data transmission needs of the local end, it receives the IO transmission commands issued by the IO management module and sends the data or commands to the other end.
[0102] The receiving management module is configured to receive commands sent from a remote end and responses corresponding to commands sent locally to the remote end.
[0103] In this way, the platform is automatically identified, and the number and IO data size related to auto-completion are generated. The auto-completion capabilities are exchanged through device management and connection management, and appropriate auto-completion is negotiated. During IO transmission, eligible IO will be auto-completed, reducing CPU utilization, transmission latency, and improving transmission rate.
[0104] As shown in FIG4 , a data transmission device disclosed in an embodiment of the present application includes:
[0105] The threshold determination module 11 is configured to determine an IO transmission threshold; the IO transmission threshold includes an IO data size threshold for combined transmission during IO transmission and an IO operation quantity threshold;
[0106] A condition judgment module 12 is configured to judge whether the IO operation meets a preset merge sending condition based on the IO transmission threshold;
[0107] The data merging module 13 is configured to merge the data of the IO operation and the completion information to obtain merged data if the condition judgment module determines that the IO operation meets the preset merge and send conditions;
[0108] The data sending module 14 is configured to send the combined data to the opposite node based on the RDMA operation.
[0109] It can be seen that the embodiment of the present application first determines the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation number threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged to obtain the merged data, and the merged data is sent to the peer node based on the RDMA operation. That is, the embodiment of the present application first determines the IO transmission threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged and sent. In this way, the number of RDMA operations is reduced, the CPU participation is reduced, the data transmission delay can be reduced, and the efficiency of data transmission can be improved.
[0110] The threshold determination module 11 includes:
[0111] The combined transmission capability determination submodule is configured to determine its own combined transmission capability based on its own device information; the combined transmission capability includes the IO data size and the number of IO operations that can be supported for combined transmission;
[0112] The IO transmission threshold determination submodule is configured to determine the IO transmission threshold based on its own combined transmission capability and the combined transmission capability of the opposite node.
[0113] In addition, the combined sending capability determination submodule includes:
[0114] an IO operation quantity determination unit, configured to obtain its own CPU information and memory information, and determine the number of IO operations that can be supported for combined transmission based on the CPU information and the memory information;
[0115] The IO data size determining unit is configured to obtain its own network card information and determine the supported IO data size for combined transmission based on the network card information.
[0116] Optionally, the threshold determination module 11 is configured to negotiate with the peer node to determine the IO transmission threshold when establishing a ROCE connection with the peer node. Optionally, when establishing a ROCE connection with the peer node, the module interacts with the peer node to combine the sending capabilities and negotiates to determine the IO transmission threshold.
[0117] Optionally, the IO transmission threshold determination submodule is configured to determine the smaller IO data size of the IO data sizes for combined transmission that can be supported by its own combined transmission capability and the combined transmission capability of the opposite node as the IO data size threshold for combined transmission during IO transmission; and determine the smaller IO operation number of the IO operations for combined transmission that can be supported by its own combined transmission capability and the combined transmission capability of the opposite node as the IO operation number threshold for combined transmission during IO transmission.
[0118] The preset merged sending condition includes a first preset condition and a second preset condition. Accordingly, judging whether the IO operation meets the preset merged sending condition based on the IO transmission threshold includes:
[0119] The condition judgment module 12 includes:
[0120] A first judgment submodule is configured to obtain length information of data of an IO operation, and judge whether the IO operation meets a first preset condition based on the length information and an IO data size threshold;
[0121] A second judgment submodule is configured to judge whether the IO operation meets a second preset condition based on the IO operation quantity threshold;
[0122] The third judgment submodule is configured to determine that the IO operation meets the preset combined sending condition if the first judgment submodule determines that the IO operation meets the first preset condition and the second judgment submodule determines that the IO operation meets the second preset condition.
[0123] In an optional embodiment, the first judgment submodule is configured to calculate the sum of the lengths of the data and completion information of the IO operation based on the length information; and determine whether the sum of the lengths is less than or equal to the IO data size threshold. If the sum of the lengths is less than or equal to the IO data size threshold, it is determined that the IO operation meets the first preset condition; otherwise, it is determined that the IO operation does not meet the first preset condition.
[0124] Optionally, the second judgment submodule is configured to determine whether there are currently available IO resources for combined transmission based on an IO operation quantity threshold; if there are currently available IO resources for combined transmission, the IO operation is determined to satisfy the second preset condition; otherwise, the IO operation is determined to not satisfy the second preset condition. Optionally, it is determined whether the number of IO operations to which IO resources are currently allocated reaches an IO operation quantity threshold; if so, it is determined that there are currently no IO resources available for combined transmission; if not, it is determined that there are currently available IO resources for combined transmission.
[0125] Furthermore, the data sending module 14 is configured to send the merged data and identification information to the opposite node based on the RDMA operation, so that the opposite node parses the merged data based on the identification information.
[0126] Optionally, the device further comprises:
[0127] A device part number acquisition module is configured to acquire its own device part number;
[0128] The authentication private key generation module is configured to generate an authentication private key based on the device part number.
[0129] The authentication private key sending module sends the authentication private key to the peer device so that the peer device can perform identity authentication based on the authentication private key.
[0130] Optionally, the device also includes: a queue number determination module for multi-queue transmission, configured to obtain its own CPU information and memory information; and determine the queue number for multi-queue transmission based on the CPU information and memory information.
[0131] In addition, the device also includes a memory application module, which is configured to determine memory requirements based on the number of IO operations that can be supported for combined transmission; and apply for memory from the operating system based on the memory requirements.
[0132] In addition, the device also includes a software environment deployment module, which is configured to deploy RDMA-related software environment when the node is started.
[0133] In addition, the data sending module 14 is further configured to send the data and completion information of the IO operation in sequence if the condition judgment module 12 determines that the IO does not meet the preset combined sending condition.
[0134] As shown in FIG5 , an embodiment of the present application discloses an electronic device 20, including a processor 21 and a memory 22 ; wherein the memory 22 is configured to store a computer program; and the processor 21 is configured to execute the computer program to implement the following steps:
[0135] Determine the IO transmission threshold; the IO transmission threshold includes the IO data size threshold and the IO operation number threshold for merged transmission during IO transmission; based on the IO transmission threshold, determine whether the IO operation meets the preset merge transmission conditions; if the IO operation meets the preset merge transmission conditions, merge the IO operation data and completion information to obtain merged data, and send the merged data to the peer node based on the RDMA operation.
[0136] It can be seen that the embodiment of the present application first determines the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation number threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged to obtain the merged data, and the merged data is sent to the peer node based on the RDMA operation. That is, the embodiment of the present application first determines the IO transmission threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged and sent. In this way, the number of RDMA operations is reduced, the CPU participation is reduced, the data transmission delay can be reduced, and the efficiency of data transmission can be improved.
[0137] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: determining its own combined sending capability based on its own device information; the combined sending capability includes the IO data size and the number of IO operations that can be supported for combined sending; determining the IO transmission threshold based on its own combined sending capability and the combined sending capability of the opposite node.
[0138] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: obtaining its own CPU information and memory information, and determining the number of IO operations that can be supported for combined sending based on the CPU information and memory information; obtaining its own network card information, and determining the size of IO data that can be supported for combined sending based on the network card information.
[0139] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: when establishing a ROCE connection with the opposite node, negotiate with the opposite node to determine an IO transmission threshold.
[0140] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: when establishing a ROCE connection with the peer node, interacting with the peer node to combine sending capabilities, and negotiating to determine an IO transmission threshold.
[0141] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: the smaller IO data size of the IO data sizes that can be supported by its own combined sending capability and the combined sending capability of the opposite node is determined as the IO data size threshold for combined sending during IO transmission; the smaller IO operation number of the IO operations that can be supported by its own combined sending capability and the combined sending capability of the opposite node is determined as the IO operation number threshold for combined sending during IO transmission.
[0142] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: obtaining the length information of the data of the IO operation, and judging whether the IO meets the first preset condition based on the length information and the IO data size threshold; judging whether the IO meets the second preset condition based on the IO operation quantity threshold; if the IO operation meets the first preset condition and the second preset condition, then determining that the IO operation meets the preset combined sending condition.
[0143] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: calculating the sum of the lengths of the data and completion information of the IO operation based on the length information; judging whether the sum of the lengths is less than or equal to the IO data size threshold; if the sum of the lengths is less than or equal to the IO data size threshold, determining that the IO operation meets the first preset condition; otherwise, determining that the IO operation does not meet the first preset condition.
[0144] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: based on the IO operation quantity threshold, it is determined whether there are IO resources currently available for combined sending; if there are IO resources currently available for combined sending, it is determined that the IO operation meets the second preset condition; otherwise, it is determined that the IO operation does not meet the second preset condition.
[0145] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: determining whether the number of IO operations of the currently allocated IO resources reaches the IO operation number threshold; if the IO operation number threshold is reached, determining that there are currently no IO resources available for combined sending; if the IO operation number threshold is not reached, determining that there are currently IO resources available for combined sending.
[0146] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: sending the merged data and identification information to the peer node based on the RDMA operation, so that the peer node parses the merged data based on the identification information.
[0147] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps can be implemented: obtaining its own device part number; and generating an authentication private key based on the device part number.
[0148] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: sending the authentication private key to the peer device so that the peer device performs identity authentication based on the authentication private key.
[0149] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: obtaining its own CPU information and memory information; and determining the number of queues for multi-queue transmission based on the CPU information and memory information.
[0150] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: determining the memory requirement based on the number of IO operations that can be supported for combined transmission; and requesting memory from the operating system based on the memory requirement.
[0151] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: when the node is started, the RDMA-related software environment is deployed.
[0152] In this embodiment, when the processor 21 executes the computer subroutine stored in the memory 22, the following steps may be implemented: if the IO does not meet the preset combined sending conditions, the data and completion information of the IO operation are sent in sequence.
[0153] Furthermore, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the storage method may be temporary storage or permanent storage.
[0154] In addition, the electronic device 20 also includes a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; wherein the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input / output interface 25 is configured to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0155] Optionally, an embodiment of the present application discloses a computer non-volatile readable storage medium configured to store a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:
[0156] Determine the IO transmission threshold; the IO transmission threshold includes the IO data size threshold and the IO operation number threshold for merged transmission during IO transmission; based on the IO transmission threshold, determine whether the IO operation meets the preset merge transmission conditions; if the IO operation meets the preset merge transmission conditions, merge the IO operation data and completion information to obtain merged data, and send the merged data to the peer node based on the RDMA operation.
[0157] It can be seen that the embodiment of the present application first determines the IO transmission threshold; the IO transmission threshold includes the IO data size threshold for combined transmission during IO transmission and the IO operation number threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged to obtain the merged data, and the merged data is sent to the peer node based on the RDMA operation. That is, the embodiment of the present application first determines the IO transmission threshold, and based on the IO transmission threshold, it is determined whether the IO operation meets the preset combined transmission condition. If the IO operation meets the preset combined transmission condition, the data and completion information of the IO operation are merged and sent. In this way, the number of RDMA operations is reduced, the CPU participation is reduced, the data transmission delay can be reduced, and the efficiency of data transmission can be improved.
[0158] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: determining its own combined sending capability based on its own device information; the combined sending capability includes the IO data size and the number of IO operations that can be supported for combined sending; determining the IO transmission threshold based on its own combined sending capability and the combined sending capability of the opposite node.
[0159] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: obtaining its own CPU information and memory information, and determining the number of IO operations that can be supported for combined sending based on the CPU information and memory information; obtaining its own network card information, and determining the size of IO data that can be supported for combined sending based on the network card information.
[0160] In this embodiment, when the computer subprogram stored in the non-volatile computer readable storage medium is executed by the processor, the following steps may be implemented: when establishing a ROCE connection with the opposite node, negotiate with the opposite node to determine an IO transmission threshold.
[0161] In this embodiment, when the computer subroutine stored in the non-volatile computer-readable storage medium is executed by the processor, the following steps may be implemented: when establishing a ROCE connection with the peer node, interacting with the peer node to combine sending capabilities, and negotiating to determine an IO transmission threshold.
[0162] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: the smaller IO data size of the IO data size for combined transmission that can be supported by its own combined transmission capability and the combined transmission capability of the opposite node is determined as the IO data size threshold for combined transmission during IO transmission; the smaller IO operation number of the IO operation number for combined transmission that can be supported by its own combined transmission capability and the combined transmission capability of the opposite node is determined as the IO operation number threshold for combined transmission during IO transmission.
[0163] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: obtaining the length information of the data of the IO operation, and judging whether the IO meets the first preset condition based on the length information and the IO data size threshold; judging whether the IO meets the second preset condition based on the IO operation quantity threshold; if the IO operation meets the first preset condition and the second preset condition, then judging that the IO operation meets the preset combined sending condition.
[0164] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: calculating the sum of the lengths of the data and completion information of the IO operation based on the length information; determining whether the sum of the lengths is less than or equal to the IO data size threshold; if the sum of the lengths is less than or equal to the IO data size threshold, determining that the IO operation meets the first preset condition; otherwise, determining that the IO operation does not meet the first preset condition.
[0165] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: based on the IO operation quantity threshold, it is determined whether there are IO resources currently available for combined transmission; if there are IO resources currently available for combined transmission, it is determined that the IO operation meets the second preset condition; otherwise, it is determined that the IO operation does not meet the second preset condition.
[0166] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: determining whether the number of IO operations of the currently allocated IO resources reaches the IO operation number threshold; if the IO operation number threshold is reached, determining that there are currently no IO resources available for combined sending; if the IO operation number threshold is not reached, determining that there are currently IO resources available for combined sending.
[0167] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: sending the merged data and identification information to the peer node based on the RDMA operation, so that the peer node parses the merged data based on the identification information.
[0168] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: obtaining the device part number of the device itself; and generating an authentication private key based on the device part number.
[0169] In this embodiment, when the computer subroutine stored in the non-volatile computer readable storage medium is executed by the processor, the following steps can be implemented: sending the authentication private key to the peer device so that the peer device performs identity authentication based on the authentication private key.
[0170] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: obtaining its own CPU information and memory information; and determining the number of queues for multi-queue transmission based on the CPU information and memory information.
[0171] In this embodiment, when the computer subroutine stored in the computer non-volatile readable storage medium is executed by the processor, the following steps can be implemented: determining the memory requirement based on the number of IO operations that can be supported for combined transmission; and requesting memory from the operating system based on the memory requirement.
[0172] In this embodiment, when the computer subroutine stored in the non-volatile computer readable storage medium is executed by the processor, the following steps may be implemented: when the node is started, the RDMA-related software environment is deployed.
[0173] In this embodiment, when the computer subroutine stored in the non-volatile computer readable storage medium is executed by the processor, the following steps can be implemented: if the IO does not meet the preset combined sending conditions, the data and completion information of the IO operation are sent in sequence.
[0174] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0175] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM (Compact Disc Read-Only Memory), or any other form of non-volatile readable storage medium known in the art.
[0176] The above is a detailed introduction to a data transmission method, device, equipment and non-volatile readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data transmission method, characterized in that: include: Determine an input / output IO transmission threshold; the IO transmission threshold includes an IO data size threshold for combined transmission during IO transmission and an IO operation quantity threshold; Determine whether the IO operation meets the preset merge sending condition based on the IO transmission threshold; If the IO operation meets the preset merge sending condition, the data and completion information of the IO operation are merged to obtain merged data, and the merged data is sent to the opposite node based on a remote direct data access RDMA operation.
2. The data transmission method according to claim 1, characterized in that: Determining the IO transmission threshold includes: Determine its own combined sending capability based on its own device information; the combined sending capability includes the IO data size and the number of IO operations that can be supported for combined sending; The IO transmission threshold is determined based on the combined transmission capability of the node itself and the combined transmission capability of the opposite node.
3. The data transmission method according to claim 2, characterized in that: The determining of its own combined sending capability based on its own device information includes: Obtaining the CPU information and memory information of the central processing unit (CPU) thereof, and determining the number of IO operations that can be supported for combined transmission based on the CPU information and the memory information; The network card information of the network card itself is obtained, and the supported IO data size for combined transmission is determined based on the network card information.
4. The data transmission method according to claim 2, characterized in that: Determining the IO transmission threshold includes: When establishing a remote direct data access (ROCE) connection on the converged Ethernet network with the peer node, the IO transmission threshold is determined through negotiation with the peer node.
5. The data transmission method according to claim 4, characterized in that: When establishing the ROCE connection with the opposite node, negotiating with the opposite node to determine the IO transmission threshold includes: When establishing a ROCE connection with the opposite node, the sending capability is combined with the opposite node through interaction, and negotiation is performed to determine the IO transmission threshold.
6. The data transmission method according to claim 2, characterized in that: The determining the IO transmission threshold based on the combined transmission capability of the node itself and the combined transmission capability of the opposite node includes: Determine the smaller IO data size of the IO data size for combined transmission that can be supported by the combined transmission capability of the node itself and the combined transmission capability of the opposite node as the IO data size threshold for combined transmission during IO transmission; The smaller number of IO operations for combined transmission that can be supported by the combined transmission capability of the node itself and the combined transmission capability of the opposite node is determined as a threshold number of IO operations for combined transmission during IO transmission.
7. The data transmission method according to claim 1, characterized in that: The preset combined sending condition includes a first preset condition and a second preset condition. Accordingly, judging whether the IO operation meets the preset combined sending condition based on the IO transmission threshold includes: Acquire length information of data of the IO operation, and determine whether the IO operation meets the first preset condition based on the length information and the IO data size threshold; Determining whether the IO operation meets the second preset condition based on the IO operation quantity threshold; If the IO operation satisfies the first preset condition and the second preset condition, it is determined that the IO operation satisfies a preset combined sending condition.
8. The data transmission method according to claim 7, characterized in that: The determining whether the IO operation satisfies the first preset condition based on the length information and the IO data size threshold includes: Calculate the sum of the length of the data and the completion information of the IO operation based on the length information; It is determined whether the sum of the lengths is less than or equal to the IO data size threshold; if the sum of the lengths is less than or equal to the IO data size threshold, it is determined that the IO operation satisfies the first preset condition; otherwise, it is determined that the IO operation does not satisfy the first preset condition.
9. The data transmission method according to claim 7, characterized in that: The determining whether the IO operation satisfies the second preset condition based on the IO operation quantity threshold includes: Determine whether there are currently IO resources available for combined sending based on the IO operation quantity threshold; If there are currently IO resources available for combined sending, it is determined that the IO operation meets the second preset condition; otherwise, it is determined that the IO operation does not meet the second preset condition.
10. The data transmission method according to claim 9, characterized in that: The determining whether there are currently IO resources available for combined sending based on the IO operation quantity threshold includes: Determine whether the number of IO operations of the currently allocated IO resources reaches the IO operation number threshold; If the IO operation quantity threshold is reached, it is determined that there are currently no IO resources available for combined transmission; if the IO operation quantity threshold is not reached, it is determined that there are currently IO resources available for combined transmission.
11. The data transmission method according to claim 1, characterized in that: The sending the combined data to the opposite node based on the RDMA operation includes: The combined data and identification information are sent to the opposite node based on the RDMA operation, so that the opposite node parses the combined data based on the identification information.
12. The data transmission method according to claim 1, characterized in that: Also includes: Get the part number of your own equipment; An authentication private key is generated based on the device part number.
13. The data transmission method according to claim 12, characterized in that: Also includes: The authentication private key is sent to a peer device so that the peer device performs identity authentication based on the authentication private key.
14. The data transmission method according to claim 1, characterized in that: Also includes: Get its own CPU information and memory information; The number of queues for multi-queue transmission is determined based on CPU information and memory information.
15. The data transmission method according to claim 2, characterized in that: After determining the combined transmission capability of the device based on the device information, the method further includes: Determine memory requirements based on the number of IO operations that can be merged and sent; Request memory from the operating system based on the memory requirements.
16. The data transmission method according to claim 1, characterized in that: Also includes: When the node starts, the RDMA-related software environment is deployed.
17. The data transmission method according to any one of claims 1 to 16, characterized in that: Also includes: If the IO does not meet the preset combined sending condition, the data and completion information of the IO operation are sent in sequence.
18. A data transmission device, characterized in that: include: A threshold determination module is configured to determine an IO transmission threshold; the IO transmission threshold includes an IO data size threshold for combined transmission during IO transmission and an IO operation quantity threshold; A condition judgment module is configured to judge whether the IO operation meets a preset merge sending condition based on the IO transmission threshold; a data merging module, configured to merge the data and completion information of the IO operation to obtain merged data if the condition judgment module determines that the IO operation meets the preset merged sending condition; The data sending module is configured to send the combined data to the opposite node based on the RDMA operation.
19. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is configured to store a computer program; The processor is configured to execute the computer program to implement the data transmission method according to any one of claims 1 to 17.
20. A computer non-volatile readable storage medium, characterized in that: The device is configured to store a computer program, wherein when the computer program is executed by a processor, the data transmission method according to any one of claims 1 to 17 is implemented.
Citation Information
Patent Citations
Memory data reading and writing processing method and device
CN104424105A
Data stream transmission method, sending device and receiving device
CN107623646A
Data transmission method, device, equipment and medium
CN115639954A
Data transmission method, device, equipment and medium
CN115955437A
Adaptive coalescing of remote direct memory access acknowledgements based on I / O characteristics
US20170168986A1
