CN117290084A - Memory pool operation method and device - Google Patents

Memory pool operation method and device Download PDF

Info

Publication number
CN117290084A
CN117290084A CN202211214158.XA CN202211214158A CN117290084A CN 117290084 A CN117290084 A CN 117290084A CN 202211214158 A CN202211214158 A CN 202211214158A CN 117290084 A CN117290084 A CN 117290084A
Authority
CN
China
Prior art keywords
memory
operation request
interface
memory pool
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211214158.XA
Other languages
Chinese (zh)
Inventor
左鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Cloud Computing Technologies Co Ltd
Original Assignee
Huawei Cloud Computing Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Cloud Computing Technologies Co Ltd filed Critical Huawei Cloud Computing Technologies Co Ltd
Priority to PCT/CN2023/100596 priority Critical patent/WO2023241676A1/en
Publication of CN117290084A publication Critical patent/CN117290084A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Abstract

The embodiment of the application discloses an operation method of a memory pool, which is used for improving the data transmission performance of the memory pool. The method comprises the following steps: the client provides a first interface, wherein the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting an operation request sent by the application server into an operation on the memory pool. The client calls a first interface to generate a first operation request, and sends the first operation request to the memory pool, so that the memory pool executes one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.

Description

Memory pool operation method and device
The present application claims priority from the chinese patent office, application number 202210686944.3, chinese patent application entitled "memory cache service system" filed on 6 months and 16 days 2022, the entire contents of which are incorporated herein by reference.
Technical Field
The embodiment of the application relates to the field of cloud storage, in particular to an operation method and device of a memory pool.
Background
With the development of cloud service technology, data of various applications running on a cloud server are stored in a database at a back end, and the cloud server running the various applications is also called an application server. Because the data is stored in the database by using the magnetic disk, the data transmission performance of the data is difficult to meet the requirements of front-end application. In order to solve the problem of data transmission performance, an application provider purchases a memory storage service provided by a cloud manufacturer, that is, an application server stores data in a database in a memory pool to improve the data transmission performance.
In the current system architecture of the memory storage service, the memory storage service is provided by a memory pool formed by a plurality of servers, and each server in the memory pool comprises a Central Processing Unit (CPU) and a memory. In the process of providing the memory storage service by the memory pool, after the cloud server in the memory pool receives a data transmission request sent by the application server through a remote procedure call (remote procedure call, RPC), the CPU of the corresponding server in the memory pool processes the data transmission request, and the process of processing the data transmission request comprises unpacking, processing and packaging and sending the data reception.
The CPU of the cloud server in the memory pool needs to queue to process various data transmission requests from the application server, so that the data transmission performance between the application server and the memory pool is poor. In addition, the cost of the CPU of the server in the memory pool is high, so that the cost of the memory storage service is high at present.
Disclosure of Invention
The embodiment of the application provides an operation method and device of a memory pool, which are used for improving the data transmission performance of the memory pool.
The first aspect of the embodiments of the present application provides an operation method of a memory pool, which is applied to a distributed memory storage system, where the distributed memory storage system includes a client and a memory pool, the client is deployed on an application server, and the application server is separated from the memory pool. The memory pool operation method provided in the first aspect comprises the following steps: the client calls a first interface to generate a first operation request, wherein the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting the operation request sent by the application server into an operation on a memory pool. The client sends a first operation request to the memory pool, so that the memory pool performs one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.
In the embodiment of the application, the client of the memory storage system is separated from the memory pool, and the client can directly read the remote data of the memory pool by calling the first interface corresponding to the algorithm logic, so that the access delay of the application server to the data in the memory pool is reduced, and the data transmission performance between the application server and the memory pool is improved. Meanwhile, the data are processed in the memory pool without adding a central processing unit, so that the cost of the memory pool is reduced.
In one possible implementation, the algorithm logic includes one or more algorithm logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, transaction algorithm logic, and the like. The data structure algorithm logic comprises operation logic such as query, insertion, update, deletion, scanning, modification and the like of a data structure and stored data in the data structure, wherein the data structure comprises a hash table, a tree structure, a linked list, an ordered set, a jump table and the like. The cache replacement algorithm logic includes least recently used LRU algorithm logic, least frequently used LFU algorithm logic, and first-in first-out algorithm logic. The multi-copy algorithm logic includes final coherency algorithm logic and serially connectable coherency algorithm logic.
In the embodiment of the application, the client can call a plurality of first interfaces to realize a plurality of different arithmetic logics, so that a plurality of first operation requests are generated, and the feasibility of generating the first operation requests is improved. Meanwhile, based on the architecture that the client and the memory pool are separated, various algorithm logics are realized on one side of the application server, a central processing unit for increasing calculation power in the memory pool is not needed, and the cost of the memory pool is reduced.
In a possible implementation manner, before the client side invokes the first interface to generate the first operation request, the client side receives, through the second interface, a second operation request sent by an application program in the application server, where the second operation request is used to instruct the distributed memory storage system to perform one or more of the following operations: query operation, insert operation, delete operation, scan operation, and update operation. And in the process that the client calls the first interface to generate the first operation request, the client calls the first interface to generate the first operation request according to the second operation request.
According to the method and the device for processing the RDMA operation, the memory allocation and release operation and the calculation task unloading operation of the memory pool are achieved, the data transmission performance between the application server and the memory pool is improved, and the cost of memory storage service is reduced.
In a possible implementation, the second interface includes one or more of the following interfaces: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API.
In the embodiment of the application, the distributed memory storage service can be realized through a plurality of second interfaces, so that the realizability of the memory storage service is improved.
In one possible implementation, the first operation request is a memory pool access request, and the client performs a remote data direct access RDMA operation to the memory pool according to the memory pool access request.
In the embodiment of the application server side client reads and writes the data in the memory pool through RDMA operation, so that the data transmission time delay between the application server and the memory pool is reduced, and the data transmission performance of the memory storage service is improved.
In one possible implementation, the first operation request is a memory allocation or release request, and the distributed memory storage system performs a memory allocation and release operation on the memory pool according to the memory allocation or release request.
According to the embodiment of the application server side, the client side allocates or releases the memory address of the memory pool as required in real time through the memory allocation or release operation request, so that the use flexibility of the memory resources in the memory pool is improved.
In one possible implementation, the memory pool includes a data processing unit DPU, the first request is an offload operation request, and the distributed memory storage system performs an offload operation according to the offload operation request, where the offload operation is used to offload a computing task of the application server to the DPU of the memory pool for execution.
According to the embodiment of the application server, the computing task can be unloaded to the data processing unit in the memory for execution, so that the processing efficiency of the application server on the computing task is improved.
In one possible implementation, a distributed memory caching system provides a subscription interface for memory storage services, the subscription interface including a pay-per-demand mode including time-per-use and space-per-use charging.
According to the memory storage service selling method and device, the memory storage service is sold through the on-demand charging mode that the user does not perceive server serverless, and the user can purchase on demand based on the use time and the use space, so that the flexibility of the memory caching service is improved compared with the mode that the user purchases the storage space in the memory pool in advance.
A second aspect of the embodiments of the present application provides an operation device for a memory pool, where the operation device for a memory pool includes a transceiver unit and a processing unit. The processing unit is used for calling a first interface to generate a first operation request, the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting the operation request sent by the application server into an operation on the memory pool. The receiving and transmitting unit is used for sending a first operation request to the memory pool so that the memory pool can execute one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.
In one possible implementation, the algorithm logic includes one or more algorithm logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, transaction algorithm logic, and the like.
In a possible implementation manner, the processing unit is further configured to receive, through the second interface, a second operation request sent by an application program in the application server, where the second operation request is used to instruct the distributed memory storage system to perform one or more of the following operations: query operation, insert operation, delete operation, and update operation. The processing unit is specifically configured to invoke the first interface according to the second operation request to generate a first operation request.
In a possible implementation, the second interface includes one or more of the following interfaces: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API.
In one possible implementation, the first operation request is a memory pool access request, and the processing unit is specifically configured to perform a remote data direct access RDMA operation on the memory pool according to the memory pool access request.
In one possible implementation manner, the first operation request is a memory allocation or release request, and the processing unit is configured to perform a memory allocation and release operation on the memory pool according to the memory allocation or release request.
In a possible implementation manner, the memory pool includes a data processing unit DPU, the first request is an offloading operation request, and the processing unit is specifically configured to execute an offloading operation according to the offloading operation request, where the offloading operation is used to offload a computing task of the application server to the DPU for executing.
In a possible implementation manner, the transceiver unit is specifically configured to provide a subscription interface for the memory storage service, where the subscription interface includes a charging-on-demand mode, and the charging-on-demand mode includes charging-on-use time and charging-on-use space.
A third aspect of the embodiments of the present application provides a cluster of computer devices, including at least one computing device, each computing device including a processor, where the processor of the at least one computing device is configured to execute instructions stored in a memory of the at least one computing device, so that the cluster of computing devices performs the method according to the first aspect or any one of the possible implementation manners of the first aspect.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium having stored thereon instructions that, when executed, cause a computer to perform the method of the first aspect or any of the possible implementation manners of the first aspect.
A fifth aspect of the embodiments of the present application provides a computer program product, which includes instructions that, when executed, cause a computer to implement the method according to the first aspect or any one of the possible implementation manners of the first aspect.
It should be appreciated that any of the above-mentioned advantages achieved by the computer device cluster, the computer-readable medium, or the computer program product may refer to the advantages of the corresponding method, and will not be described herein.
Drawings
FIG. 1 is a schematic diagram of a system architecture of a memory storage service according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for operating a memory pool according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating another method for operating a memory pool according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of an algorithm logic provided in an embodiment of the present application;
FIG. 5 is a flow chart of another algorithm logic provided in an embodiment of the present application;
FIG. 6 is a flow chart of another algorithm logic provided in an embodiment of the present application;
FIG. 7 is a flow chart of another algorithm logic provided in an embodiment of the present application;
FIG. 8 is a flow chart of another algorithm logic provided in an embodiment of the present application;
FIG. 9 is a flowchart illustrating another method of operating a memory pool according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a memory pool operating device according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a computing device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computing device cluster according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides an operation method and device of a memory pool, which are used for improving the data transmission performance of the memory pool.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
First, related terms referred to in the present application are explained for convenience of understanding by those skilled in the art.
A distributed memory cache (disaggregated memory cache, DMC) system, also referred to as a distributed storage system, is a pool-based distributed cache provided herein.
Remote direct memory access (remote direct memory access, RDMA) is a direct memory access technique in which RDMA transfers data directly from the memory of one computing device to another computing device without the intervention of the two operating systems.
The following describes a memory pool operation method and device provided in the embodiments of the present application with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic system architecture diagram of a distributed memory storage system according to an embodiment of the present application. In the system architecture shown in fig. 1, a distributed memory storage system 100 includes a memory pool 101 and a client 102, where the client 102 is deployed on an application server 103, and the application server 103 and the memory pool 101 are connected through a transmission network. The functions of the various portions of distributed memory storage system 100 are described in detail below.
Memory pool 101 is used to provide memory storage services to application servers 103. Memory pool 101 is comprised of one or more memories 1011, with memory 1011 being used to store data or data structures associated with memory storage services. Memory pool 101 may also include a network card and a data processing unit DPU for performing computing tasks offloaded to the memory pool by application server 103. Memory pool 101 provides the application server with a standard interface for remote direct memory access RDMA operations, memory allocation and release operations, and offload operations, i.e., a third interface.
The client 102 is configured to provide a cache access interface, such as a Redis API, a Memcached API, and a key-value-store API, to an application program, i.e., a second interface. The application programs include web applications such as game applications, e-commerce applications, and financial applications that run on the application server 103.
Client 102 is also configured to implement a variety of algorithm logic including data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, and transaction algorithm logic. Wherein each algorithm logic has a corresponding call interface, i.e. a first interface. The client 102 generates various operation requests, i.e., a first operation request, to the memory pool 101, including an RDMA operation request, a memory allocation or release operation request, and an offload operation request, by invoking interfaces corresponding to various algorithmic logic in combination. Since the client 102 is deployed at the application server 103, various arithmetic logic is implemented at the application server side.
Referring to fig. 2, fig. 2 is a schematic diagram of a method for operating a memory pool according to an embodiment of the present application. The operation method of the memory pool comprises the following steps:
201. the client in the application server invokes the first interface to generate a first operation request.
The client in the application server calls a first interface to generate a first operation request, wherein the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting the operation request sent by the application server into an operation on a memory pool. The client calls a first interface to generate a first operation request, wherein the first interface comprises one or more of the following interfaces: the interface corresponding to the data structure algorithm logic, the interface corresponding to the cache replacement algorithm logic, the interface corresponding to the multi-copy algorithm logic, the interface of the erasure code algorithm logic and the interface of the transaction algorithm logic.
In a possible implementation manner, before the client in the application server invokes the first interface to generate the first operation request, the client receives, through the second interface, a second operation request sent by an application program in the application server, where the second operation request invokes an operation combination of one or more algorithm logics.
Specifically, the client calls a second interface corresponding to the processing logic module according to the second operation request to generate a third operation request, and calls a first interface corresponding to one or more algorithm logic modules according to the third operation request to generate a first operation request. Wherein the first operation request comprises one or more of the following operation requests: remote direct memory access RDMA operation requests, memory allocation and release operation requests, and offload operation requests. The second operation request is for instructing the distributed memory storage system to perform one or more of the following operations: query operation, insert operation, delete operation, scan operation, and update operation. The third operation request includes operation requests corresponding to one or more algorithmic logics.
For example, when the third operation request invokes the data structure algorithm logic, the third operation request is to instruct the distributed memory storage system to perform one or more of the following operations on the data structure: query operations, insert operations, delete operations, update operations, scan operations, and modify operations. For another example, when the third operation request invokes the cache replacement algorithm logic, the third operation request is used to instruct the distributed memory storage system to perform a write operation of information such as the cache replacement algorithm logic related data structure, the timestamp, and the count. For another example, when the third operation request invokes multi-copy algorithm logic or erasure code logic, the third operation request is to instruct the distributed memory storage system to perform the multi-copy algorithm logic or erasure code logic operation. For another example, when the third operation request invokes the transactional algorithm logic, the third operation request is to instruct the distributed memory storage system to perform operations related to the transactional algorithm logic such as transaction creation, transaction commit, transaction read, transaction write, transactional memory allocation, transactional memory release, and the like.
The second interface in the embodiment of the application includes one or more of the following interfaces: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API. Referring to fig. 3, fig. 3 is a flow chart of a method for operating a memory pool according to an embodiment of the application. In the example shown in fig. 3, the client provides a second interface to the application program, and the client receives a second operation request sent by the application program through the second interface. Specifically, the client calls a second interface corresponding to the processing logic module, generates a third operation request, calls a first interface corresponding to one or more algorithm logics based on the third operation request, and generates a first operation request. For example, the application program of the client sends a second operation request, the second operation request indicates a query operation on the distributed memory storage system, the client calls a second interface corresponding to the processing logic module according to the second operation request, and a third operation request is generated, where the third operation request is used to indicate a query operation and an insertion operation of the client on the data structure. And the client calls a first interface corresponding to the algorithm logic of the data structure according to the third operation request to generate a first operation request.
The algorithm logic in the embodiment of the application comprises one or more of the following algorithm logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, and transaction algorithm logic. The following describes the above-described algorithm logic, respectively.
Referring to fig. 4, fig. 4 is a schematic diagram of an algorithm logic of a data structure according to an embodiment of the present application. In the example shown in fig. 4, the client calls an interface corresponding to the algorithm logic of the data structure according to the third operation request, and generates the first operation request. The data structure algorithm logic is configured to perform a third operation on the data structure, such as hash tables, tree structures, linked lists, ordered sets, and jump tables, and the data stored therein, such as operations of querying, inserting, updating, deleting, scanning, and modifying. It will be appreciated that for the insert and update operations, the client needs to input the data that needs to be inserted and updated. For query and scan operations, the data results of the query and scan are output.
In the example shown in fig. 4, the client receives a second operation request sent by the application program in the application server, and the client invokes the second interface according to the second operation request to generate a third operation request. For example, the third operation request is a hash table lookup request, the hash table lookup operation is implemented by two RDMA read operations, the first RDMA read operation being to read a bucket in the hash table, the second RDMA read operation being to read data pointed to by an pointer in the bucket. And the client calls an interface corresponding to the data structure operation according to the hash table query request to generate the two RDMA read operation requests.
Referring to fig. 5, fig. 5 is a schematic diagram of a cache replacement algorithm logic according to an embodiment of the present application. In the example shown in fig. 5, the client invokes the interface corresponding to the cache replacement algorithm logic to generate the first operation request, the cache replacement algorithm logic including least recently used (least recently used, LRU) algorithm logic, least frequently used (least frequently used, LFU) algorithm logic, and first-in-first-out (first in first out, FIFO) algorithm logic.
In the example shown in fig. 5, the client receives a second operation request sent by an application program in the application server, the client calls the second interface according to the second operation request to generate a third operation request, and the client calls the first interface corresponding to the arithmetic logic according to the third operation request to generate the first operation request. For example, the third operation request is a data structure write operation request related to the cache replacement algorithm logic, and the client side calls an interface corresponding to the cache replacement algorithm logic to generate a memory allocation or release operation request according to the data structure write operation request. For another example, the third operation request is a time stamp or a count write operation request related to the cache replacement algorithm logic, and the client side calls an interface corresponding to the cache replacement algorithm according to the time stamp or the count write operation request to generate an RDMA write operation request to the memory pool.
In the example shown in fig. 5, the first operation request may be an operation request of the application server, or may be an operation request of the application server simultaneously with the memory pool. For example, the client invokes an interface corresponding to the cache replacement algorithm to generate a write operation request to the application server, where the write operation request is used to write data such as a data structure, a timestamp, a count, and the like related to the cache replacement algorithm to the application server. For another example, the client invokes an interface corresponding to the cache replacement algorithm to generate a write operation request to the application server and the memory pool, where the write operation request is used to write data such as a data structure, a timestamp, a count, and the like related to the cache replacement algorithm into the application server and the memory pool, respectively.
Referring to fig. 6, fig. 6 is a schematic diagram of a multi-copy algorithm logic according to an embodiment of the present application. In the example shown in fig. 6, the client invokes the interface corresponding to the multi-copy algorithm logic including the final coherency algorithm logic and the serializable coherency algorithm logic to generate the first operation request.
In the example shown in fig. 6, the client receives a second operation request sent by the application program in the application server, the client calls the second interface according to the second operation request to generate a third operation request, and the client calls the first interface corresponding to the arithmetic logic according to the third operation request to generate the first operation request. For example, when the third operation request is a read operation request, the client calls an interface corresponding to the multi-copy algorithm logic according to the read operation request to generate an RDMA read operation request to the memory pool. For another example, when the third operation request is a write operation request, the client invokes an interface corresponding to the multi-copy algorithm logic to generate an RDMA write operation request to the memory pool according to the write operation request.
Referring to fig. 7, fig. 7 is a schematic diagram of erasure code logic according to an embodiment of the present application. In the example shown in fig. 7, the client invokes a first interface corresponding to erasure code logic to generate a first operation request, and the multi-copy algorithm logic includes final consistency logic and serializable consistency logic.
In the example shown in fig. 7, the client receives a second operation request sent by the application program in the application server, the client calls the second interface to generate a third operation request according to the second operation request, and the client calls the first interface to generate the first operation request according to the third operation request. For example, when the third operation request is a read operation request, the client calls an interface corresponding to the erasure code according to the read operation request to generate an RDMA read operation request to the memory pool. For another example, when the third operation request is a write operation request, the client invokes an interface corresponding to the erasure code logic according to the write operation request to generate an RDMA write operation request to the memory pool.
Referring to fig. 8, fig. 8 is a schematic diagram of a transaction algorithm logic according to an embodiment of the present application. In the example shown in fig. 8, the client invokes an interface corresponding to the transaction algorithm logic to generate a first operation request, where the transaction algorithm logic is configured to implement operations such as transaction creation, transaction commit, transaction read, transaction write, transaction memory allocation, and transaction memory release.
In the example shown in fig. 8, the client receives a second operation request sent by the application program in the application server, the client calls the second interface to generate a third operation request according to the second operation request, and the client calls the first interface to generate the first operation request according to the third operation request. For example, when the third operation request is a transaction creation operation request, the client calls an interface corresponding to the transaction algorithm logic according to the transaction creation operation request to generate a memory allocation operation request for the memory pool. For another example, when the third operation request is a transaction read operation request, the client invokes an interface corresponding to the transaction algorithm logic according to the transaction read operation request to generate an RDMA read operation request to the memory pool.
202. The application server sends a first operation request to the memory pool.
After the application server calls the first interface to generate a first operation request, the application server sends a third operation request to the memory pool. Specifically, the client in the application server sends the first operation request to the memory pool through a third interface, where the third interface includes an access interface of the memory pool.
With continued reference to fig. 3, in the example shown in fig. 3, the client in the application server sends a first operation request to the memory pool through the third interface, for example, the client in the application server generates an RDMA read operation request of the memory pool, and the client sends the RDMA read operation request to the memory pool through the third interface, so as to implement a read operation of the client on the stored data in the memory pool.
203. The memory pool executes one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation or release operations, and offload operations.
After the memory pool of the distributed memory cache system receives the first operation request through the third interface, the memory pool executes one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation or release operations, and offload operations. Wherein the RDMA operations include RDMA read operations, RDMA write operations, and RDMA compare and swap (CAS) operations.
Specifically, when the first operation request is a memory pool access request, the distributed memory storage system performs a remote data direct access RDMA operation on the memory pool according to the memory pool access request. When the first operation request is a memory allocation or release request, the distributed memory storage system executes memory allocation or release operation in the memory pool to the memory pool according to the memory allocation or release request. When the first operation request is an unloading operation request, the distributed memory storage system executes an unloading operation according to the unloading operation request, wherein the unloading operation is used for unloading the computing task of the application server to the data processing unit DPU of the memory pool for execution.
Referring to fig. 9, fig. 9 is a schematic diagram of another memory pool operation method according to an embodiment of the present application. In the example shown in fig. 9, the memory pool in the distributed memory storage system is capable of performing one or more of the following functions: memory pool space management, memory space allocation and release, copy mapping, multi-lease isolation and offloading operations are performed.
The memory pool space management is to address the memory spaces of a plurality of processors in the memory pool into a unified memory space so as to provide memory storage service for the application server. The copy mapping refers to that a copy mapping relation among a plurality of storage addresses in a memory is established so as to cooperate with realization of multi-copy algorithm logic. The multi-lease isolation refers to isolating the memories of a plurality of application servers, so that different application servers can access the memory pool without mutual influence, and the memory storage service quality of the application servers is ensured.
According to the memory storage system, based on the architecture of separate deployment of the client and the memory pool, the client can directly read remote data of the memory pool by calling the first interface corresponding to the algorithm logic, so that the access time delay of the application server to the data in the memory pool is reduced, and the data transmission performance between the application server and the memory pool is improved.
Having described a method for operating a memory pool provided by an embodiment of the present application, a memory pool operating device provided by an embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 10, fig. 10 is a schematic structural diagram of a memory pool operating device according to an embodiment of the present application. The device is used to implement the steps performed by the distributed memory storage system in the above embodiments, and as shown in fig. 10, the memory pool operating device 1000 includes a transceiver unit 1001 and a processing unit 1002.
The processing unit 1001 is configured to invoke a first interface to generate a first operation request, where the first interface includes one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is configured to convert the operation request sent by the application server into an operation on the memory pool. The transceiver unit 1001 is further configured to send a first operation request to the memory pool, so that the memory pool performs one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.
In one possible implementation, the algorithm logic includes one or more algorithm logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, transaction algorithm logic, and the like.
In a possible implementation manner, the processing unit 1002 is further configured to receive, through the second interface, a second operation request sent by an application program in the application server, where the second operation request is used to instruct the distributed memory storage system to perform one or more of the following operations: query operation, insert operation, delete operation, scan operation, and update operation. The processing unit 1002 is specifically configured to invoke the first interface to generate the first operation request according to the second operation request.
In a possible implementation, the second interface includes one or more of the following interfaces: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API.
In one possible implementation, the first operation request is a memory pool access request, and the processing unit 1002 is specifically configured to perform a remote data direct access RDMA operation on the memory pool according to the memory pool access request.
In a possible implementation manner, the first operation request is a memory allocation or release request, and the processing unit 1002 is configured to perform a memory allocation and release operation on the memory pool according to the memory allocation or release request.
In a possible implementation manner, the memory pool includes a data processing unit DPU, the first request is an offload operation request, and the processing unit 1002 is specifically configured to perform an offload operation according to the offload operation request, where the offload operation is used to offload a computing task of the application server to the DPU for execution.
In a possible implementation manner, the transceiver unit 1001 is specifically configured to provide a subscription interface for the memory storage service, where the subscription interface includes a charging-on-demand mode, and the charging-on-demand mode includes charging-on-use time and charging-on-use space.
It should be understood that the division of the units in the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated when actually implemented. And the units in the device can be all realized in the form of software calls through the processing element; or can be realized in hardware; it is also possible that part of the units are implemented in the form of software, which is called by the processing element, and part of the units are implemented in the form of hardware. For example, each unit may be a processing element that is set up separately, may be implemented as integrated in a certain chip of the apparatus, or may be stored in a memory in the form of a program, and the functions of the unit may be called and executed by a certain processing element of the apparatus. Furthermore, all or part of these units may be integrated together or may be implemented independently. The processing element described herein may in turn be a processor, which may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each unit above may be implemented by an integrated logic circuit of hardware in a processor element or in the form of software called by a processing element.
It should be noted that, for simplicity of description, the above method embodiments are all described as a series of combinations of actions, but it should be understood by those skilled in the art that the present invention is not limited by the order of actions described, and further, that the embodiments described in the specification belong to preferred embodiments, and that the actions are not necessarily required for the present invention.
Other reasonable combinations of steps that can be conceived by those skilled in the art from the foregoing description are also within the scope of the present application. Furthermore, those skilled in the art will be familiar with the preferred embodiments, and the description of the preferred embodiments does not necessarily require any particular action to be taken in connection with the present invention.
Referring to fig. 11, fig. 11 is a schematic structural diagram of a computing device according to an embodiment of the present application. As shown in fig. 11, the computing device 1100 includes: processor 1101, memory 1102, communication interface 1103 and bus 1104, processor 1101, memory 1102 and communication interface 1103 being coupled by a bus (not shown). The memory 1102 stores instructions that, when executed in the memory 1102, cause the computing device 1100 to perform the methods performed by the memory storage system in the method embodiments described above.
Computing device 1100 may be one or more integrated circuits configured to implement the above methods, for example: one or more specific integrated circuits (application specific integrated circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (field programmable gate array, FPGA), or a combination of at least two of these integrated circuit forms. For another example, when the units in the apparatus may be implemented in the form of a scheduler of processing elements, the processing elements may be general-purpose processors, such as a central processing unit (central processing unit, CPU) or other processor that may invoke the program. For another example, the units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
The processor 1101 may be a central processing unit (central processing unit, CPU), but may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits (application specific integrated circuit, ASIC), field programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general purpose processor may be a microprocessor, but in the alternative, it may be any conventional processor.
The memory 1102 may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
The memory 1102 stores executable program codes, and the processor 1101 executes the executable program codes to implement the functions of the transceiver unit and the processing unit, respectively, thereby implementing the memory pool operation method described above. That is, the memory 1102 has instructions stored thereon for performing the memory pool operations described above.
The communication interface 1103 enables communication between the computing device 1100 and other devices or communication networks using transceiving means such as, but not limited to, a network interface card, transceiver, or the like.
The bus 1104 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. The bus may be a peripheral component interconnect express (peripheral component interconnect express, PCIe) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, a unified bus (Ubus or UB), a computer quick link (compute express link, CXL), a cache coherent interconnect protocol (cache coherent interconnect for accelerators, CCIX), or the like. The buses may be divided into address buses, data buses, control buses, etc.
Referring to fig. 12, fig. 12 is a schematic diagram of a computing device cluster according to an embodiment of the present application. As shown in fig. 12, the computing device cluster 1200 includes at least one computing device 1100. The computing device 1100 may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, computing device 1100 may also be a terminal device such as a desktop, notebook, or smart phone.
As shown in fig. 12, the computing device cluster 1200 includes at least one computing device 1100. The same instructions for performing the memory pool operation method described above may be stored in memory 1102 in one or more computing devices 1100 in the computing device cluster 1200.
In some possible implementations, some of the instructions for performing the pool operation method described above may also be stored separately in the memory 1102 of one or more computing devices 1100 in the computing device cluster 1200. In other words, a combination of one or more computing devices 1100 may collectively execute instructions for performing the above-described memory pool operation method.
It should be noted that, the memory 1102 of different computing devices 1100 in the computing device cluster 1200 may store different instructions for performing part of the functions of the memory pool operating device described above. That is, the instructions stored by the memory 1102 in the different computing devices 1100 may implement the functionality of one or more modules in the transceiver unit and the processing unit.
In some possible implementations, one or more computing devices 1100 in the cluster of computing devices 1200 may be connected by a network. Wherein the network may be a wide area network or a local area network, etc.
In another embodiment of the present application, there is further provided a computer readable storage medium, where computer executable instructions are stored, when executed by a processor of a device, to perform a method performed by a memory storage system in the above method embodiment.
In another embodiment of the present application, there is also provided a computer program product comprising computer-executable instructions stored in a computer-readable storage medium. When the processor of the device executes the computer-executable instructions, the device executes the method executed by the memory storage system in the method embodiment described above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM, random access memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (19)

1. The method for operating the memory pool is characterized by being applied to a distributed memory storage system, wherein the distributed memory storage system comprises a client and the memory pool, the client is deployed on an application server, and the application server is separated from the memory pool and comprises the following steps:
the client calls a first interface to generate a first operation request, wherein the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting the operation request sent by the application server into an operation on the memory pool;
the client sends the first operation request to the memory pool, so that the memory pool executes one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.
2. The method of claim 1, wherein the algorithmic logic comprises one or more of algorithmic logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, and transaction algorithm logic.
3. The method of claim 1 or 2, wherein before the client invokes the first interface to generate the first operation request, the method further comprises:
The client receives a second operation request sent by an application program in the application server through a second interface, wherein the second operation request is used for indicating the distributed memory storage system to execute one or more of the following operations: query operation, insert operation, delete operation, scan operation, and update operation;
the client invoking the first interface to generate a first operation request includes:
and the client calls the first interface according to the second operation request to generate the first operation request.
4. A method according to claim 3, wherein the second interface comprises one or more of the following: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API.
5. The method of any of claims 1-4, wherein the first operation request is a memory pool access request, the method further comprising:
and executing remote data direct access (RDMA) operation on the memory pool according to the memory pool access request.
6. The method of any one of claims 1 to 5, wherein the first operation request is a memory allocation or release request, the method further comprising:
And executing memory allocation and release operation on the memory pool according to the memory allocation or release request.
7. The method of any of claims 1 to 6, wherein the memory pool includes a data processing unit, DPU, the first request is an offload operation request, the method further comprising:
and executing unloading operation according to the unloading operation request, wherein the unloading operation is used for unloading the computing task of the application server to the DPU for execution.
8. The method according to any one of claims 1 to 7, further comprising:
the distributed memory caching system provides a subscription interface for memory storage services, the subscription interface comprising a pay-per-view mode, the pay-per-view mode comprising time-per-use charging and space-per-use charging.
9. An apparatus for operating a memory pool, comprising:
the processing unit is used for calling the first interface to generate a first operation request, the first interface comprises one or more application program interface APIs corresponding to algorithm logic, and the algorithm logic is used for converting the operation request sent by the application server into an operation on the memory pool;
The receiving and transmitting unit is used for sending the first operation request to the memory pool so that the memory pool can execute one or more of the following operations according to the first operation request: remote direct memory access RDMA operations, memory allocation and release operations, and offload operations.
10. The apparatus of claim 9, wherein the algorithm logic comprises one or more algorithm logic: data structure algorithm logic, cache replacement algorithm logic, multi-copy algorithm logic, erasure code algorithm logic, and transaction algorithm logic.
11. The apparatus according to claim 9 or 10, wherein the processing unit is further configured to:
receiving a second operation request sent by an application program in the application server through a second interface, wherein the second operation request is used for indicating the distributed memory storage system to execute one or more of the following operations: query operation, insert operation, delete operation, scan operation, and update operation;
the processing unit is specifically configured to invoke the first interface according to the second operation request to generate the first operation request.
12. The apparatus of claim 11, wherein the second interface comprises one or more of the following: the remote dictionary service Redis application program interface API, the cache Memcached API, and the key-value-store API.
13. The apparatus according to any one of claims 9 to 12, wherein the first operation request is a memory pool access request, and the processing unit is specifically configured to:
and executing remote data direct access (RDMA) operation on the memory pool according to the memory pool access request.
14. The apparatus according to any one of claims 9 to 13, wherein the first operation request is a memory allocation or release request, and the processing unit is configured to:
and executing memory allocation and release operation on the memory pool according to the memory allocation or release request.
15. The apparatus according to any one of claims 9 to 16, wherein the memory pool comprises a data processing unit DPU, the first request being an offload operation request, the processing unit being specifically configured to:
and executing unloading operation according to the unloading operation request, wherein the unloading operation is used for unloading the computing task of the application server to the DPU for execution.
16. The apparatus according to any one of claims 9 to 15, wherein the transceiver unit is specifically configured to:
providing a subscription interface for memory storage services, the subscription interface comprising a pay-per-demand mode, the pay-per-demand mode comprising time-per-use and space-per-use charging.
17. A cluster of computer devices, comprising at least one computing device, each computing device comprising a processor, the processor of the at least one computing device to execute instructions stored in a memory of the at least one computing device to cause the cluster of computing devices to perform the method of any one of claims 1 to 8.
18. A computer readable storage medium having instructions stored thereon, which when executed, cause a computer to perform the method of any of claims 1 to 8.
19. A computer program product comprising instructions which, when executed, cause a computer to carry out the method of any one of claims 1 to 8.
CN202211214158.XA 2022-06-16 2022-09-30 Memory pool operation method and device Pending CN117290084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2023/100596 WO2023241676A1 (en) 2022-06-16 2023-06-16 Memory pool operation method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2022106869443 2022-06-16
CN202210686944 2022-06-16

Publications (1)

Publication Number Publication Date
CN117290084A true CN117290084A (en) 2023-12-26

Family

ID=89246897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211214158.XA Pending CN117290084A (en) 2022-06-16 2022-09-30 Memory pool operation method and device

Country Status (1)

Country Link
CN (1) CN117290084A (en)

Similar Documents

Publication Publication Date Title
CN113905097B (en) Data transmission method and device
WO2023056797A1 (en) Blockchain-based data processing method, apparatus, and device, and storage medium
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN111339057A (en) Method, apparatus and computer readable storage medium for reducing back-to-source requests
CN114089920A (en) Data storage method and device, readable medium and electronic equipment
CN113434249A (en) Mirror image synchronization method and device, docker host and storage medium
CN111259060B (en) Data query method and device
US11647103B1 (en) Compression-as-a-service for data transmissions
CN116126742A (en) Memory access method, device, server and storage medium
CN113779452B (en) Data processing method, device, equipment and storage medium
CN113282589A (en) Data acquisition method and device
CN117290084A (en) Memory pool operation method and device
CN116560878A (en) Memory sharing method and related device
CN115562887A (en) Inter-core data communication method, system, device and medium based on data package
CN114595080A (en) Data processing method and device, electronic equipment and computer readable storage medium
WO2023241676A1 (en) Memory pool operation method and apparatus
CN109766363B (en) Streaming data processing method, system, electronic device and storage medium
CN110543351B (en) Data processing method and computer device
CN114401262A (en) RDMA-based big data transmission system, method, device, equipment and storage medium
CN111638979A (en) Call request processing method and device, electronic equipment and readable storage medium
CN113760318A (en) Information processing method, information processing apparatus, server, and storage medium
US10630571B1 (en) Fault-tolerant request routing
CN113779122A (en) Method and apparatus for exporting data
CN108959313B (en) Concurrent processing method and device for massive small files and storage medium
CN113645261A (en) Session data processing method, device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication