Test method, test equipment and computer readable storage medium

By simulating real-world scenarios through multiple rounds of copy tests, the average write speed of the SSD is calculated, solving the problem of difficulty in testing the efficiency of garbage collection strategies in existing technologies and achieving accurate performance optimization.

CN120932719APending Publication Date: 2025-11-11SHENZHEN SHICHUANGYI ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510913523.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately test the efficiency of SSD garbage collection strategies, leading to a decline in SSD performance, especially when the garbage collection area is full, resulting in limited write speeds.

Method used

Through multiple rounds of copy tests, the system simulates continuous writing in real-world scenarios, calculates the average write speed, and analyzes the efficiency of the garbage collection strategy. This process includes generating test files, copying them to storage devices, calculating write speeds, repeating the copy process and calculating the average, clearing the files, and repeating the test until X rounds have elapsed before analyzing the garbage collection strategy.

Benefits of technology

The test results accurately reflect real-world usage and allow for adjustments to garbage collection strategies based on these results, thereby improving SSD performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120932719A_ABST
    Figure CN120932719A_ABST
Patent Text Reader

Abstract

The invention discloses a test method, test equipment and a computer readable storage medium, and relates to the technical field of storage. The test method comprises the following steps: generating a test file; copying the test file to a storage device; calculating a write-in speed when the test file is copied to the storage device; repeatedly copying the test file to the storage device, and calculating the writing speed of repeatedly copying the test file to the storage device; taking a preset number of repeated copy test files as a round of copy test, and calculating the average value of the write-in speed of the round of copy test; the test file in the storage device is emptied, and a new round of copy test is started; after the X rounds of copy tests, obtaining average value data of the writing speed of the X rounds of copy tests, and analyzing the recovery efficiency of the garbage recovery strategy of the storage device according to the average value data obtained by the X rounds of copy tests; according to the test method, multi-round continuous writing in a real scene is simulated through multi-round copy test, so that the test is close to a real use condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of storage technology, and in particular to a test method, test equipment, and computer-readable storage medium. Background Technology

[0002] SSD (Solid State Disk) garbage collection refers to the process where the system reserves a portion of space to handle and manage residual and deleted data while storing data. Due to the special working principle of SSDs, when data is marked for deletion, it is not immediately removed from the storage medium, but rather transferred to a specific garbage collection area. This mechanism aims to reduce the cost of writing data and improve the efficiency of reading data.

[0003] However, the garbage collection process can also lead to a decrease in SSD performance. When the garbage collection area is full, the write speed of the SSD will be limited. Therefore, testing the stability and speed of the garbage collection strategy is crucial for maintaining the performance of the SSD. Thus, there is an urgent need for a testing method that can accurately test the garbage collection efficiency of the strategy. Summary of the Invention

[0004] The purpose of this application is to provide a testing method, testing equipment, and computer-readable storage medium that simulates multiple rounds of continuous writing in real-world scenarios through multiple rounds of copy testing, making the test close to real-world usage and ensuring accurate test results.

[0005] This application discloses a testing method for testing storage devices, including the following steps:

[0006] Generate test files;

[0007] Copy the test file to the storage device;

[0008] Calculate the write speed when copying the test file to the storage device;

[0009] Repeatedly copy the test file to the storage device and calculate the write speed of repeatedly copying the test file to the storage device;

[0010] The test file is copied repeatedly a preset number of times as one round of copy test, and the average write speed of one round of copy test is calculated.

[0011] Clear the test files from the storage device and begin a new round of copying tests;

[0012] Among them, after X rounds of copy tests, the average write speed of X rounds of copy tests is obtained, and the garbage collection efficiency of the storage device is analyzed based on the average data obtained from X rounds of copy tests.

[0013] Where X is a positive integer.

[0014] Optionally, the preset number of times is A.

[0015] In this case, after copying the test file to the storage device A times, the storage device was nearly full.

[0016] Optionally, the test file is a random data test file, and the test files in multiple rounds of copying tests are of the same size.

[0017] Optionally, in the X-round copy test, the test files in the A repeated copies are of the same size but different in data;

[0018] In the X-round copy test, the test files were all the same size.

[0019] Optionally, the data size of the test file is greater than or equal to 1GB.

[0020] Optionally, the lifespan of the storage device's particles is Y times of erase / write cycles, where X is greater than or equal to 5% * Y.

[0021] Optionally, X is greater than or equal to 100 and less than 200.

[0022] Optionally, the step of analyzing the garbage collection efficiency of the storage device's garbage collection strategy based on the average data obtained from X rounds of copy tests includes:

[0023] The recycling efficiency of the storage device's garbage collection strategy is analyzed based on preset rules.

[0024] The preset rules include:

[0025] If the average write speed of the X-round copy test decreases linearly, it is necessary to check the load pressure or device malfunction.

[0026] If the average write speed of X rounds of copy tests shows a rapid decline followed by a plateau, then there is a slight resource contention.

[0027] If the average write speed of the X-round copy test does not show a linear decrease, then it is normal.

[0028] This application also discloses a testing device, including:

[0029] Memory, used to store computer programs;

[0030] A processor for executing the computer program to implement the steps of a test method as described above.

[0031] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a test method as described above.

[0032] The testing method in this application simulates multiple rounds of continuous writing in real-world scenarios through continuous multi-round copy tests. The test results closely resemble real-world usage, thus ensuring that the changes in the average write speed data from multiple rounds of copy tests accurately reflect the changes in actual application scenarios. This results in accurate test information, allowing testers to make judgments and adjust the garbage collection strategy of the storage device based on these results. Attached Figure Description

[0033] The accompanying drawings, which form part of the specification, are used to provide a further understanding of the embodiments of this application and illustrate the implementation methods of this application, together with the textual description, to explain the principles of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any creative effort. In the drawings:

[0034] Figure 1 This is a flowchart of the steps of a testing method according to the first embodiment of this application;

[0035] Figure 2 This is a schematic diagram showing that the average write speed of an X-round copy test does not show a linear decay, which is a test result of a test method according to the second embodiment of this application.

[0036] Figure 3 This is a schematic diagram showing the results of a test method according to the second embodiment of this application, where the average write speed of X rounds of copy test shows a rapid decline followed by a plateau period.

[0037] Figure 4 This is a schematic diagram of the structure of a test device according to the third embodiment of this application.

[0038] Among them, 100 is the test equipment; 200 is the memory; and 300 is the processor. Detailed Implementation

[0039] It should be understood that the terminology, specific structural and functional details used herein are merely for describing particular embodiments and are representative. However, this application may be implemented in many alternative forms and should not be construed as being limited to the embodiments set forth herein.

[0040] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating relative importance or implying the number of technical features indicated. Therefore, unless otherwise stated, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; "multiple" means two or more. The term "comprising" and any variations thereof mean non-exclusive inclusion, where one or more other features, integers, steps, operations, units, components, and / or combinations thereof may be present or added.

[0041] In addition, terms such as “center,” “horizontal,” “up,” “down,” “left,” “right,” “vertical,” “horizontal,” “top,” “bottom,” “inner,” and “outer” that indicate orientation or positional relationship are based on the orientation or relative positional relationship shown in the accompanying drawings. They are only for the purpose of simplifying the description of this application and do not indicate that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0042] Furthermore, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0043] The present application will now be described in detail with reference to the accompanying drawings and optional embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.

[0044] Traditional SSD garbage collection efficiency tests typically use fixed write volumes or single pressure models (such as sequential writes), which cannot reflect the dynamic pressure of multiple rounds of high-intensity continuous writes on the garbage collection strategy in real-world scenarios. Based on this, the inventors of this application have designed a new testing method, the details of which are as follows.

[0045] like Figure 1 As shown, as a first embodiment of this application, a testing method is disclosed. This testing method is used to test the recycling efficiency of a storage device's garbage collection strategy. The testing method includes the following steps:

[0046] Generate test files;

[0047] Specifically, the test files can be generated by the host computer;

[0048] Copy the test file to the storage device;

[0049] Specifically, the test files can be copied from the host computer to the storage device;

[0050] Calculate the write speed when copying the test file to the storage device;

[0051] Specifically, based on the size of the test file and the time spent copying the test file, the write speed when copying the test file to the storage device is calculated;

[0052] Repeatedly copy the test file to the storage device and calculate the write speed of repeatedly copying the test file to the storage device;

[0053] The test file is copied repeatedly a preset number of times as one round of copy test, and the average write speed of one round of copy test is calculated.

[0054] Specifically, a round of copy test includes a preset number of repeated copy test files. During each repeated copy test, the write speed of copying the test file to the storage device is calculated. The average write speed of a round of copy test is then calculated as data to analyze the recycling efficiency of the storage device's garbage collection strategy.

[0055] Clear the test files from the storage device and begin a new round of copying tests;

[0056] The average write speed of the X rounds of copy tests is obtained. The garbage collection efficiency of the storage device is analyzed based on the average data obtained from the X rounds of copy tests, where X is a positive integer.

[0057] The testing method in this embodiment generates a test file, repeatedly copies the test file to the storage device, and calculates the write speed of the repeated copying of the test file to the storage device to obtain the average write speed of one round of copying tests. This is repeated multiple times to obtain the average write speed data across multiple rounds of copying tests. By analyzing the changes in the average write speed data across multiple rounds of copying tests, the efficiency of the storage device's garbage collection strategy can be analyzed, serving as an indicator for subsequent optimization of storage device performance. In summary, the testing method in this embodiment simulates multiple rounds of continuous writing in a real-world scenario through continuous copying tests. The test results closely approximate real-world usage, ensuring that the analysis of changes in the average write speed data across multiple rounds of copying tests accurately reflects changes in actual application scenarios. Furthermore, the test results are accurate, allowing testers to make judgments and adjust the storage device's garbage collection strategy based on these results.

[0058] In this embodiment, the preset number of times can be greater than or equal to two. Taking two preset times as an example, two consecutive repeated copy test files are considered as one round of copy test. That is, in one round of copy test, two write speeds can be obtained, and the two write speeds can be judged and compared to analyze whether there are other influencing factors on the write performance of the storage device.

[0059] As a second embodiment of this application, and a further improvement of the first embodiment of this application, a testing method is disclosed, wherein the preset number of times in the testing method is A times, and after repeatedly copying the test file to the storage device A times, the storage device is close to full capacity.

[0060] The testing method in this embodiment uses A consecutive copying tests of the test file as one round of copying tests. After A consecutive copying tests, the storage device is close to full capacity. This allows the testing method in this embodiment to simulate multiple rounds of high-intensity continuous writing to the storage device in a real-world scenario. Since the test file is close to full capacity, the storage device will not have much remaining space, ensuring that the storage device can perform garbage collection. Therefore, by analyzing the changes in the average write speed data of multiple rounds of copying tests, the garbage collection efficiency of the storage device can be accurately analyzed.

[0061] In this embodiment, the test file is a random data test file, and the data size of the test files in multiple rounds of copy tests is the same. The test method in this embodiment uses different random data test files for copy tests, which is more in line with the actual use of storage devices, and the test results are more reliable. Although the test files have different data, the data size is the same. Test files with the same data size can exert the same pressure on the storage device's chips during the copy test, avoiding the influence of other factors on the test results. In particular, the test files copied A times in X rounds of copy tests have the same data size, but the data is different. The data size of the test files in X rounds of copy tests is the same.

[0062] Furthermore, a crucial factor influencing test results is the choice of test file size. If the test file size is too small, multiple tests may reduce the load on the storage device's memory chips; if the test file size is too large, the speed measurement may be inaccurate. Therefore, selecting a test file of appropriate size is essential. In this embodiment, the test file size is greater than or equal to 1GB, with speed calculated every 1GB. This is equivalent to writing to a full 128GB SSD, measuring the write speed 128 times, and then averaging the results to obtain a more accurate speed. It should be noted that the 128GB SSD here is merely an example and does not represent the actual size of the storage device. The test file size is not limited to 1GB; designers can choose the test file size based on the actual storage device requirements. No restrictions are imposed here.

[0063] In the testing method of this embodiment, the average write speed is obtained through X rounds of copy testing. The garbage collection efficiency of the storage device is analyzed based on the average data. Here, X is set according to the lifespan of the storage device's memory chips. Currently, the lifespan of storage device memory chips is approximately 3000 write cycles. If the storage device is overwritten, its chip lifespan will decrease. The trend of write speed changes obtained in subsequent tests cannot be analyzed as being caused by the decrease in the lifespan of the storage device's memory chips or by a problem with the garbage collection strategy. Therefore, in this embodiment, the lifespan of the storage device's memory chips is Y write cycles, and X is greater than or equal to 3%*Y and less than 6%*Y. This way, the amount of test data obtained is appropriate, and the write speed obtained from the test will not be affected by other factors due to the decrease in the lifespan of the storage device's memory chips caused by a large number of tests, thus affecting the judgment and analysis of the garbage collection efficiency of the storage device's garbage collection strategy. Wherein, Y is 3000, and X is greater than or equal to 100 and less than 200.

[0064] Furthermore, the step of analyzing the garbage collection efficiency of the storage device's garbage collection strategy based on the average data obtained from X rounds of copy tests includes:

[0065] The recycling efficiency of the storage device's garbage collection strategy is analyzed based on preset rules.

[0066] The preset rules include:

[0067] If the average write speed of the X-round copy test decreases linearly, it is necessary to check the load pressure or device malfunction.

[0068] If the average write speed of the X-round copy test shows a rapid decline followed by a plateau, it indicates that the garbage collection strategy is responding promptly, but there is a slight resource contention.

[0069] If the average write speed of the X-round copy test does not show a linear decay, it is normal, indicating that the garbage collection strategy is highly efficient and has excellent real-time resource recovery.

[0070] In the testing method of this embodiment, the average write speed of X rounds of copy tests is obtained. This average write speed is then used to create a statistical chart. The garbage collection efficiency of the storage device is analyzed according to preset rules. When the statistical chart shows a linear decline, it indicates that the garbage collection efficiency of the storage device is low, and the load pressure (whether write resources are blocked by other processes) or whether the storage device is malfunctioning (slow write speed due to hardware damage or other reasons during data transmission) needs to be checked. When the statistical chart shows a rapid decline followed by a plateau, such as... Figure 3 As shown, this indicates that the garbage collection strategy responds promptly, but there is slight resource contention. In this case, the garbage collection strategy can be adjusted according to needs to minimize write resource consumption, or no adjustment can be made. When the statistical chart does not show a linear decay, such as... Figure 2 As shown, this demonstrates that the garbage collection strategy has extremely high efficiency and excellent real-time resource recovery capabilities. In summary, the testing method in this embodiment simulates multiple rounds of high-intensity continuous writing to the storage device in a real-world scenario through multi-round copy tests. The average write speed obtained from the tests is used to analyze the garbage collection efficiency of the storage device's garbage collection strategy. Furthermore, the garbage collection strategy of the storage device can be judged and analyzed according to preset rules, thereby determining the performance of the storage device.

[0071] like Figure 4 As shown, as a third embodiment of this application, a testing device 100 is disclosed, the testing device 100 comprising:

[0072] Memory 200 is used to store computer programs;

[0073] The processor 300 is used to implement the steps of a test method as disclosed above when executing a computer program.

[0074] The testing device 100 provided in this embodiment of the invention has the beneficial effects of the aforementioned testing method.

[0075] Accordingly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of a test method as disclosed above.

[0076] The computer-readable storage medium provided in this embodiment of the invention has the beneficial effects of the aforementioned test method.

[0077] It should be noted that the limitations on each step involved in this solution are not considered as limiting the order of steps, provided that they do not affect the implementation of the specific solution. The steps listed first can be executed first, later, or even simultaneously. As long as this solution can be implemented, it should be considered to fall within the scope of protection of this application.

[0078] It should be noted that the inventive concept of this application can form many embodiments, but due to the limited space of the application documents, they cannot all be listed. Therefore, without conflict, the embodiments described above or the technical features can be arbitrarily combined to form new embodiments. After the embodiments or technical features are combined, the original technical effect will be enhanced.

[0079] The above description, in conjunction with specific optional embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications or substitutions should be considered within the scope of protection of this application.

Claims

1. A testing method for testing storage devices, characterized in that, Including the following steps: Generate test files; Copy the test file to the storage device; Calculate the write speed when copying the test file to the storage device; Repeatedly copy the test file to the storage device and calculate the write speed of repeatedly copying the test file to the storage device; The test file is copied repeatedly a preset number of times as one round of copy test, and the average write speed of one round of copy test is calculated. Clear the test files from the storage device and begin a new round of copying tests; Among them, after X rounds of copy tests, the average write speed of X rounds of copy tests is obtained, and the garbage collection efficiency of the storage device is analyzed based on the average data obtained from X rounds of copy tests. Where X is a positive integer.

2. The test method according to claim 1, characterized in that, The preset number of times is A. In this case, after copying the test file to the storage device A times, the storage device was nearly full.

3. The test method according to claim 1, characterized in that, The test file is a random data test file, and the data size of the test file is the same in multiple rounds of copying tests.

4. The test method according to claim 2, characterized in that, In the X-round copy test, the test file data size is the same in A repeated copies, but the data is different; In the X-round copy test, the data size of the test files is the same.

5. The test method according to claim 1, characterized in that, The test file contains at least 1 GB of data.

6. The test method according to claim 1, characterized in that, The lifespan of the storage device's particles is Y times of erase / write cycles, where X is greater than or equal to 5% * Y.

7. The test method according to claim 6, characterized in that, X is greater than or equal to 100 and less than 200.

8. The test method according to claim 1, characterized in that, The steps for analyzing the garbage collection efficiency of the storage device based on the average data obtained from X rounds of copy tests include: The recycling efficiency of the storage device's garbage collection strategy is analyzed based on preset rules. The preset rules include: If the average write speed of the X-round copy test decreases linearly, it is necessary to check the load pressure or device malfunction. If the average write speed of X rounds of copy tests shows a rapid decline followed by a plateau, then there is a slight resource contention. If the average write speed of the X-round copy test does not show a linear decrease, then it is normal.

9. A testing device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of a test method as described in any one of claims 1 to 8.

10. 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 a test method as described in any one of claims 1 to 8.