Dynamic slc mechanism implementation method, device and computer equipment of solid state disk
By optimizing the data writing strategy in SSDs, prioritizing write amplification, static SLC space, average PE of TLC, and dynamic SLC space, the performance and reliability issues of SSDs in TLC and QLC flash memory are resolved, achieving a balance between performance and reliability and extending the lifespan of the hard drive.
Patent Information
- Application Number
- CN202211129890.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-09-16
AI Technical Summary
In existing technologies, SSDs using TLC and QLC flash memory suffer from significant performance and reliability issues, lacking effective dynamic SLC technology to improve performance and extend lifespan.
A dynamic SLC mechanism is used to determine the data writing method based on the priority order of write amplification, static SLC space, average PE of TLC, dynamic SLC space and remaining space, including determining the priority of writing to static SLC, TLC or dynamic SLC, to ensure a balance between performance and reliability.
It achieves a better balance between performance and reliability in SSDs, extending the lifespan of the hard drive and improving performance by optimizing data writing strategies.
Smart Images

Figure CN115509447B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of solid state disks, and particularly relates to a dynamic SLC mechanism implementation method and device for a solid state disk, a computer device and a storage medium. BACKGROUND
[0002] As a new type of storage medium, an SSD (Solid State Drive) uses NAND particles as data storage and has been widely applied to various fields such as PCs, notebooks and servers and gradually replaces HDDs (Hard Disk Drives) to become a mainstream application product in the storage field. Compared with traditional HDDs, the SSD has obvious advantages such as higher read-write speed, lower power consumption and better drop resistance.
[0003] At present, for SSD hard disks, with TLC (Triple-Level Cell) and QLC (Quad-Level Cell) flash memory occupying the mainstream, performance and reliability problems are increasingly prominent, and many current SSDs expect to use dynamic SLC technology to improve performance and prolong life. However, it is a technical problem to be solved to use which dynamic SLC technology to make performance and reliability best. SUMMARY
[0004] Therefore, it is necessary to provide a dynamic SLC mechanism implementation method and device for a solid state disk, a computer device and a storage medium in view of the above technical problems.
[0005] A dynamic SLC mechanism implementation method for a solid state disk, the method comprising:
[0006] writing data and determining whether current write amplification exceeds an alarm threshold;
[0007] if the write amplification exceeds the alarm threshold, writing the data into TLC, and if not, continuing to determine whether static SLC space is sufficient;
[0008] if the static SLC space is sufficient, writing the data into static SLC, and if not, continuing to determine whether average PE of TLC is over standard;
[0009] if the average PE of TLC is over standard, writing the data into TLC, and if not, continuing to determine whether dynamic SLC space is sufficient;
[0010] if the dynamic SLC space is not sufficient, writing the data into TLC, and if the dynamic SLC space is sufficient, continuing to determine whether remaining space is greater than reserved space;
[0011] if the remaining space is greater than the reserved space, writing the data into dynamic SLC, and otherwise, writing the data into TLC.
[0012] In one embodiment, the step of determining whether the static SLC space is sufficient further comprises:
[0013] 512GB capacity requires 6GB of static SLC space, 1T capacity requires 12GB of static SLC space.
[0014] In one embodiment, the step of determining whether the dynamic SLC space is sufficient further comprises:
[0015] 512GB capacity requires 85GB of dynamic SLC space, 1TB capacity requires 140GB of dynamic SLC space.
[0016] In one embodiment, the step of determining whether the remaining space is greater than the reserved space further comprises:
[0017] Determining whether the remaining space is greater than the reserved space OP ratio, wherein the OP ratio = (flash space - user space) / user space.
[0018] A dynamic SLC mechanism implementation device of a solid state disk, the dynamic SLC mechanism implementation device of the solid state disk comprises:
[0019] A first determination module, the first determination module is used for writing data and determining whether the current write amplification exceeds an alarm threshold;
[0020] A second determination module, the second determination module is used for writing data into TLC if the write amplification exceeds the alarm threshold, and continuing to determine whether the static SLC space is sufficient if it does not exceed.
[0021] A third determination module, the third determination module is used for writing data into static SLC if the static SLC space is sufficient, and continuing to determine whether the average PE of TLC is over-standard if it is not sufficient.
[0022] A fourth determination module, the fourth determination module is used for writing data into TLC if the average PE of TLC is over-standard, and continuing to determine whether the dynamic SLC space is sufficient if it is not over-standard.
[0023] A fifth determination module, the fifth determination module is used for writing data into TLC if the dynamic SLC space is not sufficient, and continuing to determine whether the remaining space is greater than the reserved space if the dynamic SLC space is sufficient.
[0024] A writing module, the writing module is used for writing data into dynamic SLC if the remaining space is greater than the reserved space, and writing data into TLC otherwise.
[0025] In one embodiment, the second determination module is further used for:
[0026] 512GB capacity requires 6GB of static SLC space, 1T capacity requires 12GB of static SLC space.
[0027] In one of the embodiments, the fourth judging module is further configured to:
[0028] 512GB capacity requires 85GB of dynamic SLC space, 1TB capacity requires 140GB of dynamic SLC space.
[0029] In one of the embodiments, the fifth judging module is further configured to:
[0030] judging whether the remaining space is greater than the OP ratio of the reserved space, wherein the OP ratio = (flash memory space - user space) / user space.
[0031] A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0032] A computer readable storage medium, having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of any of the above methods.
[0033] The dynamic SLC mechanism implementation method, device, computer device and storage medium of the above solid state disk determine the use mode of the dynamic SLC from five aspects, including: the influence of write amplification; whether the static SLC space is sufficient; whether the PE is alarmed; whether the dynamic SLC space is sufficient; and whether the standby space is sufficient. The five aspects are prioritized according to a specific flow step, thereby realizing a dynamic SLC mechanism and flow that balances the performance and reliability of the solid state disk. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 It is a schematic diagram of the implementation process of the dynamic SLC mechanism in the traditional technology.
[0035] Figure 2 It is a schematic diagram of the flow of the dynamic SLC mechanism implementation method of the solid state disk in one embodiment.
[0036] Figure 3 It is a schematic diagram of the flow of the dynamic SLC mechanism implementation method of the solid state disk in another embodiment.
[0037] Figure 4 It is a structural block diagram of the dynamic SLC mechanism implementation device of the solid state disk in one embodiment.
[0038] Figure 5 It is an internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0039] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0040] Currently, referring to Figure 1 , the traditional dynamic SLC mechanism is: firstly check if the static SLC space is enough, if enough, try to write into the static SLC, then check if the dynamic SLC space is enough, if the dynamic SLC space is not enough, write into the TLC. It can be seen that the above dynamic SLC mechanism is not perfect and has a large optimization space.
[0041] Based on this, the present application provides a dynamic SLC mechanism implementation method of a solid state disk, which aims to better balance the performance and reliability of the solid state disk.
[0042] In one embodiment, as shown in Figure 2 , a dynamic SLC mechanism implementation method of a solid state disk is provided, which comprises:
[0043] Step 202, write data and determine if the current write amplification exceeds the alarm threshold;
[0044] Step 204, if the write amplification exceeds the alarm threshold, write the data into the TLC, if not, continue to determine if the static SLC space is enough;
[0045] Step 206, if the static SLC space is enough, write the data into the static SLC, if not, continue to determine if the average PE of the TLC is over standard;
[0046] Step 208, if the average PE of the TLC is over standard, write the data into the TLC, if not, continue to determine if the dynamic SLC space is enough;
[0047] Step 210, if the dynamic SLC space is not enough, write the data into the TLC, if the dynamic SLC space is enough, continue to determine if the remaining space is greater than the reserved space;
[0048] Step 212, if the remaining space is greater than the reserved space, write the data into the dynamic SLC, otherwise, write the data into the TLC.
[0049] In the embodiment, a dynamic SLC mechanism implementation method of a solid state disk is provided, which determines the use mode of the dynamic SLC from five aspects, specifically including: the influence of write amplification; if the static SLC space is enough; if the PE is alarming; if the dynamic SLC space is enough; and if the standby space is enough.
[0050] The specific judgment priority can refer to Figure 3 The specific judgment priority can refer to
[0051] 1. Start, next step executes flow 2;
[0052] 2. Write data, next step executes flow 3;
[0053] 3. Judge whether the write amplification exceeds the alarm threshold, if yes, execute flow 4, if no, execute flow 5;
[0054] 4. Data is written to TLC, next step executes flow 11;
[0055] 5. Judge whether the SSLC (Static Single Level Cell) space is sufficient, if yes, execute flow 10, if no, execute flow 6;
[0056] 6. Judge whether the average PE (program / erase cycle) of TLC is over standard, if over standard, execute flow 4, if no, execute flow 7;
[0057] 7. Judge whether the DSLC (Dynamic Single Level Cell) space is sufficient, if sufficient, execute flow 8, if insufficient, execute flow 4;
[0058] 8. Judge whether the remaining space is greater than OP (Over-Provision), if the remaining space is greater than OP, execute flow 9, otherwise, execute flow 4;
[0059] 9. Data is written to DSLC, next step executes flow 11;
[0060] 10. Data is written to SSLC, next step executes flow 11;
[0061] 11. End.
[0062] In the embodiment, the use mode of dynamic SLC is determined from five aspects, including: the influence of write amplification; whether the static SLC space is sufficient; whether the PE is alarming; whether the dynamic SLC space is sufficient; and whether the standby space is sufficient. The five aspects are sorted according to the specific flow steps, so as to realize a dynamic SLC mechanism and flow balancing the performance and reliability of the solid state disk.
[0063] In one embodiment, the step of judging whether the static SLC space is sufficient further includes: 512 GB capacity needs 6 GB of static SLC space, and 1T capacity needs 12 GB of static SLC space.
[0064] In one embodiment, the step of determining whether the dynamic SLC space is sufficient further comprises: 512GB capacity requires 85GB of dynamic SLC space, 1TB capacity requires 140GB of dynamic SLC space.
[0065] In one embodiment, the step of determining whether the remaining space is greater than the reserved space further comprises: determining whether the remaining space is greater than the reserved space OP ratio, wherein the OP ratio = (flash space - user space) / user space.
[0066] In this embodiment, the parameters involved in each step of the determination process are further described as follows:
[0067] In the step of determining whether the write amplification exceeds the alarm threshold, here the write amplification is determined within a period of time, for example, the write amplification is 6.
[0068] In the step of determining whether the static SLC (SSLC) space is sufficient, the details here are that 512GB of capacity uses 6GB of SSLC, 1T uses 12GB of SSLC, and so on.
[0069] In the step of determining whether the average PE of TLC is over-standard, the PE selected here is 1000.
[0070] In the step of determining whether the dynamic SLC (DSLC) space is sufficient, the DSLC is 85GB for 512GB capacity and 140GB for 1TB capacity here.
[0071] Determine whether the remaining space is greater than the reserved space OP (Over-Provision), wherein the OP ratio = (flash space - user space) / user space, and the OP recommendation here is 2%.
[0072] In this embodiment, through the above specific determination details, better balance between the performance and reliability of the solid state disk can be achieved.
[0073] It should be understood that, although Figures 1-3 the steps in the flowchart of the method are shown in sequence according to the arrows, these steps are not necessarily executed in sequence according to the arrows. Unless explicitly stated herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 1-3 at least part of the steps in the method can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with other steps or sub-steps or stages of other steps.
[0074] In one embodiment, as shown in Figure 4 A device 400 for implementing a dynamic SLC mechanism of a solid state disk is provided, comprising:
[0075] A first judging module 401 is configured to write data and judge whether the current write amplification exceeds an alarm threshold;
[0076] A second judging module 402 is configured to write the data into TLC if the write amplification exceeds the alarm threshold, and continue to judge whether the static SLC space is sufficient if the write amplification does not exceed the alarm threshold;
[0077] A third judging module 403 is configured to write the data into static SLC if the static SLC space is sufficient, and continue to judge whether the average PE of TLC is over-standard if the static SLC space is not sufficient;
[0078] A fourth judging module 404 is configured to write the data into TLC if the average PE of TLC is over-standard, and continue to judge whether the dynamic SLC space is sufficient if the average PE of TLC is not over-standard;
[0079] A fifth judging module 405 is configured to write the data into TLC if the dynamic SLC space is not sufficient, and continue to judge whether the remaining space is greater than a reserved space if the dynamic SLC space is sufficient;
[0080] A writing module 406 is configured to write the data into dynamic SLC if the remaining space is greater than the reserved space, and write the data into TLC if the remaining space is not greater than the reserved space.
[0081] In one embodiment, the second judging module 402 is further configured to:
[0082] 512GB capacity requires 6GB of static SLC space, and 1T capacity requires 12GB of static SLC space.
[0083] In one embodiment, the fourth judging module 404 is further configured to:
[0084] 512GB capacity requires 85GB of dynamic SLC space, and 1TB capacity requires 140GB of dynamic SLC space.
[0085] In one embodiment, the fifth judging module 405 is further configured to:
[0086] Judge whether the remaining space is greater than a reserved space OP ratio, wherein the OP ratio = (flash memory space - user space) / user space.
[0087] The specific limitations of the device for implementing a dynamic SLC mechanism of a solid state disk can refer to the limitations of the method for implementing a dynamic SLC mechanism of a solid state disk in the foregoing, which will not be repeated here.
[0088] In one embodiment, a computer device is provided, an internal structure diagram of which can be shown as follows. Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a dynamic SLC mechanism implementation method of a solid state disk.
[0089] Those skilled in the art can understand that the structure shown in the above Figure 5 embodiments is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0090] 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 each of the above method embodiments when executing the computer program.
[0091] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program, when executed by the processor, implements the steps in each of the above method embodiments.
[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, databases, or other media in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0093] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0094] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent protection of the present application should be subject to the appended claims.
Claims
1. A method for implementing a dynamic SLC mechanism of a solid state disk, the method comprising: writing data and determining whether current write amplification exceeds an alarm threshold; if the write amplification exceeds the alarm threshold, writing the data to TLC, and if the write amplification does not exceed the alarm threshold, determining whether static SLC space is sufficient; if the static SLC space is sufficient, writing the data to static SLC, and if the static SLC space is not sufficient, determining whether average PE of TLC is over standard; if the average PE of TLC is over standard, writing the data to TLC, and if the average PE of TLC is not over standard, determining whether dynamic SLC space is sufficient; if the dynamic SLC space is not sufficient, writing the data to TLC, and if the dynamic SLC space is sufficient, determining whether remaining space is greater than reserved space; if the remaining space is greater than the reserved space, writing the data to dynamic SLC, and if the remaining space is not greater than the reserved space, writing the data to TLC; the step of determining whether the static SLC space is sufficient further comprises that 512 GB capacity requires 6 GB of static SLC space, and 1 TB capacity requires 12 GB of static SLC space; the step of determining whether the dynamic SLC space is sufficient further comprises that 512 GB capacity requires 85 GB of dynamic SLC space, and 1 TB capacity requires 140 GB of dynamic SLC space; the step of determining whether the remaining space is greater than the reserved space further comprises determining whether the remaining space is greater than a reserved space OP ratio, wherein the OP ratio = (flash memory space - user space) / user space.
2. A dynamic SLC mechanism implementation device of a solid state disk, characterized in that, An apparatus for implementing a dynamic SLC mechanism of a solid state disk, the apparatus comprising: a first determining module configured to write data and determine whether current write amplification exceeds an alarm threshold; a second determining module configured to, if the write amplification exceeds the alarm threshold, write the data to TLC, and if the write amplification does not exceed the alarm threshold, determine whether static SLC space is sufficient; a third determining module configured to, if the static SLC space is sufficient, write the data to static SLC, and if the static SLC space is not sufficient, determine whether average PE of TLC is over standard; a fourth determining module configured to, if the average PE of TLC is over standard, write the data to TLC, and if the average PE of TLC is not over standard, determine whether dynamic SLC space is sufficient; a fifth determining module configured to, if the dynamic SLC space is not sufficient, write the data to TLC, and if the dynamic SLC space is sufficient, determine whether remaining space is greater than reserved space; a writing module configured to, if the remaining space is greater than the reserved space, write the data to dynamic SLC, and if the remaining space is not greater than the reserved space, write the data to TLC; the second determining module is further configured to, 512 GB capacity requires 6 GB of static SLC space, and 1 TB capacity requires 12 GB of static SLC space; the fourth determining module is further configured to, 512 GB capacity requires 85 GB of dynamic SLC space, and 1 TB capacity requires 140 GB of dynamic SLC space; the fifth determining module is further configured to, determine whether the remaining space is greater than a reserved space OP ratio, wherein the OP ratio = (flash memory space - user space) / user space.
3. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the method of claim 1 when executing the computer program.
4. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, which is executed by a processor, implements the steps of the method as claimed in claim 1.
Citation Information
Patent Citations
Memory devices and electronic systems having a hybrid cache with static and dynamic cells, and related methods
CN109716309A
Memory device with dynamic cache management
CN111095226A