Storage methods and related devices based on SSD standard disks and ZNS disks
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-09
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本发明的主要目的在于解决当前SSD基于host主控存储下,上位机消耗的管理空间较大的技术问题
[0031]在本发明实施例中,Host结合自身情况,将相对离散数据写入到标盘进行管理,连续大数据尽量写入到ZNS中,降低物理page和逻辑地址之间映射关系的空间消耗量,解决了当前SSD基于host主控存储下,上位机消耗的管理空间较大的技术问题。
Smart Images

Figure CN116301573B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data storage, and more particularly to a storage method and related apparatus based on SSD standard disks and ZNS disks. Background Technology
[0002] ZNS is a protocol concept in NVMe that divides the entire storage area within an SSD into multiple zones. Each zone manages a segment of LBAs (Legacy Address Maps), and data between different zones can be independent. Most importantly, writes within each zone are sequential only, but random reads are allowed. This sequential write characteristic within a zone essentially eliminates the overhead of SSD garbage collection (GC). To ensure sequential writes within a zone, overwriting an LBA address within a ZNS requires a reset (clearing the data at the current address) before rewriting that segment of logical address space sequentially. The host manages data to meet the requirements of ZNS, which inherently requires sequential writes within a ZNS. However, in many cases, the host cannot guarantee that all data is contiguous within the ZNS, and ensuring contiguousness may consume significant management space at higher layers. As the amount of stored data on the SSD increases, the relationships in the mapping tables controlled by the host computer also become more numerous and complex. This is due to the highly dispersed available capacity of the SSD's ZNS-based zones.
[0003] Therefore, a new technology is needed to address the technical problem of the large amount of management space consumed by the host computer in current SSD-based host controller storage. Summary of the Invention
[0004] The main objective of this invention is to solve the technical problem of the large amount of management space consumed by the host computer in current SSD-based host controller storage.
[0005] The first aspect of this invention provides a storage method based on SSD standard disks and ZNS disks, comprising the following steps:
[0006] Obtain the target data to be stored and calculate the capacity value of the target data;
[0007] Determine whether the stated capacity value is greater than the preset superblock capacity threshold;
[0008] If the value is greater than the target value, the target data will be written to the solid-state drive.
[0009] If the value is not greater than the target value, the target data will be written to the hard disk drive.
[0010] Optionally, in a first implementation of the first aspect of the present invention, the step of obtaining the target data to be stored and calculating the capacity value of the target data includes:
[0011] Obtain the target data to be stored, and determine whether the target data is independent file data;
[0012] If the data is not an independent file, the target data is split into multiple target data, and the capacity value corresponding to each target data is calculated.
[0013] If it is independent file data, then calculate the capacity value of the target data.
[0014] Optionally, in a second implementation of the first aspect of the present invention, determining whether the capacity value is greater than a preset superblock capacity threshold includes:
[0015] Determine if the superblock has been modified;
[0016] If no modification is found, determine whether the capacity value is greater than the preset superblock capacity threshold.
[0017] If modifications are made, based on the FTL protocol, the logical mapping address table corresponding to the solid-state drive is read, and a new superblock capacity threshold is calculated according to the superblock address corresponding to the logical mapping address table. It is then determined whether the capacity value is greater than the new superblock capacity threshold.
[0018] Optionally, in a third implementation of the first aspect of the present invention, the solid-state drive supports NVM Command and ZNS protocol.
[0019] Optionally, in a fourth implementation of the first aspect of the present invention, writing the target data into the solid-state drive includes:
[0020] Based on the ZNS protocol, the target data is written to the most recent lifetime solid-state region so that SSD GC can reduce resource overhead.
[0021] Optionally, in a fifth implementation of the first aspect of the present invention, after writing the target data into the solid-state drive, the method further includes:
[0022] Modify the preset logical mapping address table according to the storage address of the target data.
[0023] Optionally, in a sixth implementation of the first aspect of the present invention, the target data includes: compressed packaged data and overall encrypted data.
[0024] A second aspect of the present invention provides a storage device based on SSD standard disks and ZNS disks, the storage device based on SSD standard disks and ZNS disks comprising:
[0025] The acquisition module is used to acquire the target data to be stored and calculate the capacity value of the target data;
[0026] The judgment module is used to determine whether the capacity value is greater than the preset superblock capacity threshold;
[0027] A solid-state write module is used to write the target data into a solid-state drive if the value is greater than the target value.
[0028] The target data writing module is used to write the target data to the hard disk if the value is not greater than the target value.
[0029] A third aspect of the present invention provides a storage device based on SSD standard disks and ZNS disks, comprising: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; the at least one processor invokes the instructions in the memory to cause the storage device based on SSD standard disks and ZNS disks to perform the above-described storage method based on SSD standard disks and ZNS disks.
[0030] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described storage method based on SSD standard disks and ZNS disks.
[0031] In this embodiment of the invention, the Host, based on its own circumstances, writes relatively discrete data to the standard disk for management, and writes continuous large data to the ZNS as much as possible, thereby reducing the space consumption of the mapping relationship between physical pages and logical addresses. This solves the technical problem of the large management space consumed by the host computer in the current SSD based on host controller storage. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of an embodiment of the storage method based on SSD standard disk and ZNS disk in this invention;
[0033] Figure 2 This is a schematic diagram of an embodiment of a storage device based on SSD standard disks and ZNS disks in this invention;
[0034] Figure 3 This is a schematic diagram of another embodiment of the storage device based on SSD standard disks and ZNS disks in this invention;
[0035] Figure 4This is a schematic diagram of an embodiment of a storage device based on SSD standard disks and ZNS disks in this invention. Detailed Implementation
[0036] This invention provides a storage method and related apparatus based on SSD standard disks and ZNS disks.
[0037] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the storage method based on SSD standard disks and ZNS disks in this invention includes:
[0039] 101. Obtain the target data to be stored and calculate the capacity of the target data;
[0040] In this embodiment, the capacity value of the target data to be stored is calculated, and the capacity value is used as a measure of the dispersion of the target data for further analysis.
[0041] Furthermore, the following steps can be performed on 101:
[0042] 1011. Obtain the target data to be stored and determine whether the target data is independent file data;
[0043] 1012. If the data is not an independent file, the target data is split into multiple target data, and the capacity value of each target data is calculated.
[0044] 1013. If it is independent file data, calculate the size of the target data.
[0045] In steps 1011-1013, the storage capacity of the target data is primarily concerned with whether the data is discrete, and the storage capacity is a measure of this discreteness. For video data, there are streaming and non-streaming video data, which differ in their discreteness but exhibit similar storage capacities. Therefore, it's necessary to first analyze whether the target data consists of independent files. Streaming video data exists as multiple files during transmission, directly increasing the physical address space consumption. For example, compressed data is a single, indivisible file; it can be analyzed as a whole to calculate its capacity. However, if it can be split, the target data is divided into the smallest possible units, and the capacity of each unit is analyzed to determine whether SSD storage is appropriate.
[0046] Specifically, the target data includes: compressed and packaged data, and overall encrypted data.
[0047] In this embodiment, if the target data is compressed and packaged, it can be treated as a whole without modification. However, the encrypted data is not packaged and cannot be split due to encryption. It can be read directly as a whole independent data.
[0048] 102. Determine if the capacity value is greater than the preset superblock capacity threshold;
[0049] In this embodiment, the superblock is the smallest logical operation unit determined in the SSD based on the FTL protocol. The granularity of the superblock serves as the standard for whether to store data on the SSD. Because SSD reads can be performed from different locations, but writes can only be performed sequentially due to physical limitations, logical operation units based on the smallest operation unit can save storage space for the related physical logic mappings on the host computer.
[0050] Furthermore, the following steps can be performed at 102:
[0051] 1021. Determine if the superblock has been modified;
[0052] 1022. If no modification is found, determine whether the capacity value is greater than the preset superblock capacity threshold.
[0053] 1023. If modifications are made, based on the FTL protocol, read the logical mapping address table corresponding to the SSD standard disk, calculate the new superblock capacity threshold according to the superblock address corresponding to the logical mapping address table, and determine whether the capacity value is greater than the new superblock capacity threshold.
[0054] In steps 1021-1023, since the superblock is a logical-level operational unit, it is generally the default for SSDs. However, in some cases, the number of blocks contained in the superblock may be modified. In such cases, it is necessary to first determine whether the superblock has been modified. If it has not been modified by the FTL protocol, then directly check whether the capacity value is greater than the preset superblock capacity threshold.
[0055] If the superblock has been modified, the logical mapping address table modified by the FTL protocol is read based on the settings of the FTL protocol. This logical mapping address table contains the association data information between physical address pages and logical addresses. The new superblock capacity threshold is obtained based on the number of blocks contained in the modified superblock, and then it is determined whether the capacity value is greater than the new superblock capacity threshold.
[0056] 103. If the value is greater than the target value, write the target data to the ZNS disk.
[0057] In this embodiment, the target data is written to the ZNS disk, occupying at least one superblock of space. This avoids multiple discrete data points in the ZNS disk affecting the host computer's mapped address data capacity, thus reducing the host computer's storage consumption. Generally, PCIe SSDs are either standard disks or disks with ZNS characteristics (non-standard disks). This application proposes a solid-state drive that combines both characteristics. It integrates the advantages of both types of disks. Here, "standard disk" refers to the common solid-state drives currently on the market, while "ZNS disk" is a type of characteristic disk in PCIe / NVMe SSDs.
[0058] For standard SSDs, FTL (Fulfilled Transfer Layer) is internal to the PCIe SSD, making it convenient for upper-layer systems to use, but it's difficult to meet the needs of every application scenario. For ZNS (Zone-Negative Memory) drives, the specific management is determined by the upper-layer application. ZNS SSDs themselves don't have FTL functionality, so all management is delegated to the upper layer, making it easier to define management operations tailored to specific use cases. This is particularly convenient for managing large datasets, but more complex for managing small datasets. For example, upper-layer applications can use ZNS drives specifically for managing large datasets and standard SSDs for handling smaller datasets.
[0059] Furthermore, since the ZNS disk supports NVM Command and the ZNS protocol, the following steps can be performed in step 103:
[0060] 1031. Based on the ZNS protocol, the target data is written to the most recent lifetime solid-state region so that SSD GC can reduce resource overhead.
[0061] In step 1031, the solid-state drive supports NVM Command and the ZNS protocol. Under the ZNS protocol, the target data is placed in the most recently modified solid-state zone to avoid two storage data that are close in time being too far apart, and to avoid the SSDGC consuming too many resources when moving the physical information that maintains the data.
[0062] Furthermore, after step 103, the following steps can be performed:
[0063] 1032. Modify the preset logical mapping address table according to the storage address of the target data.
[0064] In step 1032, after the target data is stored, the upper-layer logical mapping address table is modified as needed based on the FTL protocol.
[0065] 104. If the value is not greater than the target value, the target data will be written to the SSD standard disk.
[0066] In this embodiment, if the target data has a large dispersion, it is stored by an SSD standard disk. The storage physical logic of the SSD standard disk is different from that of the ZNS disk. Therefore, there is no situation where the related blocks increase the mapping address data in the host computer. The mapping processing of the SSD standard disk is done on the standard disk itself and will not affect the number of mapping addresses in the host computer.
[0067] In this embodiment of the invention, the Host, based on its own circumstances, writes relatively discrete data to the standard disk for management, and writes continuous large data to the ZNS as much as possible, thereby reducing the space consumption of the mapping relationship between physical pages and logical addresses. This solves the technical problem of the large management space consumed by the host computer in the current SSD based on host controller storage.
[0068] The storage method based on SSD standard disks and ZNS disks in the embodiments of the present invention has been described above. The storage device based on SSD standard disks and ZNS disks in the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 2 One embodiment of the storage device based on SSD standard disks and ZNS disks in this invention includes:
[0069] The acquisition module 201 is used to acquire the target data to be stored and calculate the capacity value of the target data;
[0070] The judgment module 202 is used to determine whether the capacity value is greater than the preset superblock capacity threshold;
[0071] Solid-state writing module 203 is used to write the target data into the ZNS disk if the value is greater than the target value.
[0072] The target data writing module 204 is used to write the target data into the SSD target disk if the target data is not greater than the specified value.
[0073] In this embodiment of the invention, the Host, based on its own circumstances, writes relatively discrete data to the standard disk for management, and writes continuous large data to the ZNS as much as possible, thereby reducing the space consumption of the mapping relationship between physical pages and logical addresses. This solves the technical problem of the large management space consumed by the host computer in the current SSD based on host controller storage.
[0074] Please see Figure 3 Another embodiment of the storage device based on SSD standard disks and ZNS disks in this invention includes:
[0075] The acquisition module 201 is used to acquire the target data to be stored and calculate the capacity value of the target data;
[0076] The judgment module 202 is used to determine whether the capacity value is greater than the preset superblock capacity threshold;
[0077] Solid-state writing module 203 is used to write the target data into the ZNS disk if the value is greater than the target value.
[0078] The target data writing module 204 is used to write the target data into the SSD target disk if the target data is not greater than the specified value.
[0079] Specifically, the acquisition module 201 is used for:
[0080] Obtain the target data to be stored, and determine whether the target data is independent file data;
[0081] If the data is not an independent file, the target data is split into multiple target data, and the capacity value corresponding to each target data is calculated.
[0082] If it is independent file data, then calculate the capacity value of the target data.
[0083] Specifically, the judgment module 202 is used for:
[0084] Determine if the superblock has been modified;
[0085] If no modification is found, determine whether the capacity value is greater than the preset superblock capacity threshold.
[0086] If modifications are made, based on the FTL protocol, the logical mapping address table corresponding to the SSD disk is read, and a new superblock capacity threshold is calculated according to the superblock address corresponding to the logical mapping address table. It is then determined whether the capacity value is greater than the new superblock capacity threshold.
[0087] The ZNS disk supports NVM Command and ZNS protocol, and the solid-state writing module 203 is specifically used for:
[0088] Based on the ZNS protocol, the target data is written to the most recent lifetime solid-state region so that SSD GC can reduce resource overhead.
[0089] The storage device based on SSD standard disks and ZNS disks further includes a mapping modification module 205, which is specifically used for:
[0090] Modify the preset logical mapping address table according to the storage address of the target data.
[0091] The target data includes: compressed and packaged data, and overall encrypted data.
[0092] In this embodiment of the invention, the Host, based on its own circumstances, writes relatively discrete data to the standard disk for management, and writes continuous large data to the ZNS as much as possible, thereby reducing the space consumption of the mapping relationship between physical pages and logical addresses. This solves the technical problem of the large management space consumed by the host computer in the current SSD based on host controller storage.
[0093] above Figure 2 and Figure 3 The storage device based on SSD standard disk and ZNS disk in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The storage device based on SSD standard disk and ZNS disk in the embodiments of the present invention will be described in detail from the perspective of hardware processing.
[0094] Figure 4This is a schematic diagram of a storage device based on SSD standard disks and ZNS disks according to an embodiment of the present invention. The storage device 400 based on SSD standard disks and ZNS disks can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 410 (e.g., one or more processors) and memory 420, and one or more storage media 430 (e.g., one or more mass storage devices) for storing application programs 433 or data 432. The memory 420 and storage media 430 can be temporary or persistent storage. The program stored in the storage media 430 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the SSD standard disk and ZNS disk-based storage device 400. Furthermore, the processor 410 may be configured to communicate with the storage media 430 and execute the series of instruction operations on the storage media 430 on the SSD standard disk and ZNS disk-based storage device 400.
[0095] The storage device 400 based on SSD standard disks and ZNS disks may also include one or more power supplies 440, one or more wired or wireless network interfaces 450, one or more input / output interfaces 460, and / or one or more operating systems 431, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 4 The storage device structures shown are based on SSD standard disks and ZNS disks and do not constitute a limitation on storage devices based on SSD standard disks and ZNS disks. They may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0096] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the storage method based on SSD standard disk and ZNS disk.
[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0098] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0099] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A storage method based on SSD standard disks and ZNS disks, characterized in that, Including the following steps: Obtain the target data to be stored and calculate the capacity value of the target data; Determine whether the stated capacity value is greater than the preset superblock capacity threshold; If the value is greater than the target value, the target data will be written to the ZNS disk. If the value is not greater than the target value, the target data will be written to the SSD standard disk. The step of determining whether the capacity value is greater than the preset superblock capacity threshold includes: Determine if the superblock has been modified; If no modification is found, determine whether the capacity value is greater than the preset superblock capacity threshold. If modifications are made, based on the FTL protocol, the logical mapping address table corresponding to the SSD disk is read, and a new superblock capacity threshold is calculated according to the superblock address corresponding to the logical mapping address table. It is then determined whether the capacity value is greater than the new superblock capacity threshold. The superblock is the smallest logical operation unit determined in the SSD based on the FTL protocol, and the granularity of the superblock is used as the standard basis for whether to store it in the SSD. The steps of acquiring the target data to be stored and calculating the capacity value of the target data include: Obtain the target data to be stored, and determine whether the target data is independent file data; If the data is not an independent file, the target data is split into multiple target data, and the capacity value corresponding to each target data is calculated. If it is independent file data, then calculate the capacity value of the target data; The ZNS disk supports NVM Command and ZNS protocol. Writing the target data to the ZNS disk includes: Based on the ZNS protocol, the target data is written to the most recent lifetime solid-state region so that SSD GC can reduce resource overhead.
2. The storage method based on SSD standard disk and ZNS disk according to claim 1, characterized in that, After writing the target data into the ZNS disk, the process further includes: Modify the preset logical mapping address table according to the storage address of the target data.
3. The storage method based on SSD standard disk and ZNS disk according to claim 1, characterized in that, The target data includes: compressed and packaged data, and overall encrypted data.
4. A storage device based on SSD standard disks and ZNS disks, characterized in that, The storage device based on SSD standard disks and ZNS disks includes: The acquisition module is used to acquire the target data to be stored and calculate the capacity value of the target data; The judgment module is used to determine whether the capacity value is greater than the preset superblock capacity threshold; A solid-state writing module is used to write the target data into the ZNS disk if the value is greater than the target value. The target data writing module is used to write the target data into the SSD target disk if the target data is not greater than the specified value. The step of determining whether the capacity value is greater than the preset superblock capacity threshold includes: Determine if the superblock has been modified; If no modification is found, determine whether the capacity value is greater than the preset superblock capacity threshold. If modifications are made, based on the FTL protocol, the logical mapping address table corresponding to the SSD disk is read, and a new superblock capacity threshold is calculated according to the superblock address corresponding to the logical mapping address table. It is then determined whether the capacity value is greater than the new superblock capacity threshold. The superblock is the smallest logical operation unit determined in the SSD based on the FTL protocol, and the granularity of the superblock is used as the standard basis for whether to store it in the SSD. The steps of acquiring the target data to be stored and calculating the capacity value of the target data include: Obtain the target data to be stored, and determine whether the target data is independent file data; If the data is not an independent file, the target data is split into multiple target data, and the capacity value corresponding to each target data is calculated. If it is independent file data, then calculate the capacity value of the target data; The ZNS disk supports NVM Command and ZNS protocol. Writing the target data to the ZNS disk includes: Based on the ZNS protocol, the target data is written to the most recent lifetime solid-state region so that SSD GC can reduce resource overhead.
5. A storage device based on SSD standard disks and ZNS disks, characterized in that, The storage device based on SSD standard disks and ZNS disks includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the storage device based on SSD standard disks and ZNS disks to perform the storage method based on SSD standard disks and ZNS disks as described in any one of claims 1-3.
6. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the storage method based on SSD standard disk and ZNS disk as described in any one of claims 1-3.
Citation Information
Patent Citations
Addressing zone namespace and non-zoned memory based on data characteristics
CN114077549A