Method and apparatus for testing solid state drive slc available size and release policy
By performing secure erase tests on SSDs and different proportions of disk filling tests using the FIO tool, the problem of inaccurate confirmation of SLC cache availability was solved. This enabled fast and efficient determination of SLC availability and release strategy, improving write speed stability and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIONMEMORY INFORMATION SYST LTD
- Filing Date
- 2023-09-28
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technology cannot accurately determine the available size of the SLC cache on a solid-state drive, resulting in a decrease in write speed when the amount of data written exceeds the cache capacity, leading to a poor user experience and making it unsuitable for all solid-state drives.
By performing a secure erase on the SSD under test and waiting for the temperature to stabilize, the FIO tool was used to perform sequential write-fill operations at different ratios, recording the write speed and performance per second. Based on the recorded performance, the available SLC size and relocation/release strategy were determined.
It enables fast and efficient confirmation of SLC available size and release strategy, applicable to all solid-state drives, without additional hardware costs, ensuring stable write speeds and user experience.
Smart Images

Figure CN117234881B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive (SSD) testing technology, and in particular to a method, apparatus, computer device, and storage medium for testing the available size and release strategy of solid-state drives (SLC). Background Technology
[0002] SLC (Single Level Cache, 1 bit per cell) is fast and has a long lifespan (approximately 100,000 write / erase cycles), but its price is several times higher than NAND media such as MLC (Multi-Level Cell, 2 bits per cell), TLC (Trinary-Level Cell, 3 bits per cell), and QLC (Quad-level Cell, 4 bits per cell). Currently, most mainstream consumer-grade SSDs use TLC media. Its write performance bandwidth is less than one-third that of SLC and its lifespan is short, but its advantages are low price and large capacity, so it has gradually become the mainstream SSD. To enable TLC-based SSDs to provide SLC-level performance during testing and use, and to meet the high bandwidth requirements of specific scenarios, various manufacturers simulate an SLC layer on top of the TLC layer as an SLC cache. During user operation, the amount of data on the drive continuously increases, causing the available SLC cache size to continuously decrease. When the amount of data written exceeds the limit of the cache capacity, the write speed will drop significantly. When the host stops writing data to the solid-state drive, the solid-state drive will start moving the data in the SLC cache to the TLC cache. The cleanup of the SLC cache will restore the read and write performance to the performance of simulated SLC.
[0003] Currently, most methods for verifying SSD SLC cache performance involve waiting a period of time in both empty and filled states before conducting maximum performance tests. This method cannot determine the specific available SLC size, often testing 1GB or a fixed amount of space. However, the SLC space available varies between SSDs under different filling conditions. If insufficient space is released, the user experience will significantly decrease in speed. While firmware code could add completion log information to output the available SLC size, this method lacks universality and cannot obtain such logs for any SSD purchased online. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for testing the available size and release strategy of solid-state drives (SLC) in response to the above-mentioned technical problems.
[0005] A method for testing the available size and release strategy of a solid-state drive (SLC), the method comprising:
[0006] Perform a safe erase on the solid-state drive under test and wait for the temperature to stabilize;
[0007] FIO was used to sequentially write to the solid-state drive under test, with the write volume being 100% of the total disk capacity and the write speed per second being recorded.
[0008] Perform a safe erase on the solid-state drive under test and wait for the temperature to stabilize;
[0009] FIO was used to perform sequential write operations on the solid-state drive under test, with the write volume being X% of the total disk capacity and the performance per second recorded.
[0010] After the temperature drops and stabilizes, FIO is used to sequentially write to the solid-state drive under test. The amount of writing is Y% of the total disk capacity = 100% - X% and the performance per second is recorded.
[0011] Modify X% and repeat the erase and record steps above. Determine the available SLC size and move / release strategy based on the record performance per second.
[0012] In one embodiment, the step of sequentially writing to the solid-state drive under test using FIO, writing to 100% of the total disk capacity, and recording the write speed per second further includes:
[0013] Record the write speed per second as A1, A2...An, and sum the values greater than A1*80% to get A.
[0014] In one embodiment, the step of waiting for the temperature to drop and stabilize, then using FIO to sequentially write to the solid-state drive under test, with the write volume being Y% of the total disk capacity = 100% - X%, and recording the performance per second, further includes:
[0015] Record the write speed per second as B1, B2...Bn, and sum the values of all values greater than B1*80% as B.
[0016] In one embodiment, the step of modifying X% and repeating the above-described erasure and recording steps, and determining the available SLC size and the move-and-release strategy based on the recording performance per second, further includes:
[0017] Determine the available size of the SLC and the strategy for moving and releasing it based on records A and B.
[0018] A solid-state drive (SLC) available size and release strategy testing apparatus, the apparatus comprising:
[0019] A secure erase module is used to securely erase the solid-state drive under test and wait for the temperature to stabilize.
[0020] The first recording module is used to perform sequential write filling of the solid-state drive under test using FIO, with the write volume being 100% of the total disk capacity and the write speed per second being recorded.
[0021] The second recording module is used to perform sequential write-filling of the solid-state drive under test using FIO, with the write volume being X% of the total disk capacity and recording the performance per second.
[0022] The third recording module is used to wait for the temperature to drop and stabilize, and then use FIO to sequentially write to the solid-state drive under test. The amount written is Y% of the total disk capacity = 100% - X% and the performance per second is recorded.
[0023] The result judgment module is used to modify X% and repeat the above-mentioned erasure and recording steps, and to determine the available size of SLC and the move-and-release strategy based on the recording performance per second.
[0024] In one embodiment, the first recording module is further configured to:
[0025] Record the write speed per second as A1, A2...An, and sum the values greater than A1*80% to get A.
[0026] In one embodiment, the third recording module is further configured to:
[0027] Record the write speed per second as B1, B2...Bn, and sum the values of all values greater than B1*80% as B.
[0028] In one embodiment, the result determination module is further configured to:
[0029] Determine the available size of the SLC and the strategy for moving and releasing it based on records A and B.
[0030] A computer device includes 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 methods described above.
[0031] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0032] The aforementioned method, apparatus, computer equipment, and storage medium for testing the available SLC size and release strategy of solid-state drives (SSDs) involve: performing a secure erase on the SSD under test and waiting for temperature stabilization; using FIO to sequentially write to the SSD under test, filling it with 100% of the total disk capacity and recording the write speed per second; performing another secure erase on the SSD under test and waiting for temperature stabilization; performing another sequential write to the SSD under test using FIO, filling it with X% of the total disk capacity and recording the performance per second; waiting for the temperature to drop and stabilize; performing another sequential write to the SSD under test using FIO, filling it with Y% of the total disk capacity (100% - X%) and recording the performance per second; modifying X% and repeating the erase and recording steps; and determining the available SLC size and migration / release strategy based on the recorded performance per second. This invention utilizes FIO to fill the disk under test with different proportions, and confirms the size of the available SLC area by monitoring sequential write performance. It is applicable to all SSDs and incurs no additional hardware cost. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating a method for testing the available size and release strategy of a solid-state drive (SLC) in one embodiment.
[0034] Figure 2 This is a flowchart illustrating a method for testing the available size and release strategy of a solid-state drive (SLC) in another embodiment.
[0035] Figure 3 This is a flowchart illustrating a method for testing the available size and release strategy of a solid-state drive (SLC) in another embodiment.
[0036] Figure 4 A schematic diagram showing the remaining available SLC space for two products under different fill ratios;
[0037] Figure 5 This is a structural block diagram of a solid-state drive (SLC) available size and release strategy testing apparatus in one embodiment;
[0038] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] Currently, most methods for verifying SSD SLC cache performance involve waiting a period of time in both empty and filled states before conducting maximum performance tests. This method cannot determine the specific available SLC size, often testing 1GB or a fixed amount of space. However, the SLC space available varies between SSDs under different filling conditions. If insufficient space is released, the user experience will significantly decrease in speed. While firmware code could add completion log information to output the available SLC size, this method lacks universality and cannot obtain such logs for any SSD purchased online.
[0041] Based on this, the present invention proposes a test method for the available SLC size and release strategy of solid-state drives, aiming to quickly and efficiently test the available SLC size and release strategy of solid-state drives.
[0042] In one embodiment, such as Figure 1 As shown, a method for testing the available size and release strategy of a solid-state drive (SLC) is provided. This method includes:
[0043] Step 102: Perform a secure erase on the solid-state drive under test and wait for the temperature to stabilize;
[0044] Step 104: Use FIO to perform sequential write filling on the solid-state drive under test, with the write volume being 100% of the total disk capacity and the write speed per second recorded.
[0045] Step 106: Perform a safe erase on the solid-state drive under test and wait for the temperature to stabilize;
[0046] Step 108: Use FIO to perform sequential write filling on the solid-state drive under test, with the write volume being X% of the total disk capacity and record the performance per second.
[0047] Step 110: After the temperature drops and stabilizes, use FIO to perform sequential write operations on the solid-state drive under test. The write volume is Y% of the total disk capacity = 100% - X% and the performance per second is recorded.
[0048] Step 112: Modify X% and repeat the above erase and record steps. Determine the available SLC size and move / release strategy based on the record performance per second.
[0049] In this embodiment, a method for testing the available size and release strategy of SLC in solid-state drives is proposed. This method uses FIO to fill the disk under test with different proportions, waits for the SLC to be moved, and then confirms the size of the available SLC area by monitoring the sequential write performance. This method is applicable to all solid-state drives.
[0050] Specifically, first, the slave disk is safely erased using the NVME format command to ensure the consistency of the disk's initial state and wait for the temperature to stabilize (the temperature difference is less than 2 for 5 consecutive seconds).
[0051] Then, FIO was used to sequentially write to the solid-state drive under test, with the write volume being 100% of the total disk capacity and the write speed per second was recorded; the solid-state drive under test was then safely erased and the temperature was allowed to stabilize (the temperature difference was less than 2 for 5 consecutive seconds).
[0052] Next, FIO was used to perform sequential write operations on the SSD under test, writing X% of the total disk capacity and recording the performance per second. After the temperature dropped and stabilized (the temperature difference was less than 2 for 5 consecutive seconds), FIO was used to perform sequential write operations on the SSD under test, writing Y% of the total disk capacity = 100% - X% and recording the performance per second. The initial value of X% can be 10%.
[0053] Finally, modify X% and repeat the erase and record steps described above. Determine the available SLC size and move / release strategy based on the record performance per second. For example, modify X sequentially to 20%, 30%, 50%, 70%, and 90%.
[0054] In this embodiment, the process involves: 1) Securely erasing the SSD under test and waiting for its temperature to stabilize; 2) Using FIO to sequentially write to the SSD, filling it with 100% of the disk capacity and recording the write speed per second; 3) Securely erasing the SSD under test and waiting for its temperature to stabilize; 4) Using FIO to sequentially write to the SSD under test, filling it with X% of the disk capacity and recording the performance per second; 5) After the temperature drops and stabilizes, using FIO to sequentially write to the SSD under test, filling it with Y% of the disk capacity (100% - X%) and recording the performance per second; 6) Modifying X% and repeating the erasing and recording steps; 7) Determining the available SLC size and migration / release strategy based on the recorded performance per second. This solution utilizes FIO to fill the disk under test with different proportions, and then monitors the sequential write performance to confirm the size of the available SLC area. It is applicable to all SSDs and incurs no additional hardware cost.
[0055] In one embodiment, such as Figure 2 As shown, a method for testing the available size and release strategy of a solid-state drive (SLC) is provided. This method includes:
[0056] Step 202: Use FIO to sequentially write to the solid-state drive under test, with the write volume being 100% of the total disk capacity and record the write speed per second as A1, A2...An, and calculate the sum of all values greater than A1*80% as A;
[0057] Step 204: After the temperature drops and stabilizes, use FIO to perform sequential write filling on the solid-state drive under test. The write volume is X% of the total disk capacity and the performance per second is recorded.
[0058] Step 206: After the temperature drops and stabilizes, use FIO to sequentially write to the solid-state drive under test. The amount written is Y% of the total disk capacity = 100% - X% and the write speed per second is recorded as B1, B2...Bn. The sum of all values greater than B1*80% is calculated as B.
[0059] Step 208: Modify X% and repeat the above erase and record steps. Determine the available size of SLC and the strategy for moving and releasing based on the recorded A and B.
[0060] In one embodiment, a method for testing the available size and release strategy of a solid-state drive (SLC) is provided, with the following test environment:
[0061] Hardware Requirements: The computer under test is an ASUS Z690; the specific model is not mandatory. This patent prefers the ASUS Z690 as the computer under test. The solid-state drive (SSD) under test is a TLC SSD that supports simulated SLC caching. This testing method is applicable to various multi-layer storage unit SSDs with simulated SLC; for ease of description, the most mainstream TLC SSD is used as the test and description object.
[0062] Software Requirements: Operating System: Linux Red Hat. Testing tools: FIO (an open-source testing tool mainly used for stress testing and performance verification of hard drives) and smartmontools (an open-source tool for obtaining hard drive SMART information). Test scripts are self-written batch scripts. There are no strict requirements for the testing OS and tools; in this embodiment, Red Hat, FIO, and smartmontools are preferred.
[0063] Specifically, refer to Figure 3 The diagram illustrates the testing method for SLC available size and release strategy of solid-state drives. The test process includes:
[0064] 1. Use the NVME format command to perform a secure erase on the disk as a slave disk to ensure the consistency of the disk's initial state.
[0065] 2. Wait for the temperature to stabilize (the temperature difference is less than 2 for 5 consecutive seconds) to ensure the consistency of the initial state of the disk.
[0066] 3. Use FIO to perform a 128KB sequential write to the disk under test using Q32T1. The write volume is a percentage of the total disk capacity X = 100%. Record the write speed per second as A1, A2...An. The sum of all values greater than (A1 * 80%) is A.
[0067] 4. Use the NVME format command to perform a secure erase on the disk as a slave disk to ensure the consistency of the disk's initial state.
[0068] 5. Wait for the temperature to drop and stabilize (the temperature difference for 5 consecutive seconds should be less than 2) to ensure that the disk is idle and in a consistent state.
[0069] 6. Use FIO to perform a 128KB sequential write to the test disk using Q32T1, with the write amount being a percentage of the total disk capacity X = 10%, and the write start position being 0. Record the performance per second.
[0070] 7. Wait for the temperature to drop and stabilize (the temperature difference for 5 consecutive seconds should be less than 2) to ensure that the disk is idle and in a consistent state.
[0071] 8. Use FIO to perform a 128KB sequential write to the disk under test using Q32T1. The write amount is a percentage of the total disk capacity Y = 100% - X. The starting write address is X * total disk capacity. Record the write speed B1, B2, B3...Bn per second. The sum of all values greater than (B1 * 80%) is B.
[0072] 9. Repeat steps 1-5, modifying X to 20%, 30%, 50%, 70%, and 90% respectively.
[0073] 10. Record the hard disk capacity as C. Based on the value A in step 3 and the value B in step 8, determine the available size of SLC and the strategy for moving and releasing it.
[0074] Specifically, the following table shows the SLC size and estimated release strategy for two products at different filling ratios:
[0075]
[0076] Reference Figure 4 As shown, for product Y: during the initial data writing, less than 20% of the data will remain in the SLC space without being moved. Overall, it is a lazy SLC release strategy. Therefore, the available SLC space is smaller under various disk filling ratios, but the write amplification control is better.
[0077] Product Z: It can simulate SLC across the entire disk and uses a greedy release strategy to release SLC as much as possible to ensure the user experiences the highest performance when writing new data, but the write amplification will be relatively large.
[0078] In this embodiment, the available SLC size and release strategy of solid-state drives can be tested quickly and efficiently. After filling the test disk with different proportions using FIO, the size of the available SLC area is confirmed by monitoring the sequential write performance, and then the SLC release strategy for any filling scenario is derived. This method is applicable to all solid-state drives and has no additional hardware cost.
[0079] It should be understood that, although Figures 1-4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 1-4 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0080] In one embodiment, such as Figure 5 As shown, a solid-state drive (SLC) available size and release strategy testing apparatus 500 is provided, the apparatus comprising:
[0081] The secure erase module 501 is used to securely erase the solid-state drive under test and wait for the temperature to stabilize.
[0082] The first recording module 502 is used to perform sequential write-filling of the solid-state drive under test using FIO, with the write volume being 100% of the total disk capacity and the write speed per second being recorded.
[0083] The second recording module 503 is used to perform sequential write-filling of the solid-state drive under test using FIO, with the write volume being X% of the total disk capacity and recording the performance per second.
[0084] The third recording module 504 is used to wait for the temperature to drop and stabilize, and then use FIO to sequentially write to the solid-state drive under test. The amount written is Y% of the total disk capacity = 100% - X% and the performance per second is recorded.
[0085] Result judgment module 505 is used to modify X% and repeat the above-mentioned erasure and recording steps, and to determine the available size of SLC and the move-and-release strategy based on the recording performance per second.
[0086] In one embodiment, the first recording module 502 is further configured to:
[0087] Record the write speed per second as A1, A2...An, and sum the values greater than A1*80% to get A.
[0088] In one embodiment, the third recording module 504 is further configured to:
[0089] Record the write speed per second as B1, B2...Bn, and sum the values of all values greater than B1*80% as B.
[0090] In one embodiment, the result determination module 505 is further configured to:
[0091] Determine the available size of the SLC and the strategy for moving and releasing it based on records A and B.
[0092] For specific limitations on the testing equipment for SLC available size and release strategy of solid-state drives, please refer to the limitations on the testing method for SLC available size and release strategy of solid-state drives mentioned above, which will not be repeated here.
[0093] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 6 As shown, the computer device includes a processor, memory, and a network interface connected via a device bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores operating devices, computer programs, and databases. The internal memory provides an environment for the operation of the operating devices and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for testing the available size and release strategy of a solid-state drive (SLC).
[0094] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0095] 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, wherein the processor executes the computer program to implement the steps in the various method embodiments described above.
[0096] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the various method embodiments described above.
[0097] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0099] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for testing the available size and release strategy of a solid-state drive (SLC), the method comprising: Perform a safe erase on the solid-state drive under test and wait for the temperature to stabilize; FIO was used to sequentially write to the solid-state drive under test, with the write volume being 100% of the total disk capacity and the write speed per second being recorded. Perform a safe erase on the solid-state drive under test and wait for the temperature to stabilize; FIO was used to sequentially write to the solid-state drive under test, with the write volume being X% of the total disk capacity; After the temperature drops and stabilizes, FIO is used to sequentially write to the solid-state drive under test. The amount of writing is Y% of the total disk capacity = 100% - X% and the performance per second is recorded. Modify X% and repeat the above erase and record steps. Determine the available SLC size and move / release strategy based on the record performance per second. The step of using FIO to sequentially write and fill the solid-state drive under test, with the write volume being 100% of the total disk capacity and the write speed per second also includes: Record the write speed per second as A1, A2...An, and sum all values greater than A1*80% as A; The step of waiting for the temperature to drop and stabilize, then using FIO to sequentially write to the solid-state drive under test, with the write volume being Y% = 100% - X% of the total disk capacity and recording the performance per second, also includes: Record the write speed per second as B1, B2...Bn, and sum the values greater than B1*80% to get B; The steps of modifying X% and repeating the above-described erasure and recording steps, and determining the available SLC size and the move-and-release strategy based on the recording performance per second, further include: Determine the available size of the SLC and the strategy for moving and releasing it based on records A and B.
2. A device for testing the available size and release strategy of a solid-state drive (SLC), characterized in that, The device includes: A secure erase module is used to securely erase the solid-state drive under test and wait for the temperature to stabilize. The first recording module is used to perform sequential write filling of the solid-state drive under test using FIO, with the write volume being 100% of the total disk capacity and the write speed per second being recorded. The second recording module is used to sequentially write to the solid-state drive under test using FIO, with the write volume being X% of the total disk capacity. The third recording module is used to wait for the temperature to drop and stabilize, and then use FIO to sequentially write to the solid-state drive under test. The amount written is Y% of the total disk capacity = 100% - X% and the performance per second is recorded. The result judgment module is used to modify X% and repeat the above-mentioned erasure and recording steps, and to determine the available size of SLC and the move and release strategy based on the recording performance per second. The first recording module is also used for: Record the write speed per second as A1, A2...An, and sum all values greater than A1*80% as A; The third recording module is also used for: Record the write speed per second as B1, B2...Bn, and sum the values greater than B1*80% to get B; The result judgment module is also used for: Determine the available size of the SLC and the strategy for moving and releasing it based on records A and B.
3. 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, it implements the steps of the method of claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 1.