A solid state hard disk RAID parity storage method, device and medium
By dynamically detecting the data amount of NAND open block in the SSD solid-state drive and storing the RAID parity in appropriate memory, the problem of SSD using too much SRAM when multiple NAND open blocks are simultaneously operated, reducing the main control cost and improving the computing efficiency.
Patent Information
- Application Number
- CN202411721142.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-04
AI Technical Summary
When using RAID parity storage, existing SSD solid-state drives require a large amount of SRAM to handle the simultaneous operation of multiple NAND open blocks, resulting in an increase in master control costs.
By setting the data amount threshold, dynamically detect the data amount of each NAND open block, store the RAID parity corresponding to hot data in SRAM, and store the RAID parity corresponding to cold data in DRAM or PSLC NAND, thereby reducing the use of SRAM.
It realizes that when multiple NAND open blocks are operated simultaneously, less SRAM is used, thereby reducing the cost of mastering and improving the effectiveness of RAID parity operations.
Smart Images

Figure CN119759258A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of SSD solid state disk storage, and in particular to a solid state disk RAID parity storage method, device and medium. Background Art
[0002] SSD is a solid state drive structure. NAND is used as data storage inside the SSD. In order to avoid data errors that cannot be corrected, most SSDs now use RAID (Redundant Array of Independent Disks) technology. In order not to affect performance, RAID parity is stored in the SRAM inside the main control. Raid parity means that every piece of data must be read out and calculated before being written back to the SRAM. That is, if the data throughput is 16GB, RAID5 parity requires 16GB read + 16GB write, and RIAD6 becomes 16GB x2 read + 16GB x2 write. When the SSD supports multiple NAND open blocks, there will be multiple RAID groups operating at the same time, causing the SRAM storing RAID parity to be too large, thereby increasing the cost of the main control. Summary of the invention
[0003] The technical problem solved by the present invention is to provide a solid state hard disk RAID parity storage method which uses less SRAM and can simultaneously operate on multiple NAND openblocks.
[0004] The technical solution adopted by the present invention to solve the technical problem is: a solid state hard disk RAID parity storage method, comprising the following steps:
[0005] Data volume threshold setting step: setting a threshold value K of the data volume of the NAND open block. When the data volume is greater than K, the data is determined to be hot data; when the data volume is less than K, the data is determined to be cold data.
[0006] NAND open block data volume analysis step: Analyze and count the data volume of each NAND open block, and determine whether the data corresponding to the NAND open block is hot data or cold data;
[0007] RAID parity storage steps: store the RAID parity corresponding to the NAND open block of hot data in SRAM, and store the RAID parity corresponding to the NAND open block of cold data in DRAM.
[0008] Furthermore, when new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the DRAM, the RAID parity is first read from the DRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the DRAM.
[0009] Furthermore, when new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the DRAM, the RAID parity is first transferred from the DRAM to the SRAM, then the RAID parity is calculated in the SRAM, and then the recalculated RAID parity is written back to the DRAM.
[0010] Furthermore, when new data is read in and the RAID parity needs to be recalculated, when the RAID parity is in the SRAM, the RAID parity is read out from the SRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the SRAM.
[0011] Furthermore, when there is no DRAM in the solid-state drive, the RAID parity corresponding to the NAND open block of the cold data is stored in the PSLC NAND.
[0012] Furthermore, when new data is read and the RAID parity needs to be recalculated, if the RAID parity is in the PSLC NAND, the RAID parity is read from the PSLC NAND, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the PSLC NAND.
[0013] Furthermore: monitor the amount of data corresponding to each NAND open block;
[0014] When the amount of data corresponding to a NAND open block changes from hot data to cold data, the RAID parity corresponding to the NAND open block is moved to DRAM;
[0015] When the amount of data corresponding to a NAND open block changes from cold data to hot data, the RAID parity corresponding to the NAND open block is moved to the SRAM.
[0016] Furthermore, the data volume of the NAND open block is obtained by calculating its throughput per unit time.
[0017] The present invention also discloses a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method when executing the computer program.
[0018] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0019] The beneficial effects of the present invention are:
[0020] 1. This solution proposes a RAID parity storage space method, which does not require the use of a large amount of SRAM storage space when targeting multiple NAND open blocks.
[0021] 2. In this method, the data volume corresponding to each NAND open block is dynamically detected, and the RAID parity corresponding to the hot data can be placed in SRAM, thereby increasing the efficiency of calculating the RAID parity. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A schematic diagram of a solid state drive RAID parity storage method according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0024] like Figure 1 As shown, an embodiment of the present application discloses a solid state hard disk RAID parity storage method, comprising the following steps:
[0025] Data volume threshold setting step: setting a threshold value K of the data volume of the NAND open block. When the data volume is greater than K, the data is determined to be hot data; when the data volume is less than K, the data is determined to be cold data.
[0026] NAND open block data volume analysis step: Analyze and count the data volume of each NAND open block, and determine whether the data corresponding to the NAND open block is hot data or cold data;
[0027] RAID parity storage steps: store the RAID parity corresponding to the NAND open block of hot data in SRAM, and store the RAID parity corresponding to the NAND open block of cold data in DRAM.
[0028] Specifically, the data volume of the NAND open block is obtained by calculating its throughput per unit time.
[0029] Specifically, the hot data mentioned above refers to data with a large amount of data, and cold data refers to data with a small amount of data. RAID parity represents RAID verification data. K can be set according to the actual situation. When calculating the amount of data, it is determined by the throughput of the specific data. For example, K is set to 3G, and the amount of data for each data stream is calculated within one second. Assuming that a data stream is only 0.5GB per second, then RAID parity only needs a bandwidth of 0.5GBx2, so it can be placed in DRAM, which is cold data. However, if a data stream transmits 10GB per second, then the DRAM bandwidth is not enough, and this data stream is hot data.
[0030] In the present invention, the data flow of the NAND open block is judged, and the RAID parity corresponding to the large data is stored in the SRAM, and the RAID parity corresponding to the small data is stored in the DRAM, thereby reducing the use of the SRAM memory. Therefore, when multiple NAND open blocks are targeted, it can be completed without using a large amount of SRAM storage space.
[0031] In this embodiment, when new data is read and the RAID parity needs to be recalculated, if the RAID parity is in the DRAM, the RAID parity is first read from the DRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the DRAM.
[0032] The following method may also be used, namely: when new data is read in and the RAID parity needs to be recalculated, when the RAID parity is in the DRAM, the RAID parity is first transferred from the DRAM to the SRAM, then the RAID parity is calculated in the SRAM, and then the recalculated RAID parity is written back to the DRAM.
[0033] Specifically, when new data is read in and the RAID parity needs to be recalculated, when the RAID parity is located in the SRAM, the RAID parity is read from the SRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the SRAM.
[0034] Specifically, the concept of RAID is to calculate the RAID parity with multiple groups of different data. When one group of data is wrong, the RAID parity can be used to recover the group of data, so many different data must be calculated with the XOR method for parity, but different data enter the SSD solid state drive sequentially, not at the same time, so every time a piece of data comes in, the parity stored last time must be read out, and the new parity must be calculated together with the new data, and then written back to the SRAM or DRAM. Both of the above methods can calculate new RAID parity data. The method of transferring RAID parity from DRAM to SRAM and then calculating it has a lower complexity, but it will occupy the SRAM bandwidth. The method of directly reading RAID parity from DRAM for calculation has a higher complexity, but it will not occupy the SRAM bandwidth.
[0035] In this embodiment, when there is no DRAM in the solid state drive, the RAID parity corresponding to the NAND open block of the cold data is stored in the PSLC NAND.
[0036] When new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the PSLC NAND, the RAID parity is read out from the PSLC NAND, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the PSLC NAND.
[0037] Specifically, the above-mentioned PSLC NAND represents a virtual flash memory. When there is no DRAM in the solid-state drive, the PSLC NAND can be used instead of the DRAM to store cold data.
[0038] In this embodiment, the amount of data corresponding to each NAND open block is monitored;
[0039] When the amount of data corresponding to a NAND open block changes from hot data to cold data, the RAID parity corresponding to the NAND open block is moved to DRAM;
[0040] When the amount of data corresponding to a NAND open block changes from cold data to hot data, the RAID parity corresponding to the NAND open block is moved to the SRAM.
[0041] Specifically, in this method, the data volume corresponding to each NAND open block is dynamically detected, and the RAID parity corresponding to the hot data can be placed in the SRAM, and the RAID parity corresponding to the cold data can be stored in the DRAM, thereby increasing the efficiency of calculating the RAID parity.
[0042] In one embodiment, a computer device is provided, which includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a solid-state hard disk RAID parity storage method is implemented.
[0043] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above method embodiments when executing the computer program.
[0044] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0045] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A solid state hard disk RAID parity storage method, characterized in that: The following steps are involved: Data volume threshold setting step: setting a threshold value K of the data volume of the NAND open block. When the data volume is greater than K, the data is determined to be hot data; when the data volume is less than K, the data is determined to be cold data. NAND open block data volume analysis step: Analyze and count the data volume of each NAND open block, and determine whether the data corresponding to the NAND open block is hot data or cold data; RAID parity storage steps: store the RAID parity corresponding to the NAND open block of hot data in SRAM, and store the RAID parity corresponding to the NAND open block of cold data in DRAM.
2. The solid state drive RAID parity storage method according to claim 1, wherein: When new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the DRAM, the RAID parity is first read from the DRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the DRAM.
3. The solid state hard disk RAID parity storage method according to claim 1, characterized in that: When new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in DRAM, the RAID parity is first transferred from DRAM to SRAM, then the RAID parity is calculated in SRAM, and then the recalculated RAID parity is written back to DRAM.
4. The solid state hard disk RAID parity storage method according to claim 1, characterized in that: When new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the SRAM, the RAID parity is read from the SRAM, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the SRAM.
5. The solid state hard disk RAID parity storage method according to claim 1, characterized in that: When there is no DRAM in the SSD, the RAID parity corresponding to the NAND open block of cold data is stored in the PSLC NAND.
6. The solid state hard disk RAID parity storage method according to claim 5, characterized in that: When new data is read in and the RAID parity needs to be recalculated, if the RAID parity is in the PSLC NAND, the RAID parity is read out from the PSLC NAND, the RAID parity is recalculated, and then the recalculated RAID parity is written back to the PSLC NAND.
7. The solid state hard disk RAID parity storage method according to claim 1, characterized in that: Monitor the amount of data corresponding to each NAND open block; When the amount of data corresponding to a NAND open block changes from hot data to cold data, the RAID parity corresponding to the NAND open block is moved to DRAM; When the amount of data corresponding to a NAND open block changes from cold data to hot data, the RAID parity corresponding to the NAND open block is moved to the SRAM.
8. The solid state hard disk RAID parity storage method according to claim 1, characterized in that: The data volume of the NAND open block is obtained by calculating its throughput per unit time.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.