Data protection method in transparent compression storage device

By dynamically adjusting the data protection level in the SSD, the read error probability and performance problems caused by the adjustment of the data protection level in the existing technology are solved, and stronger data protection and lower read latency are achieved.

CN118550470APending Publication Date: 2024-08-27RUIZHENG (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410733453.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When the existing SSD firmware improves the data protection level, it is easy to lose the excessive reserved space of NAND flash, leading to an increase in the probability of read errors and a decrease in performance, or when the probability of errors is increased, it affects the life of the storage device.

Method used

In the transparent compression storage device, multiple data protection levels are preset, and the data protection level is dynamically adjusted according to the physical area and overall space conditions of the NAND flash, ensuring that excessive OP space is not lost, and the probability of read errors and the maximum read delay are reduced. hour. Specific steps include setting the weakest protection level as the default when the device is in use, selecting an appropriate data protection level based on space conditions, and updating metadata when writing and reading to achieve data reconstruction.

Benefits of technology

It is possible to reduce the probability of read errors and the maximum read delay without losing the entire disk OP space, extend the life of the storage device, and improve performance at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550470A
    Figure CN118550470A
Patent Text Reader

Abstract

The invention relates to the field of data protection, and discloses a data protection method in transparent compression storage equipment, which comprises the following steps of: after data is subjected to transparent compression, confirming a data protection level adopted by written data through a data protection level confirmation module, then generating corresponding verification data according to the protection level, and finally writing the verification data into NAND; meanwhile, the used data protection level is stored in the data protection level metadata, and according to the data protection method in the transparent compression storage device, the space saved by transparent compression in the solid state disk is utilized, and a higher data protection level is adopted for data in the storage device; therefore, the purposes that the OP space of the whole disk is not lost, the read error probability is reduced as much as possible, and the maximum read delay is reduced are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data protection, and in particular to a data protection method in a transparent compression storage device. Background Art

[0002] With the advancement of storage technology, solid-state drives (SSD) have gradually become the main medium for data storage in individuals, enterprises and data centers. Compared with traditional mechanical disks (HDD), they have greatly relieved the pressure on the storage end and released the performance potential of the overall system. The emergence of transparent compression SSD has further increased the effective storage space of storage devices, improved the performance of storage devices, and extended the life of storage devices.

[0003] The storage medium of SSD is mainly flash memory chip (NAND flash). In the mainstream SSD firmware design, NAND flash is managed at the granularity of super block, and each super block can be divided into multiple super pages. In order to minimize the risk of data loss, that is, the data cannot be correctly read back from NAND flash, XOR technology (similar to traditional RAID 5 technology) is generally used in the firmware to protect the original data by writing redundant check data. A super page will contain one or more XOR groups, so that when the data at a certain location cannot be correctly decoded after multiple retries (read retries), the data at that location will be rebuilt (read rebuild) using other data in the corresponding XOR group, thereby ensuring that data is not lost as much as possible. At the same time, due to the characteristic that NAND flash itself cannot be updated in place (update-in-place), a part of space (over-provisioning, OP) is reserved in the SSD for data migration during garbage collection.

[0004] In traditional implementations, the entire SSD disk often uses only one fixed granularity of XOR, such as 31+1XOR or 63+1XOR (i.e., the ratio of the original data volume to the check data volume is 31:1 or 63:1), according to the preset read data error probability (e.g., the error probability of a 4K data block is 10^(-17)). As the process of NAND flash continues to improve and the density continues to increase, the error probability of NAND flash itself also increases. If a smaller XOR granularity, such as 15+1XOR, is used, although a lower read error probability is guaranteed, the OP space of NAND flash is reduced, which will affect the performance and life of the SSD (increase the write amplification problem in the solid state drive); if a larger XOR granularity, such as 63+1XOR, is used, although the OP space will become larger, the error probability will also increase. In particular, when there are areas of poor quality in the NAND flash, the probability of read errors will be multiplied. For this reason, we propose a data protection method in a transparent compression storage device. Summary of the invention

[0005] 1. Technical issues to be resolved

[0006] In view of the deficiencies in the prior art, the present invention provides a data protection method in a transparent compression storage device, which utilizes the space saved by transparent compression in a solid-state hard disk and adopts a stronger data protection level for the data in the storage device, thereby achieving the purpose of not losing the OP space of the entire disk, while minimizing the probability of read errors and reducing the maximum read delay.

[0007] (II) Technical solution

[0008] To achieve the above-mentioned purpose, the present invention provides the following technical solution: a data protection method in a transparent compression storage device, comprising the following steps:

[0009] Step 1: The device is preset with two or more different data protection levels when in use, and the weakest protection level is set as the default level, that is, the worst protection level is the protection level used in the traditional method;

[0010] Step 2: Different data protection levels can be used in different physical areas of the NAND flash according to the space saved by transparent compression. At the same time, according to the different data protection levels, the corresponding data protection level metadata is maintained in the device to record the data protection level used in different physical areas.

[0011] Step 3: When the device is writing data (regardless of whether the data comes from the host or the SSD), if the physical area currently using the same data protection level is not full, the current data protection level will continue to be used;

[0012] If the current physical area is full and the new physical area is just starting to be written, the data protection level used by the new physical area is determined based on the overall space savings in the current device;

[0013] If the overall space savings are large enough, use a stronger data protection level;

[0014] If the overall space savings are insufficient, a weaker data protection level is used;

[0015] Step 4: When writing to a new physical area, update the corresponding data protection level metadata according to the data protection level used;

[0016] Step 5: When the device reads data, if data reconstruction is performed, the range of the XOR / RAID group where the physical address is located is confirmed based on the read physical location and the data protection level in the corresponding metadata, and then the corresponding read command is issued for data reconstruction, and the reconstructed data is returned to the host.

[0017] Preferably, the data protection level in the first step includes RAID 5 (XOR) or RAID 6 of different granularities.

[0018] Preferably, the physical area may be at a super block level, a super page level, or a super page group level.

[0019] Preferably, if a stronger data protection level is used, the extra space used compared to the default protection level is subtracted from the overall space saving variable;

[0020] At the same time, based on the size difference of the newly written data before and after transparent compression, the space saved after transparent compression is calculated and accumulated into the variable of overall space saving.

[0021] (III) Beneficial effects

[0022] Compared with the prior art, the present invention provides a data protection method in a transparent compression storage device, which has the following beneficial effects:

[0023] 1. The data protection method in the transparent compression storage device uses the space saved by transparent compression in the solid state drive to adopt a stronger data protection level for the data in the storage device, thereby achieving the purpose of not losing the OP space of the entire disk, while minimizing the probability of read errors and reducing the maximum read delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1It is a schematic diagram of the process of the present invention;

[0025] Figure 2 It is a schematic diagram of the spray head of the present invention;

[0026] Figure 3 This is a flowchart of the device during data reconstruction. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] See also Figure 1-3 , a data protection method in a transparent compression storage device, comprising the following contents:

[0029] After transparent compression, the data first passes through the data protection level confirmation module to confirm the data protection level to be adopted for the written data, then generates the corresponding verification data according to the protection level, and finally writes it to NAND; at the same time, the data protection level used is saved in the data protection level metadata.

[0030] 1. The device presets three different data protection granularities when in use, including 63+1XOR, 31+1XOR and 30+2RAID 6, corresponding to data protection level 0, data protection level 1 and data protection level 2 respectively, and 63+1XOR is set as the default data protection level;

[0031] 2. A set of metadata is maintained in the device to record the data protection levels used by different physical areas. If the same data protection level is used within a super block, different data protection levels may be used between super blocks. In this case, each super block in the metadata corresponds to a data protection level record. Similarly, different data protection levels can also be used between super pages or between super page groups.

[0032] 3. Attachment Figure 2This is a flow chart of the device in the mechanism of the present invention when writing data. Take the use of different data protection levels at the super block granularity as an example. If a super block corresponds to 16GB of physical space, then by using 63+1XOR, the effective user data capacity that can be stored inside a super block is 15.75GB, and the remaining 0.25GB is used to store verification data; if 31+1XOR is used, the effective user data capacity is 15.5GB, and the verification data is 0.5GB; if 30+2RAID 6 is used, the effective user data capacity is 15GB, and the verification data is 1GB. When the device is writing data, if the current super block is not full, the current data protection level will continue to be used; if the current super block is full, when the next super block starts to be written, the data protection level used by the new super block is determined based on the overall space saving in the current device; if the overall space saving in the disk is large enough, a stronger data protection level is used; if the overall space saving is insufficient, a weaker data protection level is used; if a stronger data protection level is used, the space used more than the default protection level (more space occupied by verification data) is subtracted from the overall space saving variable; at the same time, based on the size difference of the newly written data before and after transparent compression, the space saved after transparent compression is calculated and accumulated in the overall space saving variable. For example, if the space saved by transparent compression is 0.5GB, the data protection level of the new super block can be converted from 63+1XOR to 31+1XOR. At this time, the verification data in the entire super block will consume an additional 0.5GB-0.25GB=0.25GB of space, and the overall space saving after the update is 0.5GB-0.25GB=0.25GB; if 10GB of space has been saved by transparent compression, the data protection level of a new super block can be converted from 63+1XOR to 31+1XOR. At this time, the overall space saving after the update is 10GB-0.25GB=0.75GB, or converted to 30+2RAID 6. At this time, the verification data in the entire super block will consume an additional 1GB-0.25GB=0.75GB of space, and the overall space saving after the update is 10GB-0.75GB=9.25GB.

[0033] 4. When writing to a new physical area, update the corresponding data protection level metadata according to the data protection level used. Take the use of different data protection levels at the super block granularity as an example. If a new super block uses 63+1XOR, the data protection level in the corresponding metadata is set to 0; if 31+1XOR is used, the data protection level in the corresponding metadata is set to 1; if 30+2RAID 6 is used, the data protection level in the corresponding metadata is set to 2;

[0034] 5. When the device reads data, if data reconstruction is performed, the read data is reconstructed according to the physical location of the read and the data protection level in the corresponding metadata, and the reconstructed data is returned to the host. Take the use of different data protection levels at the super block granularity as an example. If, when reading a physical address within a super block, the data cannot be read correctly after a read retry, and data reconstruction is required, first find the data protection level used when the super block was written, and then confirm the range of the XOR / RAID group where the physical address is located based on the data protection level, and then issue the corresponding read command to reconstruct the data. Appendix Figure 3 The flowchart of the device in the mechanism of the present invention during data reconstruction is shown.

[0035] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A data protection method in a transparent compression storage device, characterized in that: It is characterized by comprising the following steps: Step 1: The device is preset with two or more different data protection levels when in use, and the weakest protection level is set as the default level, that is, the worst protection level is the protection level used in the traditional method; Step 2: Different data protection levels can be used in different physical areas of the NAND flash according to the space saved by transparent compression. At the same time, according to the different data protection levels, the corresponding data protection level metadata is maintained in the device to record the data protection level used in different physical areas. Step 3: When the device is writing data (regardless of whether the data comes from the host or the SSD), if the physical area currently using the same data protection level is not full, the current data protection level will continue to be used; If the current physical area is full and the new physical area is just starting to be written, the data protection level used by the new physical area is determined based on the overall space savings in the current device; If the overall space savings are large enough, use a stronger data protection level; If the overall space savings are insufficient, a weaker data protection level is used; Step 4: When writing to a new physical area, update the corresponding data protection level metadata according to the data protection level used; Step 5: When the device reads data, if data reconstruction is performed, the range of the XOR / RAID group where the physical address is located is confirmed based on the read physical location and the data protection level in the corresponding metadata, and then the corresponding read command is issued for data reconstruction, and the reconstructed data is returned to the host.

2. The method for protecting data in a transparent compression storage device according to claim 1, characterized in that: The data protection level in the first step includes RAID 5 (XOR) or RAID 6 at different granularities.

3. The data protection method in a transparent compression storage device according to claim 1, characterized in that: The physical area can be at the super block level, the super page level, or the super page group level.

4. The data protection method in a transparent compression storage device according to claim 1, characterized in that: If a stronger data protection level is used, the extra space used compared to the default protection level is subtracted from the overall space savings variable; At the same time, based on the size difference of the newly written data before and after transparent compression, the space saved after transparent compression is calculated and accumulated into the variable of overall space saving.