Test method of storage device, electronic device and storage medium
By dividing storage devices into capacity and adjusting latency, the write volume is dynamically controlled, solving the problem that existing technologies cannot fully simulate complex usage scenarios and accurately control the write volume, thus enabling a more accurate assessment of the durability and performance of storage devices.
Patent Information
- Application Number
- CN202410436900.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2025-10-21
AI Technical Summary
Existing durability testing methods for storage devices cannot fully simulate the complex scenarios in real-world use, cannot reflect the impact of different types of data loads on performance and lifespan, and lack precise control over write volume, leading to excessive wear and performance impact.
By dividing the capacity of the storage device into several storage units and adjusting the write operation time according to the latency, the amount of writing per unit time is dynamically controlled to simulate real-world application scenarios.
It enables a more comprehensive and accurate assessment of the durability and performance of storage devices under complex usage scenarios, avoids excessive wear and tear, and improves the flexibility and accuracy of testing.
Smart Images

Figure CN120823871A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of storage device testing, and in particular to a storage device testing method, an electronic device, and a storage medium. Background Art
[0002] Storage devices (such as solid-state drives) are widely used in data centers, enterprise applications, and personal computers. Based on this, as technology develops, the ability to maintain performance and reliability during long-term use of storage devices is a condition for evaluating the durability of storage devices.
[0003] However, durability tests in related technologies usually have the following problems: based on a simple continuous write mode, it cannot fully simulate the complex usage scenarios in actual use; it cannot reflect the actual impact of different types of data loads on the performance and life of storage devices; the test process usually does not consider the dynamic changes in data writing and cannot adapt to changing application requirements and usage patterns; there is a lack of precise control over the write volume, which may lead to excessive wear and performance impact on the storage device.
[0004] With the development of storage devices and the diversification of application scenarios, more optimal testing methods are needed to evaluate the durability of storage devices under various workloads, which need to be able to simulate the complex usage conditions in actual applications. Summary of the Invention
[0005] The present application provides a testing method, electronic device and storage medium for a storage device. The method divides the capacity of the storage device into several storage units, and then adjusts the time for performing write operations on the fixed-capacity storage units according to the delay time, thereby realizing dynamic adjustment of the write amount per unit time of the write operation and realizing simulation of actual application scenarios.
[0006] In order to solve the above technical problems, the present application provides, on the one hand, a testing method for a storage device, comprising: determining, according to test requirements, several storage units with fixed capacity from the storage device to be tested; performing a write operation on the current storage unit in combination with the current delay time, and determining the next delay time corresponding to the current storage unit; adjusting the time for the next storage unit to perform the write operation based on the next delay time, until the write operation on all storage units is completed within the test time of the test requirements.
[0007] In some embodiments, performing a write operation on the current storage unit in combination with the current delay time includes: performing a write operation on the current storage unit in response to reaching an end point of the current delay time.
[0008] In some embodiments, determining a next delay time corresponding to the current storage unit includes: determining the next delay time corresponding to the current storage unit using a delay algorithm.
[0009] In some embodiments, a delay algorithm is used to determine the next delay time corresponding to the current storage unit, including: determining the test parameters corresponding to when performing a write operation on the current storage unit; wherein the test parameters include at least the power-on time, the amount of data written by the write operation, the execution time of the write operation, the target data writing amount and the test time; based on the test parameters, the next delay time corresponding to the current storage unit is calculated.
[0010] In some embodiments, based on the test parameters, the next delay time corresponding to the current storage unit is calculated, including: summing the power-on time and the execution time of the write operation to obtain first data; performing a difference operation on the test time and the first data to obtain second data; determining the remaining write amount that has not yet been written from the target data write amount, dividing the remaining write amount by the amount of data written by the write operation to obtain third data; dividing the second data by the third data to obtain the next delay time corresponding to the current storage unit.
[0011] In some embodiments, adjusting the time for the next storage unit to perform a write operation based on the next delay time includes: determining whether the total data write amount of the storage unit that has performed the write operation exceeds the target data write amount corresponding to the test requirement; if not, adjusting the time for the next storage unit to perform the write operation based on the next delay time.
[0012] In some embodiments, the test requirements include at least a target data write amount; according to the test requirements, a number of fixed-capacity storage units are determined from the storage device to be tested, including: determining the number of storage devices to be tested based on the target data write amount; and dividing the capacity of each storage device to be tested into equal amounts to obtain a number of fixed-capacity storage units.
[0013] In some embodiments, the method further includes: monitoring a power-on time of the memory device to be tested; and stopping a write operation to the memory unit in response to the power-on time being greater than or equal to the test time.
[0014] In order to solve the above technical problems, the present application provides an electronic device on the other hand, including a storage device and a processor, the storage device is used to store a computer program, and the processor is used to execute the computer program to implement the above-mentioned storage device testing method.
[0015] In order to solve the above technical problems, the present application provides, on the other hand, a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the above-mentioned storage device testing method.
[0016] The storage device testing method provided in some embodiments of the present application determines, in accordance with test requirements, several fixed-capacity storage units from the storage device to be tested; performs a write operation on the current storage unit in combination with the current delay time, and determines the next delay time corresponding to the current storage unit; and adjusts the time when the next storage unit performs the write operation based on the next delay time until the write operation on all storage units is completed within the test time required by the test. The above-mentioned testing method divides the capacity of the storage device into several storage units, and then adjusts the time when the write operation is performed on the fixed-capacity storage unit based on the delay time, thereby achieving dynamic adjustment of the write amount per unit time of the write operation, thereby simulating actual application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:
[0018] Figure 1 is a flowchart of a method for testing a storage device in some embodiments of the present application;
[0019] Figure 2 is a flowchart of determining the delay time using a delay algorithm in step 12 in some embodiments of the present application;
[0020] Figure 3 is a flow chart of calculating the delay time based on parameters in step 22 in some embodiments of the present application;
[0021] Figure 4 1 is a schematic diagram of a monitoring process for power-on time in some embodiments of the present application;
[0022] Figure 5 is a schematic diagram of a monitoring process for the amount of written data in some embodiments of the present application;
[0023] Figure 6 is a schematic diagram of a test process of a disk in some embodiments of the present application;
[0024] Figure 7 is a schematic structural diagram of an electronic device in some embodiments of the present application;
[0025] Figure 8 It is a schematic diagram of the structure of the computer-readable storage medium in some embodiments of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0027] Storage devices (such as solid-state drives) are widely used in data centers, enterprise applications, and personal computers. Based on this, as technology develops, the ability to maintain performance and reliability during long-term use of storage devices is a condition for evaluating the durability of storage devices.
[0028] However, durability tests in related technologies usually have the following problems: based on a simple continuous write mode, it cannot fully simulate the complex usage scenarios in actual use; it cannot reflect the actual impact of different types of data loads on the performance and life of storage devices; the test process usually does not consider the dynamic changes in data writing and cannot adapt to changing application requirements and usage patterns; there is a lack of precise control over the write volume, which may lead to excessive wear and performance impact on the storage device.
[0029] With the development of storage devices and the diversification of application scenarios, more optimal testing methods are needed to evaluate the durability of storage devices under various workloads. These methods need to be able to simulate complex real-world usage scenarios, including different read and write modes, data types, and access frequencies.
[0030] Based on this, the present application provides a testing method for storage devices, which can simulate complex usage scenarios and dynamically control the write volume per unit time. It is more flexible and can evaluate the durability of storage devices more comprehensively and accurately.
[0031] See also Figure 1 , Figure 1 : is a flowchart of a method for testing a storage device in some embodiments of the present application. The testing method includes:
[0032] Step 11: According to the test requirements, a number of storage units with fixed capacity are determined from the storage device to be tested.
[0033] In some embodiments, the test requirements include a target data write volume. In this case, the number of storage devices to be tested can be determined based on the target data write volume, and the capacity of each storage device to be tested can be equally divided to obtain several storage units with fixed capacities.
[0034] For example, the capacity of the storage device to be tested is 512GB (Gigabyte) and the target data write volume is 85TB (Terabyte). At this time, based on the target data write volume, the number of storage devices to be tested required is determined to be 170 (512GB=0.5TB, 85 / 0.5=170). Furthermore, the 512GB capacity of each storage unit to be tested is equally divided to obtain several storage units with fixed capacity.
[0035] In some embodiments, the test requirements include target data write volume and test time. The number of storage devices to be tested can be determined based on the target data write volume, and the capacity of each storage device to be tested can be equally divided according to the test time to obtain several storage units with fixed capacity.
[0036] For example, the capacity of the storage device to be tested is 512GB, the target data write volume is 85TB, and the test time is 100h. At this time, the number of storage devices to be tested can be determined to be 170 based on the target data write volume. Furthermore, based on the test time of 100h, the 512GB capacity of each storage device to be tested is equally divided to obtain several storage units with fixed capacity.
[0037] In some embodiments of the present application, the number of storage units obtained by dividing the capacity of the storage device to be tested may be determined based on actual conditions.
[0038] In one application scenario, the number of storage units obtained by dividing the capacity of the storage device to be tested can be determined according to the model generation method corresponding to the JESD219 (SSD Endurance Workload, solid-state drive endurance workload) model. Specifically, the capacity (such as 256G, 512G, 1T, 2T) and quantity of each storage device to be tested are determined, as well as the capacity of the JESD219 model (such as 218G), and then a large model of a specified capacity (specified capacity = capacity of the storage device to be tested × number of storage devices to be tested) is generated according to the model generation method corresponding to the JESD219 model. This large model is then split according to the write volume to obtain multiple small models, each of which has a fixed capacity value.
[0039] Step 12: Perform a write operation on the current storage unit in combination with the current delay time, and determine the next delay time corresponding to the current storage unit.
[0040] In some embodiments, the following process may be further included before executing step 12: determining whether the total amount of data written to the storage cells that have been written to and before the current storage cell exceeds the target amount of data written corresponding to the test requirement; if not, determining a current delay time based on test data during the write operation of the storage cell preceding the current storage cell. Furthermore, in response to reaching the end point of the current delay time, performing a write operation on the current storage cell.
[0041] For example, the current storage unit is unit 4, and the storage units that have performed write operations before unit 4 include unit 1, unit 2 and unit 3 in sequence. At this time, it can be determined whether the amount of data written by units 1 to 3 performing write operations exceeds the target data writing amount; if not, the delay time corresponding to unit 4 is determined based on the test data during the write operation of unit 3, and then when the end point of the delay time is reached, the write operation on unit 4 is started.
[0042] For another example, the current storage unit is unit 1, and there is no storage unit that has performed a write operation before unit 1. The storage unit to be written after unit 1 is unit 2. At this time, the delay time of unit 2 can be determined based on the test data during the write operation of unit 1, and then when the end point of the delay time is reached, the write operation on unit 2 can be started.
[0043] The delay time corresponding to unit 4 is determined according to the test data during the write operation of unit 3, or the delay time of unit 2 is determined according to the test data during the write operation of unit 1, which can be specifically determined by dynamic delay algorithm.
[0044] In some embodiments, see Figure 2 , Figure 2 FIG. 1 is a flow chart of determining the delay time by using the delay algorithm in step 12. Specifically, determining the next delay time corresponding to the current storage unit by using the delay algorithm includes the following process:
[0045] Step 21: Determine test parameters corresponding to performing a write operation on the current storage unit; wherein the test parameters include at least power-on time, amount of data written by the write operation, execution time of the write operation, target data writing amount and test time.
[0046] Step 22: Calculate the next delay time corresponding to the current storage unit based on the test parameters.
[0047] In some embodiments, see Figure 3 , Figure 3 This is a flow chart of calculating the delay time based on the test parameters in step 22. Specifically, calculating the next delay time may include the following process:
[0048] Step 31: performing a sum operation on the power-on time and the execution time of the write operation to obtain first data.
[0049] The power-on time is the time when the current storage unit is powered on and running; the execution time of the write operation is the time between the start and end of the execution.
[0050] Step 32: Perform a difference operation on the test time and the first data to obtain second data.
[0051] The test time is the total time consumed to perform write operations on all storage units.
[0052] Step 33: Determine the remaining writing amount that has not been written from the target data writing amount, and divide the remaining writing amount by the data amount written by the write operation to obtain third data.
[0053] The target data writing amount is the amount of data that needs to be written to the storage device to be tested; and the amount of data written by the write operation is the amount of data written by the storage unit on which the write operation is currently performed.
[0054] For example, the currently executed storage unit is unit 1, and there is no storage unit that has performed a write operation before unit 1. At this time, the target data writing amount=the remaining writing amount, and the third data=0.
[0055] For another example, the currently executing storage unit is unit 2, and the storage unit that has performed the write operation before unit 2 is unit 1. At this time, the third data = (target data storage capacity - the amount of data written by unit 1 performing the write operation) / (the amount of data written by unit 2 performing the write operation).
[0056] Step 34: Perform a division operation on the second data and the third data to obtain a next delay time corresponding to the current storage unit.
[0057] In one application scenario, the calculation formula for the next delay time is:
[0058]
[0059] Among them, T represents the next delay time; T s Indicates the power-on time; T1 indicates the time consumed by the current storage unit to perform the write operation (corresponding to the execution time of the write operation); C1 indicates the remaining write amount, which is the amount of data in the target data write amount that has not yet been written to the storage unit; C2 indicates the amount of data written when the current storage unit performs the write operation.
[0060] Step 13: Adjust the time for executing the write operation on the next storage unit based on the next delay time, until the write operations on all storage units are completed within the test time required by the test.
[0061] In some embodiments, it is determined whether the total data write amount of the storage units that have performed write operations exceeds the target data write amount corresponding to the test requirements; if not, the time for the next storage unit to perform a write operation is adjusted based on the next delay time.
[0062] The storage device testing method provided in some embodiments of the present application determines, in accordance with test requirements, a number of fixed-capacity storage units from the storage device to be tested; performs a write operation on the current storage unit in combination with the current delay time, and determines the next delay time corresponding to the current storage unit; and adjusts the time at which the write operation is performed on the next storage unit based on the next delay time, until the write operation on all storage units is completed within the test time required by the test. That is, the testing method provided in some embodiments of the present application divides the capacity of the storage device into a number of storage units, and then adjusts the time at which the write operation is performed on the fixed-capacity storage unit based on the delay time, thereby achieving dynamic control of the amount of data written to the storage unit per unit time, thereby achieving simulation of actual application scenarios.
[0063] In some embodiments of the present application, during the process of executing the test method described in any of the above embodiments on the storage device, it is also necessary to monitor the power-on time to control the execution of the test method based on the monitoring result. Figure 4 As shown, the following steps are included:
[0064] Step 41: Monitor the power-on time of the storage device to be tested.
[0065] Step 42: Determine whether the power-on time is greater than or equal to the test time.
[0066] If yes, go to step 43; otherwise go to step 44.
[0067] Step 43: Stop the write operation to the storage unit.
[0068] Step 44: Continue writing to the storage unit.
[0069] In some embodiments of the present application, during the process of executing the test method described in any of the above embodiments on the storage device, it is also necessary to monitor the total amount of data written to the storage unit that has performed the write operation, so as to control the execution of the test method based on the monitoring result. Figure 5 As shown, the following steps are included:
[0070] Step 51: Monitor the total amount of data written to the storage units that have performed write operations.
[0071] Step 52: Determine whether the total data writing amount exceeds the target data writing amount corresponding to the test requirement.
[0072] If yes, go to step 53; otherwise go to step 54.
[0073] Step 53: Stop the write operation to the storage unit.
[0074] Step 54: Adjust the time for the next storage unit to perform a write operation based on the next delay time.
[0075] In some embodiments of the present application, before executing the test method described in any of the above embodiments on a storage device, it is necessary to determine the storage device to be tested, specifically, according to an address mapping table.
[0076] In an application scenario, taking the storage device as a disk as an example, the test process for the disk is as follows: Figure 6 As shown. First, initialization is performed to obtain the driver and disk address mapping table. The storage device to be tested is determined through the disk address mapping table. Further, model data is generated based on the disk capacity, and the JESD219 model capacity is evenly divided into multiple small models (such as model 1, model 2...model n). Then, write operations are performed on the small models, and after each write operation, it is determined whether the amount of data written to the small model that has been written exceeds the specified write amount (i.e., the target data write amount). If it does not exceed, dynamic monitoring technology is used to determine the model running time, the write amount corresponding to the write operation, the power-on time, the test time, etc., so that the delay time of the next small model can be more accurately calculated. Based on the delay time, the write operation is performed on the next small model, realizing dynamic control of the model write amount.
[0077] It can be understood that a corresponding data model is created according to the capacity of the storage device, and then the data model is divided into multiple small models. Each small model represents a fixed write amount. By subdividing and controlling the delay after writing each small model, the data writing mode in actual use can be simulated, and the more the number of divisions, the higher the simulation accuracy.
[0078] The storage device testing method provided in some embodiments of the present application is based on JESD219 playback technology, which can control the write amount of the playback technology and limit the playback write amount within the specified time, thereby solving the technical problem of "the write amount exceeds the write amount within the specified time before the specified time is reached". It can also identify the reasons for the decline in the performance of the storage device to better maintain the performance of the storage device.
[0079] In addition, the storage device testing method provided in some embodiments of the present application accurately simulates and controls the writing process of the storage device to evaluate the durability and performance of the storage device under a specific workload.
[0080] See also Figure 7 , Figure 7 This is a structural diagram of an electronic device in some embodiments of the present application. The electronic device 10 includes a storage device 101 and a processor 102. The storage device 101 is used to store computer programs, and the processor 102 is used to execute computer programs to implement the test method described in any of the above embodiments. No further details will be given here.
[0081] The storage device 101 involved in this application can be a hard disk, a solid-state drive, an optical disk, a magnetic tape or others, which is not limited here.
[0082] The electronic device 10 involved in this application can be a desktop computer, a laptop computer, a smart wearable device, a medical machine or others, and is not limited here.
[0083] In some embodiments, the operating system corresponding to the electronic device 10 involved in this application is a Linux system.
[0084] See also Figure 8 , Figure 8 This is a structural diagram of a computer-readable storage medium in some embodiments of the present application. The computer-readable storage medium 100 stores a computer program 1001. When the computer program 1001 is executed by the processor 102, it is used to implement the test method described in any of the above embodiments, which will not be repeated here.
[0085] The processor 102 involved in this application can be called a CPU (Central Processing Unit), which may be an integrated circuit chip, or a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component.
[0086] The computer-readable storage medium 100 used in this application includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), or an optical disk.
[0087] In summary, the testing method provided in some embodiments of the present application can accurately simulate and control the writing process of the storage device 101, so as to evaluate the durability and performance of the storage device 101 under a specific workload.
[0088] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for testing a storage device, characterized in that: The test method includes: According to the test requirements, a number of storage units with fixed capacity are determined from the storage device to be tested; Performing a write operation on a current storage unit in combination with a current delay time, and determining a next delay time corresponding to the current storage unit; The time for executing the write operation on the next storage unit is adjusted based on the next delay time until the write operations on all the storage units are completed within the test time required by the test.
2. The testing method according to claim 1, wherein: The performing a write operation on the current storage unit in combination with the current delay time includes: In response to reaching an end point of the current delay time, a write operation is performed on the current storage unit.
3. The testing method according to claim 1, wherein: The determining of a next delay time corresponding to the current storage unit includes: A delay algorithm is used to determine a next delay time corresponding to the current storage unit.
4. The testing method according to claim 3, wherein: The method of determining a next delay time corresponding to the current storage unit by using a delay algorithm includes: Determining test parameters corresponding to performing a write operation on the current storage unit; wherein the test parameters include at least a power-on time, an amount of data written by the write operation, an execution time for performing the write operation, a target amount of data written, and the test time; Based on the test parameters, a next delay time corresponding to the current storage unit is calculated.
5. The testing method according to claim 4, characterized in that: The calculating, based on the test parameter, a next delay time corresponding to the current storage unit, includes: Performing a sum operation on the power-on time and the execution time of executing the write operation to obtain first data; Performing a difference operation between the test time and the first data to obtain second data; determining a remaining amount of data that has not yet been written from the target amount of data written, and dividing the remaining amount of data by the amount of data written by the write operation to obtain third data; A division operation is performed on the second data and the third data to obtain a next delay time corresponding to the current storage unit.
6. The testing method according to claim 1, wherein: The adjusting the time for the next storage unit to perform a write operation based on the next delay time includes: Determining whether a total amount of data written to the storage unit that has performed a write operation exceeds a target amount of data written corresponding to the test requirement; If not, the time for executing the write operation on the next storage unit is adjusted based on the next delay time.
7. The testing method according to claim 1, wherein: The test requirements include at least a target data writing amount; The method of determining a plurality of storage units with fixed capacity from the storage device to be tested according to the test requirements includes: Determining the number of storage devices to be tested according to the target data writing amount; The capacity of each of the storage devices to be tested is divided equally to obtain a number of storage units with fixed capacity.
8. The testing method according to claim 1, wherein: The method further comprises: Monitoring the power-on time of the storage device to be tested; In response to the power-on time being greater than or equal to the test time, stopping the write operation on the memory cell.
9. An electronic device, characterized in that: The electronic device includes a storage device and a processor, the storage device is used to store a computer program, and the processor is used to execute the computer program to implement the testing method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the computer program is used to implement the testing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Power consumption test method and device, equipment and storage medium
CN114627955A
Fault test method and device, electronic equipment and storage medium
CN114822666A
UBER test method and device based on solid state disk and computer equipment
CN117253525A
Semiconductor memory device
JP2019192314A
Simulating a single data rate (SDR) mode on a dual data rate (DDR) memory controller for calibrating DDR memory coarse alignment
US20190214073A1