A solid state drive testing method, system, and computer-readable storage medium
By setting the test cache size and using different voltage drop methods to simulate abnormal power failure scenarios, the problem of the existing technology failing to fully verify the security of cache data is solved, and higher-precision abnormal power failure testing of solid-state drives is achieved to ensure data reliability.
Patent Information
- Application Number
- CN202310843788.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-07-10
AI Technical Summary
The existing technology fails to fully verify different sizes of data in the cache and different power supply voltage drop modes during the abnormal power-off test of the solid-state drive, resulting in that the data security problem is not effectively solved.
By setting the test cache size, using the direct descent method, step descent method, and vibration descent method to simulate different voltage drop methods, the cache data preservation integrity is tested, including controlling the voltage drop slope and vibration amplitude to accurately simulate abnormal power-off scenarios.
The verification precision and accuracy of abnormal power-off tests are improved, ensuring the reliability of solid-state drive data in various scenarios, covering multiple abnormal power-off test scenarios, and improving data security.
Smart Images

Figure CN117133349B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid-state hard disk testing, and in particular to a solid-state hard disk testing method, system, and computer-readable storage medium. Background Art
[0002] Data written by the host to an SSD exists in two parts: one in the cache, and the other, possibly already stored in non-volatile media. Reliability testing is crucial for SSDs, and abnormal power failure testing is the most prone to problems. An abnormal power failure occurs when the SSD loses power before receiving a power loss notification from the host, or when receiving a power loss notification but before writing data to the SSD's flash memory. This can result in data loss.
[0003] The existing testing methods all rely on a test device to control the power supply to fail abnormally. However, different power supplies may experience different voltage drops during a power failure. Different voltage drop slopes place different demands on the data reliability of the solid-state drive. The existing technology has the following problems when performing abnormal power failure testing:
[0004] 1. The scenarios of different data sizes in the cache have not been fully verified, that is, the security of the data in the cache has not been specifically verified.
[0005] 2. At the same time, the data reliability under different power supply voltage drop methods was not verified, resulting in insufficient test pressure and easily leading to data security issues.
[0006] Therefore, the present invention is necessary for the reliability of the power-off test of the solid-state hard disk. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a solid state drive testing method, system and computer-readable storage medium in response to the defects in the prior art.
[0008] The technical solution adopted by the present invention to solve its technical problem is:
[0009] The present invention provides a method for testing a solid state drive, comprising the following steps:
[0010] Start the test and set the test cache size based on the amount of data stored in the SSD cache.
[0011] Set different voltage drop methods according to the working voltage of the solid-state drive. The voltage drop methods include: direct drop method, step drop method and vibration drop method;
[0012] Execute the test and count the data integrity of the test cache under different voltage drop modes until all voltage drop mode tests are completed.
[0013] Furthermore, the method for setting the size of the test cache of the present invention is specifically as follows:
[0014] Use the command to read the amount of data written by the host to Nand. After a certain count of data is written, continue reading;
[0015] Until the data volume of the Nand changes, the maximum count at this time is taken as max_count, which is recorded as the maximum value of the SSD test cache;
[0016] The test cache size is evenly selected between 0 and max_count.
[0017] Furthermore, the direct drop method of the present invention is specifically: directly dropping the operating voltage to 0, which is used to simulate the scenario of abnormal power failure during normal use.
[0018] Furthermore, the direct drop method of the present invention connects a switch control chip between the power supply and the solid state drive. When the test conditions are met, the switch control chip is directly disconnected, and the slope of the voltage drop curve k→∞.
[0019] Furthermore, the step-down method of the present invention is specifically as follows: the voltage drop curve is in a step-like shape, which is used to simulate the scenario where the voltage drop trend is stable during normal power failure.
[0020] Furthermore, the voltage drop in the step-down method of the present invention is controlled according to the following formula:
[0021]
[0022] Among them, at the beginning of the discharge point, the step of the power supply discharge amount in the same time t is m; when the power is insufficient, the step of the power supply discharge amount in the same time t is n, m>n, assuming that the critical potential of the power supply discharge amount change is l, the remaining power of the power supply is Q, Q stand Indicates the voltage value when the voltage starts to decrease.
[0023] Furthermore, the vibration reduction method of the present invention is specifically as follows: the voltage reduction curve is in the shape of a downward broken line, which includes stages of voltage vibration reduction and voltage vibration increase, and the amplitude of the voltage vibration reduction is greater than the amplitude of the voltage vibration increase, which is used to simulate the voltage jitter scenario.
[0024] Furthermore, the vibration reduction method of the present invention includes a slope control method for voltage vibration reduction and voltage vibration increase, specifically:
[0025] The slope of the voltage vibration decrease is:
[0026]
[0027] The voltage is V stand Drop to V notify , the time elapsed during the test is t1;
[0028] When the voltage drops to V notify After that, the driving power supply performs voltage vibration and increases, and the voltage range of the solid state drive voltage is set to ±h%, and the target voltage to be vibrated is set to V notify *(1+h%), the time of the voltage vibration rising stage is t2, t2 is tested according to a certain step value, and the rising slope of the voltage vibration rising stage is:
[0029]
[0030] After the voltage oscillates, it continues to oscillate downward according to the slope k1.
[0031] The present invention provides a solid state drive testing system, comprising the following modules:
[0032] The test cache setting module is used to set the size of the test cache according to the amount of data stored in the cache of the solid-state drive when starting the test;
[0033] The voltage drop mode setting module is used to set different voltage drop modes according to the working voltage of the solid-state drive. The voltage drop modes include direct drop method, step drop method and vibration drop method.
[0034] The test module is used to perform tests and count the completeness of the data stored in the test cache under different voltage drop modes until all voltage drop mode tests are completed.
[0035] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of any of the above-mentioned solid-state hard disk testing methods.
[0036] The beneficial effects produced by the present invention are:
[0037] 1. The testing method of the present invention first needs to confirm the amount of data stored in the cache of the solid-state drive to determine how to adjust the data size of the test cache, which can specifically verify the security of the data in the cache and improve the precision and accuracy of the verification.
[0038] 2. The present invention controls the power supply voltage drop in various ways, including direct drop method, step drop method and vibration drop method. The test method is more complete and has higher test accuracy for different scenarios, thereby improving the reliability of data testing during abnormal power failure of solid-state drives in various scenarios.
[0039] 3. A vibration reduction method is proposed to simulate the test scenario of abnormal power failure, which can effectively simulate the voltage jitter. A method for controlling the vibration point and slope is proposed, which can accurately control the amplitude of vibration reduction and ensure accurate test results.
[0040] The present invention can cover a variety of abnormal power failure test scenarios and ensure the data reliability of solid-state hard disks under different power quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0042] Figure 1 is a flow chart of a testing method according to an embodiment of the present invention;
[0043] Figure 2 This is the method of controlling voltage drop in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0045] Example 1
[0046] like Figure 1 As shown, the testing method of the solid-state drive according to the embodiment of the present invention includes the following steps:
[0047] Start the test and set the test cache size based on the amount of data stored in the SSD cache.
[0048] Set different voltage drop methods according to the working voltage of the solid-state drive. The voltage drop methods include: direct drop method, step drop method and vibration drop method;
[0049] Execute the test and count the data integrity of the test cache under different voltage drop modes until all voltage drop mode tests are completed.
[0050] Example 2
[0051] In an embodiment of the present invention, the method for determining the cache size of a solid-state drive is as follows:
[0052] In the current down-flush strategy of solid-state drives, a certain amount of data is generally cached for performance reasons, and the down-flush operation is performed after the data reaches a certain amount to achieve greater concurrent operations.
[0053] Therefore, in order to determine the size of the SSD cache, it is necessary to read the amount of data written by the host to the Nand in advance through a command, and then continue reading after writing a certain count of data.
[0054] The amount of data written by the host to the Nand until the Nand's data volume changes, and the maximum count is taken as the SSD cache size. The cache size defined in subsequent tests can be evenly selected between 0 and max_count. A larger max_count requires a higher SSD's ability to handle data after an abnormal power failure.
[0055] Example 3
[0056] like Figure 2 As shown, in the embodiment of the present invention, the voltage drop control method specifically includes the following three methods:
[0057] 1. Direct descent method.
[0058] Directly dropping from the operating voltage to 0 is similar to the abnormal power-off scenario during normal use, that is, the direct power-off scenario. It mainly tests the abnormal power-off processing flow of the solid-state drive and the data integrity in the abnormal power-off scenario.
[0059] The direct drop method uses a switch control chip connected between the power supply and the solid-state drive. When the conditions are met, the switch control chip is directly disconnected, and the voltage drop time is required to be as short as possible. In this way, the drop slope k→∞.
[0060] 2. Step-down method.
[0061] Similar to a normal power outage scenario, for a power supply with good quality design, the power supply voltage drops steadily during a power outage. Therefore, this test method mainly covers scenarios where the voltage drops steadily during a power outage.
[0062] According to the discharge characteristics of the power supply, the discharge amount is usually large at the beginning of the discharge, and the discharge amount is small at the end of the insufficient power. Assuming that the step size of the power supply in the initial discharge is m, and the discharge amount in the same time when the power is insufficient is n, usually (m>n), assuming that the critical potential of the power supply discharge change is l, the decrease of the remaining power Q of the power supply should be carried out according to the following formula:
[0063]
[0064] 3. Vibration descent method.
[0065] During a normal power outage, voltage jitter shouldn't occur. However, for power supplies of varying quality, environmental influences may cause voltage jitter. This scenario places significant stress on the SSD's power-off handling, so it's important to cover this scenario during testing. In the vibration drop method, the selection of vibration points should refer to the SSD's threshold for abnormal power outages. The oscillation rise slope can also be controlled to simulate different power-off scenarios.
[0066] In this test scenario, the voltage vibration test is mainly considered to be performed when the critical value of the abnormal power failure notification solid state drive is reached, to test whether the solid state drive's processing can meet the use requirements. Assume that the voltage of the solid state drive receiving the abnormal power failure notification is V notify , the test time t1, V stand Drop to V notify , the slope of decline in this stage is shown in the following formula:
[0067]
[0068] When the voltage drops to V notify After that, the driving power supply is vibrated upward. Since the voltage of the solid state drive can operate normally within ±10%, the target voltage to be vibrated is set to V notify *(1+10%), the rising time in this stage is t2, which can be set from 0-1s, and tested in steps of 0.1. The rising slope in this stage is shown in the following formula:
[0069]
[0070] After the vibration rises, the slope of the continued decline is referenced to k1.
[0071] Example 4
[0072] An embodiment of the present invention provides a solid-state drive testing system, comprising the following modules:
[0073] The test cache setting module is used to set the size of the test cache according to the amount of data stored in the cache of the solid-state drive when starting the test;
[0074] The voltage drop mode setting module is used to set different voltage drop modes according to the working voltage of the solid-state drive. The voltage drop modes include direct drop method, step drop method and vibration drop method.
[0075] The test module is used to perform tests and count the completeness of the data stored in the test cache under different voltage drop modes until all voltage drop mode tests are completed.
[0076] Example 5
[0077] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps of any of the above-mentioned solid-state hard disk testing methods.
[0078] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0079] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all such improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A method for testing a solid state drive, characterized in that: The following steps are involved: Start the test and set the test cache size based on the amount of data stored in the SSD cache. Set different voltage drop methods according to the working voltage of the solid-state drive. The voltage drop methods include: direct drop method, step drop method and vibration drop method; Execute the test and count the data integrity of the test cache under different voltage drop modes until all voltage drop mode tests are completed.
2. The solid state drive testing method according to claim 1, wherein: The method for setting the size of the test cache is as follows: Use the command to read the amount of data written by the host to Nand. After a certain count of data is written, continue reading; Until the data volume of the Nand changes, the maximum count at this time is taken as max_count, which is recorded as the maximum value of the SSD test cache; The test cache size is evenly selected between 0 and max_count.
3. The solid state drive testing method according to claim 1, wherein: The direct drop method is to drop the operating voltage directly to 0, which is used to simulate the abnormal power-off scenario during normal use.
4. The method for testing a solid state drive according to claim 3, wherein: The direct drop method connects a switch control chip between the power supply and the solid-state drive. When the test conditions are met, the switch control chip is directly disconnected, and the slope of the voltage drop curve k→∞.
5. The solid state drive testing method according to claim 1, wherein: The step-down method is specifically: the voltage drop curve is in a step-like shape, which is used to simulate the scenario where the voltage drop trend is stable during normal power outage.
6. The method for testing a solid state drive according to claim 5, wherein: The voltage drop of the step-down method is controlled according to the following formula: Among them, at the beginning of the discharge point, the step of the power supply discharge amount in the same time t is m; when the power is insufficient, the step of the power supply discharge amount in the same time t is n, m>n, assuming that the critical potential of the power supply discharge amount change is l, the remaining power of the power supply is Q, Q stand Indicates the voltage value when the voltage starts to decrease.
7. The method for testing a solid state drive according to claim 1, wherein: The vibration drop method is specifically as follows: the voltage drop curve is a downward broken line, which includes the stages of voltage vibration drop and voltage vibration increase, and the amplitude of the voltage vibration drop is greater than the amplitude of the voltage vibration increase, which is used to simulate the voltage jitter scenario.
8. The solid state drive testing method according to claim 7, wherein: The vibration reduction method includes the slope control method of voltage vibration reduction and voltage vibration increase, specifically: The slope of the voltage vibration decrease is: The voltage is V stand Drop to V notify , the time elapsed during the test is t1; When the voltage drops to V notify After that, the driving power supply performs voltage vibration and increases, and the voltage range of the solid state drive voltage is set to ±h%, and the target voltage to be vibrated is set to V notify *(1+h%), the time of the voltage vibration rising stage is t2, t2 is tested according to a certain step value, and the rising slope of the voltage vibration rising stage is: After the voltage oscillates, it continues to oscillate downward according to the slope k1.
9. A solid state drive testing system, characterized in that: Includes the following modules: The test cache setting module is used to set the size of the test cache according to the amount of data stored in the cache of the solid-state drive when starting the test; The voltage drop mode setting module is used to set different voltage drop modes according to the working voltage of the solid-state drive. The voltage drop modes include direct drop method, step drop method and vibration drop method. The test module is used to perform tests and count the completeness of the data stored in the test cache under different voltage drop modes until all voltage drop mode tests are completed.
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 solid state drive testing method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for protecting the abnormal power-down of solid-state hard disk
CN109062825A
Hard disk fault diagnosis method and system, terminal and storage medium
CN114550800A