Control the quality of service of input / output streams associated with a key-value database
By integrating QoS modules in the storage stack, dynamically managing bandwidth based on I/O stream tags, the problem of uncertain I/O stream processing time in the key-value database is solved, and efficient QoS control and waiting time optimization are achieved.
Patent Information
- Application Number
- CN202011504246.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-18
- Filing Date
- 2020-12-18
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2040-12-18
AI Technical Summary
The existing key-value database lacks fine-grained I/O stream processing time control in the permanent storage architecture, resulting in uncertain wait time for user-initiated operations, and internal maintenance operations are mixed with user operations, affecting QoS delivery.
By integrating QoS modules in the storage stack, the bandwidth is dynamically allocated based on the label information of I/O streams, distinguishing user-initiated I/O streams from internal maintenance-related I/O streams, and achieving fine-grained bandwidth management and adjustment.
It significantly reduces I/O path length, reduces bandwidth over-allocation costs, improves the predictability of I/O latency and priority of user operations, and ensures target QoS delivery of the storage architecture.
Smart Images

Figure CN112988861B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates generally to a memory subsystem and, more particularly, to the operation of a persistent storage architecture. Background Art
[0002] The memory subsystem may include one or more memory devices that store data. The memory devices may be, for example, non-volatile memory devices and volatile memory devices. The host system may typically utilize the memory subsystem to store data in the memory devices and retrieve data from the memory devices. Summary of the Invention
[0003] In one aspect, the present disclosure relates to a method comprising: receiving one or more input / output flows associated with one or more key-value databases; checking corresponding tags of the one or more input / output flows; determining corresponding amounts of bandwidth to be allocated to the one or more input / output flows based on identification data obtained by checking the corresponding tags to meet threshold criteria related to predetermined quality of service (QoS) parameters associated with the one or more input / output flows; and dynamically throttling the one or more input / output flows across the one or more key-value databases using the corresponding allocated amounts of bandwidth to adjust processing times of input / output operations in the one or more input / output flows according to the QoS parameters.
[0004] On the other hand, the present disclosure relates to a system comprising: multiple memory components; and a processing device operatively coupled to the memory components to perform operations comprising: providing an interface to assign corresponding tags to one or more input / output streams associated with one or more key-value databases, wherein the corresponding tags contain identification data about which key-value database the input / output stream is associated with; determining an amount of bandwidth to be allocated to the one or more input / output streams based on the identification data obtained from the corresponding tags to meet a threshold latency value; and dynamically throttling the one or more input / output streams across the one or more key-value databases using the corresponding allocated bandwidth amount to adjust the processing time of input / output operations in the one or more input / output streams according to the threshold latency value.
[0005] In another aspect, the present disclosure relates to a non-transitory computer-readable medium comprising instructions that, when executed by a processor, cause the processor to perform operations comprising: receiving one or more input / output flows associated with one or more key-value databases; checking corresponding tags of the one or more input / output flows; determining corresponding amounts of bandwidth to be allocated to the one or more input / output flows based on identification data obtained by checking the corresponding tags to meet threshold criteria related to predetermined quality of service (QoS) parameters associated with the one or more input / output flows; and dynamically throttling the one or more input / output flows across the one or more key-value databases using the corresponding allocated amounts of bandwidth to adjust processing times of input / output operations in the one or more input / output flows according to the QoS parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] The present disclosure will be more fully understood from the detailed description given below and the accompanying drawings of various embodiments of the present disclosure.
[0007] Figure 1 An example computing system including a host system coupled to a memory subsystem is shown according to some embodiments of the present disclosure.
[0008] Figure 2 Bandwidth provisioning and dynamic throttling by a quality of service (QoS) module that receives input / output (I / O) streams from one or more key-value databases (KVDBs) according to some embodiments of the present disclosure are presented.
[0009] Figure 3 A storage stack architecture with built-in QoS control according to some embodiments of the present disclosure is presented.
[0010] Figure 4 A grouping scheme using I / O tags to facilitate QoS control is presented according to some embodiments of the present disclosure.
[0011] Figure 5 is a flow chart of an example method of controlling QoS of database I / O flows according to some embodiments of the present disclosure.
[0012] Figure 6 is a block diagram of an example computer system in which embodiments of the present disclosure may operate. DETAILED DESCRIPTION
[0013] Various aspects of the present disclosure relate to implementing quality of service (QoS) features in a storage architecture built on a type of non-relational database known as a key-value database (KVDB). QoS features can provide consistent bandwidth and predictable latency for KVDB input / output (I / O) streams placed in a processing queue that can span multiple KVDBs. A KVDB is an example of a collection of key-value sets (kvsets), also known as key-value stores (KVS), in a host system coupled to a memory subsystem. The memory subsystem can be a storage device, a memory module, or a hybrid of a storage device and a memory module. Figure 1 Examples of storage devices and memory modules are described. A host system may typically utilize a memory subsystem that includes one or more memory components, such as memory devices, that store data. The host system may provide data for storage at the memory subsystem and may request retrieval of data from the memory subsystem.
[0014] Key-value data structures accept key-value pairs (i.e., contain a key and a value) and are configured to respond to queries related to the keys. Key-value data structures can include structures such as dictionaries (e.g., maps, hash maps, etc.), in which keys are stored in lists linked to (or containing) corresponding values. While these data structures are useful in memory (e.g., in main memory or system state memory, as opposed to long-term storage), the storage representation of these data structures in permanent storage (e.g., long-term on-disk storage) can be inefficient.
[0015] In some embodiments, KVDB uses a tree data structure (such as a log-structured merge tee or LSM tree) to improve efficiency in a permanent storage architecture. The tree data structure includes nodes with connections between parent nodes and child nodes based on a predetermined derivation of a key. The node contains a time-ordered sequence of KVSs. The KVS contains key-value pairs in a key-sorted structure. Once written, the KVS is also immutable. By maintaining the KVS of the node, the KVS tree achieves high write throughput and improved search. The KVS contains sorted keys and, in instances, key metrics (such as bloom filters, minimum and maximum keys, etc.) to provide efficient search. In many instances, the KVS tree can improve the temporary storage problems of other types of tree structures by separating keys from values and merging smaller KVS sets. In addition, the KVS tree can reduce write amplification by performing various maintenance operations on the KVS. Further, since the KVS in the node is immutable, problems such as write loss on a permanent storage device (e.g., a solid-state device (SSD)) can be managed by the data structure, thereby reducing garbage collection activity on the device itself. This has the added benefit of freeing up internal device resources (eg, bus bandwidth, processing cycles, etc.), which results in better external drive performance (eg, read or write speeds).
[0016] Although the KVS tree is a flexible and powerful data structure for a variety of storage tasks, greater efficiency can be achieved by combining multiple KVS trees into a KVS tree database (referred to as a KVDB). The input / output (I / O) streams associated with the KVDB (i.e., the sequence of I / O operations between a source (e.g., a host system) and a destination (e.g., a permanent storage medium)) include both user-initiated I / O streams and management I / O streams to maintain the KVDB. User I / O streams can include I / O operations associated with applications running on the host system that need to access data in the KVDB. Management I / O streams can include I / O operations that are part of internal maintenance-related operations that are periodically (manually or automatically) run by a system administrator to efficiently organize the data structures within the KVDB.
[0017] Without proper internal maintenance, the shape of the tree data structure in the KVDB (i.e., the hierarchy between different nodes) becomes non-optimal, and user-initiated I / O operations may take longer to complete, i.e., the latency of user-initiated operations may be unacceptably high, which in turn has a negative impact on the QoS that the persistent storage architecture can deliver to users. QoS is a common industry term often used to describe the distribution of operation latency within a system. QoS control is a feature that is not available in many conventional databases (including conventional non-relational databases, some of which are based on open source software). Conventional databases typically place user-initiated operations (e.g., read and / or write requests) and internal maintenance operations in the same processing queue. Alternatively, in some conventional databases, user-initiated operations are always processed at a higher priority than internal maintenance operations, resulting in a gradual degradation of latency due to poor data structure maintenance. None of these approaches can provide fine-grained dynamic control over I / O processing time to ensure predictable latency for user-initiated I / O flows. Furthermore, in existing KVS-based databases, KVS is created on a file system and there is no mechanism for implementing QoS control across multiple instances of the KVDB.
[0018] Aspects of the present disclosure address the above and other deficiencies by integrating a QoS module with a storage stack that processes database I / O streams. A storage stack is a set of software that implements a storage engine used by a database management system to update data in a database. The QoS module dynamically allocates bandwidth to I / O streams associated with a KVDB based on information contained in tags with which the I / O streams are marked. The QoS module throttles and / or multiplexes I / O streams across one or more KVDBs. I / O throttling regulates the processing time of I / O operations contained in an I / O stream. Multiplexing involves efficiently dividing processing time among multiple I / O streams.
[0019] An advantage of the present disclosure is that the described system enables users to select tags in order to mark user-initiated I / O flows with different priorities. The system also allows KVDB administrators to mark internal maintenance-related I / O flows so that internal maintenance-related I / O flows can be distinguished from user-initiated I / O flows. Based on the tag information, the QoS module can determine the appropriate throttling and / or multiplexing scheme so that the storage stack can deliver the target QoS of the application. By integrating QoS control with the storage stack, the I / O path length of the application to the media is significantly reduced. The reduction in I / O path length results in a reduction in I / O latency and a reduction in bandwidth over-provisioning costs.
[0020] Figure 1An example computing system 100 is shown that includes a memory subsystem 110 according to some embodiments of the present disclosure. Memory subsystem 110 may include media such as one or more volatile memory devices (e.g., memory device 140), one or more non-volatile memory devices (e.g., memory device 130), or a combination of such memory devices.
[0021] The memory subsystem 110 may be a storage device, a memory module, or a combination of both. Examples of storage devices include solid-state drives (SSDs), flash drives, universal serial bus (USB) flash drives, embedded multimedia controller (eMMC) drives, universal flash storage (UFS) drives, secure digital (SD) cards, and hard disk drives (HDDs). Examples of memory modules include dual inline memory modules (DIMMs), small outline DIMMs (SO-DIMMs), and various types of non-volatile dual inline memory modules (NVDIMMs).
[0022] The computing system 100 can be a computing device such as a desktop computer, a laptop computer, a network server, a mobile device, a vehicle (e.g., an airplane, drone, train, car, or other transportation), an Internet of Things (IoT) enabled device, an embedded computer (e.g., a computer included in a vehicle, industrial equipment, or a networked commercial device), or such a computing device that includes a memory and a processing device.
[0023] The computing system 100 may include a host system 120 coupled to one or more memory subsystems 110. In some embodiments, the host system 120 is coupled to memory subsystems 110 of different types. Figure 1 An example of a host system 120 coupled to a memory subsystem 110 is shown. As used herein, "coupled to" or "coupled with" generally refers to a connection between components, which can be an indirect communication connection or a direct communication connection (e.g., without intervening components), whether wired or wireless, including connections such as electrical, optical, magnetic, etc.
[0024] The host system 120 may include a processor chipset and a software stack executed by the processor chipset. The processor chipset may include one or more cores, one or more caches, a memory controller (e.g., an NVDIMM controller), and a storage protocol controller (e.g., a PCIe controller, a SATA controller). The host system 120 uses the memory subsystem 110, for example, to write data to the memory subsystem 110 and read data from the memory subsystem 110.
[0025] The host system 120 can be coupled to the memory subsystem 110 via a physical host interface. Examples of the physical host interface include, but are not limited to, a Serial Advanced Technology Attachment (SATA) interface, a Peripheral Component Interconnect Express (PCIe) interface, a Universal Serial Bus (USB) interface, Fibre Channel, Serial Attached SCSI (SAS), a Double Data Rate (DDR) memory bus, a Small Computer System Interface (SCSI), a Dual In-line Memory Module (DIMM) interface (e.g., a DIMM slot interface supporting Double Data Rate (DDR)), and the like. The physical host interface can be used to transfer data between the host system 120 and the memory subsystem 110. When the memory subsystem 110 is coupled to the host system 120 via the PCIe interface, the host system 120 can further utilize an NVM Express (NVMe) interface to access components (e.g., the memory device 130). The physical host interface can provide an interface for passing control, address, data, and other signals between the memory subsystem 110 and the host system 120. Figure 1 Memory subsystem 110 is shown as an example. Host system 120 can generally access multiple memory subsystems through the same communication connection, multiple separate communication connections, and / or a combination of communication connections.
[0026] Memory devices 130 and 140 may include any combination of different types of non-volatile memory devices and / or volatile memory devices. Volatile memory devices (e.g., memory device 140) may be, but are not limited to, random access memory (RAM), such as dynamic random access memory (DRAM) and synchronous dynamic random access memory (SDRAM).
[0027] Some examples of non-volatile memory devices (e.g., memory device 130) include NAND-type flash memory and write-in-place memory, such as three-dimensional cross-point ("3D cross-point") memory. A cross-point array of non-volatile memory can be combined with a stackable cross-grid data access array to perform bit storage based on changes in bulk resistance. In addition, compared to many flash-based memories, cross-point non-volatile memory can perform write-in-place operations, where non-volatile memory cells can be programmed without having to previously erase the non-volatile memory cells. NAND-type flash memory includes, for example, two-dimensional NAND (2D NAND) and three-dimensional NAND (3D NAND).
[0028] Each memory device in the memory devices 130 may include one or more memory cell arrays. One type of memory cell, such as a single-level cell (SLC), may store one bit per cell. Other types of memory cells, such as multi-level cells (MLC), triple-level cells (TLC), and quad-level cells (QLC), may store multiple bits per cell. In some embodiments, each memory device in the memory devices 130 may include one or more memory cell arrays, such as SLC, MLC, TLC, QLC, or any combination of such memory cells. In some embodiments, a particular memory device may include an SLC portion and an MLC portion, a TLC portion, or a QLC portion of memory cells. The memory cells of the memory devices 130 may be grouped into pages, which may refer to a logical unit of a memory device for storing data. With some types of memory (e.g., NAND), pages may be grouped to form blocks.
[0029] Although nonvolatile memory components such as a 3D cross-point array of nonvolatile memory cells and NAND-type flash memory (e.g., 2D NAND, 3D NAND) are described, the memory device 130 can be based on any other type of nonvolatile memory, such as read-only memory (ROM), phase-change memory (PCM), select memory, other chalcogenide-based memory, ferroelectric transistor random access memory (FeTRAM), ferroelectric random access memory (FeRAM), magnetic random access memory (MRAM), spin-transfer torque (STT)-MRAM, conductive bridging RAM (CBRAM), resistive random access memory (RRAM), oxide-based RRAM (OxRAM), NOR (NOR) flash memory, electrically erasable programmable read-only memory (EEPROM), and a cross-point array of nonvolatile memory cells.
[0030] The memory subsystem controller 115 (or, for simplicity, the controller 115) can communicate with the memory device 130 to perform operations such as reading data, writing data, or erasing data at the memory device 130, as well as other such operations. The memory subsystem controller 115 can include hardware, such as one or more integrated circuits and / or discrete components, buffer memory, or a combination thereof. The hardware can include digital circuitry with dedicated (i.e., hard-coded) logic to perform the operations described herein. The memory subsystem controller 115 can be a microcontroller, dedicated logic circuitry (e.g., a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc.), or other suitable processor.
[0031] The memory subsystem controller 115 may include a processor 117 (e.g., a processing device) configured to execute instructions stored in a local memory 119. In the illustrated example, the local memory 119 of the memory subsystem controller 115 includes embedded memory configured to store instructions for executing various processes, operations, logic flows, and routines that control the operation of the memory subsystem 110, including handling communications between the memory subsystem 110 and the host system 120.
[0032] In some embodiments, local memory 119 may include memory registers that store memory pointers, fetched data, etc. Local memory 119 may also include read-only memory (ROM) for storing microcode. Figure 1 The example memory subsystem 110 in has been shown as including a memory subsystem controller 115, but in another embodiment of the present disclosure, the memory subsystem 110 does not include a memory subsystem controller 115, but may rely on external control (e.g., provided by an external host or by a processor or controller separate from the memory subsystem).
[0033] The memory subsystem controller 115 may generally receive commands or operations from the host system 120 and convert the commands or operations into instructions or appropriate commands to achieve the desired access to the memory device 130. The memory subsystem controller 115 may be responsible for other operations such as wear leveling operations, garbage collection operations, error detection and error correction code (ECC) operations, encryption operations, cache operations, and address translation between logical addresses (e.g., logical block address (LBA) namespace) and physical addresses (e.g., physical block addresses) associated with the memory device 130. The memory subsystem controller 115 may further include host interface circuitry to communicate with the host system 120 via a physical host interface. The host interface circuitry may convert commands received from the host system into command instructions to access the memory device 130 and convert responses associated with the memory device 130 into information for the host system 120.
[0034] The memory subsystem 110 may also include additional circuitry or components not shown. In some embodiments, the memory subsystem 110 may include a cache or buffer (e.g., DRAM) and address circuitry (e.g., row decoders and column decoders) that can receive addresses from the memory subsystem controller 115 and decode the addresses to access the memory device 130.
[0035] In some embodiments, memory device 130 includes a local media controller 135 that operates in conjunction with memory subsystem controller 115 to perform operations on one or more memory cells of memory device 130. An external controller (e.g., memory subsystem controller 115) can externally manage memory device 130 (e.g., perform media management operations on memory device 130). In some embodiments, memory device 130 is a managed memory device, which is a raw memory device that is combined with a local controller (e.g., local controller 135) for media management within the same memory device package. An example of a managed memory device is a managed NAND (MNAND) device.
[0036] The host system 120 includes one or more instances of KVDBs 125A to 125N. The host system 120 also includes a QoS module 126 that can identify which I / O operations are user-initiated and which I / O operations are related to internal maintenance of data structures in the KVDB based on tags. The QoS module can be included in a memory management system (e.g., Figure 3 The controller 115 may include a processor 117 (processing device) configured to execute instructions stored in the local memory 119 for performing some of the operations described herein.
[0037] Figure 2 Bandwidth provisioning and dynamic throttling by a quality of service (QoS) module 126 that receives I / O streams from one or more key-value databases (KVDBs) is shown. Figure 2 Only two instances of KVDBs are shown (i.e., KVDB (0) and KVDB (1)), but the scope of the present disclosure is not limited to any particular number of KVDBs. For clarity, arrows showing I / O flows are shown only for KVDB (0) (125A), but KVDB (1) (125B) and any other KVDB instances (not shown) may also have I / O flows directed to the QoS module 126. As described above, each KVDB contains one or more KVSs 225A through 225N. One or more I / O operation requests 222A through 222N from an application running on the host system involve accessing the corresponding KVS 225A through 225N. The I / O operation requests are placed into an I / O flow. The memory management system (e.g., Figure 3 The m pool 362 shown enables one or more tags to be passed, for example, Figure 3The command line interface, such as component 364, is associated with an I / O stream. For example, an I / O stream 232 may include a tag 229 that may inform the QoS module 126 of the corresponding priority levels of the I / O operations in the I / O stream. Note that the tag 229 may include multiple tags containing information about different priority levels for different I / O operations. In this example, the I / O stream 232 has only user-initiated I / O operations and no internal maintenance-related I / O operations (i.e., no operations related to maintaining the hierarchy of nodes in the tree data structure within the KVDB).
[0038] Each KVDB can have an internal maintenance module 227, which can be a dirty data cache module. Each internal maintenance module includes a data organization component 228 (e.g., 228A, 228B, 228C - although three components are shown in the example, any arbitrary number of components can be used) to periodically reorganize the KVS 225A to 225N. The data organization component 228 performs various maintenance operations on the tree data structure to keep the tree in the optimal shape. In some embodiments, components 228A, 228B and 22C can be recording modules, ingestion modules, etc. I / O streams 234A, 234B and 234C indicate I / O streams that can include both user-initiated I / O operations (e.g., 222A to 222N) and internal maintenance-related I / O operations. Tags 231A, 231B and 231C contain relevant information to distinguish user-initiated I / O operations from internal maintenance-related I / O operations. The KVDBs are mapped into the QoS module 126 along with their corresponding I / O streams (with corresponding tags). For example, bandwidth allocation modules 245A and 245B map KVDB(0) and KVDB(1), respectively. Based on examining the tags and the information contained in the tags, bandwidth allocation module 245A for KVDB(0) can allocate available bandwidth among the I / O streams 232, 234A, 234B, and 234C (e.g., thereby giving priority to user-initiated I / O operations over internal maintenance-related I / O operations when the nodes of the tree data structure are optimally distributed, or giving priority to internal maintenance-related I / O operations over user-initiated I / O operations when write or read latency is experienced due to suboptimal distribution of the nodes of the tree data structure). For example, in one scenario, when internal maintenance related I / O operations in I / O stream 234C are prioritized, I / O stream 232 may have 10% of the bandwidth, I / O streams 234A and 234B may each have 10% of the bandwidth and the remaining 70% of the bandwidth may be allocated to I / O stream 234C. This percentage allocation may be accomplished using weighted round robin or other techniques. Module 245A may instruct dynamic throttling and multiplexing module 250 to service the I / O streams according to those percentages. Note that these example percentages are for illustrative purposes and do not limit the scope of the present disclosure. The QoS module may dynamically change these percentages of allocated bandwidth based on predetermined QoS parameters associated with the I / O streams. In one instance, Figure 3 The QoS adjustment API module 378 is shown to control the dynamic bandwidth allocation function.
[0039] The QoS module 126 includes a bandwidth allocation module corresponding to each KVDB. For example, the bandwidth allocation module 245B can allocate available bandwidth among the I / O flows (not shown) from KVDB (1) (125B). Depending on the number of KVDBs, the QoS module 126 can distribute the total available bandwidth among the I / O flows directed to the dynamic throttling and multiplexing module 250. For example, I / O flow 247A can direct all I / O flows from KVDB (0) to the dynamic throttling and multiplexing module 250, including all information from labels 229, 231A, 231B and 231C. Similarly, I / O flow 247B can direct all I / O flows from KVDB (1) to the dynamic throttling and multiplexing module 250, including all label information (not shown). The dynamic throttling and multiplexing module 250 adjusts the processing time of input / output operations in one or more input / output flows according to predetermined QoS parameters, as described in further detail below.
[0040] Figure 3 A storage stack architecture with built-in QoS control according to some embodiments of the present disclosure is shown. Specifically, the QoS module layer (370A, B, C) in the I / O flow path from the KVDB (325A, B) to the memory device (374A, B, C) shows the QoS module 126 ( Figure 1 and 2 In this example embodiment, the thicker, darker arrows indicate information flow related to QoS control, while the thinner, lighter arrows indicate I / O flow from the KVDB to media 374A, 374B, 374C. Although three media are shown for illustrative purposes, any number of media may be used. Media 374A-C may be Figure 1 Memory device 140 is shown. Also, KVDB 325A and 325B may be Figure 1 and Figure 2 KVDB(0)125A and KVDB(1)125B are shown. Note that although Figure 3 Only two KVDBs are shown in FIG, but the QoS component can be integrated with any number of KVDBs coupled with any number of media.
[0041] Specifically, block 360 is for the administrator to configure QoS parameters so that the QoS module 126 (shown in FIG. Figure 2A command-line interface (CLI) can be used to apply appropriate throttling schemes to incoming I / O flows. QoS parameters can be associated with the latency of one or more I / O flows. For example, if the latency of one or more I / O flows does not meet a threshold latency, the storage architecture cannot deliver the target QoS parameters configured by management. The QoS module can dynamically change the I / O processing time of one or more I / O flows to meet the configured QoS parameters.
[0042] Components of the QoS module 126 may reside in a memory pool (mpool) 362. A memory pool is a storage module that manages different memory devices. Figure 3 In the I / O path shown, the m pool can write data to the storage device and perform data protection operations. The m pool 362 can have another command line interface 364 to assign tags to the I / O streams from the KVDB 325A and 325B. Optionally, a data protection block 366 is included in the I / O path. The data protection block can be based on erasure coding (EC) or other types of data protection schemes, such as redundant arrays of independent disks (RAID). The QoS module layer (370A, 370B, and 370C) is implemented between a media-agnostic universal physical layer (368A, 368B, and 368C) and a media-specific physical layer (372A, 372B, and 372C) that acts as an interface adapter based on the media type. For example, if the media is an SSD, the media-specific physical layer can be an NVMe SSD. The media-specific physical layer guides the interface with the physical media, while the media-agnostic universal physical layer provides an interface to the QoS module layer (370A, B, C) within the m pool. The QoS module layer implements the actual throttling mechanism using queues. The QoS module intercepts I / O flows to check the tags and posts I / O operations to the throttling queue. The QoS module can also provide a system overview by providing statistics about the latency and bandwidth distribution of various I / O flows tagged with various tags.
[0043] In addition to the QoS layer, the internal architecture of the QoS module may also include a policy engine 380 , a policy repository 382 , and various application programming interfaces (APIs) such as a QoS API 384 , a QoS query API 376 , and a QoS adjustment API 378 .
[0044] Policy repository 382 provides persistent data storage for the QoS module. When the storage stack is loaded, data from policy repository 382 is read. When no policy is stored, a default policy is loaded (which may be hard-coded). Administrators may have privileges to modify policies and make them permanent. Policy engine 380 maintains the in-memory data structures of policy repository 382. An API can query policy engine 380 to convert I / O tags to runtime throttling queues.
[0045] The QoS API 384 defines an interface for communicating with the policy engine in the I / O path. The QoS query API provides an interface for users and / or administrators to query policies. For example, system performance statistics can be reported through the QoS API. The QoS adjustment API 378 is responsible for automatically adjusting different types of I / O, such as user-initiated I / O and internal maintenance-related I / O. For example, if the KVDB determines that a rebalance is needed between internal maintenance-related I / O and user-initiated I / O to improve the tree structure in the database, such a rebalance request is sent to the QoS adjustment API along with the bandwidth allocation between internal maintenance-related I / O and user-initiated I / O. The QoS adjustment API module processes the rebalance request and redistributes bandwidth across throttling queues. The new bandwidth allocation information is then sent to the policy engine. In some embodiments, the KVDB receives feedback from the QoS. The KVDB uses the feedback to understand the effectiveness of the QoS adjustments. For example, the feedback can include the current throughput and I / O wait time for each I / O flow.
[0046] Figure 4 A grouping scheme for facilitating QoS control of I / O tags according to some embodiments of the present disclosure is presented. I / O tags of a KVDB can be grouped. A user can select tags that have been pre-set with appropriate priority levels through an interface. The user can also select groups to which the tags will be assigned. The groups can have predetermined weights. Although individual tags with different priority levels provide the finest granularity for allocating bandwidth, it may be difficult for a KVDB to determine the optimal bandwidth percentage for each tag. Therefore, grouping provides an alternative method for efficient bandwidth allocation. For example, Figure 4 , 7). The QoS module 126 may implement a weighted round robin (WRR) algorithm to calculate the weighted percentages of bandwidth allocated to the different tag groups. ...
[0047] Figure 5is a flow chart of an example method 500 for controlling QoS of database I / O flows according to some embodiments of the present disclosure. The method 500 may be performed by processing logic, which may include hardware (e.g., a processing device, circuitry, dedicated logic, programmable logic, microcode, hardware of a device, integrated circuit, etc.), software (e.g., instructions running or executed on a processing device), or a combination thereof. In some embodiments, the method 500 may be performed by Figure 1 The QoS component 126 of the host system 120 is executed. Although shown in a specific sequence or order, the order of the processes may be modified unless otherwise specified. Therefore, the illustrated embodiments should be understood as examples only, and the illustrated processes may be performed in a different order, and some processes may be performed in parallel. In addition, one or more processes may be omitted in various embodiments. Therefore, not all processes are required in every embodiment. Other process flows are possible.
[0048] At operation 510, processing logic receives one or more I / O streams associated with one or more KVDBs. The I / O streams may originate from a host system running a user-initiated application. At least one of the I / O streams contains one or more user-initiated I / O operations associated with accessing data stored in a memory subsystem coupled to the one or more KVDBs. Some of the I / O streams may originate from the KVDB itself and may contain input / output operations related to internal maintenance of the one or more KVDBs. The I / O streams are marked with a label. A memory management system containing a QoS module 126 may provide an interface to the user for tagging the user-initiated I / O operations, wherein the label has identification data about the I / O stream. An example of identification data is which application executed at the host system initiated the I / O operation in the I / O stream. Another example of identification data contained in the label may be which KVDB is associated with the corresponding I / O stream.
[0049] In certain embodiments, Figure 3 The command line interface 364 shown enables the user to select appropriate tags for the I / O stream. Tags can be associated with different priority tags, and the user can select tags with appropriate priority levels to mark the I / O operations in the I / O stream. In addition, the user or administrator can group multiple tags into a group, such as Figure 4 described.
[0050] At operation 520, processing logic checks the corresponding tag of the I / O flow. An I / O flow can have multiple tags, thereby providing different identification data to the QoS module. In one embodiment, the QoS module 126 checks whether the tag is associated with a user-initiated I / O operation or an internal maintenance-related I / O operation. The QoS module 126 also checks to which KVDB the tagged I / O flow corresponds. Further, the QoS module can identify the user-initiated application to which the tag is associated and which QoS parameter is associated with the user-initiated application.
[0051] At operation 530, based on the identification data obtained by examining the tag, processing logic determines a corresponding amount of bandwidth to be allocated to the I / O flow to meet threshold criteria related to predetermined QoS parameters associated with the I / O flow. The predetermined QoS parameters may be set by an administrator, for example, using Figure 3 The threshold criteria associated with the QoS parameter may be the maximum waiting time experienced by a user-initiated I / O operation without perceptible performance degradation. Figure 2 As described, bandwidth allocation can be within an I / O flow associated with a particular instance of the KVDB. When there are multiple KVDB instances, the processor in the QoS module allocates the total available bandwidth across the I / O flows that span the multiple KVDB instances. In some embodiments, more bandwidth can be allocated to I / O flows containing user-initiated operations than to I / O flows containing internal maintenance-related operations. However, as described with respect to Figure 3 As depicted by the QoS adjustment API module 360 , bandwidth may be redistributed across throttled queues if the internal KVS tree data structure becomes disorganized such that completing user-initiated I / O operations becomes inefficient.
[0052] At operation 540, processing logic dynamically throttles I / O streams across one or more KVDBs using corresponding allocated bandwidth amounts. Dynamic throttling involves adjusting the processing time of I / O operations in an I / O stream. Dynamic throttling can be performed by Figure 2 The module 250 shown is completed. Figure 3 The QoS module layers 370A-C in the I / O path in
[15] implement dynamic throttling by communicating with the policy engine 380 via module 384. Throttling itself does not affect QoS, as appropriate bandwidth allocation is performed based on the information contained in the label. Furthermore, I / O flows can be multiplexed between KVDBs by module 250.
[0053] Figure 6An example machine of a computer system 600 is shown within which a set of instructions for causing the machine to perform any one or more of the methodologies discussed herein may be executed. For example, the computer system 600 may correspond to a computer system that includes, is coupled to, or utilizes a memory subsystem (e.g., Figure 1 host system 110) of the host system (eg, Figure 1 host system 120) or can be used to perform operations of the controller (for example, execute an operating system to perform operations corresponding to Figure 1 In some embodiments, the machine may be connected (e.g., using a network) to other machines in a LAN, an intranet, an extranet, and / or the Internet. The machine may operate in the capacity of a server or a client user machine in server-client user network environment, as a peer machine in a peer-to-peer (or distributed) network environment, or as a server or a client user machine in a cloud computing infrastructure or environment.
[0054] The machine may be a personal computer (PC), tablet PC, set-top box (STB), personal digital assistant (PDA), cellular phone, web appliance, server, network router, switch or bridge, or any machine capable of executing (sequentially or otherwise) a set of instructions that specify actions to be taken by the machine. Further, while a single machine is shown, the term "machine" shall also be taken to include any collection of machines that individually or jointly execute a set (or multiple sets of instructions) to perform any one or more of the methodologies discussed herein.
[0055] The example computer system 600 includes a processing device 602, a main memory 604 (e.g., read-only memory (ROM), flash memory, dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM) or Rambus DRAM (RDRAM), etc.), a static memory 606 (e.g., flash memory, static random access memory (SRAM), etc.), and a data storage device 618, which communicate with each other via a bus 630.
[0056] Processing device 602 represents one or more general-purpose processing devices, such as a microprocessor, a central processing unit, or the like. More specifically, the processing device may be a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, or a processor that implements another instruction set or a combination of instruction sets. Processing device 602 may also be one or more special-purpose processing devices, such as an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), a network processor, or the like. Processing device 602 is configured to execute instructions 6026 for performing the operations and steps discussed herein. Computer system 600 may further include a network interface device 608 for communicating via a network 620. Data storage device 618 may include a machine-readable storage medium 624 (also referred to as a computer-readable medium) having stored thereon one or more instruction sets or software 626 that embodies any one or more of the methods or functions described herein. During execution of the instructions 626 by the computer system 600, the instructions may also reside, completely or at least partially, within the main memory 604 and / or within the processing device 602, the main memory 604 and the processing device 602 also constituting machine-readable storage media. The machine-readable storage media 624, the data storage device 618, and / or the main memory 604 may correspond to Figure 1 Memory subsystem 110.
[0057] In one embodiment, the instructions 626 include instructions for implementing instructions related to a particular component (e.g., Figure 1 QoS module 126). Although the machine-readable storage medium 624 is shown as a single medium in the example embodiment, the term "machine-readable storage medium" should be taken to include a single medium or multiple media (e.g., a centralized or distributed database and / or associated cache memory and servers) that store the one or more instruction sets. The term "machine-readable storage medium" should also be taken to include any medium that can store or encode an instruction set for execution by a machine and causes the machine to perform any one or more of the methods of the present disclosure. Therefore, the term "machine-readable storage medium" should be taken to include, but not be limited to, solid-state memory, optical media, and magnetic media.
[0058] Some portions of the foregoing detailed description have been presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. Operations are those requiring physical manipulation of physical quantities. Typically, but not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, combined, compared, and otherwise manipulated. It has proven convenient at times, primarily for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
[0059] It should be remembered, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise, as will be apparent from the above discussion, it should be understood that throughout this specification, discussions utilizing terms such as "receive," "serve," or "issue" refer to the actions and processes of a computer system or similar electronic computing device that manipulate and transform data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system's memories or registers or other such information storage devices.
[0060] The present disclosure also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the intended purpose, or this apparatus may comprise a computer selectively activated or reconfigured by a computer program stored in a general-purpose computer. Such a computer program may be stored in a computer-readable storage medium, such as, but not limited to, any type of disk (including floppy disks, optical disks, CD-ROMs, and magneto-optical disks), read-only memory (ROM), random access memory (RAM), EPROM, EEPROM, magnetic or optical cards, or any type of medium suitable for storing electronic instructions, each coupled to a computer system bus.
[0061] The algorithms and displays proposed herein are not inherently related to any particular computer or other device. Various general-purpose systems can be used together with programs according to the teachings herein, or it can be demonstrated that it is convenient to construct more specialized equipment for performing the methods described. The structure for various of these systems will be as described below in the description. In addition, the present disclosure is not described with reference to any specific programming language. It should be understood that various programming languages can be used to implement the teachings of the present disclosure as described herein.
[0062] The present disclosure may be provided as a computer program product or software, which may include a machine-readable medium having instructions stored thereon, which instructions may be used to program a computer system (or other electronic device) to perform a process according to the present disclosure. A machine-readable medium includes any mechanism for storing information in a form readable by a machine (e.g., a computer). For example, a machine-readable (e.g., computer-readable) medium includes a machine (e.g., computer) readable storage medium, such as a read-only memory ("ROM"), a random access memory ("RAM"), a magnetic disk storage medium, an optical storage medium, a flash memory storage device, etc.
[0063] In the foregoing description, embodiments of the present disclosure have been described with reference to specific exemplary embodiments thereof. It will be apparent that various modifications may be made to the described embodiments without departing from the broader spirit and scope of the embodiments of the present disclosure as set forth in the following claims. The specification and drawings are, therefore, to be regarded in an illustrative rather than a restrictive sense.
Claims
1. A method for data processing, comprising: receiving a plurality of input / output streams associated with two or more key-value databases in a host system; checking corresponding tags of the plurality of input / output streams; determining, by a quality of service (QoS) module in the host system operatively coupled to a single controller receiving the plurality of input / output flows, respective amounts of bandwidth to be allocated to the plurality of input / output flows based on identification data obtained by inspecting the respective tags to satisfy threshold criteria associated with predetermined QoS parameters associated with the plurality of input / output flows, wherein the QoS parameters are applied across the two or more key-value stores; as well as The plurality of input / output flows are dynamically throttled using the corresponding provisioned bandwidth amounts across the two or more key-value stores to adjust processing times of input / output operations in the plurality of input / output flows according to the QoS parameters.
2. The method of claim 1 , wherein at least one of the plurality of input / output streams comprises one or more user-initiated input / output operations associated with accessing data stored in a memory subsystem coupled to the two or more key-value stores.
3. The method according to claim 2, wherein checking the corresponding tags comprises: Identification data is obtained that associates the one or more user-initiated input / output operations with corresponding application programs executing at the host computer system. 4 . The method of claim 2 , wherein at least one of the plurality of input / output streams comprises input / output operations related to internal maintenance of the two or more key-value databases.
5. The method according to claim 4, wherein checking the corresponding tags comprises: Identification data associating an input / output stream of the plurality of input / output streams with a corresponding key-value database is obtained. The method of claim 1 , wherein each key-value database comprises a collection of key-value stores arranged in a non-relational schema.
7. The method of claim 1 , wherein determining the amount of bandwidth to be allocated to the plurality of input / output flows comprises: determining a latency associated with completing one or more user-initiated or internal maintenance-related input / output operations included in the input / output stream; as well as A determination is made as to whether the determined latency satisfies a threshold latency associated with the predetermined QoS parameter associated with the input / output flow.
8. The method according to claim 1, further comprising: mapping the two or more key-value stores along with corresponding input / output streams for each key-value store; as well as Multiplexing is performed between the plurality of input / output streams across the two or more key-value stores to efficiently divide the processing time among the plurality of input / output streams.
9. The method according to claim 1, further comprising: A first interface is provided for receiving a group definition from a user, the group definition comprising one or more tags belonging to the plurality of input / output flows.
10. The method according to claim 9, further comprising: A second interface is provided for receiving from the user weights assigned to a set of tags.
11. A system for data processing, comprising: multiple memory components; as well as a processing device operatively coupled to the memory component to perform operations comprising: providing an interface for assigning respective tags to a plurality of input / output streams associated with two or more key-value databases in a host system, wherein the respective tags contain identification data regarding which key-value database the input / output stream is associated with; determining, by a quality of service (QoS) module in the host system operatively coupled to a single controller receiving the plurality of input / output flows, an amount of bandwidth to be provisioned to the plurality of input / output flows based on identification data obtained from the respective tags to satisfy a threshold latency value, wherein the threshold latency value is related to predetermined QoS parameters associated with the plurality of input / output flows, and wherein the QoS parameters are applied across the two or more key-value stores; as well as The plurality of input / output streams are dynamically throttled with corresponding amounts of provisioned bandwidth across the two or more key-value stores to regulate processing times of input / output operations in the plurality of input / output streams according to the threshold latency value.
12. The system of claim 11, wherein the processing device is further configured to perform operations comprising: A determination is made based on the tag whether an input / output stream among the plurality of input / output streams contains a user-initiated operation.
13. The system of claim 12, wherein the processing device is further configured to perform operations comprising: In response to determining that a first I / O stream contains user-initiated I / O operations, more bandwidth is allocated to the first I / O stream than to a second I / O stream containing internal maintenance-related I / O operations.
14. The system of claim 11, wherein each key-value database comprises a collection of key-value stores arranged in a non-relational schema.
15. The system of claim 11, wherein the processing device is further configured to perform operations comprising: A priority level of a user-initiated input / output operation included in an input / output stream among the plurality of input / output streams is received from a user through the interface.
16. The system of claim 15, wherein the interface provides a plurality of tags associated with different priorities, and the user selects an appropriate tag from the plurality of tags to indicate a priority level of the user-initiated input / output operation contained in an input / output stream among the plurality of input / output streams.
17. The system of claim 11, wherein the interface provides a plurality of tags for a database administrator to indicate that the input / output operation is related to internal maintenance of the corresponding key-value database.
18. A non-transitory computer-readable medium comprising instructions that, when executed by a processor, cause the processor to perform operations comprising: receiving a plurality of input / output streams associated with two or more key-value databases in a host system; checking corresponding tags of the plurality of input / output streams; determining, by a quality of service (QoS) module in the host system operatively coupled to a single controller receiving the plurality of input / output flows, respective amounts of bandwidth to be allocated to the plurality of input / output flows based on identification data obtained by inspecting the respective tags to satisfy threshold criteria associated with predetermined QoS parameters associated with the plurality of input / output flows, wherein the QoS parameters are applied across the two or more key-value stores; as well as The plurality of input / output flows are dynamically throttled using the corresponding provisioned bandwidth amounts across the two or more key-value stores to adjust processing times of input / output operations in the plurality of input / output flows according to the QoS parameters.
19. The non-transitory computer-readable medium of claim 18, wherein the plurality of input / output streams comprises one or more user-initiated input / output operations associated with accessing data stored in a memory subsystem coupled to the two or more key-value databases, wherein each key-value database comprises a collection of key-value stores arranged in a non-relational scheme.
Citation Information
Patent Citations
Memory efficient persistent key-value store for non-volatile memories
CN109085997A
Database processing system and method
US20100211577A1
Multi-stream SSD QOS management
US20170272494A1
Storage rate limiting for information handling system with multiple storage controllers
US20180103098A1