Solid-state drive testing method, testing device, and computer-readable storage medium

By changing the operating parameters and status of solid-state drives and conducting performance tests in multiple real-world scenarios, the problem of low testing efficiency in existing technologies has been solved, enabling a more comprehensive performance evaluation.

CN115206405BActive Publication Date: 2025-10-28SHENZHEN LONGSYS ELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110391643.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-13
Publication Date
2025-10-28
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

In existing technologies, the performance testing efficiency of solid-state drives is low, making it difficult to comprehensively examine their performance changes under multiple real-world working scenarios.

Method used

This paper provides a testing method for solid-state drives (SSDs). By changing the drive's operating parameters, such as write/delete operations and write cache status, multiple performance tests are conducted. Combined with multiple real-world working scenarios, the method automatically analyzes performance changes.

Benefits of technology

This improves the efficiency and comprehensiveness of SSD testing, enabling the examination of performance changes in multiple real-world scenarios and enhancing the accuracy and comprehensiveness of the tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115206405B_ABST
    Figure CN115206405B_ABST
Patent Text Reader

Abstract

This application discloses a testing method, testing apparatus, and computer-readable storage medium for solid-state drives (SSDs). The testing method includes performing a performance test on the SSD under test to obtain a first performance index. The operating parameters of the SSD under test are changed, and a performance test is performed on the SSD with the changed operating parameters to obtain a second performance index. The performance degradation of the SSD under test is determined based on the first and second performance indices. This application's solution can combine multiple real-world working scenarios to test the performance of SSDs, providing a comprehensive assessment of their performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of solid-state drive technology, and in particular to a testing method, testing apparatus, and computer-readable storage medium for solid-state drives. Background Technology

[0002] Currently, SSDs (Solid State Drives) are widely used in various applications and are gradually replacing traditional hard drives due to their superior performance, power consumption, and environmental adaptability. Performance testing of SSDs is a necessary step before they leave the factory, and improving testing efficiency is a problem that major SSD manufacturers are currently working to solve. Summary of the Invention

[0003] The main technical problem addressed by this application is to provide a testing method, testing device, and computer-readable storage medium for solid-state drives (SSDs), which can test the performance of SSDs in conjunction with real-world working scenarios and conduct a comprehensive evaluation of SSD performance.

[0004] One technical solution adopted in this application is a testing method for solid-state drives (SSDs). The method includes: performing a performance test on the SSD under test to obtain a first performance index; changing the operating parameters of the SSD under test and performing a performance test on the SSD under test with the changed operating parameters to obtain a second performance index of the SSD under test with the changed operating parameters; and determining the performance degradation of the SSD under test based on the first and second performance indices.

[0005] Furthermore, performance tests are performed on the solid-state drive under test to obtain its first performance index, including: when the solid-state drive under test is in a bare disk state, performance tests are performed on the solid-state drive under test to obtain its first performance index.

[0006] Furthermore, the operating parameters of the SSD under test are changed, and performance tests are performed on the SSD after the change. The second performance metric of the SSD after the change includes: performing K write / delete operations on the SSD, where K = 1, 2, ... . Specifically, after the Mth write / delete operation, the SSD under test is subjected to the Mth performance test, and the second performance metric of the SSD after the Mth write / delete operation is obtained, where M = 1, 2, ..., K. The write / delete operations include writing data to the entire capacity of the SSD under test to change it from a bare disk state to a full disk state, and deleting all data from the SSD under test to change it from a full disk state to a bare disk state.

[0007] Furthermore, the operating parameters of the SSD under test are changed, and performance tests are performed on the SSD after the change of operating parameters. The second performance index of the SSD after the change of operating parameters is obtained, which includes performing K write operations on the SSD under test, writing data of a preset capacity to the SSD under test, where K = 1, 2, ... . Among them, after the Mth write operation, the SSD under test is subjected to the Mth performance test, and the second performance index of the SSD under test after the Mth write operation is obtained, where M = 1, 2, ..., K.

[0008] Furthermore, before performing performance tests on the SSD under test and obtaining its first performance metric, the process includes: determining whether the SSD supports write caching. If so, the initial write caching state of the SSD is obtained.

[0009] Furthermore, performance tests are performed on the solid-state drive under test to obtain the first performance index of the solid-state drive under test, including: when the solid-state drive under test is in the initial write cache state, the performance test is performed on the solid-state drive under test to obtain the first performance index of the solid-state drive under test.

[0010] Furthermore, the operating parameters of the SSD under test are changed, and performance tests are performed on the SSD after the change. The second performance metric of the SSD after the change includes alternating the write cache state of the SSD K times, where K = 1, 2, ... . Specifically, after the Mth change in the write cache state of the SSD, the Mth performance test is performed on the SSD to obtain the second performance metric of the SSD after the Mth change in write cache state, where M = 1, 2, ..., K. The write cache state obtained after the first change in the write cache state of the SSD is the opposite of the initial write cache state.

[0011] Furthermore, determining the performance degradation of the solid-state drive under test based on the first and second performance indicators includes: if the second performance indicator of the solid-state drive under test measured after the Mth change of operating parameters is greater than the first performance indicator by a preset proportion, where M = 1, 2, ..., K, then it is determined that the performance of the solid-state drive under test has not degraded.

[0012] Furthermore, determining the performance drop of the solid-state drive under test based on the first and second performance indicators includes: among the K second performance indicators, if the volatility of the second performance indicator corresponding to the same write cache state does not exceed a preset threshold, then it is determined that the performance of the solid-state drive under test has not dropped.

[0013] Furthermore, the first or second performance metric includes bandwidth and / or the number of read / write operations per second and / or latency.

[0014] Another technical solution adopted in this application is to provide a testing device for connecting a solid-state drive under test to test the solid-state drive under test. The testing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above-mentioned solid-state drive testing method.

[0015] Another technical solution adopted in this application is to provide a computer-readable storage medium that stores a computer program, which, when executed by a processor, implements the steps of the above-described solid-state drive testing method.

[0016] The beneficial effects of this application are as follows: Unlike existing technologies, the solid-state drive (SSD) testing method provided in this application includes: performing performance testing on the SSD under test to obtain a first performance index; changing the operating parameters of the SSD under test and performing performance testing on the SSD after the parameter change to obtain a second performance index; and determining the performance degradation of the SSD under test based on the first and second performance indices. This application's solution changes the operating parameters of the SSD and tests the performance of the SSD after the parameter change to obtain the performance changes, thereby enabling the testing of SSD performance in multiple real-world scenarios and providing a comprehensive assessment of SSD performance. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0018] Figure 1 This is a flowchart illustrating the first embodiment of the solid-state drive testing method provided in this application;

[0019] Figure 2 This is a flowchart illustrating the second embodiment of the solid-state drive testing method provided in this application;

[0020] Figure 3 This is a flowchart illustrating the third embodiment of the solid-state drive testing method provided in this application;

[0021] Figure 4 This is a flowchart illustrating the fourth embodiment of the solid-state drive testing method provided in this application;

[0022] Figure 5 This is a schematic diagram of the structure of an embodiment of the testing device provided in this application;

[0023] Figure 6 This is a schematic diagram of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are only for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts related to this application are shown in the accompanying drawings, not all structures. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] The performance of a solid-state drive (SSD) is determined by parameters such as IOPS (Input / Output Operations Per Second) and BW (Bandwidth). Higher IOPS and BW values ​​generally indicate higher SSD performance. Currently, SSD performance is typically tested using FIO under a Linux system. After obtaining the performance data, it needs to be manually copied to a Linux or other operating system, and then manually compiled into charts for analysis. Therefore, obtaining SSD performance data under Linux requires significant manual time for data processing and analysis, resulting in low testing efficiency.

[0027] Based on this, the inventors of this application provide a testing method for solid-state drives (SSDs), which can automatically test SSDs and improve testing efficiency.

[0028] Furthermore, the solid-state drive (SSD) testing method provided in this application changes the SSD's operating parameters and thus its operating state. After changing the SSD's operating state, performance tests are performed, and the changes in SSD performance are analyzed. Therefore, the SSD testing method provided in this application can comprehensively evaluate SSD performance by combining multiple real-world working scenarios.

[0029] See Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the solid-state drive testing method provided in this application. Figure 1 As shown, the method includes the following steps:

[0030] S101: Set up the test environment.

[0031] In this embodiment, various solid-state drives (SSDs) can be tested, such as SATA SSDs and NMVe SSDs. After identifying the type of SSD to be tested, a Linux system and host that match the SSD are selected to perform performance testing on the SSD using that Linux system and host.

[0032] In this embodiment, a runtime environment is set up and test scripts are written for each test case. Specifically, to effectively test the performance of the solid-state drive under test (SSD), multiple test cases can be pre-configured, each testing a specific performance aspect of the SSD. Before testing the SSD, the SSD is installed on the server, and then tested separately using multiple test cases. Each test process yields a test result, which reflects the performance of the SSD.

[0033] Specifically, each test case can correspond to a test script. In this embodiment, the runtime environment can be built based on the fio tool, which tests IOPS, read latency, or bandwidth of the SSD under the Linux system. Each test task in the fio tool is independent. The SSD under test has multiple performance characteristics that collectively affect its overall performance. For example, the bandwidth of the SSD under test refers to the data transfer capacity provided by the bus used for data transmission. The IOPS of the SSD under test refers to the number of accesses from the host per second that the SSD under test can accept, used to measure the performance of random access. The read latency of the SSD under test is the delay in the host retrieving data that has been written to the SSD and returning it to the host or cache. The SSD under test also includes other performance characteristics, which will not be described in detail here.

[0034] In this embodiment, the solid-state drive under test can be preprocessed before testing. Specifically, it is determined whether the solid-state drive under test has been mounted. If it has been mounted, an unmounting operation is performed. After unmounting, it is formatted and mounted to a specified directory.

[0035] S102: Perform performance testing on the solid-state drive under test to obtain the first performance index of the solid-state drive under test.

[0036] In this embodiment, the IOPS performance, read latency performance, or bandwidth performance of the solid-state drive under test can be tested. The user can specify the performance test type according to their needs. Optionally, before executing step S103, it can be determined whether the performance test is successful. If successful, step S103 is executed; if it fails, an error log is written and the test is exited.

[0037] S103: Change the operating parameters of the solid-state drive under test, and perform performance tests on the solid-state drive under test after the operating parameters are changed to obtain the second performance index of the solid-state drive under test after the operating parameters are changed.

[0038] In this embodiment, changing the operating parameters of the solid-state drive under test is equivalent to creating multiple working scenarios for the solid-state drive under test. In these working scenarios, the performance of the solid-state drive under test may change, thereby comprehensively examining the performance of the solid-state drive under test from multiple working scenarios.

[0039] In this embodiment, changing the operating parameters of the solid-state drive under test is equivalent to changing the state of the solid-state drive under test, such as a full disk state.

[0040] S104: Determine the performance drop of the solid-state drive under test based on the first performance index and the second performance index.

[0041] In summary, the solid-state drive (SSD) testing method provided in this embodiment includes performing performance tests on the SSD under test to obtain a first performance index. The operating parameters of the SSD under test are changed, and performance tests are performed on the SSD after the change to obtain a second performance index. The performance degradation of the SSD under test is determined based on the first and second performance indices. This application's solution changes the operating parameters of the SSD and tests its performance after the change, obtaining the performance changes of the SSD. This allows for comprehensive evaluation of the SSD's performance by combining multiple real-world working scenarios for testing.

[0042] See Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the solid-state drive testing method provided in this application. Figure 2 As shown, the method includes the following steps:

[0043] S201: Set up the test environment.

[0044] S202: When the solid-state drive under test is in a bare disk state, a performance test is performed on the solid-state drive under test to obtain the first performance index of the solid-state drive under test.

[0045] In this embodiment, the bare disk state refers to the state in which the solid-state drive under test does not store any data, and can also be called the empty disk state.

[0046] S203: Perform K write / delete operations on the solid-state drive under test, where K = 1, 2, ...

[0047] As the K value changes, different numbers of write / delete operations are performed on the solid-state drive under test. For example, when K=5, 5 write / delete operations are performed on the solid-state drive under test, which will not be described in detail here.

[0048] Write / delete operations include writing data to the entire capacity of the SSD under test to make it change from a bare disk state to a full disk state, and deleting all data on the SSD under test to make it change from a full disk state to a bare disk state.

[0049] In this embodiment, the full disk state is the opposite of the bare disk state, indicating the state of the solid-state drive under test being filled with data.

[0050] Specifically, after performing a full-disk random write, some SSDs may experience a loss of full-disk dynamic SLC cache. Deleting file data and then testing performance may trigger background GC and TRIM operations in the firmware. Continuous data writing may trigger SLC cache data migration. For small-capacity dynamic SLC caches with a fixed number of write / delete operations, the dynamic SLC cache may become invalid after reaching that number. In general, the performance of some SSDs may degrade after multiple write / delete operations. Therefore, it is necessary to test the performance degradation of the SSD under test after multiple write / delete operations when conducting performance tests.

[0051] In this embodiment, after the Mth write / delete operation, the solid-state drive under test is subjected to the Mth performance test to obtain the second performance index of the solid-state drive under test after the Mth write / delete operation, where M = 1, 2, ..., K.

[0052] Specifically, a performance test is performed after each write / delete operation on the SSD under test; that is, the number of write / delete operations is the same as the number of performance tests. For example, when K=5, meaning 5 write / delete operations are performed on the SSD under test, then a corresponding performance test is performed after each write / delete operation. Each performance test yields a corresponding secondary performance metric, thus resulting in 5 secondary performance metrics.

[0053] It is worth noting that the type of performance test performed in step S203 should be the same as the type of performance test performed in step S202. For example, if the performance test performed in step S202 is a bandwidth performance test, then step S203 will also perform a bandwidth performance test.

[0054] Optionally, during write / delete operations, after filling all the capacity of the SSD under test with data, thus changing it from a bare disk state to a full disk state, the system checks whether the operation was successful. If the operation fails, an error log is written and the test exits. If the operation is successful, all data on the SSD under test is deleted, thus changing it from a full disk state to a bare disk state. Specifically, a preset time period is used to test the SSD under test to determine whether the operation was successful.

[0055] Optionally, after performing the Mth performance test, it is determined whether the Mth performance test was successful. If the performance test fails, the error information is written to the error log and the test is terminated. If the performance test is successful, the performance test result, i.e. the Mth second performance indicator, is saved to the log.

[0056] S204: Determine whether the second performance index of the solid-state drive under test after the Mth change of working parameters is greater than the first performance index of a preset ratio, M = 1, 2, ..., K.

[0057] S205: If the second performance index of the solid-state drive under test after the Mth change of the working parameters is greater than the first performance index of the preset ratio, then it is determined that the performance of the solid-state drive under test has not dropped, M = 1, 2, ..., K.

[0058] For example, when K=10, if after 10 write / delete operations, all 10 secondary performance metrics are greater than 90% of the primary performance metrics, then it is determined that the performance of the SSD under test has not dropped after multiple write / delete operations. Conversely, if any one secondary performance metric is less than 90% of the primary performance metric, then it is determined that the performance of the SSD under test has dropped.

[0059] The solid-state drive (SSD) testing method provided in this embodiment involves repeatedly performing write / delete operations on the SSD under test to change its operating parameters, thereby altering its operating environment. Performance testing is then performed on the SSD under test with the changed operating environment to determine the performance degradation of the SSD under test.

[0060] In another embodiment, see Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the solid-state drive testing method provided in this application. Figure 3 As shown, the method includes the following steps:

[0061] S301: Set up the test environment.

[0062] S302: When the solid-state drive under test is in a bare state, a performance test is performed on the solid-state drive under test to obtain the first performance index of the solid-state drive under test.

[0063] S303: Performs K write operations on the solid-state drive under test, writing a preset amount of data to the solid-state drive under test, K=1, 2, ...

[0064] As the value of K changes, different numbers of write operations are performed on the solid-state drive under test. For example, when K=5, 5 write operations are performed on the solid-state drive under test, which will not be described in detail here.

[0065] Specifically, after the Mth write operation, the solid-state drive under test is subjected to the Mth performance test to obtain the second performance index of the solid-state drive under test after the Mth write operation, where M = 1, 2, ..., K.

[0066] In one specific implementation, K=5, meaning the SSD under test undergoes 5 write operations. A performance test is performed after each write operation, for a total of 5 performance tests. The amount of data written to the SSD under test each time can be the same or different. Each write operation increases the amount of data stored on the SSD under test by the amount of data written in that operation.

[0067] In another specific implementation, K=10. The first nine write operations each write 10% of the SSD's capacity. The last write operation writes data equal to the SSD's capacity minus 2GB. In other words, if 10% of the SSD's capacity is greater than the SSD's capacity minus 2GB, then the tenth write operation will be the SSD's capacity minus 2GB; conversely, if it is less than or equal to the SSD's capacity, then the tenth write operation will be 10% of the SSD's capacity.

[0068] In fact, since the performance of some solid-state drives may change after reserving different amounts of cold data in the solid-state drive under test, this embodiment reserves different amounts of cold data in the solid-state drive under test and then writes data slightly smaller than the capacity of the solid-state drive under test to verify whether the performance of the solid-state drive under test is normal when different amounts of cold data are reserved.

[0069] Optionally, after the Mth test of the solid-state drive under test, it is determined whether the performance test is successful. If the performance test fails, the error information is written to the error log and the test is exited. If the performance test is successful, the performance test result is saved to the log.

[0070] S304: Determine whether the second performance index of the solid-state drive under test after the Mth change of operating parameters is greater than the first performance index of a preset ratio, M = 1, 2, ..., K.

[0071] S305: If the second performance index of the solid-state drive under test after the Mth change of operating parameters is greater than the first performance index of the preset ratio, then it is determined that the performance of the solid-state drive under test has not dropped, M = 1, 2, ..., K.

[0072] For example, when K=10, if after 10 write operations all 10 second performance metrics are greater than 90% of the first performance metric, then it is determined that the performance of the SSD under test has not dropped after multiple write operations. Conversely, if any one of the second performance metrics is less than 90% of the first performance metric, then it is determined that the performance of the SSD under test has dropped.

[0073] The solid-state drive (SSD) testing method provided in this embodiment changes the operating parameters of the SSD by repeatedly performing write operations on it, thereby changing the operating environment of the SSD. It also performs performance testing on the SSD with different amounts of cold data reserved to determine the performance drop of the SSD.

[0074] In another embodiment, see Figure 4 , Figure 4 This is a flowchart illustrating the fourth embodiment of the solid-state drive testing method provided in this application. Figure 4 As shown, the method includes the following steps:

[0075] S401: Set up the test environment.

[0076] S402: Determine whether the solid-state drive under test supports write caching.

[0077] Cache stands for cache memory. It refers to a type of RAM with access speeds faster than regular random access memory (RAM). Generally, it doesn't use DRAM technology like main memory, but rather the more expensive but faster SRAM technology. Cache is a level of memory existing between main memory and the CPU, composed of static RAM chips. It is relatively small in size but much faster than main memory, approaching the speed of the CPU. Cache can significantly improve the speed of CPU accessing main memory. Most CPU operations accessing main memory can be replaced by accessing the cache, greatly mitigating the speed mismatch between the CPU and main memory.

[0078] Cache can significantly improve the processing speed of computer systems.

[0079] Cache memory is typically only a fraction of the size of main memory, but its access speed can match that of the central processing unit (CPU). According to the principle of locality of reference, the memory units adjacent to a currently used main memory unit are highly likely to be used as well. Therefore, when the CPU accesses a main memory unit, the computer hardware automatically loads the entire set of memory units containing that unit into the cache. The main memory unit that the CPU is about to access is likely to be one of the units just loaded into the cache. Thus, the CPU can directly access the cache. If, throughout the entire processing, the vast majority of the CPU's main memory accesses can be replaced by cache accesses, the computer system's processing speed can be significantly improved.

[0080] Write caching refers to whether the solid-state drive (SSD) has a high-speed cache storage function. If it does, it means that write caching is supported. If the SSD under test is determined to not support write caching, an indicator indicating that write caching is not supported will be output, the test will stop, and the test will exit.

[0081] S403: If yes, then obtain the initial write cache state of the solid-state drive under test.

[0082] Solid-state drives (SSDs) have two write cache states: on or off. Research shows that frequent changes to the write cache state can affect SSD performance. Users may need to change the write cache state multiple times during actual SSD use, so if an SSD experiences a significant performance drop after multiple write cache state changes, it indicates that the SSD is unqualified.

[0083] In this embodiment, the initial write cache state of the solid-state drive can be either on or off.

[0084] S404: When the SSD under test is in the initial write cache state, a performance test is performed on the SSD under test to obtain the first performance index of the SSD under test.

[0085] S405: Alternately change the write cache state of the solid-state drive under test K times, K=1, 2, ...

[0086] As the value of K changes, the number of times the write cache state of the SSD under test is changed varies. For example, when K=5, it means that the write cache state of the SSD under test is changed 5 times, which will not be described in detail here.

[0087] In this process, after the Mth change of the write cache state of the solid-state drive under test, the solid-state drive under test is subjected to the Mth performance test to obtain the second performance index of the solid-state drive under test after the Mth change of the write cache state, where M = 1, 2, ..., K.

[0088] Among them, the write cache state obtained after the first change of the write cache state of the solid-state drive under test is the opposite of the initial write cache state.

[0089] For example, when K=5 and the initial write cache state of the SSD under test is enabled, the first change to the write cache state of the SSD under test is as follows: change the write cache state from enabled to disabled; the second change is from disabled to enabled; the third change is from enabled to disabled; the fourth change is from disabled to enabled; and the fifth change is from enabled to disabled. After each change to the write cache state of the SSD under test, a corresponding performance test is performed, resulting in five secondary performance metrics.

[0090] Optionally, after the Mth test of the solid-state drive under test, it is determined whether the performance test is successful. If the performance test fails, the error information is written to the error log and the test is exited. If the performance test is successful, the performance test result is saved to the log.

[0091] S406: Determine whether the second performance index of the solid-state drive under test after the Mth change of operating parameters is greater than the first performance index of a preset ratio, M = 1, 2, ..., K.

[0092] S407: If the second performance index of the solid-state drive under test after the Mth change of operating parameters is greater than the first performance index of the preset ratio, then it is determined that the performance of the solid-state drive under test has not dropped, M = 1, 2, ..., K.

[0093] For example, when K=5 and the initial write cache state of the SSD under test is enabled, if after the first to fifth changes to the write cache state of the SSD under test, all five second performance indicators obtained from the corresponding performance tests are greater than 90% of the first performance indicators obtained from the performance tests when the initial write cache state is enabled, then it is determined that the performance of the SSD under test has not dropped.

[0094] In another implementation, if the volatility of the second performance indicator corresponding to the same write cache state does not exceed a preset threshold among the K second performance indicators, it is determined that the performance of the solid-state drive under test has not dropped.

[0095] Specifically, among the K second performance metrics, all second performance metrics with write cache enabled and all second performance metrics with write cache disabled are counted. The first volatility of all second performance metrics with write cache enabled is calculated, and the second volatility of all second performance metrics with write cache disabled is calculated. If neither the first volatility nor the second volatility exceeds a preset threshold, then it is determined that the performance of the solid-state drive under test has not dropped.

[0096] The solid-state drive (SSD) testing method provided in this embodiment involves repeatedly alternating the write cache state of the SSD under test when the SSD supports write caching, and then performing functional tests on the SSD under test after changing the write cache state to obtain the performance drop of the SSD under test.

[0097] See Figure 5 , Figure 5 This is a schematic diagram of an embodiment of the testing apparatus provided in this application. The testing apparatus 100 is used to connect a solid-state drive (not shown) to be tested. The testing apparatus 100 may include a memory 110 and a processor 120. The memory 110 stores a computer program, and the processor 120 executes the computer program to implement the steps of the solid-state drive testing method provided in this application. For example, the processor 120 is used to implement the following steps:

[0098] The SSD under test is subjected to performance testing to obtain its first performance metric. The operating parameters of the SSD under test are then changed, and performance testing is performed on the SSD with the changed parameters to obtain its second performance metric. The performance degradation of the SSD under test is determined based on the first and second performance metrics.

[0099] The processor 120 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0100] Memory 110 is used for executable instructions. Memory 110 may include high-speed RAM or non-volatile memory, such as at least one disk storage device. Memory 110 may also be a memory array. Memory 110 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The instructions stored in memory 110 can be executed by processor 120 to enable processor 120 to perform the solid-state drive testing method in any of the above method embodiments.

[0101] See Figure 6, Figure 6 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium provided in this application. Figure 6 As shown, the computer-readable storage medium 200 stores a computer program 201, which, when executed by a processor, implements the steps of the solid-state drive testing method provided in this application. For example, when the computer program 201 is executed by a processor, it implements the following steps:

[0102] The SSD under test is subjected to performance testing to obtain its first performance metric. The operating parameters of the SSD under test are then changed, and performance testing is performed on the SSD with the changed parameters to obtain its second performance metric. The performance degradation of the SSD under test is determined based on the first and second performance metrics.

[0103] The computer-readable storage medium 200 can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical storage (e.g., CD, DVD, BD, HVD), and semiconductor storage (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0104] In summary, the solid-state drive (SSD) testing method provided in this embodiment includes performing performance tests on the SSD under test to obtain a first performance index. The operating parameters of the SSD under test are changed, and performance tests are performed on the SSD after the change to obtain a second performance index. The performance degradation of the SSD under test is determined based on the first and second performance indices. This application's solution changes the operating parameters of the SSD and tests its performance after the change, obtaining the performance changes of the SSD. This allows for comprehensive evaluation of the SSD's performance by combining multiple real-world working scenarios for testing.

[0105] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules or units described above is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0106] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0107] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0108] If the integrated units in the other embodiments described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0109] The above are merely embodiments of this application and do not limit the scope of this patent application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A testing method for a solid-state drive, characterized in that, The method includes: Determine whether the solid-state drive under test supports write caching. If so, obtain the initial write cache state of the solid-state drive under test; When the solid-state drive under test is in the initial write cache state, a performance test is performed on the solid-state drive under test to obtain the first performance index of the solid-state drive under test. The write cache state of the solid-state drive under test is alternately changed K times, where K=1, 2, ...; Wherein, after the Mth change of the write cache state of the solid-state drive under test, the solid-state drive under test is subjected to the Mth performance test to obtain the second performance index of the solid-state drive under test after the Mth change of the write cache state, M=1,2,...,K; wherein, the write cache state obtained after the first change of the write cache state of the solid-state drive under test is the opposite of the initial write cache state. If the volatility of the second performance indicator corresponding to the same write cache state does not exceed a preset threshold among the K second performance indicators, then it is determined that the performance of the solid-state drive under test has not dropped.

2. The method according to claim 1, characterized in that, If, among the K second performance metrics, the volatility of the second performance metric corresponding to the same write cache state does not exceed a preset threshold, then it is determined that the performance of the solid-state drive under test has not dropped, including: Among the K second performance metrics, identify all second performance metrics whose write cache state is enabled, and all second performance metrics whose write cache state is disabled. Calculate the first volatility of all second performance metrics when the write cache is enabled, and calculate the second volatility of all second performance metrics when the write cache is disabled. If neither the first volatility nor the second volatility exceeds a preset threshold, then it is determined that the performance of the solid-state drive under test has not dropped.

3. The method according to any one of claims 1-2, characterized in that, The first performance metric or the second performance metric includes bandwidth and / or the number of read / write operations per second and / or latency.

4. A testing device, characterized in that, The testing apparatus is used to connect to the solid-state drive under test for testing. The testing apparatus includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 3.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method and device for testing state solid disk (SSD)

    CN102411993A