Data distribution method and device of hybrid solid state disk and storage system

By adopting the front-end and back-end hot and cold data shunt mechanism and adaptive threshold adjustment in hybrid solid-state drives, the bandwidth occupation and hard disk life reduction caused by frequent data exchange in traditional hybrid hard disk solutions is solved, and efficient data management is achieved and improved Read and write performance and hard disk life.

CN119065602APending Publication Date: 2024-12-03国创芯科技(江苏)有限公司
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411042951.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When processing user write requests, the traditional SLC and TLC hybrid hard disk solution requires batch migration of data to TLC after the SLC cache is full, occupying a large amount of back-end bandwidth, reducing user experience, and frequent data exchanges lead to a reduced hard disk life.

Method used

Through the hot and cold data shunt mechanism of the front-end and back-end, the data is written to the SLC or TLC flash memory according to the size and data attributes of the user's write request, and dynamically transfer the data blocks to the TLC flash memory when the SLC cache is full, combining adaptive Adjust the threshold to ensure that the SLC cache mainly stores hot data, and the TLC flash memory mainly stores cold data, reducing unnecessary data exchange.

Benefits of technology

It significantly improves the read and write performance and life of storage devices, reduces data exchange between SLC and TLC areas, saves bandwidth, extends the service life of the hard disk, and optimizes write amplification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065602A_ABST
    Figure CN119065602A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of solid state storage, and provides a data distribution method and device of a hybrid solid state disk and a storage system. The data distribution method comprises the steps of front-end cold and hot data distribution, wherein cold and hot attributes of write request data are judged through a threshold value Tv according to the size of a user write request; hot data are written into the SLC cache, and cold data are written into the TLC flash memory; back-end cold and hot data redistribution: when the SLC cache is full, transferring a data block at the head of the LRW queue from the SLC cache to the TLC flash memory; self-adaptive adjustment of a front-end cold and hot flow dividing valve: dynamically adjusting a threshold value Tv in the front-end cold and hot data flow dividing step according to real-time data of a cold data counter preset in the SLC cache and a hot data counter preset in the TLC flash memory. According to the data distribution method, efficient management and optimization of the data in the storage system are achieved, the read-write performance of the storage device is remarkably improved, and the service life of the storage device is remarkably prolonged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of solid-state storage device control, and in particular to a data distribution method, device and storage system for a hybrid solid-state hard disk. Background Art

[0002] NAND FLASH particles can be divided into four types: SLC, MLC, TLC and QLC based on the data bits that can be stored in each storage unit. In terms of read and write performance and lifespan, SLC>MLC>TLC>QLC. Current consumer-grade solid-state drives are mainly based on TLC particles, and their read and write performance is far weaker than SLC particles. In order to allow users to enjoy more powerful read and write performance at the same cost, the TLC particles are switched to the SLC working mode, and the user write requests are shared to the SLC area, which greatly improves the read and write performance of the SSD. From the user's perspective, the high performance experience of SLC particles is obtained at the cost of TLC particles.

[0003] The traditional SLC and TLC hybrid hard drive solution writes all user data to the SLC cache when processing user write requests. SLC has better read and write performance and longer life than TLC, which can significantly improve the user experience; however, when the SLC cache is full, the valid data in the SLC needs to be migrated to the TLC in batches. This operation will occupy a large amount of backend bandwidth, greatly reducing the user experience. In addition, this solution will cause all user writes to be written at least twice. If there is a large amount of data in the SLC that needs to be frequently modified, the data exchange between the SLC and TLC will be more frequent. This behavior will cause unnecessary internal write amplification, greatly reducing the service life of the hard drive. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a data allocation method, device and storage system for a hybrid solid-state drive to solve or partially solve the above-mentioned problem.

[0005] In a first aspect, an embodiment of the present invention provides a data allocation method for a hybrid solid-state drive, comprising the following steps:

[0006] Front-end hot and cold data diversion: According to the size of the user's write request, the hot and cold attributes of the write request data are determined by the threshold Tv, wherein the data whose write request size is less than the threshold Tv is determined as hot data and written to the SLC cache, and the data whose write request size is greater than or equal to the threshold Tv is determined as cold data and written to the TLC flash memory;

[0007] Back-end hot and cold data redistribution: Before the hot data is written into the SLC cache, it is necessary to check whether the SLC cache is full. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to release the SLC cache space, and the LRW queue and address mapping table are updated; wherein, the data in the SLC cache are all stored in the LRW queue, and in the LRW queue, the data block (LCA) with the least number of recent writes is stored at the head of the queue, and the data block (LCA) with the most recent writes is stored at the tail of the queue;

[0008] Adaptive adjustment of the front-end hot and cold data diversion valve: According to the real-time data of the cold data counter (CntSlcCold) preset in the SLC cache and the hot data counter (CntTlcHot) preset in the TLC flash memory, the threshold Tv in the front-end hot and cold data diversion step is dynamically adjusted to maintain the ideal state in which the SLC cache mainly stores hot data and the TLC flash memory mainly stores cold data.

[0009] The above embodiments have at least the following technical effects:

[0010] This data allocation method realizes efficient management and optimization of data in the storage system through the front-end and back-end dual hot and cold data diversion mechanism, combined with the threshold setting of adaptive adjustment, and significantly improves the read and write performance and life of the storage device; the front-end diversion ensures that hot data is stored in the high-performance SLC cache first, while the back-end redistribution promptly cleans up the cold data in the SLC cache to avoid resource waste; at the same time, the adaptive adjustment mechanism ensures that the diversion strategy can flexibly respond to different workload changes and maintain the optimization of system performance.

[0011] According to a specific implementation of an embodiment of the present invention, in the front-end hot and cold data diversion step, the initial setting value of the threshold Tv is manually set or dynamically adjusted according to historical data to distinguish the hot and cold attributes of data in the user write request.

[0012] According to a specific implementation of an embodiment of the present invention, in the back-end hot and cold data redistribution step, the LRW queue maintains the hot and cold status of the data block by recording the number of recent writes to the data block, so that the frequently updated hot data block is kept in the SLC cache, while the seldom updated cold data block is transferred to the TLC flash memory. The process of "cooling down" the hot data in the LRW is the process of LCA from the head to the tail of the queue according to the number of recent writes.

[0013] According to a specific implementation of an embodiment of the present invention, in the step of adaptively adjusting the cold and hot diverter valves at the front end, the counts of the cold data counter (CntSlcCold) and the hot data counter (CntTlcHot) respectively reflect the amount of cold data in the SLC cache and the amount of hot data mistakenly stored in the TLC flash memory. By comparing the values ​​of the two counters and dynamically adjusting the Tv value according to a preset adjustment rule, the purpose of optimizing storage efficiency and performance is achieved.

[0014] According to a specific implementation of the embodiment of the present invention, the threshold Tv is adjusted as follows:

[0015]

[0016] Among them, SwapRatio is the ratio of hot and cold exchange, CntTlcHot is the count of the hot data counter, CntSlcCold is the count of the cold data counter, and α is a constant;

[0017] In formula (1), if SwapRatio is kept within the range of (1-δ, 1+δ), δ is a constant, indicating that the current threshold value Tv is reasonable and the value of the threshold value Tv remains unchanged; if SwapRatio>1+δ, it indicates that CntTLCHot is too large, that is, a large amount of hot data flows into the TLC flash memory, and the value of the threshold value Tv is increased at this time; if SwapRatio<1-δ, it indicates that CntSlcCold is too large, that is, a large amount of cold data flows into the SLC cache, and the value of the threshold value Tv is reduced at this time. By detecting the data exchange between SLC and TLC, the threshold value Tv of the hot and cold valve is dynamically adjusted.

[0018] According to a specific implementation manner of the embodiment of the present invention, when the value of the threshold Tv is adjusted, it is increased or decreased according to a fixed value, or increased or decreased in proportion.

[0019] In a second aspect, an embodiment of the present invention provides a data distribution device for a hybrid solid-state hard disk, comprising:

[0020] A front-end hot and cold data diversion module is used to determine the hot and cold attributes of the write request data according to the size of the user write request through a threshold Tv, wherein the data whose write request size is less than the threshold Tv is determined as hot data and written into the SLC cache, and the data whose write request size is greater than or equal to the threshold Tv is determined as cold data and written into the TLC flash memory;

[0021] A back-end hot and cold data redistribution module is used to check whether the SLC cache is full before the hot data is written into the SLC cache. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to release the SLC cache space, and the LRW queue and address mapping table are updated; wherein the data in the SLC cache are all stored in the LRW queue, and in the LRW queue, the data block (LCA) with the least number of recent writes is stored at the head of the queue, and the data block (LCA) with the most recent writes is stored at the tail of the queue;

[0022] The front-end cold and hot diversion valve adaptive adjustment module is used to dynamically adjust the threshold Tv in the front-end cold and hot data diversion step according to the real-time data of the cold data counter (CntSlcCold) preset in the SLC cache and the hot data counter (CntTlcHot) preset in the TLC flash memory, so as to maintain the ideal state in which the SLC cache mainly stores hot data and the TLC flash memory mainly stores cold data.

[0023] In a third aspect, an embodiment of the present invention further provides a storage system, which implements the steps of the data allocation method in the aforementioned first aspect or any implementation of the first aspect, and the storage system includes an SLC cache and a TLC flash memory for storing data, and firmware logic for performing cold and hot data diversion and redistribution operations.

[0024] According to a specific implementation of an embodiment of the present invention, the storage system also includes a monitoring and adjustment module for monitoring the data status in the SLC cache and the TLC flash memory, and adjusting the front-end hot and cold diversion valve threshold Tv according to the monitoring result.

[0025] The embodiments of the present invention have at least the following technical effects:

[0026] First, the present invention greatly reduces the data exchange between the SLC and TLC areas and saves the back-end bandwidth by combining the front-end and back-end hot and cold data allocation;

[0027] Second, the present invention greatly reduces the data exchange between the SLC and TLC areas by combining the front-end and back-end hot and cold data allocation, reduces the number of erasures, and increases the service life of the hard disk;

[0028] Thirdly, the present invention ensures that the hot data is in the SLC area within a limited time by combining the front-end and back-end cold and hot data allocation, thereby improving the read and write performance of the hard disk;

[0029] Fourth, the present invention further reduces the data exchange between the SLC and TLC areas by dynamically adjusting the front-end hot and cold valve thresholds, thereby optimizing the overall write amplification of the hard disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.

[0031] Figure 1 A flow chart showing a data allocation method for a hybrid solid-state hard disk provided by an embodiment of the present invention is shown;

[0032] Figure 2 A cold and hot data flow distribution diagram of a data distribution method for a hybrid solid-state hard disk provided by an embodiment of the present invention is shown;

[0033] Figure 3 A schematic diagram of LRW queue buffer arrangement in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0034] The following embodiments of the technical solution of the present invention are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and are therefore only used as examples, and cannot be used to limit the protection scope of the present invention.

[0035] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by those skilled in the art to which the present invention belongs.

[0036] Figure 1 A flow chart of the steps of a data allocation method for a hybrid solid state drive provided by an embodiment of the present invention; see Figure 1 , the method comprises the following steps:

[0037] According to the size of the user's write request, the preset threshold Tv is used to determine the hot and cold attributes of the write request data;

[0038] If the write request size ≥ Tv, the data is judged as cold data and written to the TLC flash memory;

[0039] If the write request size is less than Tv, the data is determined to be hot data and written into the SLC cache;

[0040] Before writing hot data to the SLC cache, it is necessary to check whether the SLC cache is full. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to free up the SLC cache space, and the LRW queue and address mapping table are updated, and then recheck whether the SLC cache is full; if it is not full, the hot data is written to the SLC cache, and the LRW queue and address mapping table are updated.

[0041] Figure 2 A diagram showing the distribution of hot and cold data streams of a data distribution method for a hybrid solid-state hard disk provided by an embodiment of the present invention is shown; see Figure 2 , this data allocation method realizes the pre-allocation of user write requests through the front-end hot-cold diversion method, writes cold data into the TLC flash memory, and writes hot data into the SLC cache; while the back-end hot-cold diversion method realizes the data redistribution in the SLC cache, and transfers the data that is least updated in the SLC cache within a limited time to the TLC flash memory. This ensures that the frequently read and written hot data is always in the SLC cache, and reduces unnecessary data exchange between the TLC and SLC areas. The front-end hot-cold data diversion method is a workload-sensitive data allocation method; it is to realize the estimation of the hot and cold attributes of data according to the size of the user write request. The firmware estimates the user data with a write request size < the threshold Tv as hot data, and vice versa; all hot data loads are written to the SLC cache, and cold data loads are written to the TLC flash memory.

[0042] The back-end hot and cold data diversion method is that the firmware uses LRW to "cool down" the hot data in the SLC; LRW (Least Recently Write) is a queue, the head of the queue stores the data block with the least number of recent writes (LCA), and the tail of the queue stores the data block with the most recent writes (LCA). The process of "cooling down" hot data in LRW is the process of LCA from the head to the tail of the queue according to the number of recent writes. When the SLC cache is insufficient, the data is transferred to the TLC from the head of the queue. The working principle of LRW is as follows: Figure 3 shown.

[0043] The front-end hot and cold diversion valve adaptive adjustment method is to dynamically adjust the Tv threshold in the front-end hot and cold data diversion method according to the amount of "cooling" data in the SLC cache and the "heating" data in the TLC flash memory. There is a cold data counter in the hot data area of ​​the SLC cache; there is a hot data counter in the cold data area of ​​the TLC flash memory; the threshold Tv of the front-end hot and cold diversion valve may appear too large or too small due to changes in workload, resulting in a small amount of cold data mixed in the area of ​​the SLC cache that should store hot data, and a small amount of hot data mixed in the TLC flash memory. Set the cold data count value in the SLC cache to CntSlcCold, and the hot data count value in the TLC flash memory to CntTlcHot. If the Tv value is too small, some hot data will flow into the TLC flash memory, causing CntTlcHot to increase; if the Tv value is too large, some cold data will flow into the SLC cache, causing CntSlcCold to increase; when the Tv value is just right, CntSlcCold and CntTlcHot should not differ much, and the cold-hot swap ratio SwapRatio is considered as follows:

[0044]

[0045] Among them, SwapRatio is the ratio of hot and cold exchange, CntTlcHot is the count of the hot data counter, CntSlcCold is the count of the cold data counter, and α is a constant used to adjust the value of SwapRatio;

[0046] In formula (1), if SwapRatio is kept within the range of (1-δ, 1+δ), it means that the current threshold Tv is reasonable and the value of threshold Tv remains unchanged; if SwapRatio>1+δ, it means that CntTLCHot is too large, that is, a large amount of hot data flows into the TLC flash memory, and the value of threshold Tv is increased at this time; if SwapRatio<1-δ, it means that CntSlcCold is too large, that is, a large amount of cold data flows into the SLC cache, and the value of threshold Tv is reduced at this time. By detecting the data exchange between SLC and TLC, the threshold Tv of the hot and cold valve is dynamically adjusted.

[0047] Among them, δ is a constant. By default, the cold and hot data exchange follows the normal distribution with an average value of 1. The SwapRatio should fall within the range of 3 times the standard deviation, that is, δ = 3*sigma.

[0048] When adjusting the value of the threshold value Tv, it can be increased or decreased by a fixed value or by a proportional increase or decrease.

[0049] The embodiments of the present invention have the following technical effects:

[0050] First, the present invention greatly reduces the data exchange between the SLC and TLC areas and saves the back-end bandwidth by combining the front-end and back-end hot and cold data allocation;

[0051] Second, the present invention greatly reduces the data exchange between the SLC and TLC areas by combining the front-end and back-end hot and cold data allocation, reduces the number of erasures, and increases the service life of the hard disk;

[0052] Thirdly, the present invention ensures that the hot data is in the SLC area within a limited time by combining the front-end and back-end cold and hot data allocation, thereby improving the read and write performance of the hard disk;

[0053] Fourth, the present invention further reduces the data exchange between the SLC and TLC areas by dynamically adjusting the front-end hot and cold valve thresholds, thereby optimizing the overall write amplification of the hard disk.

[0054] An embodiment of the present invention further provides a data distribution device for a hybrid solid-state hard disk, the device comprising:

[0055] The front-end hot and cold data diversion module is used to determine the hot and cold attributes of the write request data according to the size of the user's write request through the threshold Tv, wherein the data with a write request size less than the threshold Tv is determined as hot data and written to the SLC cache, and the data with a write request size greater than or equal to the threshold Tv is determined as cold data and written to the TLC flash memory;

[0056] The back-end hot and cold data redistribution module is used to check whether the SLC cache is full before writing hot data to the SLC cache. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to release the SLC cache space, and the LRW queue and address mapping table are updated; wherein, the data in the SLC cache are all stored in the LRW queue, and in the LRW queue, the data block (LCA) with the least number of recent writes is stored at the head of the queue, and the data block (LCA) with the most recent writes is stored at the tail of the queue;

[0057] The front-end hot and cold data diversion valve adaptive adjustment module is used to dynamically adjust the threshold Tv in the front-end hot and cold data diversion step according to the real-time data of the cold data counter (CntSlcCold) preset in the SLC cache and the hot data counter (CntTlcHot) preset in the TLC flash memory, so as to maintain the ideal state in which the SLC cache mainly stores hot data and the TLC flash memory mainly stores cold data.

[0058] The functions of each module in the above data distribution device correspond to the contents in the corresponding method embodiment, and will not be described in detail here.

[0059] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof.

[0060] In the above embodiments, multiple steps or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it may be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0061] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A data allocation method for a hybrid solid state drive, It is characterized in that The following steps are involved: Front-end hot and cold data diversion: According to the size of the user's write request, the hot and cold attributes of the write request data are determined by the threshold Tv; wherein, the data whose write request size is less than the threshold Tv is determined as hot data and written to the SLC cache, and the data whose write request size is greater than or equal to the threshold Tv is determined as cold data and written to the TLC flash memory; Back-end hot and cold data redistribution: Before the hot data is written into the SLC cache, it is necessary to check whether the SLC cache is full. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to release the SLC cache space, and the LRW queue and address mapping table are updated; wherein, the data in the SLC cache are all stored in the LRW queue, and in the LRW queue, the data block with the least number of recent writes is stored at the head of the queue, and the data block with the most recent writes is stored at the tail of the queue; Adaptive adjustment of the front-end hot and cold data diversion valve: dynamically adjust the threshold Tv in the front-end hot and cold data diversion step according to the real-time data of the cold data counter preset in the SLC cache and the hot data counter preset in the TLC flash memory.

2. The data distribution method according to claim 1, Features: In the front-end hot and cold data diversion step, the initial setting value of the threshold Tv is manually set or dynamically adjusted according to historical data to distinguish the hot and cold attributes of the data in the write request.

3. The data distribution method according to claim 1, Features: In the back-end hot and cold data redistribution step, the LRW queue maintains the hot and cold status of data blocks by recording the number of recent writes to the data blocks, so that frequently updated data blocks are kept in the SLC cache, while less frequently updated data blocks are transferred to the TLC flash memory.

4. The data distribution method according to claim 1, Features: In the front-end hot and cold diverter valve adaptive adjustment step, the counts of the cold data counter and the hot data counter respectively reflect the amount of cold data in the SLC cache and the amount of hot data in the TLC flash memory.

5. The data distribution method according to claim 4, Features: The threshold Tv is adjusted as follows: Wherein, SwapRatio is the ratio of hot and cold exchange, CntTlcHot is the count of the hot data counter, and CntSlcCold is the count of the cold data counter; In formula (1), if SwapRatio is within the range of (1-δ, 1+δ), the value of the threshold Tv remains unchanged; if SwapRatio>1+δ, the value of the threshold Tv is increased; if SwapRatio<1-δ, the value of the threshold Tv is reduced.

6. The data distribution method according to claim 5, Features: When adjusting, the value of the threshold Tv is increased or decreased according to a fixed value, or increased or decreased in proportion.

7. A data distribution device for a hybrid solid state hard disk, It is characterized in that The data distribution method according to any one of claims 1 to 6 is adopted, comprising: A front-end hot and cold data diversion module is used to determine the hot and cold attributes of the write request data according to the size of the user's write request through a threshold value Tv; wherein the data whose write request size is less than the threshold value Tv is determined as hot data and written to the SLC cache, and the data whose write request size is greater than or equal to the threshold value Tv is determined as cold data and written to the TLC flash memory; A back-end hot and cold data redistribution module is used to check whether the SLC cache is full before the hot data is written into the SLC cache. If it is full, the data block at the head of the LRW queue is transferred from the SLC cache to the TLC flash memory to release the SLC cache space, and the LRW queue and address mapping table are updated; wherein the data in the SLC cache are all stored in the LRW queue, and in the LRW queue, the data block with the least number of recent writes is stored at the head of the queue, and the data block with the most recent writes is stored at the tail of the queue; The front-end cold and hot diversion valve adaptive adjustment module is used to dynamically adjust the threshold Tv in the front-end cold and hot data diversion step according to the real-time data of the cold data counter preset in the SLC cache and the hot data counter preset in the TLC flash memory.

8. A storage system, Features: The steps of the data distribution method as described in any one of claims 1 to 6 are implemented, and the storage system includes an SLC cache and a TLC flash memory for storing data, and firmware logic for performing cold and hot data diversion and redistribution operations.

9. The storage system according to claim 8, Features: It also includes a monitoring and regulating module for monitoring the data status in the SLC cache and the TLC flash memory, and adjusting the threshold Tv according to the monitoring result.

Citation Information

Cited By

  • Data processing method and device, electronic equipment and storage medium

    CN120704593A

  • Window-level data placement method and device for multi-level mixed flash memory solid-state disk

    CN122411866A

  • Window level data placement method and device for multi-level hybrid flash solid state disk

    CN122411866B