Systems and methods for a cross-layer key-value store architecture with a computational storage device
Patent Information
- Application Number
- KR1020230023140
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-06-13
- Filing Date
- 2023-02-21
- Publication Date
- 2026-11-11
- Estimated Expiration
- 2043-02-21
AI Technical Summary
Existing key-value store designs experience computational bottlenecks and network bottlenecks due to inefficient utilization of host and storage device computational resources, leading to increased data fetch latency and reduced performance in applications like AI and ML.
A cross-layer key-value store architecture is implemented, logically partitioning the system into a search layer processed by the host processor and a data layer processed by the storage device's processing circuit, utilizing a mirror cache and common memory area to offload data plane operations and enhance data locality.
This approach reduces CPU bottlenecks, minimizes data movement, and improves throughput and scalability by leveraging the high bandwidth of computational storage devices, while providing version-based crash consistency to simplify conflict resolution.
Smart Images

Figure R1020230023140_ABST
Abstract
Description
Technology Field
[0001] One or more aspects of the embodiments according to the present invention relate to a system and method for data storage. Background Technology
[0002] The background art is provided for context only, and the disclosure of any embodiment or concept of the background art does not constitute an acknowledgment that said embodiment or concept is prior art.
[0003] In the field of computer storage, a key-value store may be implemented in a storage system (e.g., a system) comprising a host (e.g., a host computer) and a storage device (e.g., a device including a storage medium for storing data). The system may store data nodes in the memory of the storage device (e.g., non-volatile memory). Data nodes are accessible to system users. The system may perform various operations on data nodes in response to user requests. The system may identify key-value locations within data nodes to perform operations based on the data node location and key-value pairs. For example, the system may (i) search for and locate the location of a value (e.g., a data object) corresponding to a key, and (ii) process requests related to the key to perform operations related to the value.
[0004] Therefore, methods, devices, and systems are required to efficiently process requests for key-value stores. The problem to be solved
[0005] The problem that the present invention aims to solve is to provide an improved computational storage system for a key-value store. means of solving the problem
[0006] An embodiment according to the present invention provides a data storage system comprising a host including a host cache portion of a mirror cache, wherein the host cache portion is for storing metadata indicating the location of a data node stored in a kernel cache portion of the mirror cache, and a storage device located in a common memory area and including the kernel cache portion.
[0007] In one embodiment, a data storage system is provided that further comprises a search layer configured to be processed by the host on the host and a data layer configured to be processed by the storage device on the storage device.
[0008] In one embodiment, the search layer includes a tree structure, and the data layer includes the data node corresponding to the leaf node in a doubly linked list of leaf nodes corresponding to the tree structure, thereby providing a data storage system.
[0009] In one embodiment, a data storage system is provided that further includes a permanent memory connected to the common memory area and a processing circuit connected to the common memory area.
[0010] In one embodiment, the processing circuit provides a data storage system configured to perform a data operation on the data node and write the data node as an updated data node to the kernel cache portion.
[0011] In one embodiment, the host determines whether the updated data node is filled in the common memory area and provides a data storage system configured to induce peer-to-peer writes from the common memory area to the persistent memory.
[0012] In one embodiment, the host provides a data storage system configured to determine whether the amount of available space of the data node is less than the amount of space for accommodating data access requests corresponding to the data node, and to allocate an expansion node to the data node.
[0013] In one embodiment, the storage device further includes a processing circuit configured to update the metadata of the data node to point to the expansion node, and the metadata of the data node indicates a first version number, and the metadata of the expansion node indicates the first version number, thereby providing a data storage system.
[0014] In one embodiment, the processing circuit provides a data storage system configured to update the extension node, update the metadata of the data node to indicate a second version number to identify the data node as the updated data node, update the metadata of the extension node to indicate the second version number to identify the extension node as the updated extension node, and update the metadata of the updated data node to point to the updated extension node.
[0015] In one embodiment, the processing circuit provides a data storage system configured to write the updated expansion node to the storage of the storage device in an out-place manner and write the updated data node to the storage in an in-place manner.
[0016] In one embodiment, a data storage system is provided that is configured to manage concurrent access to the storage device by receiving a read request and acquiring a read lock for the data node, or receiving a write request and acquiring a write lock for the data node.
[0017] An embodiment according to the present invention provides a data storage method comprising the steps of: finding metadata indicating the location of a data node stored in a storage device in a host cache portion of a mirror cache; determining that the host cache portion is stored in a host; and determining that the data node exists in a kernel cache portion of the mirror cache, wherein the kernel cache portion is stored in a common memory area of the storage device.
[0018] In one embodiment, a data storage method is provided that further includes the step of finding a partial key in a search layer to find the metadata indicating the location of the data node by the host.
[0019] In one embodiment, a data storage method is provided that includes the steps of determining that the data node has an amount of available space less than the amount of space for accommodating data access requests, and allocating an expansion node to the data node.
[0020] In one embodiment, the storage device provides a data storage method comprising a permanent memory connected to the common memory area and a processing circuit connected to the common memory area.
[0021] In one embodiment, the processing circuit may include the step of updating the metadata of the data node to point to the extension node, and the metadata of the data node and the metadata of the extension node represent a first version number, providing a data storage method.
[0022] In one embodiment, a data storage method is provided comprising the steps of updating an extension node, updating the metadata of the data node to indicate a second version number, updating the metadata of the extension node to indicate the second version number, wherein the second version number can identify the data node as an updated data node and the extension node as an updated extension node, and updating the metadata of the updated data node to point to the updated extension node.
[0023] In one embodiment, a data storage method is provided that includes the step of writing the updated expansion node to the storage of the storage device in an out-place manner, and the step of writing the updated data node to the storage in an in-place manner.
[0024] An embodiment according to the present invention provides a non-transient computer-readable medium implemented in a key-value store, wherein the non-transient computer-readable medium comprises computer code that implements a data storage method when executed in a processor, wherein the data storage method comprises the steps of finding metadata indicating the location of a data node stored in a storage device in a host cache portion of a mirror cache, wherein the host cache portion is stored in a host, and determining that the data node exists in a kernel cache portion of the mirror cache, wherein the kernel cache portion is stored in a common memory area of the storage device.
[0025] In one embodiment, the method provides a non-transient computer-readable medium that further includes the step of finding a partial key in a search layer to find the host cache metadata. Effects of the invention
[0026] An embodiment of the present invention relates to a computational storage system and provides improvements to a key-value store. Brief explanation of the drawing
[0027] Non-limiting and non-comprehensive embodiments of the present invention are described with reference to the following drawings, and unless otherwise specified, similar reference numbers refer to similar parts throughout the various drawings. FIG. 1 is a system diagram showing a data storage system including a search layer and a data layer according to some embodiments of the present invention. FIG. 2 is a system diagram showing a data storage system including a host cache and a kernel cache according to some embodiments of the present invention. FIG. 3a is a combined flowchart and system diagram illustrating the operation of a data storage method within a system according to some embodiments of the present invention. FIG. 3b is a flowchart illustrating the operation of a data storage method corresponding to the operation of FIG. 3a according to some embodiment of the present invention. FIG. 4 is a combined flowchart and system diagram illustrating the operation of a data storage method within a system providing variable-length key-value support according to some embodiments of the present invention. FIG. 5 is a combined flowchart and system diagram illustrating the operation of a data storage method within a system that provides variable key-value support and version-based crash consistency according to some embodiments of the present invention. FIG. 6 is a flowchart illustrating the operation of a data storage method for a read (or lookup) request including host-side concurrency control according to some embodiments of the present invention. FIG. 7 is a flowchart illustrating the operation of a data storage method for a write (or insert) request including host-side concurrency control according to some embodiments of the present invention. Corresponding reference characters indicate corresponding components from various perspectives of the drawings. A person skilled in the art will understand that the elements of the drawings are described for simplicity and clarity and are not necessarily drawn to scale. For example, the dimensions of some elements, layers, and areas of the drawings may be exaggerated relative to other elements, layers, and areas to help improve clarity and understanding of the various embodiments. Additionally, common but sufficiently understandable components and parts unrelated to the description of the invention may be omitted to make these various embodiments easier to understand and to clarify the description. Specific details for implementing the invention
[0028] The advantages and features of the present invention, and the methods for achieving them, will become clear by referring to the embodiments described below in detail together with the accompanying drawings. Hereinafter, embodiments are described in more detail with reference to the accompanying drawings. However, the described embodiments may be implemented in various different forms and are not limited to the embodiments described herein. Rather, these embodiments are provided to make the present invention more faithful and complete and to fully convey the spirit and features of the present invention to those skilled in the art. Accordingly, descriptions of processes, components, and technologies that are not necessary for a person skilled in the art to fully understand the spirit and features of the present invention may be omitted.
[0029] Throughout the attached drawings and specifications, unless otherwise noted, the same reference numerals, letters, or combinations thereof denote the same components, so redundant descriptions are omitted. Additionally, irrelevant parts have been omitted in the description of the embodiments to clarify the explanation. In the drawings, the relative sizes of components, layers, and regions may be exaggerated for clarity.
[0030] In the detailed description, numerous specific details are presented for the purpose of explanation and to provide a thorough understanding of various embodiments. However, it is evident that various embodiments may be implemented without these specific details or in one or more equivalent arrangements.
[0031] It should be understood that terms such as “zero,” “first,” “second,” “third,” etc., may be used herein to describe various elements, components, regions, layers, and / or sections, and that such elements, components, regions, layers, and / or sections should not be limited by these terms. These terms are used to distinguish one element, component, region, layer, or section from another element, component, region, layer, or section. Accordingly, the first element, component, region, layer, or section described below may be referred to as the second element, component, region, layer, or section without departing from the spirit and scope of the invention.
[0032] When an element or component is referred to as being "on," "connected," or "combined" with another element or component, it may be directly connected or combined with the other element or component, or one or more intermediate elements or components may exist. However, "direct connection" means that one component directly connects or combines with another component without any intermediate components. Meanwhile, other expressions describing the relationship between components, such as "between," "right between," "adjacent to," and "right adjacent to," may be interpreted similarly. Additionally, when an element or component is referred to as being "between" two elements or components, it may be the only element or component between the two elements or components, or one or more intermediate elements or components may exist.
[0033] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular forms used herein are intended to include the plural forms unless the context clearly indicates otherwise. The terms “compose,” “comprising,” “have,” “having,” “include,” and “comprising” used herein specify the presence of a specified function, integer, step, action, element, and / or component. However, they do not exclude the presence or addition of one or more other functions, integers, steps, actions, elements, components, and / or groups thereof. As used herein, the term “and / or” includes any and all combinations of one or more of the associated listed items.
[0034] As used herein, the terms “substantially,” “about,” “approximately,” and similar terms are used as terms of approximation rather than terms of degree, and are intended to describe the inherent deviation of a measured or calculated value that is perceptible to a person skilled in the art. As used herein, “about” or “approximately” includes the mentioned value and means within an acceptable range of deviation from a specific value determined by a person skilled in the art. It takes into account errors associated with the measurement and the measurement of a specific quantity (i.e., limitations of the measurement system). For example, “about” may mean within one or more standard deviations or within ±30%, 20%, 10%, or 5% of the specified value. Additionally, when describing embodiments of the invention, the use of “may” means “one or more embodiments of the invention.”
[0035] Where one or more embodiments may be implemented differently, a specific process sequence may be performed differently from the described order. For example, two processes described consecutively may be performed substantially simultaneously or in the reverse order of the described order.
[0036] Any of the described components or any combination of components (e.g., in any system diagram included herein) may be used to perform one or more of the actions of any flowchart included herein. Additionally, (i) actions are merely examples and may include various additional actions not explicitly covered, and (ii) the chronological order of actions may vary.
[0037] The electronic or electrical device and / or any other related device or component according to the embodiments of the invention described herein may be implemented using any suitable hardware, firmware (e.g., application-specific integrated circuit), software, or a combination of software, firmware, and hardware. For example, various components of such devices may be formed on a single integrated circuit (IC) chip or on separate IC chips. Additionally, various components of these devices may be implemented on a flexible printed circuit film, a tape carrier package (TCP), a printed circuit board (PCB), or formed on a single substrate.
[0038] In addition, various components of such devices may be processes or threads that run on one or more processors in one or more computing devices and interact with other system components to execute computer program instructions and perform the various functions described herein. Computer program instructions are stored in memory that may be implemented in the computing device using standard memory devices, such as, for example, Random Access Memory (RAM). Computer program instructions may also be stored in other non-transient computer-readable media, such as, for example, CD-ROMs, flash drives, etc. Furthermore, those skilled in the art should recognize that the functions of various computing devices may be combined or integrated into a single computing device without departing from the spirit and scope of the embodiments of the present invention, or that the functions of a specific computing device may be distributed across one or more other computing devices.
[0039] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by those skilled in the art to which the present invention pertains. It should be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with that meaning in the context of the relevant technology and / or this specification, and should not be interpreted in an idealized or overly formal sense unless explicitly defined herein.
[0040] As described above, in the field of computer storage, a key-value store can be implemented in a storage system (e.g., a system). The system may include a host (e.g., a host computer) and a storage device (e.g., a device including a storage medium for storing data). The storage device may store data nodes in the storage device's memory (e.g., non-volatile or persistent memory). A system user may request access to a data node. For example, the user may allow a data access request (e.g., a write request, a read request, etc.) to be received by the system. Based on the data access request, the system may locate the data node and perform operations on the data node (e.g., a write operation, a read operation, etc.).
[0041] A data node may contain a set of key-value pairs corresponding to the same partial key. Partial keys may be stored in the system's search layer. A data node may include metadata sections and ranges of key-value pairs. For example, each data node may hold a range of key-value pairs such that the largest key value in the current data node (e.g., the first data node) is smaller than the smallest key value in the next data node (e.g., the second data node adjacent to the first data node). Thus, an ascending order of key ranges between adjacent data nodes can be maintained (e.g., provided).
[0042] The system may be configured to perform various operations on data nodes. For example, the system may perform Insert(key, value), Update(key, value), Remove(key), Lookup(key), or Scan(key, range) operations on data nodes in response to a user request. Based on the receipt of a key-value pair, the system may identify the data node and the exact location within the data node where the operation is to be performed. Then, the system may process the request associated with the received key-value pair to (i) locate the value (e.g., an object) corresponding to the key and (ii) perform the operation associated with the request on the value at the data node.
[0043] Therefore, it may be appropriate to develop methods, devices, and systems to process requests for key-value stores more efficiently.
[0044] Some key-value stores may be designed to use only one of the host's computational resources or the computational resources of a storage device (e.g., a Solid State Drive (SSD)). For example, some key-value stores can use host computational resources to perform both control plane operations and data manipulation (e.g., data processing). In such key-value stores, the host processor (e.g., a Central Processing Unit (CPU)) can receive a request from a user (e.g., from an application corresponding to the user), look up a key (e.g., find it), and fetch the requested data into the host Dynamic Random Access Memory (DRAM). The data can then be used by the CPU to process the computation.
[0045] Some key-value stores may have computational storage capabilities. That is, key-value stores can be implemented using storage devices that include processing circuitry (e.g., accelerators such as Field Programmable Gate Arrays (FPGAs)). FPGAs can be used to manipulate (e.g., process) the data layer solely for "services" (e.g., to perform pure computations such as encoding or decoding).
[0046] Some key-value stores implemented with computational storage functions may utilize storage device resources to perform both control plane operations and data manipulation (e.g., data processing) operations. That is, key-value stores can be fully implemented on a storage device. In such key-value stores, the processing circuitry of the storage device may receive a request from a user application to locate a key (e.g., locate a position) and bring the requested data into the storage device DRAM for the processing circuitry to process the computation.
[0047] To provide data durability and operational atomicity, such as protecting against data loss due to device failure, key-value stores can be implemented according to crash consistency policies for data recovery.
[0048] Some key-value stores can be implemented with a crash consistency policy that incorporates write-ahead logging (WAL) (e.g., UNDO logging and REDO logging). For example, in WAL, all writes to a key-value store can be stored in a log file (e.g., write-ahead logging) that persists in the storage device's non-volatile memory before the corresponding data location is modified by the write operation.
[0049] With the rapid advancement of data storage, key-value store designs that utilize only the computational resources of either the host or the storage device may experience computational bottlenecks and / or network bottlenecks (e.g., CPU bottlenecks). In other words, although storage devices have become faster and more intelligent, the performance of the storage device may not be fully realized due to reasons such as the CPU failing to process and transmit data sufficiently efficiently. In a key-value store implemented with a storage device having computational storage capabilities (hereinafter referred to as a computational storage device), a conventional host-based cache may not fully utilize the benefits provided by peer-to-peer (P2P) transfer between the processing circuits of the computational storage (e.g., FPGA) and the memory of the storage (e.g., non-volatile memory or storage). Consequently, the computational performance of the FPGA may not be fully utilized.
[0050] Regarding conflict consistency policies, key-value stores implemented with logging-based consistency policies can lead to various problems such as increased write amplification, input / output (I / O) interdependencies, and slow request processing.
[0051] To improve key-value store performance, an embodiment of the present invention provides a key-value store that is logically partitioned to affect both the host processor of the host and the processing circuit of the computational storage device. For example, the key-value store according to the present invention may have reduced CPU bottlenecks and reduced data fetch latency in a preprocessing pipeline (e.g., a preprocessing pipeline for artificial intelligence (AI) and machine learning (ML) applications).
[0052] In some embodiments, data plane operations may be offloaded from the host processor to the computation storage device to utilize the high bandwidth of the computation storage device.
[0053] In some embodiments, the key-value store may be divided into two parts: (1) a search layer processed by a host processor (e.g., an internal node of a B-tree) and (2) a data layer processed by a processing circuit on a computational storage device (e.g., a leaf node of a B-tree). Examples of the search layer and data layer disclosed herein may refer to B-tree index structures, but it should be understood that the invention is not limited thereto. For example, the search layer and data layer according to aspects of the embodiments of the invention may be implemented through any suitable sorted index structure (e.g., a B+Tree, a Trie, or an Adaptive Radix Tree).
[0054] The search layer can store partial keys. The data layer can store key fingerprints corresponding to keys belonging to specific data nodes. Therefore, key fingerprints can identify the exact location of values corresponding to key-value pairs within the data store.
[0055] As discussed in more detail below with reference to the drawings, a key-value store (e.g., a cross-layer key-value store) according to one or more embodiments may use a cross-layer approach to use a host processor in the control plane and offload data plane computations to the processing circuits of the computational storage device. Thus, the key-value store may utilize the high bandwidth of the computational storage device.
[0056] A key-value store may also include one or more of the following features described in more detail below: (1) a cross-tier approach for enhanced throughput and scalability; (2) a cross-tier cache (e.g., mirror cache) to improve data locality (e.g., to reduce or eliminate unnecessary (e.g., redundant) data movement); and (3) version-based conflict consistency for simplified conflict consistency (e.g., a conflict consistency policy based on version numbering instead of log leading).
[0057] In addition to having improved efficiency, key-value stores can be integrated into computation pipelines to realize the benefits of significantly reducing data fetch interruptions and offloading preprocessing to computation storage devices.
[0058] Additionally, the present invention refers to a host connected to a single computational storage device, but the present invention is not limited thereto. For example, in some embodiments, the key-value store according to the present invention may utilize a heterogeneous system having a plurality of storage devices and accelerators connected to a server.
[0059] A system and method for a cross-tier key-value store having a computational storage unit can provide a key-value store having reduced bottlenecks (e.g., greater overall system bandwidth), improved throughput, scalability, and data intensity. These improvements can be achieved by logically dividing the key-value store as follows: (1) a search layer stored in host memory and manipulated (e.g., processed) by a host processor; and (2) a data layer stored in a computational storage unit and processed by the processing circuitry of the computational storage unit. Additionally, in some embodiments, the cross-tier key-value store can provide simplified crash consistency by being implemented with version-based crash consistency instead of logging-based crash consistency.
[0060] For example, a key-value store may be implemented or can be implemented by a storage device including a system including a host and persistent memory (e.g., a solid-state drive (SSD) or another non-volatile memory part of a storage device), processing circuitry (e.g., an FPGA), and a common memory area (CMA) connected to persistent memory and processing circuitry (e.g., via P2P memory).
[0061] The host can store and manipulate (e.g., process) a search layer containing a sorted index (e.g., a tree structure). The host can also store and manipulate (e.g., process) the host-cache portion of the key-value store's "mirror cache." The storage device can store and process a data layer containing leaf nodes (e.g., data nodes) of the tree structure. The storage device can also store and process the kernel cache portion of the mirror cache.
[0062] The host cache can be implemented as a two-dimensional (2D) array. Each entry of the host cache that stores metadata corresponding to a data node can be stored in a storage device.
[0063] The kernel cache can be implemented as a one-dimensional (1D) array of data nodes stored in the CMA. The host can store each entry of the host cache in the host cache at the same offset as the offset of the data node stored in the kernel cache (for example, to reduce the amount of data movement within the system).
[0064] A key-value store can distribute responsibilities between a host processor (e.g., CPU) and the processing circuitry of a storage device (e.g., FPGA). For example, the key-value store can divide the control of processing requests to access data nodes stored in the storage device. Thus, the host processor can operate in the control plane to trigger (e.g., induce or issue) kernel calls, issue data transfers to or from persistent memory (hereinafter, storage), and manage collision consistency. The processing circuitry of the storage device can handle data plane operations so that the key-value store can utilize the relatively higher access throughput of the computational storage device.
[0065] Additionally, the key-value store can be implemented to provide variable-length key-value support with a version-based crash consistency mechanism that maintains version metadata to avoid the overhead of logging technologies (e.g., WAL).
[0066] Accordingly, a key-value store according to an embodiment of the present invention can provide several improvements and advantages compared to other key-value store designs, including: (1) reducing bottlenecks by logically splitting the search layer and the data layer to use the host processor only as the control plane and offload data plane operations to the processing circuit. (2) increasing overall throughput by improving I / O bandwidth utilization by transferring data to the processing circuit via P2P memory, thereby reducing network hops (e.g., reducing the number of data transfers between storage and host). (3) preventing journaling (e.g., computationally expensive and data-intensive logging-based recovery) by implementing version-based conflict consistency with atomic updates (e.g., 4KB size updates). (4) allowing scalability without synchronization issues because the search layer and the data layer are logically and physically split between the host processor and the processing circuit.
[0067] FIG. 1 is a system diagram showing a data storage system including a search layer and a data layer according to some embodiments of the present invention.
[0068] Referring to FIG. 1, the system (1) may include a host (100) that can be connected to a storage device (200) (e.g., a computer storage device). The host (100) may include a host processor (110) (e.g., a host CPU) and a host memory (120) (e.g., a host DRAM).
[0069] The storage device (200) may include storage (210) (e.g., permanent or non-volatile memory), a storage controller (212) (e.g., a non-volatile memory express (NVMe) auxiliary controller), a processing circuit (220) (e.g., an accelerator such as an FPGA), and a common memory area (CMA) (230) (e.g., a P2P memory of a computational storage device that may be part of the DRAM of the processing circuit (220) that is connected to or shared with both the storage (210) and the processing circuit (220).
[0070] The storage device (200) may store one or more data nodes (DN) (see FIG. 4). Each data node (DN) may contain a set of key-value pairs (e.g., a plurality of key-value pairs that may be arranged in ascending order and are illustrated as “AAA” and “AAB”, etc. in FIG. 1 and FIG. 4). The set of key-value pairs of the corresponding data node may correspond to the same partial key in the search layer (150) of the host memory (120).
[0071] The system (1) may include a key-value store having a cross-layered structure in which responsibilities, such as processing data access requests, are divided between a host processor (110) and a processing circuit (220) to improve performance over a conventional key-value store (e.g., may). For example, the search layer (150) may be stored in the host memory (120), and the data layer (250) may be stored in the storage device (200) (e.g., storage (210)). The search layer (150) may be operated (e.g., processed, maintained, or controlled) by the host processor (110). The data layer (250) may be processed by the processing circuit (220).
[0072] Accordingly, the host processor (110) can act as a control plane and perform appropriate operations such as triggering FPGA kernel calls (e.g., kernel calls directed to the processing circuit (220)), issuing data transfers to / from storage (210) (e.g., triggering), and managing concurrency control (e.g., managing concurrent access to the storage device (200) from multiple requests). Additionally, the processing circuit (220) can manage operations of the data plane such as data manipulation (e.g., processing) and processing (e.g., executing data node updates and updating corresponding metadata for the updated data nodes).
[0073] By delegating the operation (e.g., processing) of the search layer (150) to the host processor (110) and the operation of the data layer (250) to the processing circuit (220), different sources of computational power can be used more appropriately. For example, the system (1) can reduce (e.g., minimize) data movement caused by P2P data transfer (e.g., direct data transfer) between the storage (210) and the processing circuit (220) while utilizing the internal bandwidth (e.g., high internal bandwidth) between the storage (210) and the processing circuit (220).
[0074] The search layer (150) may be implemented as a tree structure on a host memory (120) that stores partial keys, for example (e.g., storing partial keys as internal nodes of a B-tree meta-structure). Although the search layer (150) and the data layer (250) are described herein as corresponding to a tree structure, it should be understood that the invention is not limited thereto and other sorted index structures may be suitable.
[0075] The data layer (250) can be implemented as a doubly linked list of leaf nodes (e.g., leaf nodes of a B-tree structure) corresponding to the data nodes (DN) of the storage device (200). The search layer (e.g., tree structure) can aid in the fast retrieval of point queries. Since the data layer, which is a doubly linked list, can store key-value pairs in ascending order, fast range queries are generated. Thus, unlike some existing key-value stores that do not perform range operations, the cross-layer key-value store can allow the system (1) to be suitable for both point queries (e.g., operations corresponding to a single key-value pair) and range queries (e.g., operations corresponding to two or more consecutive key-value pairs).
[0076] An embodiment of the cross-layer key-value store can provide a framework that utilizes processing circuits (220) (e.g., storage FPGA) for the flexibility of host CPU processing (e.g., range query processing) and near data processing (e.g., lookup operations of leaf nodes, data compression, and preprocessing for deep learning). Additionally, by using a cross-layer key-value store with separated search and data layers, the architecture can be easily extended to non-uniform memory access (NUMA) nodes connected to multiple storage devices (200) in a network.
[0077] FIG. 2 is a system diagram showing a data storage system including a host cache and a kernel cache according to some embodiments of the present invention.
[0078] Referring to FIG. 2, the system (1) may include a mirror cache (7) (or cross-layer cache) partitioned across the host memory (120) of the host (100) and the CMA (230) of the storage device (200). The mirror cache (7) may include a host cache (170) (e.g., metadata cache) on the host memory (120) and a kernel cache (270) (e.g., data cache) on the CMA (230). The mirror cache (7) provides data locality (e.g., enhanced data locality).
[0079] Maintaining a metadata cache in the host (100) enables the host processor (110) to operate in the control plane and allows the data cache of the CMA (230) to utilize high-speed peer-to-peer data transfer provided by the computational storage device (200). By offloading data layer computations, which can generally be performed by the host of a conventional key-value store, to the storage device (200), the granularity of data access from the storage (210) can be the size of a data page (e.g., 4KB size).
[0080] In this situation, while using a conventional host-based cache may provide sufficient capacity to store data nodes (DN) (e.g., data pages), using a cross-layer cache may provide several advantages and improvements over using a host-based cache. For example, using a cross-layer cache makes the following possible: (1) reduce data page access latency; (2) reduce network traffic because the number of hops (e.g., the number of data transfers between storage (210) and host (100)) is reduced; (3) take advantage of P2P transfer between the processing circuit (220) and the storage device (200), and thus take advantage of the computational power of the processing circuit (220).
[0081] The computational storage device (200) can enable high-speed data transfer, known as peer-to-peer data transfer, by connecting the storage (210) and the processing circuit (220) through an internal data path. This connection can be achieved by an on-chip soft PCIe switch and the device memory of the processing circuit (220). The computational storage device (200) can map both the memory (e.g., DRAM) of the storage (210) and the processing circuit (220) to a PCIe (peripheral component interconnect express) bar (260) (e.g., PCIe bar memory). The memory portion of the processing circuit (220) exposed to the PCIe bar (260) may include a CMA (230) (e.g., it may).
[0082] The host cache (170) may be stored in the host memory (120) as an aggregate associative cache that stores metadata and enables the host processor (110) to operate in the control plane to handle cache maintenance operations and manage concurrent access. The host cache (170) may be a hash table that stores metadata for the corresponding data node (DN). For example, each host cache entry (172) may store metadata such as a Logical Block Address (LBA), timestamp, flag for occupancy check, LRU (Least Used) information for eviction, and lock information for concurrent cache access. The host cache (170) may be a 2D array.
[0083] The kernel cache (270) can be stored in the CMA (230) to store data nodes (DN), allowing the cross-layer key-value store to take advantage of the benefits provided by the computational storage device (200), such as P2P access and reduced network latency. The kernel cache (270) can be a flat one-dimensional (1D) array (e.g., a large P2P buffer).
[0084] The name "mirror cache" indicates its layout characteristics. For example, each host cache entry (172) on the host cache (170) can store its respective metadata at the same offset as the offset corresponding to the kernel cache entry (272) of the corresponding actual data node (DN) on the kernel cache (270) (for example, the 10th entry of the host cache (170) can contain metadata corresponding to the data node (DN) stored in the 10th entry of the kernel cache (270)). Thus, the layout of the host cache (170) can reflect the layout of the kernel cache (270). Therefore, the mirror cache (7) can reduce the number of data moves because the existence of an LBA in the host cache (170) indicates that the corresponding data node (DN) exists in the kernel cache (270).
[0085] FIG. 3a is a combined flowchart and system diagram illustrating the operation of a data storage method within a system according to some embodiments of the present invention.
[0086] Referring to FIG. 3a, a method (3000A) for processing a data access request to access a data node (DN) stored in a storage device (200) in a cross-layer key-value storage system (1) may include the following operations.
[0087] The host (100) can receive a data access request (e.g., an insertion operation using a key-value pair) (operation 3001A).
[0088] Control can be transferred to a host processor (110) that can have a search layer (150) inside a host memory (120) to enable lookup of a key (e.g., partial key) in the search layer (150), while noting that the search layer (150) can internally narrow the scope to a leaf node pointing to the LBA of a data node (DN). (Operation 3002A)
[0089] The host processor (110) can use the LBA to look up (e.g., search) the host cache (170) that also exists in the host memory (120) and determine whether the corresponding data node (DN) exists in the kernel cache (270) of the mirror cache (7) (3003A).
[0090] The host processor (110) can retrieve metadata from the host cache (170), and the retrieval may result in (i) a cache miss where the corresponding data node (DN) is not in the kernel cache (270) or does not exist in the kernel cache (270), or (ii) a cache hit where the data node (DN) exists in the kernel cache (270) (operation 3004A).
[0091] Based on the determination that a cache miss has occurred, the host processor (110) may issue (e.g., trigger or induce) a read (e.g., P2P read) from storage (210) to the kernel cache (270) located in the CMA (230) (operation 3005A).
[0092] In response to the publication of a P2P read, control may be transferred to the storage device (200) to fill the kernel cache (270) with the data node (DN) (operation 3006A). Once the data node (DN) is filled into the kernel cache (270), control may be transferred back to the host (100).
[0093] Based on determining the occurrence of a cache hit, or based on determining that a data node (DN) is filled into the kernel cache (270), the host (100) may issue (e.g., trigger or induce) a kernel call (e.g., insert kernel call) that can transfer control to the processing circuit (220) (operation 3007A).
[0094] In response to a kernel call, the processing circuit (220) can read a data node (DN) from the kernel cache (270) (e.g., read the data node (DN) into the local memory of the processing circuit (220)) and can retrieve or generate a fingerprint (fp) for a specific key to narrow down the exact location of a key-value pair within the data node (DN) (operation 3008A).
[0095] Based on the precise location determination of the key-value pair, the processing circuit (220) can perform an operation on the data node (DN) (e.g., an insertion operation). (e.g., the processing circuit (220) can manipulate the data node (DN) in the local memory of the processing circuit (220) (e.g., process or perform one or more operations thereon) and refill the updated data node (DN) into the kernel cache (270)) (operation 3009A).
[0096] Based on the completion of the operation of the data node (DN) by the processing circuit (220), control may be returned to the host (100) to persist (e.g., write) the updated data node (DN) to the storage (210) (e.g., by issuing a P2P write from the CMA (230) back to the storage (210)) (operation 3010A).
[0097] When the updated data node (DN) persists in storage (210), the method can be completed and terminated (operation 3011A).
[0098] FIG. 3b is a flowchart illustrating the operation of a data storage method corresponding to the operation of FIG. 3a according to some embodiment of the present invention.
[0099] Referring to FIG. 3b, the operations discussed above in relation to FIG. 3a (e.g., operations 3001A to 3011A) are discussed in a simplified manner in the form of a flowchart without illustrating the structure of the system (1).
[0100] For example, the host processor (110) can receive an access request for a data node (DN) associated with a key (operation 3001B).
[0101] A host (100) (e.g., the host processor (110) of the host (100)) can find a key in the search layer (150) to find information indicating the location of a data node (DN) (e.g., to find the LBA of the data node (DN)) (operation 3002B).
[0102] The host (100) can find the LBA in the host cache (170) portion of the mirror cache (7) (operation 3003B).
[0103] By searching the host cache (170), the host (100) can determine whether a data node (DN) exists in the kernel cache (270) portion of the mirror cache (7) (3004B).
[0104] Based on a cache miss determination, the host (100) may issue (e.g., trigger or trigger) a P2P read from storage (210) to CMA (230) (operation 3005B).
[0105] The storage device (200) can fill the kernel cache (270) with data nodes (DN) from the storage (210) (operation 3006B).
[0106] Based on a cache hit determination or based on a determination that a data node (DN) is filled in the kernel cache (270), the host (100) may issue (e.g., trigger or induce) a kernel call based on a request (e.g., a request received in operation 3001B) (operation 3007B).
[0107] In response to a kernel call, control may be transferred to a processing circuit (220) to perform a requested data manipulation (e.g., data processing) operation on a data node (DN), and the processing circuit (220) may obtain a fingerprint (fp) to determine the exact location of a key-value pair inside the data node (DN) (operation 3008B).
[0108] The processing circuit (220) can perform a requested data manipulation (e.g., data processing) operation on the data node (DN) (operation 3009B).
[0109] The host (100) may issue (e.g., trigger or induce) a P2P write to persist the updated data node (DN) from the CMA (230) to the storage (210) (operation 3010B).
[0110] When the updated data node (DN) persists in storage (210), the method can be completed and the operation can be terminated (operation 3011A).
[0111] FIG. 4 is a combined flowchart and system diagram illustrating the operation of a data storage method within a system providing variable-length key-value support according to some embodiments of the present invention.
[0112] Referring to FIG. 4, in some embodiments, the system (1) may provide variable-length key-value support. Additionally, as discussed below with reference to FIG. 5, variable-length key-value support may be implemented to support version-based conflict consistency methods.
[0113] In some embodiments, the cross-tier key-value storage system (1) may be used by an AI / ML application that handles a relatively large amount of data spanning multiple data pages, such as images, videos, etc. Since each data node (DN) may have a fixed size equal to the size of one data page (e.g., 4KB) according to an embodiment of the present invention, the system (1) may be configured to support variable-length key-value pairs by allocating (e.g., allocating or connecting) an extension node EN to the corresponding data node (DN) to accommodate larger key-value pairs. The extension node (EN) may be provided and allocated by a slab allocator SA (e.g., host-side helper function) from a pool of data pages of different sizes (e.g., 4KB, 8KB, 16KB, 32KB, etc.) and connected to the corresponding data node (DN).
[0114] Accordingly, a method (4000) for providing variable-length key-value support may include: receiving an access request (e.g., an insertion operation using a key-value pair) for a data node (DN) stored in a storage device (200) at a host (100) (4001); finding a corresponding data node (DN) corresponding to the key-value pair (e.g., finding) (operation 4002); determining that there is insufficient free space in the data node (DN) (e.g., determining that the available space in the data node (DN) is smaller than the space required to accommodate the request) (operation 4003); updating the metadata (MD) of the data node (DN) to indicate the presence of an extension node (EN) and to add a fingerprint of the extension node (EN) to the data node (DN) (e.g., to implement a pointer from the data node (DN) to the extension node EN within the data node (DN)) (4004); and includes the step (4005) of retrieving extension pages from the slab allocator SA and adding metadata and key-value pairs to the extension node EN.
[0115] FIG. 5 is a combined flowchart and system diagram illustrating the operation of a data storage method within a system that provides variable key-value support and version-based crash consistency according to some embodiments of the present invention.
[0116] Referring to FIG. 5, in some embodiments, the cross-tier key-value store system (1) may provide a version-based crash consistency policy that uses versioning with atomic read / write (e.g., 4KB atomic read / write) to avoid the overhead costs associated with conventional logging-based crash consistency techniques. A version-based crash consistency model according to an embodiment of the present invention may utilize atomic block read / write (e.g., 4KB block read / write) to create out-place updates (described below) and scan the entire disk (e.g., storage (210)) at the time of a crash to identify valid data pages.
[0117] With versioning, the system (1) can perform atomic read / write by using the following method. Updates to the data node (DN) can be written in an "in place" manner. For example, updates to the data node (DN) can be written to the storage at the same file offset as the previous version (for example, at the original location of the previous version of the data node (DN)).
[0118] Updates to an extension node EN that is larger than the size of a single data page and assigned to a data node (DN) can be updated to storage in an out-of-place manner. For example, the previous version of the extension node (EN) can be retained in its original location (e.g., unmodified), and the updated extension node (EN) can be written to a different location from the previous version of the extension node (EN).
[0119] Additionally, to provide accuracy (e.g., to guarantee accuracy), when the extended node EN exists, the data node (DN) may be written to the appropriate location after the extended node EN has been fully persisted in storage (210) to provide crash consistency. In any state, if a crash (e.g., power outage) occurs, an older version of the data node (DN) may be maintained (e.g., undisturbed), and when the latest version of the extended node EN exists in storage (210), it may be garbage collected by the slab allocator SA (e.g., made available by another process running in System 1).
[0120] Referring still to FIG. 5, a method (5000) for providing variable-length key value support and version-based conflict consistency may include the following: The system (1) may handle an operation to update an extension node EN (e.g., Ext. Node 3) allocated by a slab allocator SA to a data node (DN) (e.g., Data Node 3), wherein the data node (DN) and the extension node EN are each located in storage (210) and have the same version number VN (e.g., 0) (operation 5001).
[0121] The system (1) can create copies of the data node (DN) and its extension node EN on the CMA (230) (operation 5002).
[0122] The processing circuit (220) can be triggered based on copies of the data node (DN) and the extension node (EN) existing in the CMA (230) to (i) read the data node (DN) and the extension node EN into local memory, (ii) perform a requested calculation based on an operation, and (iii) update the extension node EN based on an operation (operation 5003).
[0123] Based on the completion of the operation, the processing circuit (220) can write the values (e.g., updated data node (DN) and updated extension node EN) back to the CMA (230) as the updated version number VN (e.g., the metadata MD of the updated data node (DN) is updated to 1 to point to the updated extension node EN) (operation 5004).
[0124] The updated extension node (EN) can be persisted (e.g., written) to storage (210) in an out-place manner so that the previous version of the extension node (EN) is maintained (e.g., not tampered with) (operation 5005).
[0125] Based on the fact that the updated extension node (EN) has been completely written to the storage unit (210), the updated data node (DN) may persist in the storage (210) in an in-place manner (e.g., where the previous version of the data node (DN) was located) so that the previous version of the data node (DN) is overwritten by the updated data node (DN) and the data node (DN) points to the updated extension node (ED). This is because its internal metadata MD (see FIG. 4) has been internally updated to point to the updated extension node EN (operation 5006).
[0126] By implementing method (5000), the system (1) can be resilient in the event of a crash. For example, if a crash occurs while an updated expansion node (EN) is persisted in storage (210) (e.g., in operation 5005), the operation can be interrupted and the partially created expansion node can be re-executed in a state where it is garbage collected, because the updated expansion node was persisted in storage (210) in an out-place manner.
[0127] If a crash occurs while the updated data node (DN) persists in storage (210) in-place (e.g., in operation 5006), the operation can simply be stopped and re-executed (the partially written extension node is garbage collected), and the system (1) can roll back to a previous version of both the data node (DN) and the extension node EN. Thus, data loss can be reduced (e.g., prevented).
[0128] FIG. 6 is a flowchart illustrating the operation of a data storage method for a read (or lookup) request including host-side concurrency control according to some embodiments of the present invention.
[0129] Referring to FIG. 6, a host (100) (e.g., see FIG. 1 and FIG. 2) can control concurrent access to a storage device (200) by implementing a read concurrency method (6000, e.g., for a lookup operation). The read concurrency method may include: a step of generating a lockless lookup at a lookup layer (operation 6001); a step in which the host (100) searches the metastructure of a data node (DN) and acquires a read lock on the data node (DN) (6002); a step in which the host (100) uses the discovered LBA to locate an LBA of the host cache (170) (e.g., find or search) and locates the position of the data node (DN) on the kernel cache (270) (6003); and, in the case of a cache hit, a step of acquiring a read lock on the host cache slot (6004A). In the event of a cache miss, issue (e.g., trigger or cause) a P2P read I / O call to load the data node (DN) from storage (210) to the kernel cache (270) (operation 6004B1) and acquire a write lock on the host cache slot (operation 6004B2); trigger a lookup kernel in the processing circuit (220) in the lookup kernel trigger step (e.g., FPGA) based on the kernel cache being prepared for the data node (DN) at the found offset (the system (1) may issue (e.g., trigger or cause) multiple operation units for each kernel function to achieve concurrency on the kernel side) (operation 6005); Based on the kernel execution that is completed, control may be returned to the host (100), and before terminating the application, the host (100) may unlock the read / write (mirror cache) lock for the host cache slot (operation 6006) and unlock the read lock for the data node (DN) metastructure (operation 6007); and the termination step (operation 6008).
[0130] FIG. 7 is a flowchart illustrating the operation of a data storage method for a write (or insert) request including host-side concurrency control according to some embodiments of the present invention.
[0131] Referring to FIG. 7, a host (100) (e.g., see FIG. 1 and FIG. 2) can control concurrent access to a storage device (200) by implementing a write concurrency method (7000) (e.g., for an insertion operation). The write concurrency method includes: a step of generating a lockless lookup at a search layer (operation 7001); a step in which the host (100) searches the metastructure of a data node (DN) to acquire a write lock for the data node (DN) (7002); a step in which the host (100) uses the discovered LBA to look up (e.g., find or search) the LBA of the host cache (170) to find the location of the data node (DN) on the kernel cache (270) (7003). In the case of a cache miss, a step of issuing (e.g., triggering) a P2P read I / O call to load the data node (DN) from storage (210) to the kernel cache (270) (Operation 7004A) and acquiring a write lock for the host cache slot (Operation 7004B); in the case of a cache hit, a step of acquiring a write lock for the host cache slot without issuing a P2P read I / O call (e.g., not triggering or triggering) (Operation 7004B); and a step of triggering a kernel insertion in the processing circuit (220) (e.g., FPGA) based on the kernel cache prepared to the data node (DN) at the found offset (Operation 7005) (the system (1) may issue (e.g., trigger or cause) multiple operation units for each kernel function to achieve concurrency on the kernel side); Based on the kernel execution that is completed, control may be returned to the host (100), and before the application is terminated, the host (100) may unlock the write (mirror cache) lock for the host cache slot (operation 7006) and unlock the write lock for the data node (DN) meta structure (operation 7007); the application may be terminated (operation 7008).
[0132] Accordingly, referring again to FIG. 2, an embodiment of the present invention may provide advantages and improvements over a conventional key-value store. For example, it reduces bottlenecks in the host processor (110) and utilizes the high internal bandwidth of the computational storage device (200) and computation close to data. These advantages and improvements can be achieved by logically and physically partitioning the key-value store between the host (100) and the computational storage device (200). Thus, responsibility for the search layer (150) may be performed by the host (100), and responsibility for the data layer (250) may be performed by the computational storage device (200). The disclosed embodiment also provides structural advantages of a mirror cache (7) comprising a host cache (170) stored in the host (100) and a kernel cache (270) stored in the CMA (230) of the computational storage device (200).
[0133] Although embodiments of the present invention have been specifically illustrated and described with reference to the embodiments described herein, those skilled in the art will understand that various modifications to the form and details may be made without departing from the spirit and scope of the invention as described in the following claims, and that functional equivalents are included.
[0134] delete Explanation of the symbols delete
Claims
Claim 1 A data storage system comprising: a host including a host cache portion of a mirror cache, wherein the host cache portion is for storing metadata indicating the location of a data node stored in a kernel cache portion of the mirror cache; and a storage device located in a common memory area and including the kernel cache portion, wherein a first host-cache entry of the host cache portion includes metadata associated with a first kernel-cache entry of the kernel cache portion, and a second host-cache entry of the host cache portion includes metadata associated with a second kernel-cache entry of the kernel cache portion, wherein the order of the first host-cache entry and the second host-cache entry in the host cache portion is the same as the order of the first kernel-cache entry and the second kernel-cache entry in the kernel cache portion, and wherein the host is configured to query the host cache portion to determine whether a data node exists in the kernel cache portion. Claim 2 A data storage system according to claim 1, further comprising a search layer on the host; and a data layer on the storage device. Claim 3 In claim 2, the search layer comprises a tree structure, and the data layer comprises the data node corresponding to the leaf node in a doubly linked list of leaf nodes corresponding to the tree structure, in a data storage system. Claim 4 A data storage system according to claim 1, further comprising: a permanent memory connected to the common memory region; and a processing circuit connected to the common memory region. Claim 5 In claim 4, the data storage system configured such that the processing circuit performs a data operation on the data node and writes the data node as an updated data node to the kernel cache portion. Claim 6 In claim 5, the host is configured to determine whether the updated data node is filled in the common memory area and to trigger a peer-to-peer write from the common memory area to the persistent memory. Claim 7 In claim 1, the host determines whether the amount of available space of the data node is less than the amount of space for accommodating data access requests corresponding to the data node; and the data storage system configured to allocate an expansion node to the data node. Claim 8 In claim 7, the storage device further comprises a processing circuit configured to update the metadata of the data node to point to the expansion node, wherein the metadata of the data node indicates a first version number and the metadata of the expansion node indicates the first version number, a data storage system. Claim 9 In claim 8, the processing circuit is configured to: update the extension node; update the metadata of the data node to indicate a second version number to identify the data node as the updated data node; update the metadata of the extension node to indicate the second version number to identify the extension node as the updated extension node; and update the metadata of the updated data node to point to the updated extension node. Claim 10 In claim 9, the processing circuit is configured to: write the updated expansion node to the storage of the storage device in an out-place manner; and write the updated data node to the storage in an in-place manner.
Citation Information
Patent Citations
Storage device and data processing method thereof
KR1020200086143A
Storage system including hierarchical cache metadata
US20050177687A1
Management of cache memory in a flash cache architecture
US20120110247A1
Elastic data techniques for managing cache storage using ram and flash-based memory
US20120265924A1
Object storage system
US20140244929A1
