Utilization-Based Dynamic Shared Buffer in a Data Storage System

By using a dynamic shared buffer algorithm based on utilization in the data storage device, dynamically allocating buffer memory resources is solved, and the problem of low buffer memory resource utilization in a multi-tenant environment is achieved, and the throughput of data storage device is improved.

CN114968081BActive Publication Date: 2025-06-13SK HYNIX INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111283207.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-02-25
Filing Date
2021-11-01
Publication Date
2025-06-13
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

In a multi-tenant environment, the data storage device has a limited resource utilization rate of buffer memory, resulting in limited throughput of the data storage device.

Method used

Through a dynamic shared buffer algorithm based on utilization, buffer memory resources are dynamically allocated, and buffer memory space is reassigned according to the utilization index of each data storage partition, ensuring that high utilization partitions preferentially obtain buffer memory resources.

Benefits of technology

Improve the throughput of data storage devices and improve data storage performance in multi-tenant environments by more efficiently utilizing limited buffer memory resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968081B_ABST
    Figure CN114968081B_ABST
Patent Text Reader

Abstract

The present application discloses a method for allocating a buffer memory to multiple data storage partitions. In some embodiments, the method may include: comparing the size of the free buffer space with the size of a reallocation threshold size reallocated in a reallocation loop; when it is determined that the size of the free buffer space is less than the reallocation threshold size, deallocating at least one portion of the size of the occupied buffer space based on historical information of the buffer memory utilization rate of the occupied buffer space to create new free buffer space; and allocating the existing free buffer space and the new free buffer space to the target data storage partition based on historical information of the buffer memory utilization rate corresponding to the target data storage partition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This patent document relates to the allocation of buffers for data storage devices. Background Art

[0002] In computer systems such as personal computers, servers, and mainframes, as well as mobile devices such as smartphones and tablet computers, a main memory and a data storage device are coupled to a processor such as a central processing unit (CPU) via a system bus or a local memory bus to provide the CPU with access to data stored in the main memory and the data storage device. When writing data to or reading data from the main memory or the data storage device, the host system sends a write command or a read command to a memory controller. Data read from the main memory or data to be written to the main memory or the data storage device can be temporarily stored in a buffer memory to improve the performance of the main memory and the data storage device by allowing synchronous operations such as file reads or writes to be completed quickly rather than waiting for a hardware interrupt to access the main memory and the data storage device.

[0003] Each memory interface uses such a buffer memory when moving data between the host system and the data storage device. However, when the memory space of a data storage device is divided into multiple sections or zones, efficient buffer allocation becomes very important. Summary of the Invention

[0004] Embodiments of the disclosed technology relate to a method and system that provide, among other features and benefits, an algorithm for increasing the throughput of a data storage device by increasing the utilization of limited hardware resources such as buffer memory in a multi-tenant environment.

[0005] In one aspect, a method of allocating a buffer memory to multiple data storage partitions of a data storage system is disclosed. The method includes: receiving a request for allocating at least a portion of the buffer memory to store data to be fed back to a first data storage partition among the multiple data storage partitions; determining a size of free space in the buffer memory available for allocation to the first data storage partition; comparing the size of the free space with a reallocation threshold size that triggers reallocation of at least a portion of the currently allocated buffer memory space; comparing utilization indices of the multiple data storage partitions including the first data storage partition with a first threshold utilization index and a second threshold utilization index; when determining that the size of the free space is less than the reallocation threshold size, canceling the allocation of a portion of the currently allocated buffer memory space, the portion of the currently allocated buffer memory space being allocated to at least one data storage partition among the multiple data storage partitions having a utilization index lower than the first threshold utilization index; and when determining that the utilization index of the first data storage partition is higher than the second threshold utilization index, allocating the deallocated portion of the buffer memory space to the first data storage partition.

[0006] In another aspect, a method of allocating a buffer memory to multiple data storage partitions of a data storage system is disclosed. The method includes: receiving multiple requests for allocating at least a portion of the buffer memory to store data to be fed back to multiple first data storage partitions among the multiple data storage partitions; when determining that the size of free space in the buffer memory is less than the reallocation threshold size, canceling the allocation of a portion of the currently allocated buffer memory space, the portion of the currently allocated buffer memory space being allocated to at least one data storage partition among the multiple data storage partitions having a utilization index lower than the first threshold utilization index; comparing utilization indices of the multiple first data storage partitions with the second threshold utilization index to determine high-utilization data storage partitions among the multiple first data storage partitions having a utilization index equal to or greater than the second threshold utilization index; comparing the utilization indices of the high-utilization data storage partitions with each other to determine priorities of high-utilization target data storage partitions; and based on the utilization priorities of the high-utilization data storage partitions, allocating the deallocated space and free space of the buffer memory to the high-utilization data storage partitions.

[0007] In another aspect, a data storage system is disclosed. The system includes: a data storage device including a plurality of data storage partitions configured to store data; a buffer memory configured to be shared by the plurality of data storage partitions to temporarily store the data before writing the data to the data storage device; a processor communicatively coupled to the data storage device and the buffer memory for: receiving a request for allocating at least a portion of the buffer memory to be allocated to store a plurality of first data to be fed back to a plurality of the first data storage partitions among the plurality of data storage partitions; identifying a size of existing free space in the buffer memory not allocated to the plurality of data storage partitions and a size of occupied space in the buffer memory allocated to at least one of the plurality of data storage partitions; comparing the size of the free space with a reallocation threshold size reallocated in a reallocation cycle; when determining that the size of the free space is less than the reallocation threshold size, deallocating at least a portion of the occupied space in the buffer memory based on historical information of buffer memory utilization of the occupied space to create new free space in the buffer memory; and allocating the existing free space and the new free space in the buffer memory to the plurality of first data storage partitions based on historical information of buffer memory utilization corresponding to the plurality of first data storage partitions. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 FIG. shows an example of a memory system that can be used to implement some embodiments of the disclosed technology.

[0009] Figure 2 FIG. shows an example configuration of a host and a data storage system communicatively coupled to the host that can be used to implement some embodiments of the disclosed technology.

[0010] Figure 3 FIG. shows an example graph of data throughput in a data storage device.

[0011] Figure 4 FIG. shows an example graph of data throughput in a data storage device based on a fixed buffer or cache allocation scheme.

[0012] Figure 5 FIG. shows an example graph of data throughput in a data storage device based on some embodiments of the disclosed technology.

[0013] Figure 6 FIG. is a flowchart showing an example of a utilization-based dynamic shared buffer algorithm based on some embodiments of the disclosed technology.

[0014] Figure 7 FIG. is a flowchart showing another example of a utilization-based dynamic shared buffer algorithm based on some embodiments of the disclosed technology.

[0015] Figure 8It is a flowchart showing another example of a utilization-based dynamic shared buffer algorithm according to some embodiments of the disclosed technology.

[0016] Figure 9 It is a flowchart showing another example of a utilization-based dynamic shared buffer algorithm according to some embodiments of the disclosed technology.

[0017] Figure 10 It is a flowchart showing another example of a utilization-based dynamic shared buffer algorithm according to some embodiments of the disclosed technology. Detailed Description

[0018] Figure 1 An example of a memory system 100 that can be used to implement some embodiments of the disclosed technology is shown. The memory system 100 includes a memory module 110, which can be used to store information for use by other electronic devices or systems. The memory system 100 can be incorporated (e.g., located on a circuit board) into other electronic devices and systems. Optionally, the memory system 100 can be implemented as an external storage device such as a USB flash drive and a solid-state drive (SSD).

[0019] The memory module 110 included in the memory system 100 can include memory regions (e.g., memory arrays) 102, 104, 106, and 108. Each of the memory regions 102, 104, 106, and 108 can be included in a single memory die or multiple memory dies. The memory dies can be included in an integrated circuit (IC) chip.

[0020] Each of the memory regions 102, 104, 106, and 108 includes a plurality of memory cells. Read operations, programming operations, or erase operations can be performed based on a memory unit. Thus, each memory unit can include a predetermined number of memory cells. The memory cells in the memory regions 102, 104, 106, or 108 can be included in a single memory die or multiple memory dies.

[0021] Memory cells in each of memory regions 102, 104, 106, and 108 may be arranged in rows and columns in a memory unit. Each of the memory units may be a physical unit. For example, a group of multiple memory cells may form a memory unit. Each of the memory units may also be a logical unit. For example, the memory unit may be a bank, a block, or a page, which may be identified by a unique address such as a bank address, a block address, or a page address. During a read or write operation, the unique address associated with a particular memory unit may be used to access that particular memory unit. Based on the unique address, information may be written to or retrieved from one or more memory cells in that particular memory unit.

[0022] Memory cells in memory regions 102, 104, 106, and 108 may include non-volatile memory cells. Examples of non-volatile memory cells include flash memory cells, phase change random access memory (PRAM) cells, magnetoresistive random access memory (MRAM) cells, or other types of non-volatile memory cells. In an exemplary implementation where the memory cells are configured as NAND flash memory cells, read operations or write operations may be performed based on pages. However, erase operations in NAND flash memory are performed based on blocks.

[0023] Each of the non-volatile memory cells may be configured as a single-level cell (SLC) or a multi-level memory cell. A single-level cell may store one bit of information per cell. A multi-level memory cell may store more than one bit of information per cell. For example, each of the memory cells in memory regions 102, 104, 106, and 108 may be configured as a multi-level cell (MLC) that stores two bits of information per cell, a three-level cell (TLC) that stores three bits of information per cell, or a four-level cell (QLC) that stores four bits of information per cell. In another example, each of the memory cells in memory region 102 may be configured to store at least one bit of information (e.g., one bit of information or multiple bits of information), and each of the memory cells in memory region 104 may be configured to store more than one bit of information.

[0024] As Figure 1As shown, the memory system 100 includes a controller module 120. The controller module 120 includes: a memory interface 121 for communicating with a memory module 110; a host interface 126 for communicating with a host (not shown); a processor 124 for running firmware layer code; and a system memory 122 and a buffer / cache 123 for temporarily or persistently storing the executable firmware / instructions and associated information. In some embodiments, the controller module 120 may include an error correction engine 125 for performing error correction operations on the information stored in the memory module 110. The error correction engine 125 may be configured to detect / correct single-bit errors or multiple-bit errors. In another embodiment, the error correction engine 125 may be located in the memory module 110.

[0025] In some embodiments, the controller module 120 may further include a host interface 126 for communicating with a host. The host interface 126 may include components that conform to at least one of the host interface specifications, which include but are not limited to Serial Advanced Technology Attachment (SATA), Serial Attached SCSI (SAS) specification, and Peripheral Component Interconnect Express (PCIe).

[0026] The controller module 120 may include an Error Correction Code (ECC) engine 125, which is configured to receive data to be written to multiple memory regions 102, 104, 106, 108 and generate codewords. For example, the ECC engine 125 may include an encoder configured to encode data using an error correction code, such as a Low-Density Parity-Check (LDPC) encoder.

[0027] The ECC engine 125, such as an LDPC decoder, may also be configured to receive data and process the received data using an error correction code. The LDPC decoder may be configured to decode data read from multiple memory regions 102, 104, 106, 108 to detect and correct one or more of the errors present in the data, thereby achieving the error correction capability of the ECC scheme.

[0028] Figure 2 An example configuration of a host 210 and a data storage system 220 that communicates with the host 210, which may be used to implement some embodiments of the disclosed technology, is shown.

[0029] The host 210 can be a device or system that includes one or more processors 212 that operate to retrieve data from or store or write data to a data storage system 220. In some embodiments, examples of hosts can include personal computers (PCs), portable digital devices, digital cameras, digital multimedia players, televisions, and wireless communication devices. The host 210 can also include a memory 214 to store information required to operate the data storage system. The host 210 can communicate with the data storage system 220 via a communication channel 240 such as a system bus or a wired / wireless network. As will be discussed below, the memory 214 can be used to store information associated with the utilization of buffers allocated to the data storage system 220.

[0030] The data storage system 220 includes a plurality of data storage partitions 224, 226, 228 that can be used to store information used by the host 210. In some embodiments, the data storage system 220 can include Figure 1 the memory system 100 shown. The data storage system 220 can also include a buffer 222 that is configured to be shared by the plurality of data storage partitions 224, 226, 228. In some embodiments, the buffer 222 can be used to store data read from the plurality of data storage partitions 224, 226, 228 when the host 210 reads data, or to store data to be written to the plurality of data storage partitions 224, 226, 228 when writing data from the host 210. Although Figure 2 the buffer 222 is shown by way of example within the data storage system 220, the buffer 222 can be located external to the data storage system 220.

[0031] In some embodiments, the memory cell array can include a NAND flash memory array that is divided into many blocks, and each block contains a certain number of pages. Each block includes a plurality of memory cell strings, and each memory cell string includes a plurality of memory cells.

[0032] In some embodiments where the memory cell array is a NAND flash memory array, read operations and write (programming) operations are performed based on pages, and erase operations are performed based on blocks. Before performing a programming operation on any page included in a block, all memory cells within the same block must be erased simultaneously. In an embodiment, the NAND flash memory can use an even / odd bit line structure. In another embodiment, the NAND flash memory can use a full bit line structure. In the even / odd bit line structure, even bit lines and odd bit lines are interleaved along each word line and are accessed alternately so that each pair of even and odd bit lines can share peripheral circuits such as page buffers. In the full bit line structure, all bit lines are accessed simultaneously.

[0033] In an embodiment, the data storage system 220 may further include a controller 230 that is used to allocate the buffer 222 to queues associated with multiple data storage partitions 224, 226, 228. To this end, the controller 230 may maintain information associated with the utilization rate of the buffer 222 allocated to the multiple data storage partitions 224, 226, 228. In another embodiment, such a controller 230 may be located outside the data storage system 220.

[0034] In some embodiments, the buffer 222 (or cache) may be divided into multiple portions and each portion of the buffer 222 is allocated to each data storage space, such as being allocated to one of the multiple data storage partitions 224, 226, 228.

[0035] The controller 230 may include any type of controller or processor capable of providing the functions described herein. Examples of the controller 230 may include a microprocessor, a digital signal processor, a memory controller, a device controller, and a computing engine within an electronic device.

[0036] In some embodiments, the controller 230 may operate to allocate portions of the buffer 222 to the data storage partitions 224, 226, 228 based on a utilization rate index associated with the data storage partition 224, 226, 228 being accessed. In some embodiments, the utilization rate index may indicate the percentage of the buffer memory that is currently being used or has been used relative to the total buffer memory space allocated to a specific data storage partition. In one example, the utilization rate index may include historical information of the utilization rate of the buffer memory corresponding to the multiple data storage partitions 224, 226, 228 being accessed.

[0037] In some embodiments of the disclosed technology, the controller 230 may operate to receive a request that requests allocation of at least a portion of buffer 222 for storing data to be fed back to a target data storage partition (e.g., 224, 226, or 228). The controller then determines the size of the free space in buffer 222 available for allocation to the target data storage partition and compares the size of the free space with a reallocation threshold size. The reallocation threshold may indicate that at least one portion of the currently allocated buffer memory space needs to be reallocated. The controller may compare the utilization indices of multiple data storage partitions, including the target data storage partition, with a first threshold utilization index and a second threshold utilization index. When determining that the size of the free space is less than the reallocation threshold size, the controller may deallocate a portion of the currently allocated buffer memory space that is allocated to at least one data storage partition among the multiple data storage partitions 224, 226, 228 having a utilization index lower than the first threshold utilization index. When determining that the utilization index of the first data storage partition is higher than the second threshold utilization index, the controller may allocate the deallocated portion of the buffer memory space to the first data storage partition. The request includes a command from the SSD host for buffer allocation. The request may also include a first command for an open partition for initial buffer allocation. In this patent document, the term "open partition" may be used to indicate a partition of the data storage device that is in an active state at a given time. For example, an open partition may include erased (empty) memory cells and / or partially programmed memory cells available for further writing by the host. In contrast, since all memory cells in a full partition are fully programmed, a full partition does not allow data to be written.

[0038] In some embodiments of the disclosed technology, when determining that the size of the free space is equal to or greater than the reallocation threshold size, the controller 230 may allocate free buffer memory space corresponding to the size of the free space to one or more of the multiple data storage partitions, and one or more requests are queued in the one or more data storage partitions to run in a reallocation cycle. Here, the reallocation threshold size corresponds to a predetermined buffer memory size, the predetermined buffer memory size is less than the total size of the buffer, and is set to be reallocable in a reallocation cycle. Such a reallocation cycle repeats periodically. In some embodiments, it may be determined in each reallocation cycle which partition is allocated a command from the host and whether buffer space is needed to run a command on that partition. The allocated buffer may be monitored periodically to determine whether to deallocate / reallocate buffer space, and new buffer space (e.g., deallocated buffer) is allocated based on buffer utilization monitoring.

[0039] In some embodiments of the disclosed technology, the controller 230 may operate to receive a plurality of requests for allocating at least a portion of the buffer 222 for storing data to be fed back to a plurality of data storage partitions. When determining that the size of the free space in the buffer is less than the reallocation threshold size, the controller cancels the allocation of a portion of the currently allocated buffer memory space that is allocated to at least one data storage partition among the data storage partitions with a utilization index lower than the first threshold utilization index. The controller may compare the utilization indices associated with the plurality of data storage partitions with a second threshold utilization index to determine highly utilized target data storage partitions with a utilization index equal to or greater than the second threshold utilization index. The controller may also compare the utilization indices associated with the highly utilized target data storage partitions with each other to determine the priorities of the highly utilized target data storage partitions. The controller may allocate the deallocated space and the free space of the buffer to the highly utilized target data storage partitions based on the utilization priorities of the highly utilized target data storage partitions.

[0040] In some embodiments, the reallocation threshold size corresponds to a predetermined buffer memory size that is less than the total size of the buffer memory and is set to be reallocatable in a reallocation cycle. In some embodiments, the utilization indices associated with the plurality of target data storage partitions are determined based on the utilization of the portions of the buffer memory allocated to the plurality of data storage partitions. In some embodiments, the first threshold utilization index and the second threshold utilization index are determined based on historical information of the buffer memory utilization corresponding to the plurality of data storage partitions. In one example, the first threshold utilization index and the second threshold utilization index may have the same value as each other. In another example, the first threshold utilization index and the second threshold utilization index may have different values from each other. In some embodiments, the value of the first threshold utilization index is less than the value of the second threshold utilization index.

[0041] In some embodiments of the disclosed technology, the controller may operate to allocate the deallocated space and the free space of the buffer memory to the highly utilized target data storage partition with the highest utilization among the highly utilized target data storage partitions.

[0042] In some embodiments of the disclosed technology, a controller may operate to receive a request to allocate at least a portion of a buffer memory for storing data to be fed back to a plurality of target data storage partitions among a plurality of data storage partitions. The controller then identifies the size of the existing free space in the buffer memory that is not allocated to the plurality of data storage partitions and the size of the occupied space in the buffer memory that is allocated to at least one of the plurality of data storage partitions. The controller may compare the size of the free space with a reallocation threshold size that can be reallocated in a reallocation cycle. When determining that the size of the free space is less than the reallocation threshold size, the controller may deallocate at least a portion of the occupied space size of the buffer memory based on historical information of the buffer memory utilization of the occupied space to create new free space on the buffer memory. The controller may allocate the existing free space and the new free space of the buffer memory to the plurality of target data storage partitions based on historical information of the buffer memory utilization corresponding to the plurality of target data storage partitions.

[0043] In some embodiments, the historical information of the buffer memory utilization corresponding to the occupied space includes the utilization of the portions of the buffer memory previously allocated to the plurality of data storage partitions. In some embodiments, the allocation of the occupied space is deallocated when determining that the previous utilization of the occupied space is lower than a threshold utilization value. In some embodiments, the historical information of the buffer memory utilization corresponding to the plurality of target data storage partitions includes the utilization of the portions of the buffer memory previously allocated to the plurality of target data storage partitions. In some embodiments, when determining that the previous utilization of the buffer memory associated with a target data storage partition is higher than a threshold utilization value, the existing free space and the new free space of the buffer memory are allocated to the target data storage partition. The reallocation cycle is repeated periodically.

[0044] Some examples of the data storage system 220 include a solid state drive (SSD), which is a data storage device that utilizes non-volatile memory (e.g., flash memory) and / or volatile memory (e.g., synchronous dynamic random access memory; SDRAM) to store data. For example, the data storage system 220 may include a plurality of flash memory devices using multi-level cell technology. Each memory device includes a plurality of memory blocks, and each of the plurality of memory blocks includes a plurality of memory cells. Each memory cell can be programmed to one of a plurality of programming states. Multiple read thresholds can be used to read the data stored in each memory cell. A data storage device implemented based on some embodiments of the disclosed technology is configured to ensure that data can be decoded using optimized decoder parameters.

[0045] In some embodiments of the disclosed technology, throughput of a solid state drive (SSD) is increased by using methods that maximize or improve utilization of limited hardware resources, particularly in a multi-tenant environment of the SSD.

[0046] Typical performance metrics of enterprise SSDs are throughput in MB / s or input / output (IO) operations per second (IOP). Among the numerous limiting factors for maximum throughput, hardware resources such as DRAM or SRAM volatile memory buffer sizes are fixed by the hardware design to a limited available size.

[0047] As previously mentioned, before writing to a non-volatile device such as NAND, a buffer memory (e.g., a RAM buffer) is used as a temporary buffer for SSD user data to avoid head-of-line blocking of NAND, particularly during slow write operations or programming operations. Usually the buffer is much more expensive than NAND and is available only for a fraction of the actual NAND size. Usually this fraction is far less than 1 / 1000 of the NAND capacity. In some embodiments, the buffer memory is statically allocated among different requesters of the SSD without fully exploiting the nature of the requesters.

[0048] In some embodiments, a data storage system may include a data storage space divided into multiple data storage partitions. For example, a data storage system implemented based on some embodiments of the disclosed technology may include a newer SSD type such as a zoned namespace (ZNS) drive, which enables a host of the SSD to allocate smaller SSD segments for a particular requester application with finer grain differentiation from other requester applications. However, a requester allocated with an SSD segment and a corresponding buffer memory space may not fully utilize the allocated buffer memory space during the duration of the request.

[0049] In this patent document, such a requester application is sometimes referred to as a "tenant". The disclosed technology can be used in some embodiments to provide a method for maximizing utilization of buffer memory space in a multi-tenant environment of an SSD. For example, when multiple tenants are allowed to independently perform arbitrary operations on multiple partitions, pre-allocated buffer regions that are not used due to the corresponding partitions being idle can be reallocated, thereby improving utilization of buffer memory space. In some embodiments, the method can detect and dynamically change buffer allocation based on the workload activity or utilization of such segments.

[0050] In some embodiments, the method is applicable when the host and the SSD in the system exchange command requests and completions via a predefined queue structure. In an embodiment, the SSD may include an NVMe (Non-Volatile Memory Express) ZNS SSD. In another embodiment, the disclosed method is applicable to different types of SSDs.

[0051] In an NVMe SSD, the IO command queues are paired as a submission queue (SQ) and a completion queue (CQ). The host learns of the completion of a command via one or more CQ state changes made by the SSD. After identifying a CQ change, the host inputs one or more new commands into the SQ to maintain a predefined number of queue entries for the SSD to process. This repetition of command operations via the queue entries is considered the workload of the SSD. These workloads become the input to multiple segments of the SSD.

[0052] The disclosed techniques may be used in some embodiments to provide utilization-based dynamic shared buffer (UDSB) techniques that periodically control buffer allocation for each segment workload based on utilization detection of each segment workload. In some embodiments, if the utilization of a buffer is below a threshold, the USDB technique periodically deallocates unit buffer resources based on the requests that have been allocated. In some embodiments, if the utilization of a buffer allocated to an existing request is above a threshold, the USDB technique periodically allocates unit buffer resources to that request.

[0053] Figure 3Shows an example graph of the throughput T-put of a data storage device (e.g., SSD) relative to the host input Input(Host). Specifically, the graph shows the throughput (MB / s) of a general NVMe SSD relative to the host input workload. In some embodiments, the host input may include requests from the host to the data storage device for read operations and write operations. In some embodiments, the host input may include data to be read from or written to the data storage device. The SSD throughput increases as the host input increases until the SSD reaches its saturation point ResourceUtil, which may be referred to as the maximum throughput (Tmax). The maximum throughput (Tmax) is typically determined by the limitations of a large number of resources inside the SSD. If the resources are sensitive to throughput and the resources are under-utilized, the maximum throughput (Tmax) decreases. By way of example and not limitation, the host input workload may be a sequential write workload, and the throughput may indicate the sequential write throughput in MB / s. The buffer resources may include the DRAM buffer sizes in bytes that are allocated to temporarily store host contexts before flushing the host contexts into the NAND flash memory device in the SSD.

[0054] Figure 4 Shows an example graph of the throughput of a data storage device (e.g., SSD) relative to the host input based on a fixed buffer or cache allocation scheme. However, as further explained below, a fixed buffer or cache allocation scheme may result in waste of buffer or cache resources. Therefore, efficient buffer allocation becomes very important.

[0055] A data storage device such as an SSD is designed to achieve peak sustained throughput by making full use of the buffer. If the buffer is full, the SSD cannot obtain more workload from the host, thus reducing the SSD throughput until the buffer has enough space to accept further workload by flushing the contexts into the NAND flash memory device in the SSD. Figure 4 Shows such a scenario with up to three open partitions. In this scenario, the entire buffer will eventually be shared by the three open partitions. Figure 4Strategy 1 shown in [figure] indicates an intuitive buffer sharing strategy, where the buffer size of each open partition (total buffer size / number of open partitions) is statically assigned a fixed value until the maximum number of open partitions is reached. At any given time, when there is a single open partition, the maximum throughput is limited by the buffer size (single open area). Specifically, at T0, the first open partition (first partition; Z①) starts receiving workload until the maximum throughput of a single partition is reached between T1 and T2. At T1, the second open partition (second partition; Z②) starts receiving workload. As shown by the "SUM" curve in Figure 4 , the combined throughput of the first open partition (first partition; Z①) and the second open partition (second partition; Z②) will reach 2x the throughput (single partition) maximum at T2. After that, the combined throughput remains constant until the third open area (third partition; Z③) starts receiving workload. During T2 and T3, one-third of the buffer space is unused and the resulting throughput is below its capacity. At T5, the second open partition (second partition; Z②) no longer has workload from the host and it is in an idle period. During this period, the buffer assigned to the second open partition is not used. Thus, this fixed-size buffer for each partition in Strategy 1 may result in wasted buffer or cache resources.

[0056] Figure 5 Shows an example graph of the throughput of a data storage device (e.g., SSD) based on some embodiments of the disclosed technology relative to host input.

[0057] Using the same terminology as in Figure 4 , between T0 and T1, only one area (first partition; Z①) is open and active. The maximum available buffer space is allocated to the first partition to achieve the best possible throughput. At T1, the second partition (Z②) is opened and activated. The first partition gives half of its allocation to the second partition to maintain fairness and maximum aggregate throughput. At T5, the second partition is temporarily idle and the resources of the second partition are reallocated to other active partitions to accommodate more workload on these partitions. As shown by the curve labeled "SUM" in Figure 5 , while maintaining fairness between the active partitions, the total throughput of the SSD is kept at its maximum.

[0058] Table 1 below provides an example algorithm of method steps that can be used to implement the UBSD technology disclosed herein.

[0059] Table 1

[0060]

[0061]

[0062] The methods for operating a memory or data storage system including a server and multiple SSDs discussed in this patent document are applicable to SSDs such as NAND flash-based partitioned namespace SSDs and other SSDs that use a similar resource sharing scheme to support multi-tenant applications. In some embodiments, the memory system or data storage system may include an SSD equipped with utilization detection capabilities. In some embodiments, the memory system or data storage system may include an SSD equipped with performance-sensitive DRAM buffer allocation capabilities based on utilization detection. In some embodiments, the memory system or data storage system may include an SSD equipped with target parameters that are dynamically adjusted at regular intervals.

[0063] Figure 6 is a flowchart showing a set of example operations for implementing a utilization-based dynamic shared buffer method based on some embodiments of the disclosed technology.

[0064] Method 600 includes: at 610, receiving a request from a host; at 615, determining whether the request requires buffer memory reallocation. Method 600 includes: at 620, when it is determined that the request requires buffer memory reallocation, determining the size of the free space in the buffer memory. Method 600 includes: at 630, when it is determined that the request does not require buffer memory reallocation, maintaining the current buffer memory allocation. Method 600 includes: at 625, when it is determined that the request requires buffer memory reallocation, determining whether the received request requires more buffer memory space than the free buffer memory space. Method 600 includes: at 640, when it is determined that the received request requires more buffer memory space than the free buffer memory space, deallocating a portion of the currently allocated buffer memory space. Method 600 includes: at 650, when it is determined that the received request does not require more buffer memory space than the free buffer memory space, allocating the free buffer memory space to the received request.

[0065] Figure 7 is a flowchart showing a set of example operations for implementing a utilization-based dynamic shared buffer method based on some embodiments of the disclosed technology.

[0066] Method 700 includes: at 710, receiving a request to allocate at least a portion of a buffer memory for storing data to be fed back to a plurality of first data storage partitions. Method 700 includes: at 715, determining whether the size of the free space in the buffer memory is less than a reallocation threshold size. Method 700 includes: at 720, when determining that the size of the free space in the buffer memory is not less than the reallocation threshold size, allocating the free buffer memory space to a target data storage partition. Method 700 includes: at 725, when determining that the size of the free space in the buffer memory is less than the reallocation threshold size, determining whether the utilization index of a sacrifice data storage partition is lower than a first threshold utilization index. Method 700 includes: at 730, when determining that the utilization index of the sacrifice data storage partition is lower than the first threshold utilization index, canceling the allocation of a portion of the currently allocated buffer memory space assigned to the sacrifice data storage partition. Method 700 includes: at 735, determining whether the utilization index of the target data storage partition is higher than a second threshold utilization index. Method 700 includes: at 740, when determining that the utilization index of the target data storage partition is higher than the second threshold utilization index, allocating the deallocated portion of the buffer memory space to the target data storage partition.

[0067] Figure 8 is a flowchart showing a set of example operations for implementing a utilization-based dynamic sharing buffer method according to some embodiments of the disclosed technology.

[0068] Method 800 includes: at 810, receiving a request to allocate at least a portion of a buffer memory to be allocated for storing data to be fed back to a target data storage partition. Method 800 includes: at 820, determining the size of the free space in the buffer memory available for allocation to the target data storage partition. Method 800 includes: at 830, comparing the size of the free space with a reallocation threshold size that triggers reallocation of at least a portion of the currently allocated buffer memory space. Method 800 includes: at 840, comparing the utilization indices of a plurality of data storage partitions including the target data storage partition with a first threshold utilization index and a second threshold utilization index. Method 800 includes: at 850, when determining that the size of the free space is less than the reallocation threshold size, canceling the allocation of a portion of the currently allocated buffer memory space, the portion of the currently allocated buffer memory space being allocated to at least one data storage partition among the plurality of data storage partitions whose utilization index is lower than the first threshold utilization index. Method 800 includes: at 860, when determining that the utilization index of a first data storage partition is higher than the second threshold utilization index, allocating the deallocated portion of the buffer memory space to the first data storage partition.

[0069] Figure 9FIG. is a flowchart showing a set of example operations for implementing a utilization-based dynamic shared buffer method according to some embodiments of the disclosed technology.

[0070] Method 900 includes: at 910, receiving a plurality of requests for allocating at least a portion of buffer memory to be allocated for storing data to be fed back to a plurality of first data storage partitions among a plurality of data storage partitions. Method 900 includes: at 920, when determining that the size of the free space in the buffer memory is less than the reallocation threshold size, canceling the allocation of a portion of the currently allocated buffer memory space that is allocated to at least one of the data storage partitions having a utilization index lower than a first threshold utilization index among the plurality of data storage partitions. Method 900 includes: at 930, comparing the utilization indices of the plurality of first data storage partitions with a second threshold utilization index to determine high-utilization data storage partitions among the plurality of first data storage partitions whose utilization indices are equal to or greater than the second threshold utilization index. Method 900 includes: at 940, comparing the utilization indices of the high-utilization data storage partitions with each other to determine the priority of the higher-utilization data storage partitions. Method 900 includes: at 950, the controller may allocate the deallocated space and free space of the buffer memory to the high-utilization data storage partitions based on the utilization priority of the high-utilization data storage partitions.

[0071] Figure 10 FIG. is a flowchart showing a set of example operations for implementing a utilization-based dynamic shared buffer algorithm according to some embodiments of the disclosed technology.

[0072] Method 1000 includes: at 1010, receiving a request for allocating at least a portion of buffer memory for storing data to be fed back to a plurality of first data storage partitions among a plurality of data storage partitions. Method 1000 includes: at 1020, identifying the size of the existing free space in the buffer memory that is not allocated to the plurality of data storage partitions and the size of the occupied space in the buffer memory that is allocated to at least one of the plurality of data storage partitions. Method 1000 includes: at 1030, comparing the size of the free space with a reallocation threshold size that can be reallocated in a reallocation cycle. Method 1000 includes: at 1040, when determining that the size of the free space is less than the reallocation threshold size, canceling the allocation of at least a portion of the occupied space size of the buffer memory based on historical information of the buffer memory utilization of the occupied space to create new free space on the buffer memory. Method 1000 includes: at 1050, allocating the existing free space and the new free space of the buffer memory to the plurality of first data storage partitions based on historical information of the buffer memory utilization corresponding to the plurality of first data storage partitions.

[0073] Embodiments of the subject matter and the functional operations described in this patent document can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded in a tangible and non-transitory computer-readable medium for running by, or controlling the operation of, a data processing apparatus. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter affecting a machine-readable propagated signal, or a combination of one or more of them. The term "memory" encompasses all devices, apparatus, and machines for processing data, e.g., including programmable processors, computers, or multiple processors or computers. In addition to hardware, the apparatus can include code that creates an execution environment for the computer programs being discussed, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

[0074] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the relevant program, or in multiple coordinated files (e.g., files that store one or more modules, subroutines, or portions of code). A computer program can be deployed to run on one computer or can run on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.

[0075] The processes and logical flows described in this specification can be performed by one or more programmable processors that execute one or more computer programs to perform functions by operating on input data and generating output. The processing and logical flows can also be performed by, or the apparatus can be implemented as, special-purpose logic circuitry, e.g., an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).

[0076] Processors suitable for executing computer programs include, for example, general-purpose and special-purpose microprocessors, as well as any one or more processors of any type of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing the instructions and data. Generally, a computer will also include or be operatively coupled to receive data from, or transfer data to, or both receive and transfer data to, one or more mass storage devices (such as, for example, magnetic disks, magneto-optical disks, or optical disks) for storing the data. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices. The processor and the memory may be supplemented by, or incorporated in, special purpose logic circuitry.

[0077] The specification and the drawings are intended to be considered only as exemplary, where exemplary means an example. As used herein, unless the context clearly dictates otherwise, the singular forms "a," "an," and "the" are also intended to include the plural forms. Additionally, unless the context clearly dictates otherwise, the use of "or" is intended to include "and / or."

[0078] Although this patent document contains many details, these details should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of a particular invention. The particular features described in this patent document in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments. Moreover, although the features may be described above as acting in a particular combination and even initially claimed as such, in some cases one or more features in a claimed combination may be excluded from the combination and the claimed combination may be directed to a sub-combination or a variation of a sub-combination.

[0079] Similarly, although operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order or sequence shown, or that all illustrated operations be performed to obtain a desired result. Additionally, the separation of the various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

[0080] Only some embodiments and examples have been described, and other embodiments, enhancements, and variations may be made based on what is described and illustrated in this patent document.

Claims

1. A method for allocating a buffer memory to multiple data storage partitions of a data storage system, the method comprises: receiving a request for allocating at least a portion of the buffer memory to store data to be fed back to a first data storage partition among the multiple data storage partitions; determining a size of free space in the buffer memory available for allocation to the first data storage partition; comparing the size of the free space with a reallocation threshold size that triggers reallocation of at least a portion of the currently allocated buffer memory space; comparing a utilization index of the multiple data storage partitions including the first data storage partition with a first threshold utilization index for canceling the allocation of the currently allocated buffer memory space and a second threshold utilization index for allocating the deallocated buffer memory space; when determining that the size of the free space is less than the reallocation threshold size, canceling the allocation of a portion of the currently allocated buffer memory space, the portion of the currently allocated buffer memory space being allocated to at least one data storage partition among the multiple data storage partitions having a utilization index lower than the first threshold utilization index; and when determining that the utilization index of the first data storage partition is higher than the second threshold utilization index, allocating the deallocated portion of the buffer memory space to the first data storage partition, wherein the first threshold utilization index and the second threshold utilization index have different values from each other.

2. The method according to claim 1, wherein the first threshold utilization index and the second threshold utilization index are determined based on historical information of buffer memory utilization corresponding to the multiple data storage partitions.

3. The method according to claim 1, wherein the utilization index of the multiple data storage partitions is updated based on the utilization of the portions of the buffer memory allocated to the multiple data storage partitions.

4. The method according to claim 1, further comprises: when determining that the size of the free space is equal to or greater than the reallocation threshold size, allocating free buffer memory space corresponding to the size of the free space to one or more of the multiple data storage partitions, and one or more requests are queued in the one or more data storage partitions to run in a reallocation cycle.

5. The method according to claim 1, wherein the reallocation threshold size corresponds to a predetermined buffer memory size, the predetermined buffer memory size being less than the total size of the buffer memory and being set to be reallocatable in a reallocation cycle.

6. The method according to claim 5, wherein the reallocation cycle is periodically repeated.

7. The method according to claim 1, wherein the utilization index of the multiple data storage partitions includes a percentage of the currently allocated buffer memory space in use or already used.

8. A method for allocating a buffer memory to multiple data storage partitions of a data storage system, the method comprises: Receiving a plurality of requests for allocating at least a portion of the buffer memory to store data to be fed back to a plurality of first data storage partitions among the plurality of data storage partitions; When determining that the size of the free space in the buffer memory is less than the reallocation threshold size, cancel the allocation of a portion of the currently allocated buffer memory space, where the portion of the currently allocated buffer memory space is allocated to at least one data storage partition among the plurality of data storage partitions with a utilization index lower than a first threshold utilization index for canceling the allocation of the currently allocated buffer memory space; Comparing the utilization indices of the plurality of first data storage partitions with a second threshold utilization index for allocating the deallocated buffer memory space to determine high-utilization data storage partitions among the plurality of first data storage partitions with a utilization index equal to or greater than the second threshold utilization index; Comparing the utilization indices of the high-utilization data storage partitions with each other to determine the priorities of the high-utilization data storage partitions; And Based on the utilization priorities of the high-utilization data storage partitions, allocate the deallocated space and the free space of the buffer memory to the high-utilization data storage partitions, wherein the first threshold utilization index and the second threshold utilization index have different values from each other.

9. The method according to claim 8, wherein the reallocation threshold size corresponds to a predetermined buffer memory size, and the predetermined buffer memory size is less than the total size of the buffer memory and is set to be reallocable in a reallocation cycle.

10. The method according to claim 8, wherein the utilization indices of the plurality of first data storage partitions are determined based on the utilization of the portions of the buffer memory allocated to the plurality of data storage partitions.

11. The method according to claim 8, wherein the first threshold utilization index and the second threshold utilization index are determined based on historical information of the buffer memory utilization corresponding to the plurality of data storage partitions.

12. The method according to claim 8, wherein allocating the deallocated space and the free space of the buffer memory comprises: Allocating the deallocated space and the free space of the buffer memory to the data storage partition with the highest utilization among the high-utilization data storage partitions.

13. A data storage system, comprising: A data storage device including a plurality of data storage partitions for storing data; A buffer memory shared by the plurality of data storage partitions to temporarily store the data before writing the data to the data storage device; And A processor communicating with the data storage device and the buffer memory, Receiving a request for allocating at least a portion of the buffer memory to store data to be fed back to a plurality of first data storage partitions among the plurality of data storage partitions; Identify the size of the existing free space in the buffer memory that is not allocated to the multiple data storage partitions and the size of the occupied space in the buffer memory that is allocated to at least one of the multiple data storage partitions; Compare the size of the free space with the size of a reallocation threshold that is reallocated in a reallocation cycle; When it is determined that the size of the free space is less than the size of the reallocation threshold and when it is determined that the previous utilization rate of the occupied space is lower than a first threshold utilization rate index, deallocate at least one portion of the size of the occupied space in the buffer memory based on historical information of the buffer memory utilization rate of the occupied space to create new free space on the buffer memory; And When it is determined that the previous utilization rate index of the occupied space is higher than a second threshold utilization rate index, allocate the existing free space and the new free space in the buffer memory to the multiple first data storage partitions based on historical information of the buffer memory utilization rate corresponding to the multiple first data storage partitions, wherein the first threshold utilization rate index and the second threshold utilization rate index have different values from each other.

14. The system according to claim 13, wherein the historical information of the buffer memory utilization rate of the occupied space includes the utilization rate of the portions of the buffer memory that were previously allocated to the multiple data storage partitions.

15. The system according to claim 13, wherein the historical information of the buffer memory utilization rate corresponding to the multiple first data storage partitions includes the utilization rate of the portions of the buffer memory that were previously allocated to the multiple first data storage partitions.

16. The system according to claim 13, wherein when it is determined that the previous utilization rate of the buffer memory associated with the multiple first data storage partitions is higher than a threshold utilization rate value, the existing free space and the new free space in the buffer memory are allocated to the multiple first data storage partitions.

17. The system according to claim 13, wherein the reallocation cycle is repeated periodically.

Citation Information

Patent Citations

  • Dynamic buffer allocation in similar infrastructures

    US20190104080A1

  • Systems and methods for providing a back pressure free interconnect

    US20200050379A1