Data processing method, device, equipment, system and readable storage medium
By mixing RDMA and RPC type key-value operation requests in the key-value storage system, adjusting the request ratio according to the throughput of the storage node, and using the computing power on the data path to perform key-value operations, it solves the problem of key-value operations in the existing technology. To solve the problem of poor performance, higher storage node processor task offloading performance is achieved.
Patent Information
- Application Number
- CN202310180250.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
AI Technical Summary
The existing key-value storage system has poor overall performance because key-value operations occupy a lot of network resources and computing resources outside the data path.
By mixing RDMA and RPC type key-value operation requests between computing nodes and storage nodes, adjusting the request ratio according to the throughput of the storage node, using the computing power on the data path to execute RDMA type key-value operation requests, reducing the need to pass through PCIe Data interaction with the host reduces the computing burden on the SoC and improves the processor task offloading performance of the storage node.
It improves the key-value operation throughput of the SoC and the task offloading performance of the storage node processor, avoids the computing power bottleneck of the SoC, and enhances the overall performance.
Smart Images

Figure CN118535518A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data transmission, and in particular to a data processing method, device, equipment, system and readable storage medium. Background Art
[0002] The in-memory key-value store system is a basic system component of the data center, which can efficiently serve user data requests or be used as a cache layer for other storage systems. Specifically, the key-value store provides users with key-value operations such as read, delete, insert, and modify.
[0003] In order to reduce the load of key-value operations on the processor of the storage node, the current key-value storage system usually uses the computing power of the network card in the data path or outside the data path to replace the processor of the storage node to perform some key-value operations. However, the above two key-value operation transfer methods have poor overall performance because the key-value operation occupies less network resources or computing power resources outside the data path. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device, system and readable storage medium, which can solve the problem of poor overall performance of key-value operations.
[0005] In a first aspect, a data processing method is provided, which is applied to a computing node, the computing node is connected to at least one storage node, the computing node includes a first network card, each storage node includes a second network card, the second network card includes a system on chip (SoC), the first network card is used to execute a key-value operation request of a remote direct data access (RDMA) type, and the SoC is used to execute a key-value operation request of a remote procedure call protocol (RPC) type. The data processing method includes: the computing node adjusts the ratio of the types of key-value operation requests according to the throughput of each storage node in at least one storage node to execute the key-value operation, and sends multiple key-value operation requests to at least one storage node according to the adjusted ratio of the types of key-value operation requests, and finally receives the key-value operation results returned by at least one storage node. Among them, the types of key-value operation requests include RPC type and RDMA type.
[0006] Based on the data processing method, the task offloading of key-value operations is accelerated by using the computing power on the data path and the data path, and the ratio of RPC-type and RDMA-type key-value operation requests is adjusted based on the throughput of the storage node to perform key-value operations. Therefore, while using the computing power outside the data path, i.e., SoC, to execute RPC-type key-value operation requests, reducing or even avoiding data interaction with the host through PCIe, and alleviating the network amplification effect, some key-value operation requests are also executed based on RDMA requests, thereby using the computing power on the data path to reduce the burden of SoC executing key-value operations, alleviating the limitation of the computing power bottleneck of SoC on key-value operations, and improving the key-value operation throughput of SoC. In this way, by adjusting the ratio of RPC-type and RDMA-type key-value operation requests, the overall throughput of the storage node executing RPC-type and RDMA-type key-value operations is maximized, thereby improving the task offloading performance of the storage node's processor for key-value operations.
[0007] As a possible implementation, when the throughput of the first storage node performing key-value operations is less than a preset threshold, the computing node reduces the RPC-type key-value operation requests sent to the first storage node. The first storage node is one of at least one storage node. The preset threshold is the difference between the upper limit of the throughput of the first storage node performing key-value operations and the preset value. The throughput upper limit is the combined maximum throughput of the first storage node performing key-value operations based on RPC-type key-value operation requests and performing key-value operations based on RDMA-type key-value operation requests. In this way, when the types of the initial key-value operation requests are all RPC-type and the throughput of the first storage node performing key-value operations is not close to the throughput upper limit, the RPC-type key-value operation requests sent by the computing node to the first storage node are reduced, so that the key-value operation throughput of the SoC gradually approaches the throughput upper limit, thereby improving the performance of the SoC in performing key-value operations instead of the processor of the storage node.
[0008] Among them, the comprehensive maximum throughput is equal to Thpt(RDMA)+Thpt(RPC)*(r-1) / r, Thpt(RDMA) is the maximum throughput of SoC executing key-value operations based on RDMA-type key-value operation requests, Thpt(RPC) is the maximum throughput of SoC executing key-value operations based on RPC-type key-value operation requests, and r is the average number of RDMA requests required to complete each key-value storage operation.
[0009] Optionally, when the computing node is one of the top m computing nodes in terms of the number of RPC-type key-value operation requests sent to the first storage node, and the throughput of the first storage node in performing key-value operations is less than a preset threshold, the computing node converts the type of key-value operation requests of at least one thread in the computing node from the RPC type to the RDMA type, so as to reduce the number of RPC-type key-value operation requests sent by the computing node to the first storage node. The at least one thread is one of the top n threads in terms of the number of RPC-type key-value operation requests sent to the first storage node, and m and n are positive integers greater than or equal to 1.
[0010] In this embodiment, the execution entities of the top m computing nodes that send RPC-type key-value operation requests to the first storage node and the top n threads that send RPC-type key-value operation requests to the first storage node can be computing nodes or the first storage node, and the examples provided in this embodiment do not limit them.
[0011] Optionally, when receiving the RPC reduction request sent by the first storage node, the computing node determines that the throughput of the key-value operation performed by the first storage node is less than a preset threshold. In this way, the first storage node can use the SoC outside the data path to calculate whether the throughput of the key-value operation performed by the first storage node is less than the preset threshold, thereby reducing the load of the processor of the first storage node.
[0012] Optionally, the computing node monitors the throughput of key-value operations performed by each storage node, and then determines whether the throughput of key-value operations performed by each storage node is less than a preset threshold based on the throughput of key-value operations performed by each storage node, thereby determining that the storage node whose throughput of key-value operations is less than the preset threshold is the first storage node.
[0013] In a second aspect, a data processing method is provided, which is applied to a storage node, the storage node is connected to at least one computing node, each computing node includes a first network card, the storage node includes a second network card, the second network card includes a SoC, the first network card is used to execute RPC-type key-value operation requests, and the SoC is used to execute RDMA-type key-value operation requests. The data processing method includes: the storage node determines its own throughput for executing key-value operations, and when the throughput is less than a preset threshold, sends an RPC reduction request to the computing node, and the RPC reduction request is used to instruct the computing node to reduce the RPC-type key-value operation requests sent to the storage node. In this way, when the throughput of executing key-value operations is significantly different from the throughput upper bound, the storage node instructs the computing node to convert the RPC-type key-value operation request into the RDMA-type key-value operation request, and utilizes the computing power on the data path to alleviate the limitation of the computing power bottleneck of the SoC on the key-value operation, thereby improving the throughput of the SoC's key-value operations, thereby improving the performance of the SoC replacing the processor of the storage node to execute key-value operations.
[0014] Optionally, the storage node determines a first throughput for executing key-value operations based on RPC-type key-value operation requests and a second throughput for executing key-value operations based on RDMA-type key-value operation requests, thereby determining that the throughput for executing key-value operations is the sum of the first throughput and the second throughput.
[0015] Optionally, the storage node periodically determines its throughput of executing key-value operations in each cycle. In this way, when the throughput of the storage node in each cycle is less than a preset threshold, the storage node sends an RPC reduction request to the computing node, thereby iteratively adjusting the ratio of RPC-type key-value operation requests and RDMA-type key-value operation requests, so that the combined throughput of the storage node's SoC executing RPC-type key-value operation requests and RDMA-type key-value operation requests is closer to the combined maximum throughput, thereby improving the performance of the SoC replacing the storage node's processor in executing key-value operations.
[0016] As a possible implementation, the computing node reduces RPC-type key-value operation requests with threads as the granularity. For example, the RPC reduction request is used to instruct the top n threads in at least one computing node that send RPC-type key-value operation requests to the storage node to convert the request type, where n is a positive integer greater than or equal to 1. In this way, the balance of RPC-type key-value operation requests and RDMA-type key-value operation requests sent by the computing node is improved.
[0017] For example, the storage node first determines the top m computing nodes in at least one computing node that send RPC-type key-value operation requests to the storage node, and then determines the top n threads in the top m computing nodes that send RPC-type key-value operation requests to the storage node. The RPC reduction request is then used to instruct the top m computing nodes to reduce the number of top n threads that send RPC-type key-value operation requests to the storage node.
[0018] For example, the storage node first determines the top n threads in at least one computing node that send RPC-type key-value operation requests to the storage node, and then determines the threads of the top m computing nodes that send RPC-type key-value operation requests to the storage node among the top n threads. The RPC reduction request is used to instruct the computing node to which the thread belongs to reduce the number of RPC-type key-value operation requests sent to the storage node.
[0019] As a possible implementation, the SoC stores an index of a key-value pair and / or partial data of the key-value pair, where the index includes the address of the object value corresponding to the key. For example, the partial data of the key-value pair stored in the memory of the SoC is the data with a higher access frequency in the key-value pair, i.e., hot data, and the data with a lower access frequency in the key-value pair, i.e., cold data, is stored in the memory of the storage node. In this way, compared to the long time required for the SoC to transmit data to the memory of the storage node through the bus, the SoC can perform index queries and object value queries locally on the SoC, thereby improving the overall efficiency of the SoC in performing key-value operations.
[0020] As a possible implementation method, when a storage node receives a key-value operation request from a computing node, it performs the key-value operation in a manner corresponding to the type of the key-value operation request, obtains the key-value operation result, and then returns the key-value operation result to the computing node.
[0021] For example, the key value operation request is of RDMA type. The computing node uses the first network card to read the index corresponding to the key from the storage node based on the RDMA request, and then performs the key value operation on the object value corresponding to the key according to the index to obtain the key value operation result.
[0022] For another example, if the key-value operation request is of RPC type, the SoC of the storage node queries the index corresponding to the key according to the key-value operation request. When the index indicates that the object value corresponding to the key is stored in the SoC, the SoC performs the key-value operation on the object value in the SoC based on the RPC request to obtain the key-value operation result. When the index indicates that the object value corresponding to the key is stored in the memory of the storage node, the SoC performs the key-value operation on the object value in the memory of the storage node based on the RDMA request to obtain the key-value operation result.
[0023] According to a third aspect, a data processing device is provided, the device comprising modules for executing the data processing method in the first aspect or any possible implementation of the first aspect.
[0024] According to a fourth aspect, yet another data processing device is provided, the device comprising modules for executing the data processing method in the second aspect or any possible implementation manner of the second aspect.
[0025] It should be noted that the data processing device described in the third aspect or the fourth aspect may be a terminal device or a network device, or a chip (system) or other parts or components that can be set in the terminal device or the network device, or a device that includes a terminal device or a network device, and this application does not limit this.
[0026] In a fifth aspect, a computing device is provided, comprising a memory and a processor, wherein the memory is used to store a set of computer instructions, and when the processor executes the set of computer instructions, it is used to execute the operating steps of the data processing method in any possible design in the first aspect or the second aspect.
[0027] In a sixth aspect, a computer system is provided, comprising at least one computing node and at least one storage node, wherein the at least one computing node is used to execute the operation steps of the data processing method in any possible design in the above-mentioned first aspect upon receiving a user request, and the at least one storage node is used to execute the operation steps of the data processing method in any possible design in the above-mentioned second aspect, and send key value operation results to the at least one computing node.
[0028] In addition, the technical effects of the data processing apparatus described in the third aspect, the data processing apparatus described in the fourth aspect, the computing device described in the fifth aspect, and the computer system described in the sixth aspect can refer to the technical effects of the data processing method described in the first aspect and the second aspect, and will not be repeated here.
[0029] In a seventh aspect, a computer-readable storage medium is provided, comprising: computer software instructions; when the computer software instructions are executed in a computer, the computer executes the operating steps of the method described in any possible implementation of the first aspect or the second aspect.
[0030] In an eighth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute the operation steps of the method described in any possible implementation manner of the first aspect or the second aspect.
[0031] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of RDMA-KV technology in the prior art;
[0033] Figure 2 It is a flow chart of on-path-KV technology in the prior art;
[0034] Figure 3 It is a flow chart of another on-path-KV technology in the prior art;
[0035] Figure 4 A schematic diagram of the structure of a computer system provided for this application;
[0036] Figure 5 A schematic diagram of the structure of a storage server provided for this application;
[0037] Figure 6 A schematic diagram of the hierarchical structure of a cloud platform provided for this application;
[0038] Figure 7 A flowchart of a data processing method provided in this application;
[0039] Figure 8 A flowchart of the type conversion steps of a key-value operation request provided by this application;
[0040] Fig. 9 A schematic diagram of a key-value operation flow of an RDMA type provided in this application;
[0041] Fig.10 A schematic diagram of a key-value operation flow of an RPC type provided for this application;
[0042] Fig.11 A schematic diagram of an insertion operation flow provided by this application;
[0043] Fig.12 A schematic diagram of the structure of a data processing device provided in this application;
[0044] Fig.13 A schematic diagram of the structure of a computing device provided in this application. DETAILED DESCRIPTION
[0045] To facilitate understanding, the relevant terms involved in the embodiments of the present application are first introduced below.
[0046] (1) Key-value storage system
[0047] A key-value store system, also known as a key-value database, is a non-relational database. Key-value stores store data in the form of key-value pairs, where the key is used as an index for the element and the value represents the data stored and read, i.e., each unique identifier is stored as a key with an associated value. In a key-value pair, the key is unique and the value associated with the key can be accessed through the key. The key can be a plain text or a hash value. The value in a key-value pair can be a string, a list, an object, etc. In a key-value store, values are usually treated as opaque objects. For example, if the key is "145" and the value corresponding to the key is "bob", then "bob" can be read from "145" in the key-value database.
[0048] The key-value storage system can use a single server for key-value storage, that is, the key-value pairs are stored in a hash table. According to the hash table, all key-value operations (also called key-value storage operations) can be performed in a single server. Among them, the hash table is actually called a hash table, which is a data structure. The hash table is essentially an array, but the array stores a single data, and in the key-value storage system, the hash table is used to store key-value pairs. In the key-value storage system, the hash function is used to get the index of the array corresponding to the key, and then the key-value operation is performed on the value at the index position. Key-value operations include operations such as read (Get(key)), associate (Put(key,value)), insert (Insert(key,value)) and delete (Insert(key)).
[0049] Since the amount of data stored in key-value storage usually exceeds the storage capacity of a single machine, the general key-value storage system will divide the data set, and each storage server maintains one of the data shards, that is, a distributed key-value storage system, such as etcd. A distributed key-value storage system can include clients, master nodes, and slave nodes. The client is used to communicate with the master node or slave node to perform key-value operations such as reading and writing. The master node accepts read and update operations (such as inserting and deleting in key-value operations) from the client and spreads the updated data to other nodes. The slave node is used to receive update operations from the master node and read-only operations from the client. In addition, both the master node and the slave node are equipped with independent persistence components to persist the data on the node.
[0050] (2) Task offloading
[0051] Workload offload usually refers to the transfer of part of the work of a device with limited computing power to other places for computing. For example, mobile terminal nodes such as mobile phones and IoT devices are limited by their own computing performance, so part of the work that consumes a lot of computing resources is transferred to the edge or cloud for processing.
[0052] In a key-value storage system, computing servers usually interact with storage servers through RPC. When the amount of data is large, the storage server's processor (Central Processing Unit, CPU) usually causes a performance bottleneck in memory key-value storage when processing data interactions. Therefore, in a key-value storage system, the storage server's processor is task-offloaded, and the storage server's key-value operations are offloaded to devices other than processors such as network cards.
[0053] In this embodiment, the processor of the storage server may refer to a processor in the storage server used to manage and maintain local data of the storage server. The part of the storage server excluding the network card is also called the host, and the memory of the storage server or storage node refers to the memory of the host.
[0054] (3) Smart NIC
[0055] Smart Network Interface Controller (SmartNIC) is a network card with computing functions that can replace the processor to perform data read / write operations. SmartNICs include remote direct data access network card (RDMA Network Interface Controller, RNIC), on-path SmartNIC and off-path SmartNIC.
[0056] The remote direct data access network card includes NIC cores, which can directly read and write storage devices such as the memory of the storage server, namely RDMA READ and RDMA WRITE, thereby offloading data read and write operations in key-value storage operations to the remote direct data access network card.
[0057] On-path SmartNIC is a smart NIC that adds computing power within the data path of the NIC, opens the programming interface of the NIC core, and provides on-board memory on the NIC. In this way, the on-path SmartNIC can define key-value storage operations through the programming interface and use the NIC core to perform operations such as read, associate, insert, and delete in the key-value storage operation.
[0058] An off-path smart NIC is a smart NIC that provides computing power outside the data path of the NIC. For example, a system on chip (SoC) is integrated outside the data path of the NIC, and the SoC offloads tasks to any code of storage devices such as storage servers, such as key-value storage operations.
[0059] The following describes the defects of the prior art of using a remote direct data access network card, an on-path smart network card, or an off-path smart network card to offload tasks from a processor of a storage device.
[0060] a.RDMA-KV
[0061] RDMA-KV is a key-value operation offloading technology that uses remote direct data access network cards to perform key-value operations. Figure 1As shown in the figure, RDMA-KV technology assumes that both the computing server and the storage server are equipped with remote direct data access network cards. After receiving the client's request, the computing server performs the key-value storage operation by sending an RDMA READ / WRITE request instead of a remote procedure call (RPC) request. Taking the read operation in the key-value operation as an example, the RDMA request first reads the index structure of the storage server memory where the target key is located, and then performs a key comparison locally after reading it back. If it hits, the remote object is read according to the key-related address stored in the index structure. If the key does not hit, then the RDMA request needs to be sent repeatedly until the index block where the key is located is finally found or it is determined that the key does not exist in the current data set.
[0062] Since the computing server cannot obtain the address of the object locally, the step of obtaining the index is inevitable. Due to the underlying data structure of the index, it is usually difficult for ordinary RDMA-KV to guarantee the retrieval of the index containing the target key at one time. Therefore, RDMA-KV consumes more network resources than the actual data transmission requirements, and there is a network amplification effect. In addition, RNIC does not provide a programming interface, so RDMA-KV technology cannot be used to bypass the processor of the storage server based on RDMA to perform operations other than memory reading and writing, which makes it difficult for RDMA-KV to perform complex offload operations, such as replacing the CPU to perform key-value operations such as insertion.
[0063] b.on-path-KV
[0064] On-path-KV is a key-value operation offloading technology that uses the smart network card on the path to perform key-value operations. Figure 2 As shown in the figure, the smart network card on the path receives the key-value operation request from the computing server, and communicates with the storage server through the high-speed serial computer expansion bus (peripheral component interconnect express, PCIe) to traverse and execute data queries, thereby converting multiple network requests in the RDMA-KV technology into PCIe requests, alleviating the network amplification effect problem in the RDMA-KV technology. Figure 3 As shown in the figure, on-path-KV technology can also maintain a cache in the on-chip memory of the smart NIC on the path, use the cache to store part or all of the indexes, reduce or even avoid PCIe traversal requests, and further accelerate the performance of key-value operations.
[0065] In the on-path-KV technology, all network tasks of the smart NIC on the path share network resources. The more offloaded tasks and the more complex the requests, the greater the impact on the performance of other network tasks. Therefore, the on-path-KV technical solution sacrifices the performance of ordinary network tasks in exchange for the acceleration of offloaded tasks.
[0066] c.off-path-KV
[0067] Off-path-KV is a key-value operation offloading technology that uses off-path smart NICs to perform key-value operations. Off-path-KV has the same task offloading principle as on-path-KV, that is, the NIC computing power executes RPC requests to replace the RDMA operations of the remote direct data access NIC or the key-value operations of the processor of the storage server, and traverses the data structure of the storage server through the local PCIe link. Off-path smart NICs can also include on-chip memory, which can cache the index of the key-value storage and even some objects in the on-chip memory to further accelerate the key-value storage operation. Off-path-KV transfers the offloaded tasks to the SoC outside the data path, solving the NIC core resource conflict problem between ordinary network tasks and offloaded tasks in on-path-KV.
[0068] However, in the off-path-KV technology, the three ends of the off-path smart NIC, host, and SoC are interconnected through a PCIe switch, and the SoC needs to exchange data with the host through RDMA requests. The data path is SoC-PCIe switch-off-path smart NIC-PCIe switch-host. The communication cost between the SoC and the host is high, resulting in poor offloading performance of the off-path-KV technology. At the same time, the computing power of the SoC is usually weaker than that of the host. The computing power of the SoC will become a bottleneck in the key-value storage system, making the overall performance of key-value operations in the key-value storage system poor.
[0069] The present application provides a data processing method, in particular, a data processing method for unloading key-value operations by mixing RDMA type and RPC type key-value operation requests, that is, a computing node is provided with a first network card, a storage node is provided with a second network card, the second network card includes a SoC, the first network card is used to execute RDMA type key-value operation requests, and the second network card is used to execute RPC type key-value operation requests. The computing node adjusts the ratio of the types of key-value operation requests according to the throughput of each storage node in at least one storage node executing key-value operations, and sends multiple key-value operation requests to at least one storage node according to the adjusted ratio of the types of key-value operation requests, so that the number of RDMA type key-value operation requests and the number of RPC type key-value operation requests in the multiple key-value operation requests meet the ratio of the types of key-value operation requests, and finally receives the key-value operation result returned by at least one storage node. In this way, by adjusting the ratio of RPC-type and RDMA-type key-value operation requests, the overall throughput of the storage node executing RPC-type and RDMA-type key-value operations is maximized, and the computing power outside the data path, namely the SoC, is used to execute RPC-type key-value operation requests, thereby reducing or even avoiding data interaction with the host through PCIe. At the same time, the computing power on the data path is used to execute RDMA-type key-value operation requests, thereby reducing the burden of SoC offloading key-value operations, avoiding the computing power limitation of the SoC, which is called the performance bottleneck of offloading key-value operations, and improving the key-value operation throughput of the SoC, thereby improving the performance of task offloading of key-value operations of the storage node's processor.
[0070] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0071] Figure 4 A schematic diagram of the structure of a computer system provided in this application. Figure 4 As shown, the computer system 400 includes a server and a client 440. The server is used to provide services to the client 440 through the network. The number and type of the server are related to the services that the client 440 needs to provide, such as data read / write services. The server in the computer system 400 may include a computing server cluster 410, a storage server cluster 420, and a network device cluster 430. The computing server cluster 410 and the storage server cluster 420 communicate with the client 440 through the network device cluster 430, respectively. The server in the computer system 400 may be a cloud platform.
[0072] The computing server cluster 410 includes one or more computing servers ( Figure 4 Two computing servers, namely computing server 411 and computing server 412, are shown in FIG. 4 , but are not limited to two computing servers).
[0073] The computing server is a computing resource in the computer system 400, such as a server, a desktop computer, etc., and is used to generate and allocate computing resources according to user needs based on virtualization technology. The computing server is provided with a first network card, and the first network card has an RDMA function, such as a remote direct data access network card. The first network card is used to send an RDMA type key-value operation request to a storage server in the storage server cluster 420 to obtain the key-value operation result returned by the storage server.
[0074] For example, when a computing server such as computing server 411 or computing server 412 receives a user operation request from client 440, it sends multiple RDMA type or RPC type key value operation requests to multiple storage servers in storage server 420, receives the key value operation results returned by the storage servers, and sends the key value operation results to client 440. Among them, the ratio of the number of RDMA type key value operation requests and the number of RPC type key value operation requests in the multiple key value operation requests sent by the computing server at the same time or in a cycle is adjusted by the computing server according to the throughput of each storage server in storage server 420 performing key value operations.
[0075] At the hardware level, the computing server is equipped with processors and memory ( Figure 4 The computing function of the computing server is realized by the processor running the program in the memory. The computing node server can also read / write data in each storage server in the storage server cluster 420 according to user needs, or perform key value operations such as insertion and deletion.
[0076] The storage server cluster 420 includes one or more storage servers ( Figure 4 Two storage servers, storage server 421 and storage server 422, are shown in the figure, but are not limited to two storage servers).
[0077] The storage server is a storage resource in the computer system 400, such as a server, desktop computer or storage array controller, hard disk frame, etc., which is used to provide logical disk storage, unstructured data storage and integrated backup services for the cloud virtual machines in the computer system 400.
[0078] At the hardware level, the storage server is provided with a second network card, a processor and a memory, and the second network card includes a SoC outside the data path.
[0079] The processor in the storage server is used to process data from outside the storage server, and the processor is on the data path.
[0080] The second network card is used to control the access process of the memory, such as the control of address signals, data signals and various command signals, so that the storage server can provide the memory as a storage resource to the user.
[0081] The second network card is an off-path smart network card with an SoC outside the data path. The SoC can process data from outside the storage server, such as key-value operation requests, instead of the processor in the storage server, thereby offloading tasks such as key-value operations of the processor.
[0082] Alternatively, if Figure 5 As shown, the second network card of the storage server has an RDMA function and an RPC function, and the SoC includes an on-chip memory (such as dynamic random access memory (DRAM) and other memories) for storing indexes or object values, and the SoC interacts with the host of the computing server through a PCIe link. In combination with the above-mentioned second network card, when the second network card receives an RDMA-type key-value operation request, the computing server can perform a key-value operation on the object value in the memory of the SoC of the second network card or the host memory based on the RDMA request. For another example, when the second network card receives an RPC-type key-value operation request, the SoC can perform a key-value operation on the object value of the local cache of the SoC, or perform a key-value operation on the object value in the host memory based on the RDMA request, and return the key-value operation result to the computing server in the form of an RPC response.
[0083] The memory is used to store data and may include internal memory and / or a hard disk. The memory refers to an internal memory that directly exchanges data with the processor. The memory can quickly read and write data at any time and serve as a temporary data storage for the operating system or other running programs. Unlike the memory, the hard disk reads and writes data slower than the memory and is usually used to store data persistently. In an embodiment of the present application, the memory of the storage server refers to the memory of the host other than the second network card on the storage server. The memory of the host can be used to store cold data in the key-value pair, and the memory of the SoC of the second network card is used to store hot data in the key-value pair.
[0084] In addition to the computing server cluster 410 and the storage server cluster 420, the computer system 400 may also include a management server cluster ( Figure 4 The management server cluster includes one or more management servers, which are used to manage all computing services, shared storage, and networks of the entire computer system 400, and provide users or administrators with an application program interface (API) for managing the entire node.
[0085] The network device cluster 430 includes one or more switches and routers, such as Figure 4 As shown, in this embodiment, the network device cluster 430 includes a router 431, a switch 432, a switch 433, and a switch 434. Among them, the client 440 is connected to the router 431 through the Internet, and the router 431 is connected to the switch 433 through the switch 432, and the switch 433 is connected to each computing server in the computing server cluster 410. The switch 434 is respectively connected to each computing server in the computing server cluster 410 and each storage server in the storage server cluster 420.
[0086] Optionally, the number and type of switches included in the network device cluster 430 can be adjusted according to the needs of the computer system 400, and the switch 432, the switch 433 and the switch 434 can be switches with different functions, for example, the switch 432 is a core switch, and the switch 433 and the switch 434 are switches for managing a specific network segment. For example, the switch 432 can be a core switch, the switch 433 can be an internal and external switching network segment switch, and the switch 434 can be a storage network segment switch.
[0087] Client 440 includes one or more clients ( Figure 4 Two clients, namely client 441 and client 442, are shown in the figure, but are not limited to two clients. The client includes interfaces and applications required for accessing computer system 400, such as interfaces for key-value operations.
[0088] The client 440 is used to send a user operation request to the computing server cluster 410, so that the computing server in the computing server cluster 410 sends a key-value operation request to the storage server cluster 420 according to the user operation request. Optionally, the client 440 can send the user operation request to the computing server in the computing server cluster 410 according to the principle of geographical proximity. The computing server that receives the user operation request is called the coordinator of the client to coordinate and schedule the transaction, i.e., one or more tasks of the key-value operation.
[0089] It is worth noting that Figure 4 This is only a schematic diagram and should not be construed as limiting the present application. The computer system 400 may also include other devices. Figure 4 Not drawn in.
[0090] The computing servers, storage servers, etc. in the computer system 400 provided in the present application may be nodes in a cloud platform. Figure 4Based on the equipment of the computer system 400 shown, the computer system 400 implements the functions of nodes such as computing nodes and storage nodes based on IaaS, PssS and SaaS, and provides services (such as computing services, storage services and network services, etc.) to the client 440 through the node. The node can be a cloud node (such as a computing node and a storage node, etc.) virtualized using the resources (such as computing resources and storage resources, etc.) of the computer system 400. For example, the computing server in the computer system 400 is virtualized as a computing node in the cloud platform, and the storage node is virtualized as a storage node in the cloud platform. In this case, the node and the server can be regarded as equivalent in this application.
[0091] Next, combine Figure 6 The computer system 400 is described as a hierarchical structure of a cloud platform.
[0092] like Figure 6 As shown, the IaaS platform 610 is used to virtualize all infrastructure resources in the computer system 400, and provide virtual resources (e.g., computing resources, network resources, and storage resources) to users in a software-defined manner. The infrastructure resources refer to the resources provided by the computing server cluster 410, the storage server cluster 420, and / or the network device cluster 430 in the computer system 400.
[0093] The PaaS platform 620 is used to implement the runtime environment and application support functions of the computer system 400, so users can apply for computing units within the quota instead of virtual resources to run their own services. Optionally, the computing unit can be a container, and the computer system 400 deploys and runs the user's code by scheduling the container. It should be noted that the number of containers in the PaaS platform 620 can be one or more. Figure 6 Only one container is used as an example.
[0094] As a possible implementation, the computer system 400 may inject one or more components into the container to implement code deployment and operation. Optionally, the resources (computing resources or storage resources) used by multiple components in the same container may belong to the same hardware device (such as a computing server, a storage server, or a management server) in the computer system 400, or may belong to different hardware devices.
[0095] Among them, the components may include database components, message queue components, orchestration components, log components, virtualization components, business database components, configuration database components, permission management components, etc.
[0096] The SaaS application 630 is used to provide services to users by composing user-deployed applications in the form of API responses based on the IaaS platform 610 and the PaaS platform 620. The application and container of the SaaS application 630 can communicate through a web server.
[0097] It is worth noting that Figure 6 This is only a schematic diagram and should not be construed as limiting the present application. The hierarchical structure of the computer system 400 may also include other modules. Figure 6 Not drawn in.
[0098] The steps of the data processing method provided in this embodiment are performed by the client 440, the computing node and the storage node provided by the computer system 400. Figure 7 The data processing method provided in the embodiment of the present application is described.
[0099] Step 710: The client 440 sends a user operation request to the computing node.
[0100] The user operation request may be a request for data query, data modification, etc., which is used to instruct the storage node to execute at least one RPC request or RDMA request to complete the key-value operation request.
[0101] Step 720: The computing node adjusts the ratio of the types of key-value operation requests according to the throughput of the key-value operation performed by the storage node.
[0102] The computing node adjusts the ratio of the RPC type key-value operation request and the RDMA type key-value operation request in the key-value operation request issued according to the throughput of the key-value operation respectively executed by the multiple storage nodes.
[0103] As a possible implementation method, when the throughput of key-value operations performed by the computing node on the first storage node is less than a preset threshold, the computing node reduces the RPC-type key-value operation requests sent to the first storage node to achieve proportional adjustment of RPC-type key-value operation requests and RDMA-type key-value operation requests.
[0104] The first storage node is any one of the multiple storage nodes communicating with the computing node. The preset threshold is the difference between the upper limit of the throughput of the first storage node performing the key-value operation and the preset value. The throughput upper limit is the combined maximum throughput of the first storage node performing the key-value operation based on the RPC type key-value operation request and the key-value operation based on the RDMA type key-value operation request.
[0105] Optionally, when the throughput of the key-value operation performed by the first storage node is less than a preset threshold, the computing node converts the type of the key-value operation request of at least one thread in the computing node from the RPC type to the RDMA type.
[0106] In an embodiment of the present application, the computing node may determine whether the throughput of the key-value operation performed by the first storage node is less than a preset threshold value based on the throughput information of the key-value operation performed by the first storage node uploaded by the first storage node, or may receive an RPC reduction request sent by the first storage node, and determine that the throughput of the key-value operation performed by the first storage node is less than the preset threshold value based on the indication of the RPC reduction request. For specific steps of the computing node and the storage node interacting to determine the type of the key-value operation request of at least one thread in the computing node is converted from the RPC type to the RDMA type, please refer to Figure 8 Steps 810 to 830 are not described in detail here.
[0107] It should be noted that the serial numbers of step 710 and step 720 do not limit the execution order of the computing nodes. The computing node may execute step 710 first and then step 720, or may execute step 720 first and then step 710.
[0108] Step 730: The computing node sends a key value operation request.
[0109] The computing node sends a key-value operation request to the storage server according to the user operation request. The key-value operation request may include one or more RDMA requests or RPC requests for performing the key-value operation.
[0110] Optionally, the computing node may query the management server for the location of the data corresponding to the key-value operation, that is, in which storage server the data is stored, according to the user operation request, and then send a key-value operation request to the storage server storing the data corresponding to the key-value operation.
[0111] Step 740: The storage node performs the key-value operation according to the key-value operation request and obtains the key-value operation result.
[0112] The storage node performs the key-value operation in a manner corresponding to the type of the key-value operation request to obtain a key-value operation result.
[0113] For example, when the key-value operation request is of RDMA type, the storage node cooperates with the computing node to perform RDMA reading and writing, so that the computing node operates on the object value of the key-value operation based on RDMA to obtain the key-value operation result. Fig. 9 In step 910 to step 940, the RDMA type key value operation process is described by taking the read operation as an example, which will not be repeated here.
[0114] For another example, when the key-value operation request is of RPC type, the storage node responds to the RPC request sent by the computing node, so that the computing node operates on the object value of the key-value operation based on the RPC to obtain the key-value operation result. Fig.10Steps 1010 to 1040 illustrate the RPC type key value operation process using the read operation as an example, which will not be repeated here.
[0115] Optionally, the object value of the key-value operation can be stored in the host memory or the SoC memory. The key-value operation process corresponding to the two cases can be seen in Fig. 9 and Fig.10 The relevant steps in will not be repeated here.
[0116] Step 750: The storage node returns the key value operation result to the computing node.
[0117] Step 760: The computing node returns a user operation response to the client 440 according to the key-value operation result.
[0118] The computing node processes the key-value operation result, obtains a user operation response, and then returns the user operation response to the client 440 .
[0119] As a possible implementation, the computing node processes the key-value operation result by computing the key-value operation result, and then encapsulating the key-value operation result to obtain the user operation response. For example, the user operation instruction is to obtain the rainfall in area A for a week, and the key-value operation result is the rainfall in area A for each day in a week. The computing node sums the rainfall in area A for each day in a week, and then encapsulates the summed result to obtain the user operation response.
[0120] As another possible implementation, the computing node can process the key-value operation result by directly encapsulating the key-value operation result to obtain the user operation response. For example, the user operation instruction is to obtain the rainfall in area A on Tuesday, and the key-value operation result is the rainfall in area A on Tuesday. The computing node encapsulates the rainfall in area A on Tuesday to obtain the user operation response.
[0121] Based on the above-mentioned data processing method provided by the embodiment of the present application, namely steps 710 to 760, the computing nodes and the storage nodes use a mixture of RDMA and RPC for communication to implement key-value operations, that is, the storage server, namely the storage node, uses the computing power of the remote direct data access network card on the data path to perform key-value operations on the object value in an RDMA manner, and uses the computing power of the SoC outside the data path to perform key-value operations on the object value in an RPC manner, thereby simultaneously utilizing the computing power on the data path and the computing power outside the data path to offload the key-value operation task to the processor of the storage node, thereby improving the performance of task offloading of key-value operations. Furthermore, the ratio of the number of RDMA-type key-value operation requests sent by the computing node to multiple storage nodes to the number of RPC-type key-value operation requests sent is adjusted according to the throughput of each storage node performing key-value operations, thereby avoiding concentrating the offloading tasks of key-value operations on the remote direct data access network card or SoC, thereby reducing the network amplification effect caused by RDMA requests and avoiding the excessive load of the SoC causing the computing power bottleneck of the SoC to cause a bottleneck for the offloading of key-value operations, thereby maximizing the throughput of the computing nodes and storage nodes performing key-value operations, thereby further improving the task offloading performance of the key-value operations on the processor of the storage node.
[0122] Combination of the above Figure 4-Figure 7 The steps of the data processing method are described in general, and then the steps of type conversion of key-value operation requests are described in detail, such as Figure 8 As shown, taking the first storage node as an example, the step of converting the type of the key-value operation request may include steps 810 to 830.
[0123] Step 810: The first storage node determines its own throughput of performing key-value operations.
[0124] The first storage node determines a first throughput for performing key-value operations based on RPC-type key-value operation requests and a second throughput for performing key-value operations based on RDMA-type key-value operation requests, and determines that the throughput of the first storage node for performing key-value operations is the sum of the first throughput and the second throughput.
[0125] As a possible implementation manner, the computing nodes and the storage nodes periodically adjust the ratio of RPC-type key-value operation requests to RDMA-type key-value operation requests.
[0126] For example, in each cycle, the first storage node collects the throughput of the RPC-type key-value operation requests processed by the SoC and the number of RPC-type key-value operation requests sent by each computing server to the first storage node. At the end of each cycle, the first storage node uses a monitoring tool (such as Performance Counter Monitor (PCM) etc.) to calculate the throughput of the RDMA-type key-value operation requests executed in each cycle.
[0127] Optionally, the above period may be any length such as 0.5 seconds, 1 second, 5 seconds, 11 seconds, etc.
[0128] Step 820: The first storage node determines that the throughput of the key-value operation performed by the first storage node is less than a preset threshold, and sends an RPC reduction request to the computing node.
[0129] The first storage node calculates the difference between the upper limit of the throughput of the first storage node performing key-value operations and the throughput of the first storage node performing key-value operations in the current cycle. If the difference is greater than or equal to a preset value, it is determined that the throughput of the first storage node performing key-value operations is less than a preset threshold.
[0130] Among them, the preset threshold is equal to the difference between the throughput upper bound and the preset value, and the preset value can be equal to x% of the throughput upper bound, and x can be adjusted according to the performance of the first storage node. The throughput upper bound is the comprehensive maximum throughput of the first storage node performing key-value operations based on RPC-type key-value operation requests and performing key-value operations based on RDMA-type key-value operation requests. The comprehensive maximum throughput can be equal to Thpt(RDMA)+Thpt(RPC)*(r-1) / r, Thpt(RDMA) is the maximum throughput of the SoC performing key-value operations based on RDMA-type key-value operation requests, Thpt(RPC) is the maximum throughput of the SoC performing key-value operations based on RPC-type key-value operation requests, and r is the average number of RDMA requests required to complete each key-value storage operation.
[0131] Optionally, the RPC reduction request may be sent to one or more computing servers that have sent the largest number of RPC-type key-value operation requests to the first storage node. For example, the first storage node arranges the number of RPC-type key-value operation requests sent by each computing node to the first storage node from large to small, selects the first m computing nodes in the arrangement result, and sends the RPC reduction request to the first m computing nodes.
[0132] In another possible embodiment, the first storage node may send the throughput of the key-value operation performed by the first storage node to the computing node, and the computing node calculates that the throughput of the key-value operation performed by the first storage node is less than a preset threshold. This embodiment only converts the execution subject of the same task and does not involve changes in the technical principle, which will not be repeated here.
[0133] Step 830: The computing node converts the type of the key value operation request of at least one thread from the RPC type to the RDMA type according to the RPC reduction request.
[0134] After receiving the RPC reduction request, the computing node determines at least one thread in the local thread of the computing node according to the key value operation request frequency, and converts the type of the key value operation request of the at least one thread from the RPC type to the RDMA type.
[0135] The key value operation request frequency refers to the quotient of the number of RPC type key value operation requests sent to the first storage node in a cycle and the cycle length. When the computing node is started, all local threads of the computing node use RPC type key value operation requests.
[0136] As a possible implementation method, the computing node sets corresponding identifiers (such as integer values) for all its own threads respectively, and counts the number of RPC-type key-value operation requests and the number of RDMA-type key-value operation requests sent by each thread to the first storage node within a cycle, and determines that the threads that need to be converted from RPC type to RDMA type are one or more threads that send the largest number of RPC-type key-value operation requests. For example, the identifiers of all threads of the computing node are arranged from large to small based on the number of RPC-type key-value operation requests sent to the first storage node, and the first n threads in the arrangement result are selected as threads that need to be converted from RPC type to RDMA type, where n is a positive integer greater than or equal to 1. In this way, the balance of the computing node sending RPC-type key-value operation requests and RDMA-type key-value operation requests is improved.
[0137] Optionally, the execution subject of step 810 and step 820 may be the SoC of the second network card in the first storage node. In this way, more computing tasks are offloaded to the SoC outside the data path for execution, further improving the offloading capability of key-value operations.
[0138] In the embodiment of the present application, the type conversion of the key-value operation request using the thread as the granularity is only an example. In other embodiments, the type conversion of the key-value operation request may also be performed using other granularities.
[0139] Step 820 and step 830 are only an example of determining a thread that needs to reduce RPC-type key-value operation requests, and do not constitute a limitation. In other possible implementations, the first storage node may first determine the thread, and then determine the computing node. For example, the first storage node arranges the identifiers of all threads from large to small based on the number of RPC-type key-value operation requests sent to the first storage node, selects the first n threads in the arrangement result, and then determines the computing nodes to which the first n threads belong that rank in the top m in terms of the number of RPC-type key-value operation requests sent to the storage node, and selects the top n threads in the top m computing nodes as the threads that need to be converted from RPC type to RDMA type. Wherein, m and n are positive integers greater than or equal to 1.
[0140] Based on the above steps 810 to 830, the computing nodes and the storage nodes adjust the ratio of RPC-type key-value operation requests to RDMA-type key-value operation requests based on the thread granularity, and iteratively adjust the ratio according to the throughput of the storage node executing the key-value operation requests, so that the key-value operation throughput of the SoC of the second network card of the storage node continuously approaches the theoretical throughput upper bound, thereby improving the SoC's ability to offload key-value operations processed by the storage node.
[0141] Combination of the above Figure 8 This chapter explains how computing nodes adjust the ratio of RDMA type requests and RPC type requests in key-value operation requests. Computing nodes and storage nodes complete key-value operations in different ways based on two different types of key-value operation requests. A key-value operation request may contain one or more RDMA requests or RPC requests. Fig. 9 and Fig.10 Taking the read operation as an example, the specific steps for computing nodes and storage nodes to perform key-value operations based on RDMA and the specific steps for performing key-value operations based on RPC are explained respectively.
[0142] like Fig. 9 As shown, the steps of the computing node and the storage node performing a read operation based on RDMA may include steps 910 to 940.
[0143] Step 910: The computing node determines that the type of the read request is an RDMA type.
[0144] The computing node determines a thread for executing the read request, and determines that the type of the key-value operation request sent by the thread to the storage node is an RDMA type, and the type of the read request is an RDMA type.
[0145] In the embodiments of the present application, the allocation method of threads corresponding to key-value operation requests such as read requests may be determined based on a task (event) allocation algorithm, such as a load balancing algorithm.
[0146] Step 920: The computing node sends an index read request to the storage node to read the index from the storage node.
[0147] The compute node sends an index read request to the storage node in the form of an RDMA request.
[0148] As a possible implementation method, the index of the key-value pair is stored in the memory of the SoC of the second network card of the storage node, and the computing node sends an index read request to the second network card of the storage node in the form of an RDMA request to perform RDMA reading on the index in the memory of the SoC.
[0149] Step 930: When the key of the reading request does not hit the index, the computing node executes step 920 again.
[0150] Step 940: When the key of the read request hits the index, the computing node sends an object value read request to the storage node to read the object value from the storage node.
[0151] When the key of the read request hits the index, the compute node sends an object value read request to the storage node in the form of an RDMA request.
[0152] For example, the computing node determines that the object value is cached in the memory of the SoC of the second network card according to the reserved flag in the index, and sends an object value read request to the SoC of the second network card in the form of an RDMA request to perform RDMA reading on the object value in the memory of the SoC. The reserved flag is used to indicate the cache location of the object value. For example, a reserved flag of 1 indicates that the object value is cached in the memory of the SoC of the second network card, and a reserved flag of 0 indicates that the object value is stored in the memory of the host. Alternatively, a reserved flag of 0 indicates that the object value is cached in the memory of the SoC of the second network card, and a reserved flag of 1 indicates that the object value is stored in the memory of the host.
[0153] For another example, the computing node determines that the object value is cached in the memory of the host of the storage node according to the reserved flag in the index, and sends an object value read request to the host in the form of an RDMA request to perform RDMA reading on the object value in the host's memory.
[0154] like Fig.10 As shown, the steps of the computing node and the storage node performing a read operation based on RPC may include steps 1010 to 1040.
[0155] Step 1010: The computing node determines that the type of the read request is an RPC type.
[0156] The computing node determines a thread for executing the read request, and determines that the type of the key-value operation request sent by the thread to the storage node is an RPC type, and the type of the read request is an RPC type.
[0157] Step 1020: The computing node sends a read request to the storage node.
[0158] The computing node sends a read request to the SoC of the second network card of the storage node in the form of an RPC request.
[0159] Step 1030: The storage node queries the local index according to the read request.
[0160] The SoC of the second network card of the storage node queries the index in the memory of the SoC according to the key included in the read request.
[0161] Step 1040: The storage node returns the object value of the read request to the computing node according to the index.
[0162] The storage node determines whether the object value is stored in the memory of the SoC based on the index, and retrieves the object value from the memory of the SoC or the memory of the host of the storage node and returns it to the computing node. The specific steps may be as follows:
[0163] Step 1041, the storage node determines whether the object value is stored in the memory of the SoC based on the index. When the object value is cached in the memory of the SoC, execute step 1042; when the object value is not cached in the memory of the SoC, execute step 1043.
[0164] The SoC of the second network card of the storage node determines, according to the reserved flag bit in the index, that the object value is cached in the memory of the SoC.
[0165] Step 1042: The SoC of the storage node reads the object value cached in the memory of the SoC.
[0166] Step 1043: The SoC of the storage node reads the object value from the memory of the host of the storage node in the form of an RDMA request.
[0167] Step 1044: The storage node returns the object value to the computing node.
[0168] The storage node returns the object value to the computing node in the form of an RPC response.
[0169] Combination of the above Fig. 9 and Fig.10, taking the read operation in the key-value operation as an example, the specific steps for the computing node and the storage node to perform the key-value operation based on the RDMA type key-value operation request and the RPC type key-value operation request are described in detail. Among them, the SoC included in the second network card of the storage node has a function for storing indexes. Compared with the prior art, the host of the storage node does not participate in the storage and maintenance of the index, thereby speeding up the key-value operation. On the other hand, when the SoC of the storage node replaces the processor of the storage node to perform key-value operations such as insertion, it can also reduce the storage overhead of the storage node storage index and reduce the burden on the processor of the storage node.
[0170] Next, combine Fig.11 Taking the insertion operation as an example, the steps of SoC performing task offloading on the insertion operation are described, which may include the following steps 1110 to 1160.
[0171] Step 1110: The computing node sends a key-value pair insertion request to the storage node.
[0172] The computing node sends a key-value pair insertion request to the SoC of the second network card of the storage node, wherein the key-value pair insertion request is a key-value operation request of the RPC type, and the key-value pair insertion request includes the key-value pair to be inserted.
[0173] Step 1120: The storage node inserts the key-value pair into the index.
[0174] The SoC of the storage node locks the index and creates an index entry of the key-value pair in the index.
[0175] Optionally, the SoC locks the index using a method such as record lock.
[0176] Step 1130 , the storage node determines whether the memory of the SoC is sufficient to cache the object value of the key-value pair. If so, execute step 1140 ; if not, execute step 1150 .
[0177] The SoC of the storage node determines whether the memory of the SoC is sufficient to cache the object value of the key-value pair according to the current remaining amount of the memory of the SoC. For example, if the current remaining amount of the memory of the SoC is greater than or equal to the object value of the key-value pair, the memory of the SoC is sufficient to cache the object value of the key-value pair; if the current remaining amount of the memory of the SoC is less than the object value of the key-value pair, the memory of the SoC cannot cache the object value of the key-value pair.
[0178] Step 1140: The storage node caches the object value to the memory of the SoC.
[0179] The SoC of the storage node sets a flag in the index entry corresponding to the key and caches the object value in the memory of the SoC, wherein the flag is used to indicate that the object value corresponding to the index entry is cached in the memory of the SoC.
[0180] Step 1150: The storage node returns the memory address where the object value is allocated in the memory of the storage node to the computing node.
[0181] Step 1160: The computing node sends an RDMA request to the storage node according to the memory address to write the object value into the memory of the storage node.
[0182] In this way, the SoC is responsible for allocating a section of the host's memory area to store the newly added data, and the SoC is used to completely replace the host's processor to perform key-value operations such as insertion, and the computing node can directly access the host's memory based on RDMA, which improves the task offloading performance of the SoC's key-value operations on the host. At the same time, the SoC's memory is used to maintain and store the index, reducing the storage overhead of the host of the storage node.
[0183] Combination of the above Figures 4 to 11 , describes in detail the data processing method provided by this embodiment, and will now be combined with Fig.12 , describes the data processing device provided in this embodiment.
[0184] Fig.12 Schematic diagram of the structure of a possible data processing device provided in this embodiment. The data processing device can be used to implement the functions of the computing node or storage node in the above method embodiment, and thus also has the beneficial effects possessed by the above method embodiment. In this embodiment, the data processing device can be as follows Figure 4 The nodes constituted by computing server 411, computing server 412, storage server 421, storage server 422 and / or other computing servers shown may also be modules (such as chips) applied to servers.
[0185] like Fig.12 As shown, the data processing device 1200 includes a processing module 1210 and a transceiver module 1220 .
[0186] The data processing device 1200 can be used to implement the above Figure 7 In the method embodiment shown in FIG. 1 , the functions of the computing node are calculated, and the modules included in the foot data processing device 1200 are specifically used to implement the following functions.
[0187] A processing module 1210 is used to adjust a ratio of types of key-value operation requests according to a throughput of each storage node in at least one storage node performing key-value operations, where the types of key-value operation requests include RPC types and RDMA types;
[0188] The transceiver module 1220 is used to send multiple key-value operation requests to at least one storage node, wherein the number of RPC type requests and the number of RDMA type requests in the multiple key-value operation requests are in proportion;
[0189] The transceiver module 1220 is further used to receive the key-value operation result returned by at least one storage node.
[0190] As a possible implementation method, the processing module 1210 is specifically used to: when the throughput of the first storage node performing key-value operations is less than a preset threshold, reduce the RPC type key-value operation requests sent to the first storage node, and the first storage node is one of at least one storage node.
[0191] As a possible implementation method, the processing module 1210 is specifically used to: when the computing node is one of the top m computing nodes in terms of the number of RPC-type key-value operation requests sent to the first storage node, and the throughput of the first storage node performing key-value operations is less than a preset threshold, convert the type of key-value operation requests of at least one thread in the computing node from RPC type to RDMA type, at least one thread is one of the top n threads in terms of the number of RPC-type key-value operation requests sent to the first storage node, and m and n are positive integers greater than or equal to 1.
[0192] As a possible implementation manner, the transceiver module 1220 is further used to: receive an RPC reduction request sent by the first storage node, where the RPC reduction request indicates that the throughput of the key-value operation executed by the first storage node is less than a preset threshold.
[0193] As a possible implementation manner, the processing module 1210 is further used to: obtain the throughput of the first storage node executing the key-value operation; and determine whether the throughput of the first storage node executing the key-value operation is less than a preset threshold.
[0194] The data processing device 1200 can also be used to implement the above Figure 7 In the method embodiment shown in FIG. 1 , the functions of the storage node are described, and the modules included in the foot data processing device 1200 are specifically used to implement the following functions.
[0195] The processing module 1210 is used to determine the throughput of the storage node performing the key-value operation;
[0196] The transceiver module 1220 is used to send an RPC reduction request to the computing node or the throughput of the storage node to perform key-value operations when the throughput is less than a preset threshold. The RPC reduction request is used to instruct the computing node to reduce sending RPC-type key-value operation requests to the storage node. The preset threshold is the difference between the upper limit of the throughput of the storage node to perform key-value operations and the preset value. The throughput upper limit is the comprehensive maximum throughput of the storage node to perform key-value operations based on RPC-type key-value operation requests and to perform key-value operations based on RDMA-type key-value operation requests.
[0197] As a possible implementation method, the processing module 1210 is specifically used to: determine a first throughput of the storage node performing key-value operations based on an RPC-type key-value operation request; determine a second throughput of the storage node performing key-value operations based on an RDMA-type key-value operation request; and determine that the throughput of the storage node performing key-value operations is the sum of the first throughput and the second throughput.
[0198] As a possible implementation manner, the processing module 1210 is specifically used to: for each cycle, determine the throughput of the key-value operation performed by the storage node in each cycle.
[0199] As a possible implementation method, the processing module 1210 is also used to: determine the top m computing nodes in terms of the number of RPC-type key-value operation requests sent to the storage node among at least one computing node, where m and n are positive integers greater than or equal to 1; determine the top n threads in terms of the number of RPC-type key-value operation requests sent to the storage node among the top m computing nodes, and the RPC reduction request is used to instruct the computing node to which the thread belongs to reduce the number of RPC-type key-value operation requests sent to the storage node.
[0200] As a possible implementation method, the processing module 1210 is also used to: determine the top n threads in at least one computing node that send RPC-type key-value operation requests to the storage node; determine the top m computing nodes in the computing nodes to which the top n threads belong that send RPC-type key-value operation requests to the storage node, and the RPC reduction request is used to instruct the top m computing nodes to reduce the number of RPC-type key-value operation requests sent to the storage node by the top n threads, where m and n are positive integers greater than or equal to 1.
[0201] As a possible implementation manner, the SoC stores an index of a key-value pair and / or partial data of the key-value pair, where the index includes an address of an object value corresponding to the key.
[0202] It should be understood that the data processing device 1200 of the embodiment of the present invention can be implemented by a CPU, an ASIC, or a programmable logic device (PLD), wherein the PLD can be a complex programmable logical device (CPLD), an FPGA, a generic array logic (GAL), or any combination thereof. The data processing device 1200 can be implemented by software. Figure 7 When the data processing method shown in , the data processing device 1200 and its various modules can also be software modules.
[0203] It should be understood that the computing nodes, storage nodes and other nodes in the embodiments of the present application may correspond to the data processing device 1200 in the embodiments of the application, and may correspond to the corresponding subjects in the method according to the embodiments of the present application, and the above and other operations and / or functions of each module in the data processing device 1200 are respectively to achieve Figure 7 For the sake of brevity, the corresponding process of the method in will not be repeated here.
[0204] The present application also provides a Fig.13 The system shown in the figure includes multiple computing devices 1300, each of which includes a memory 1301, a processor 1302, a communication interface 1303 and a bus 1304. The memory 1301, the processor 1302 and the communication interface 1303 are connected to each other through the bus 1304. The computing device 1300 may be Figure 4 A computing server or storage server in Figure 4 A compute node provided by a compute server or a storage node provided by a storage server.
[0205] The memory 1301 may be a read-only memory, a static storage device, a dynamic storage device or a random access memory. The memory 1301 may store computer instructions and a data set required to execute the computer instructions. When the computer instructions stored in the memory 1301 are executed by the processor 1302, the processor 1302 and the communication interface 1303 are used to execute the data processing method.
[0206] Processor 1302 may be a general-purpose central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or any combination thereof. Processor 1302 may include one or more chips. Processor 1302 may include an AI accelerator, such as a neural processing unit (NPU). In addition, Fig.13 The example in which each computing device 1300 includes a processor 1302 is used for explanation. In specific implementation, the number and type of processors 1302 in each computing device 1300 can be set according to business requirements. The same computing device 1300 can include one or more processors. When the same computing device 1300 includes multiple processors, this application does not limit the type of processor.
[0207] The communication interface 1303 uses a transceiver module such as, but not limited to, a transceiver to implement communication between the computing device 1300 and other devices or a communication network. For example, a key value operation request may be received or sent through the communication interface 1303 .
[0208] The bus 1304 may include a path for transmitting information between various components of the computing device 1300 (eg, the memory 1301 , the processor 1302 , and the communication interface 1303 ).
[0209] A communication path is established between each of the computing devices 1300 through a communication network. Any computing device 1300 may be a computer (eg, a server) in a distributed storage system, or a computer in an edge data center, or a terminal computing device.
[0210] Each computing device 1300 may be deployed with computing nodes and / or storage nodes, such as executing Figure 7 Any of the steps 710 to 760 shown in the figure, or the functions of the processing module 1210 or the transceiver module 1220 when executing the data processing device 1200.
[0211] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.
[0212] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD). The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data processing method, characterized in that: The method is applied to a computing node, the computing node is connected to at least one storage node, the computing node includes a first network card, each of the at least one storage node includes a second network card, the second network card includes a system on chip SoC, the first network card is used to execute a key-value operation request of a remote direct data access RDMA type, and the SoC is used to execute a key-value operation request of a remote procedure call protocol RPC type, the method includes: According to the throughput of each storage node performing the key-value operation, the ratio of the types of key-value operation requests is adjusted, and the types of the key-value operation requests include RPC type and RDMA type; Sending a plurality of key-value operation requests to the at least one storage node, wherein the number of RPC-type requests and the number of RDMA-type requests in the plurality of key-value operation requests meet the ratio; Receive the key-value operation result returned by the at least one storage node.
2. The method according to claim 1, characterized in that The adjusting the ratio of the types of key-value operation requests according to the throughput of the key-value operation performed by each storage node in the at least one storage node comprises: When the throughput of the key-value operation performed by the first storage node is less than a preset threshold, the RPC-type key-value operation requests sent to the first storage node are reduced, and the first storage node is one of the at least one storage node.
3. The method according to claim 2, characterized in that When the throughput of the key-value operation performed by the first storage node is less than a preset threshold, reducing the RPC-type key-value operation requests sent to the first storage node includes: When the computing node is one of the top m computing nodes that sends RPC-type key-value operation requests to the first storage node, and the throughput of the first storage node performing key-value operations is less than the preset threshold, the type of key-value operation requests of at least one thread in the computing node is converted from RPC type to RDMA type, and the at least one thread is one of the top n threads that sends RPC-type key-value operation requests to the first storage node, and m and n are positive integers greater than or equal to 1.
4. The method according to claim 2 or 3, characterized in that: When the throughput of the key-value operation performed by the first storage node is less than a preset threshold, before reducing the RPC-type key-value operation requests sent to the first storage node, the method further includes: An RPC reduction request sent by the first storage node is received, where the RPC reduction request indicates that a throughput of the key-value operation executed by the first storage node is less than the preset threshold.
5. The method according to claim 2 or 3, characterized in that: When the throughput of the key-value operation performed by the first storage node is less than a preset threshold, before reducing the RPC-type key-value operation requests sent to the first storage node, the method further includes: Obtaining a throughput of the key-value operation performed by the first storage node; Determine whether the throughput of the key-value operation performed by the first storage node is less than the preset threshold.
6. A data processing method, characterized in that: The method is applied to a storage node, the storage node is connected to at least one computing node, each computing node in the at least one computing node includes a first network card, the storage node includes a second network card, the second network card includes a system on chip SoC, the first network card is used to execute a key-value operation request of a remote direct data access RDMA type, and the SoC is used to execute a key-value operation request of a remote procedure call protocol RPC type, the method includes: Determining a throughput of the storage node performing key-value operations; When the throughput is less than a preset threshold, an RPC reduction request is sent to the computing node or the storage node performs a throughput of key-value operations, and the RPC reduction request is used to instruct the computing node to reduce sending RPC-type key-value operation requests to the storage node.
7. The method according to claim 6, characterized in that The determining the throughput of the storage node performing the key-value operation includes: Determine a first throughput of the storage node performing the key-value operation based on the RPC-type key-value operation request; Determine a second throughput of the storage node performing the key-value operation based on the key-value operation request of the RDMA type; Determine that the throughput of the storage node performing the key-value operation is the sum of the first throughput and the second throughput.
8. The method according to claim 6 or 7, characterized in that: The determining the throughput of the storage node performing the key-value operation includes: For each cycle, a throughput of the key-value operation performed by the storage node in each cycle is determined.
9. The method according to any one of claims 6 to 8, characterized in that: Before sending an RPC reduction request to the computing node or the storage node performing a key-value operation on the throughput less than a preset threshold, the method further includes: Determine the top m computing nodes in terms of the number of key-value operation requests of the RPC type sent to the storage node among the at least one computing node, where m and n are positive integers greater than or equal to 1; Determine the top n threads among the top m computing nodes that send RPC-type key-value operation requests to the storage node, and the RPC reduction request is used to instruct the computing node to which the thread belongs to reduce the number of RPC-type key-value operation requests sent to the storage node.
10. The method according to any one of claims 6 to 8, characterized in that: Before sending an RPC reduction request to the computing node or the storage node performing a key-value operation on the throughput less than a preset threshold, the method further includes: Determine the top n threads in the at least one computing node that send RPC-type key-value operation requests to the storage node; Determine the top m computing nodes that send RPC type key-value operation requests to the storage node among the computing nodes to which the top n threads belong, the RPC reduction request is used to instruct the top m computing nodes to reduce the number of RPC type key-value operation requests sent to the storage node by the top n threads, and m and n are positive integers greater than or equal to 1.
11. The method according to any one of claims 6 to 10, characterized in that: The SoC stores an index of a key-value pair and / or partial data of the key-value pair, wherein the index includes an address of an object value corresponding to the key.
12. A data processing device, characterized in that: include: A processing module, configured to adjust a ratio of types of key-value operation requests according to a throughput of key-value operations performed by each storage node in the at least one storage node, wherein the types of key-value operation requests include RPC types and RDMA types; A transceiver module, used for sending a plurality of key-value operation requests to the at least one storage node, wherein the number of RPC type requests and the number of RDMA type requests in the plurality of key-value operation requests conform to the ratio; The transceiver module is used to receive the key-value operation result returned by the at least one storage node.
13. A data processing device, characterized in that: include: A processing module, configured to determine a throughput of the storage node performing key-value operations; The transceiver module is used to send an RPC reduction request to the computing node or the throughput of the storage node performing key-value operations when the throughput is less than a preset threshold, the RPC reduction request is used to instruct the computing node to reduce sending RPC-type key-value operation requests to the storage node, the preset threshold is the difference between the upper limit of the throughput of the storage node performing key-value operations and a preset value, and the throughput upper limit is the comprehensive maximum throughput of the storage node performing key-value operations based on RPC-type key-value operation requests and performing key-value operations based on RDMA-type key-value operation requests.
14. A computing device, characterized in that The computing device includes a memory and a processor, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions, the operation steps of any one of the methods described in claims 1-11 are performed.
15. A computer system, characterized in that: The computer system includes at least one computing node and at least one storage node, the at least one computing node is used to execute the steps of the method described in any one of claims 1 to 5 upon receiving a user request, the at least one storage node is used to execute the steps of the method described in any one of claims 6 to 11, and send key-value operation results to the at least one computing node.
16. A readable storage medium, characterized in that: The readable storage medium includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer is enabled to execute the operation steps of the method described in any one of claims 1 to 11.
