Storage device testing method, device, computer equipment and storage medium

By generating and executing stress test data on the storage device itself, the high cost and low efficiency problems of existing technologies are solved, and high-accuracy storage device performance evaluation and optimization are achieved.

CN119943127BActive Publication Date: 2025-09-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202412000281.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-09-30
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Existing storage device stress testing requires multiple servers and switching devices, which is costly, inefficient, and lacks accuracy, making it difficult to meet actual needs.

Method used

Generate test data and perform stress tests through the storage device's own central processing unit, utilize the storage device's memory space and IO processing stack to simulate high-load scenarios, directly perform stress tests, generate test results, and analyze performance bottlenecks.

Benefits of technology

It simplifies the testing process, reduces costs, and improves test accuracy and flexibility. It can set test parameters and scenarios according to actual needs, directly utilize storage device capabilities for stress testing, and avoid performance differences caused by external factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943127B_ABST
    Figure CN119943127B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of device testing technology, and discloses a storage device testing method, apparatus, computer equipment, and storage medium. The method comprises: obtaining test parameters through a system interface of a storage device in response to an input operation of a user interface, wherein the test parameters are used to determine test requirements and guide the test process; applying for target memory space in the memory of the storage device, and generating test data that meets the test requirements in the target memory space based on the test parameters and the test scenario; processing the test data in the target memory space based on configuration information to obtain data operation instructions; executing the data operation instructions in the target memory space in the storage device based on the test parameters, performing a stress test on the storage device, and obtaining a test result. The method solves the problem of requiring a large number of server hosts and at least one switching device to stress test storage devices, resulting in high testing costs, low efficiency, and insufficient accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device testing, and in particular to a storage device testing method, device, computer equipment and storage medium. Background Art

[0002] As core equipment for data storage and management, the performance, stability, and reliability of storage devices are crucial for ensuring data security and business continuity. In real-world applications, storage devices often face complex operations and high load pressures, necessitating stress testing. This process simulates a large number of users simultaneously accessing the storage device or performing extensive data processing and computing operations on the storage device to test the device's load capacity, performance bottlenecks, and stability. Through stress testing, bottlenecks and weaknesses in storage devices can be identified, enabling optimization and improving performance and stability.

[0003] However, as the stability and complexity of storage devices increase, their performance limits are constantly being broken. Testing the extreme performance of storage devices often requires a large number of server hosts and at least one switching device. The non-storage investment costs are large and the labor costs are high. In addition, current stress testing methods still have problems such as low testing efficiency and insufficient test accuracy, resulting in long project development cycles and difficulty in meeting the needs of actual applications.

[0004] Therefore, the related art has the problem that a large number of server hosts and at least one switching device are required to perform stress testing on the storage device, resulting in high testing cost, low efficiency and insufficient accuracy. Summary of the Invention

[0005] In view of this, the present invention provides a storage device testing method, apparatus, computer equipment and storage medium to solve the problem that a large number of server hosts and at least one switching device are required to perform stress testing on storage devices, resulting in high testing costs, low efficiency and insufficient accuracy.

[0006] In a first aspect, the present invention provides a storage device testing method, which is applied to a central processing unit (CPU) of the storage device, and includes:

[0007] In response to an input operation of the user interface, obtaining test parameters through a system interface of the storage device, wherein the test parameters are used to determine test requirements and guide the test process;

[0008] Apply for target memory space in the memory of the storage device, and generate test data that meets the test requirements in the target memory space based on test parameters and test scenarios;

[0009] Processing the test data in the target memory space based on the configuration information to obtain data operation instructions;

[0010] The data operation instructions in the target memory space are executed in the storage device according to the test parameters, the storage device is stress-tested, and the test results are obtained.

[0011] The storage device testing method provided in this embodiment allows users to set test parameters and test scenarios according to actual needs and flexibly perform stress testing. Based on the test parameters and test scenarios, test data that meets the test requirements is generated, and the storage device's own capabilities are directly used for stress testing. No additional servers and switching devices are required to test the storage device, which simplifies the testing process and reduces testing costs. The test data is processed to obtain data operation instructions, and the storage device is controlled to perform stress testing based on the data operation instructions and test parameters to obtain test results, thereby avoiding test result deviations caused by performance differences due to external factors and improving the accuracy of the test. It solves the problem of requiring a large number of server hosts and at least one switching device to stress test the storage device, resulting in high testing costs, low efficiency, and insufficient accuracy.

[0012] In some optional implementations, after obtaining the test results, the method further includes:

[0013] determining a first preset number of load levels according to the test parameters;

[0014] Determining, based on the test results, test performance indices corresponding to the first preset number of load levels for a second preset number of read / write instruction processing objects in the storage device under the test scenario;

[0015] Determine a target read-write instruction processing object according to a test performance index, wherein a difference between the test performance index of the target read-write instruction processing object and the test performance index of other read-write instruction processing objects is greater than a preset threshold, and the other read-write instruction processing objects are read-write instruction processing objects other than the target read-write instruction processing object;

[0016] Generate analysis results corresponding to the test results based on the test performance index and the target read and write instruction processing object.

[0017] In this embodiment, the test results are analyzed to identify performance bottlenecks and potential issues of the storage device by comparing the test performance index of the read and write instruction processing object under multiple load levels. Furthermore, the performance of the storage device is determined based on the test performance index of the read and write instruction processing object.

[0018] In some optional implementations, after generating the analysis result corresponding to the test result, the method further includes:

[0019] Determining a target optimization means corresponding to the analysis result according to a preset corresponding relationship, wherein the preset corresponding relationship is used to determine a relationship between the analysis result and a third preset number of optimization means, and the target optimization means is included in the third preset number of optimization means;

[0020] Generate optimization suggestions based on target optimization methods.

[0021] In this embodiment, the test results are analyzed to determine the problems and deficiencies of the storage device, and optimization suggestions are generated for these problems and deficiencies to help users improve the performance of the storage device and enhance its stability and reliability.

[0022] In some optional implementations, generating test data that meets test requirements in the target memory space according to test parameters and test scenarios includes:

[0023] Generate data of preset types corresponding to the test scenario based on test parameters and data generation algorithm;

[0024] According to the test scenario and the preset type of data, the test data is obtained.

[0025] In this embodiment, the test data required for testing the storage device is generated according to the data generation algorithm and preset rules. The test data can be used to simulate the high load and complex operations of the storage device in different test scenarios, and the performance, stability and reliability of the storage device can be comprehensively evaluated. No additional servers and switching devices are required to test the storage device, thereby improving the accuracy and reliability of the test.

[0026] In some optional implementations, executing data operation instructions in a target memory space in a storage device according to test parameters to perform a stress test on the storage device and obtain a test result includes:

[0027] determining a first preset number of load levels according to the test parameters;

[0028] Passing the data operation instruction to the entry function of the read / write instruction processing object in the storage device, instructing the read / write instruction processing object to perform read / write operations under the test scenario and load level according to the test parameters and the data operation instruction;

[0029] Get test results based on read and write operations.

[0030] In some optional implementations, obtaining a test result based on the read and write operations includes:

[0031] Obtaining test performance indexes corresponding to a first preset number of load levels during a read / write operation of a read / write instruction processing object in a test scenario;

[0032] Generate test results based on the test performance index.

[0033] In this embodiment, during read and write operations on a read / write instruction processing object, the performance status and health of the read / write instruction processing object are monitored in real time, and a test performance index is recorded. Based on the test performance index, a test result is generated. The test result can be used to analyze problems and bottlenecks during the test process and provide strong support for optimizing storage devices.

[0034] In some optional implementations, processing the test data in the target memory space based on the configuration information to obtain the data operation instruction includes:

[0035] Determine the volume name, read / write location information, and target data block in the test data based on the configuration information;

[0036] Writing the volume name into the first preset field, writing the read / write position information into the second preset field, and writing the target data block into the third preset field;

[0037] A data operation instruction is generated according to the first preset field, the second preset field, and the third preset field.

[0038] In a second aspect, the present invention provides a storage device testing apparatus, which is deployed on a central processing unit (CPU) of a storage device, and includes:

[0039] A response module, configured to obtain test parameters through a system interface of a storage device in response to an input operation of the user interface, wherein the test parameters are used to determine test requirements and guide the test process;

[0040] A data construction module is used to apply for a target memory space in the memory of the storage device and generate test data that meets the test requirements in the target memory space according to the test parameters and test scenarios;

[0041] A data processing module is used to process the test data in the target memory space based on the configuration information to obtain data operation instructions;

[0042] The test module is used to execute data operation instructions in the target memory space in the storage device according to the test parameters, perform stress testing on the storage device, and obtain test results.

[0043] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the storage device testing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the storage device testing method of the first aspect or any corresponding embodiment thereof.

[0045] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the storage device testing method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 is a schematic diagram of testing a storage device using a server and a switch according to an embodiment of the present invention;

[0048] Figure 2 is a flowchart of a storage device testing method according to an embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of a storage device testing system according to an embodiment of the present invention;

[0050] Figure 4 is a flowchart of a storage self-stress testing method according to an embodiment of the present invention;

[0051] Figure 5 is a structural block diagram of a storage device testing apparatus according to an embodiment of the present invention;

[0052] Figure 6 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0053] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0054] Load testing is a software testing method, usually used to test the performance and stability of applications or systems under high load and high stress conditions. Stress testing tests the system's load capacity, performance bottlenecks, stability and other indicators by simulating a large number of users accessing the system at the same time, or performing a large amount of data processing or calculations on the system. Through stress testing, the bottlenecks and weaknesses of storage devices can be discovered, and the storage devices can be optimized to improve the performance and stability of the system. As the stability and complexity of storage devices improve, the performance limits are constantly being broken. Testing the extreme performance of storage devices often requires a large number of server hosts and switching devices. For example Figure 1 As shown, testing a single storage device requires multiple servers (Servers 1 to N) and at least one switch. This requires additional servers, switches, and cabinets, resulting in significant non-storage investment and high material costs. Furthermore, a significant amount of manual labor is required to set up the additional test environment, resulting in high labor costs and a long project development cycle.

[0055] Based on the above, an embodiment of the present invention provides a storage device testing method that directly utilizes the capabilities of the storage device itself to construct and manage test data, and uses the test data to perform stress testing on the storage device, thereby eliminating the need for the intervention of peripheral material equipment such as servers, simulating the high load and complex operations of the storage device in actual application scenarios, and comprehensively evaluating the performance, stability, and reliability of the storage device. This solves the current problems of strong dependence of storage device stress testing or performance tuning on external equipment and environment, high material costs for storage device research and development, and high labor costs. This achieves the technical effects of simplifying the testing process, reducing testing costs, and improving the flexibility and accuracy of testing.

[0056] According to an embodiment of the present invention, a storage device testing embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0057] In this embodiment, a storage device testing method is provided. Figure 2 is a flow chart of a storage device testing method according to an embodiment of the present invention, the method is applied to a central processor of a storage device, such as Figure 2 As shown, the process includes the following steps:

[0058] Step S201 : In response to an input operation of a user interface, test parameters are obtained through a system interface of a storage device, wherein the test parameters are used to determine test requirements and guide a test process.

[0059] Specifically, a storage device has its own CPU, memory, and hard drive, and runs its own operating system. Storage software is developed within the operating system to support IO (Input / Output) services transmitted from external servers.

[0060] This embodiment adds three software modules to the above storage software, namely storage device module, test control module, and user interface module. The storage device test method of this embodiment is executed through these newly added software modules. Figure 3 As shown, the storage device module can be directly connected to the storage native IO processing stack. Among them, the storage device module is used to store test data and has the ability to self-construct data. The module can automatically generate test data that meets the test requirements according to preset rules and algorithms. There is stress testing software in the storage device module, which is directly connected to the storage IO system and no longer uses an external server host. The storage device module is embedded inside the storage device and drives the IO flow of the entire storage device by simulating external IO input, counting and processing the IO return information of the storage device, thereby achieving the purpose of testing the storage device. The test control module is used to control the test process, including operations such as starting, pausing, continuing and ending the test. The module can also receive and analyze test results and provide suggestions for optimizing the storage device. The user interface module is used to provide a friendly user interface, allowing users to set test parameters, view test results and receive optimization suggestions. The module can also support the configuration of various combination parameters such as IO models, and export performance test data for management and operation of the entire stress test process. The storage-native IO processing stack is a logical concept that represents the various storage modules that perform read and write operations. The IO processing stack is a layered structure, with each layer containing multiple storage modules that can perform read and write operations in parallel.

[0061] In addition, the test control module and user interface module provide standard external APIs (Application Programming Interfaces) and programming interfaces, facilitating flexible programming control by external applications, such as writing stress test programs. The storage device module supports capacity and performance expansion to accommodate testing requirements of varying scale and complexity. This expansion can be achieved by adding more storage media, using more advanced storage technologies, or increasing cache capacity.

[0062] The storage device module, the test control module, and the user interface module each correspond to a logic program. The execution of these logic programs requires the use of the central processing unit (CPU) and memory of the storage device itself.

[0063] The user enters test parameters in the user interface. The CPU executes the logic program corresponding to the user interface module and, in response to the user's input operations in the user interface, obtains test parameters through the system interface of the storage device. Test parameters, such as test time, load size, data type, etc., are used to determine test requirements and guide the test process to ensure the accuracy and effectiveness of the test. System interfaces, such as RESTful API (Representational State Transfer API), use the HTTP protocol as the communication protocol to realize data transmission between the web interface and the server.

[0064] Step S202 : applying for a target memory space in the memory of the storage device, and generating test data that meets the test requirements in the target memory space according to the test parameters and the test scenario.

[0065] Specifically, test scenarios are specified by the test executor. For example, the test executor extracts data scenarios based on actual customer data, such as e-commerce customers. E-commerce customers store data with a high frequency of small block reads and writes. During the test data generation process, the test executor refines the read-write ratio and block size distribution to generate test data that meets the test requirements. Examples of test scenarios include testing full-write performance, full-read performance, random read and write performance, performance with a specified read-write ratio, performance with compressed data, and high concurrency performance.

[0066] The CPU first requests target memory space within the storage device's memory. The target memory space's size can be, for example, 5GB, 10GB, or other sizes that meet actual requirements. The CPU then executes the logic program corresponding to the storage device module, inputting test parameters and test scenarios into pre-set rules and algorithms. Based on these pre-set rules and algorithms, the CPU automatically generates test data that meets the test requirements within the target memory space. This test data can include various types of data, such as varying block sizes, read-write ratios, read-write ranges, deduplication and compression ratios, and various combinations of data to meet the needs of different test scenarios.

[0067] Step S203: Process the test data in the target memory space based on the configuration information to obtain data operation instructions.

[0068] Specifically, the configuration information includes, for example, a volume ID (Identity document), a volume logical address, a designated data block, and the like.

[0069] The CPU extracts the configuration information of the test data in the target memory space and writes it into the corresponding field in the IO context to construct the IO context. The constructed IO context is the data operation instruction.

[0070] Step S204 , executing data operation instructions in the target memory space in the storage device according to the test parameters, performing a stress test on the storage device, and obtaining a test result.

[0071] Specifically, the CPU executes the logic program corresponding to the test control module and, based on test parameters, determines information such as the test time, test duration, and the layer in the storage device's native I / O processing stack to be tested. Based on this information, the CPU executes data manipulation instructions in the target memory space on the storage device, performing a stress test on the storage device and generating test results. During the test, the storage device is controlled to perform read and write operations in real-world scenarios to evaluate its performance, stability, and reliability.

[0072] Based on test parameters and data manipulation instructions, the CPU controls the storage module in a layer specified by the test parameters in the IO processing stack to perform read and write operations, thereby controlling the storage device to simulate read and write operations in real-world scenarios. Furthermore, a portion of the logic program corresponding to the test control module is used to obtain test results. When the CPU executes this portion of the logic program, it collects and analyzes the test performance indices of the storage device during the test, such as read and write speed, response time, and I / O throughput. The CPU then aggregates information such as the test performance indices and the execution status of data manipulation instructions to generate the test results.

[0073] It should be noted that stress testing storage devices has two purposes: to test the performance of the storage device; and to use the control data from the test to identify the performance bottlenecks in the storage device, continuously optimize the implementation process, and thus improve the ultimate performance of the device.

[0074] The storage device testing method provided in this embodiment allows users to set test parameters and test scenarios according to actual needs and flexibly perform stress testing. Based on the test parameters and test scenarios, test data that meets the test requirements is generated, and the storage device's own capabilities are directly used for stress testing. No additional servers and switching devices are required to test the storage device, which simplifies the testing process and reduces testing costs. The test data is processed to obtain data operation instructions, and the storage device is controlled to perform stress testing based on the data operation instructions and test parameters to obtain test results, thereby avoiding test result deviations caused by performance differences due to external factors and improving the accuracy of the test. It solves the problem of requiring a large number of server hosts and at least one switching device to stress test the storage device, resulting in high testing costs, low efficiency, and insufficient accuracy.

[0075] In some optional implementations, after obtaining the test results, the method further includes:

[0076] determining a first preset number of load levels according to the test parameters;

[0077] Determining, based on the test results, test performance indices corresponding to the first preset number of load levels for a second preset number of read / write instruction processing objects in the storage device under the test scenario;

[0078] Determine a target read-write instruction processing object according to a test performance index, wherein a difference between the test performance index of the target read-write instruction processing object and the test performance index of other read-write instruction processing objects is greater than a preset threshold, and the other read-write instruction processing objects are read-write instruction processing objects other than the target read-write instruction processing object;

[0079] Generate analysis results corresponding to the test results based on the test performance index and the target read and write instruction processing object.

[0080] Specifically, the CPU executes the logic program corresponding to the test control module, analyzes the test results, and collects and analyzes data from the test process, such as read and write speeds, response time, and I / O throughput. By comparing test results under different test scenarios and load levels, performance bottlenecks and potential problems of the storage device can be identified.

[0081] A first preset number of load levels is determined based on the test parameters. The load levels are set by the test executor. For example, the queue depth size in the test parameters is used as different load levels, and the number of load levels is a first preset number, such as 3, 4, 5... The specific value is set according to actual needs.

[0082] The storage-native IO processing stack is a logical concept, a visual representation of the individual storage modules that perform read and write operations. The IO processing stack is a layered structure, with each layer containing multiple storage modules that can perform read and write operations in parallel. Therefore, read and write instruction processing targets include, for example, all storage modules in the entire IO processing stack and the storage modules in the first layer of the IO processing stack. The number of read and write instruction processing targets is a second preset number, such as 3, 4, or 5. The specific value is set based on actual needs.

[0083] Test performance indicators such as read and write speed, response time, I / O throughput, etc.

[0084] In the test results, read the test performance index corresponding to the first preset number of load levels of each read-write instruction processing object in the test scenario. For example: the test scenario is to test the performance of full write, and the load level is the queue depth such as 100 and 1000. In this test scenario and the queue depth is 100, the test performance index of the read-write instruction processing object; in this test scenario and the queue depth is 1000, the test performance index of the read-write instruction processing object, etc.

[0085] The target read / write instruction processing object is determined based on the test performance index. For example, when the queue depth is 100, the test performance indexes of all read / write instruction processing objects are relatively balanced. However, when the queue depth is increased to 1000, only the processing latency in the test performance index of read / write instruction processing object A increases significantly. The difference between the test performance index of the target read / write instruction processing object and the test performance indexes of other read / write instruction processing objects is greater than a preset threshold (e.g., 5ms, 10ms, etc.). The specific value is set based on actual needs. The test performance indexes of other read / write instruction processing objects are comparable. Therefore, read / write instruction processing object A is selected as the target read / write instruction processing object, and read / write instruction processing objects other than read / write instruction processing object A are designated as other read / write instruction processing objects. Therefore, the target read / write instruction processing object is the performance bottleneck in the storage device and needs to be optimized.

[0086] Stress testing of storage devices has two objectives: to test the device's performance and to identify performance bottlenecks within the device using control data from the test. Therefore, the analysis results corresponding to the test results must include both the device's performance and the bottlenecks. The test performance index of each read / write instruction processing object can be used to determine the storage device's performance. The target read / write instruction processing object is the performance bottleneck within the storage device. Therefore, the test performance index and the target read / write instruction processing object are combined to generate the analysis results corresponding to the test results.

[0087] In this embodiment, the test results are analyzed to identify performance bottlenecks and potential issues of the storage device by comparing the test performance index of the read and write instruction processing object under multiple load levels. Furthermore, the performance of the storage device is determined based on the test performance index of the read and write instruction processing object.

[0088] In some optional implementations, after generating the analysis result corresponding to the test result, the method further includes:

[0089] Determining a target optimization means corresponding to the analysis result according to a preset corresponding relationship, wherein the preset corresponding relationship is used to determine a relationship between the analysis result and a third preset number of optimization means, and the target optimization means is included in the third preset number of optimization means;

[0090] Generate optimization suggestions based on target optimization methods.

[0091] Specifically, based on the analysis results corresponding to the test results, the CPU executes the logic program corresponding to the test control module and provides optimization suggestions to the user, such as hardware upgrades, software optimization, and configuration adjustments. The optimization suggestions can be set to a third preset number, such as 3, 4, or 5. The specific value is set according to actual needs.

[0092] Preset correspondences are manually set during the storage device development process. By analyzing and refining various test results, the optimal optimization method based on the test results is determined from three preset possible optimization methods. Preset correspondences are then established between the test results and the optimal optimization method. This pre-set correspondence reduces secondary analysis and directly presents possible optimization methods based on the test results.

[0093] Based on the pre-set correspondence, the optimal optimization method corresponding to the analysis results is determined, known as the target optimization method. Based on the target optimization method, optimization recommendations are generated. These recommendations help users improve storage device performance, stability, and reliability.

[0094] In this embodiment, the test results are analyzed to determine the problems and deficiencies of the storage device, and optimization suggestions are generated for these problems and deficiencies to help users improve the performance of the storage device and enhance its stability and reliability.

[0095] In some optional implementations, generating test data that meets test requirements in the target memory space according to test parameters and test scenarios includes:

[0096] Generate data of preset types corresponding to the test scenario based on test parameters and data generation algorithm;

[0097] According to the test scenario and the preset type of data, the test data is obtained.

[0098] Specifically, the CPU executes the logic program corresponding to the storage device module to construct test data. This includes automatically generating test data that meets test requirements based on preset rules and algorithms. Test data can include various types of data, such as different block sizes, read-write ratios, read-write ranges, deduplication and compression ratios, and various combinations of data to meet the needs of different test scenarios.

[0099] Test parameters include test time, load size, data type, etc. Test parameters are inputs to the preset rules and algorithms when constructing test data. That is, the preset rules and algorithms construct test data based on the test parameters. The logic program corresponding to the storage device module is equipped with a data generation algorithm. The data generation algorithm is a method of generating test data based on rules, such as malloc memory, random algorithms, hard coding, etc. to construct data that meets the rules. The above rules determine what kind of test data is to be generated. The rules include but are not limited to: volume name, IO size, IO location, compressibility ratio, read-write ratio, read-write randomness, queue depth, and other information.

[0100] Test scenarios are specified by the test executor. For example, the test executor extracts data scenarios based on actual customer data, such as e-commerce customers. E-commerce customers store data with a high frequency of small block reads and writes. During the test data generation process, the test executor refines the read-write ratio and block size distribution to generate test data that meets the test requirements. Examples of test scenarios include testing full-write performance, full-read performance, random read and write performance, performance with a specified read-write ratio, performance with compressed data, and high concurrency performance.

[0101] The CPU generates test data based on the test scenario and the preset data type. For example, if the test scenario is an e-commerce customer, the CPU extracts the read / write ratio and block size distribution of the preset data type based on the test scenario, and combines it with the remaining preset data type to generate test data.

[0102] In this embodiment, the test data required for testing the storage device is generated according to the data generation algorithm and preset rules. The test data can be used to simulate the high load and complex operations of the storage device in different test scenarios, and the performance, stability and reliability of the storage device can be comprehensively evaluated. No additional servers and switching devices are required to test the storage device, thereby improving the accuracy and reliability of the test.

[0103] In some optional implementations, executing data operation instructions in a target memory space in a storage device according to test parameters to perform a stress test on the storage device and obtain a test result includes:

[0104] determining a first preset number of load levels according to the test parameters;

[0105] Passing the data operation instruction to the entry function of the read / write instruction processing object in the storage device, instructing the read / write instruction processing object to perform read / write operations under the test scenario and load level according to the test parameters and the data operation instruction;

[0106] Get test results based on read and write operations.

[0107] Specifically, a first preset number of load levels is determined based on the test parameters. The load level is set by the test executor. For example, the queue depth size in the test parameters is used as different load levels, and the number of load levels is the first preset number, such as 3, 4, 5... The specific value is set according to actual needs.

[0108] Test scenarios are specified by the test executor. For example, the test executor extracts data scenarios based on actual customer data, such as e-commerce customers. E-commerce customers store data with a high frequency of small block reads and writes. During the test data generation process, the test executor refines the read-write ratio and block size distribution to generate test data that meets the test requirements. Examples of test scenarios include testing full-write performance, full-read performance, random read-write performance, performance with a specified read-write ratio, performance with compressed data, and high concurrency performance.

[0109] The storage-native IO processing stack is a logical concept and a figurative representation of each storage module that performs read and write operations. The IO processing stack is a layered structure, with each layer containing multiple storage modules that can perform read and write operations in parallel. Therefore, the read and write instruction processing objects include: all storage modules in the entire IO processing stack, storage modules in the first layer of the IO processing stack, etc. The data operation instruction is passed as a parameter to the entry function of the top-level read and write instruction processing object in the storage-native IO processing stack. For example, the top-level module in the IO stack is TOP, and its entry function is TOP_in(Iob io). Through the entry function, the data operation instruction can be passed to each read and write instruction processing object in sequence. The read and write instruction processing object performs read and write operations under the test scenario and load level according to the test parameters and data operation instructions, and obtains the test results based on the read and write operations.

[0110] In some optional implementations, obtaining a test result based on the read and write operations includes:

[0111] Obtaining test performance indexes corresponding to a first preset number of load levels during a read / write operation of a read / write instruction processing object in a test scenario;

[0112] Generate test results based on the test performance index.

[0113] Specifically, in this embodiment, the CPU executes the logic program corresponding to the test control module and controls the storage device to perform a stress test based on the test parameters set by the user. During the test, the storage device is controlled to simulate read and write operations in actual scenarios to evaluate its performance, stability, and reliability. Test scenarios include: testing the performance of full writes, testing the performance of full reads, testing the performance of random reads and writes, testing the performance of specified read and write ratios, testing the performance of compressed data, and testing the performance of high concurrency.

[0114] A first preset number of load levels is determined based on the test parameters. The load levels are set by the test executor. For example, the queue depth size in the test parameters is used as different load levels, and the number of load levels is a first preset number, such as 3, 4, 5... The specific value is set according to actual needs.

[0115] During the test, the CPU collects and analyzes the test performance indices corresponding to the first preset number of load levels during the read and write operations performed by the read and write instruction processing object in the test scenario. The test performance indices include: read and write speed, response time, I / O throughput, etc., and summarizes the test performance indices, data operation instruction execution status and other information to obtain the test results.

[0116] In this embodiment, during read and write operations on a read / write instruction processing object, the performance status and health of the read / write instruction processing object are monitored in real time, and a test performance index is recorded. Based on the test performance index, a test result is generated. The test result can be used to analyze problems and bottlenecks during the test process and provide strong support for optimizing storage devices.

[0117] In some optional implementations, processing the test data in the target memory space based on the configuration information to obtain the data operation instruction includes:

[0118] Determine the volume name, read / write location information, and target data block in the test data based on the configuration information;

[0119] Writing the volume name into the first preset field, writing the read / write position information into the second preset field, and writing the target data block into the third preset field;

[0120] A data operation instruction is generated according to the first preset field, the second preset field, and the third preset field.

[0121] Specifically, the configuration information includes: volume name, IO size, IO location, compressibility ratio, read / write ratio, read / write randomness, etc. The volume name is the volume ID, the read / write location information is the IO location, and the target data block is the data block of the size specified by malloc in the system.

[0122] Based on the configuration information, the test data is converted into data operation instructions. The conversion process, for example, includes the following steps: 1. Converting the volume name to a volume ID and writing it to a first preset field; 2. Converting the read / write location information to a volume logical address (LBA) and writing it to a second preset field; and 3. Writing the target data block to a third preset field. This completes the conversion of the test data into data operation instructions. The first preset field is, for example, bits 4-10 of the IO context; the second preset field is, for example, bits 12-18 of the IO context; and the third preset field is, for example, bits 24-30 of the IO context. The first, second, and third preset fields of the IO context, along with other data in the IO context, are used to generate the data operation instructions.

[0123] In some optional implementations, during the process of controlling the storage device to perform stress testing in step S204, it is necessary to obtain a test performance index of the storage device and obtain a test result. The specific process may include steps A1 to A4.

[0124] Step A1: regularly collect target test performance index from a storage device through a data collection script.

[0125] Specifically, during the performance and stability verification of a storage device, a corresponding data collection script can be configured to periodically collect relevant data generated during the verification process, namely the aforementioned target test performance index. The aforementioned target test performance index can be collected based on actual needs and is not unique. Examples include the available storage space and usage of each node in the storage device, as well as network transmission speed.

[0126] In the storage device, a corresponding task timing mechanism can be set on each storage node, and the above-mentioned data collection script can be run through the task timing mechanism to realize the automatic collection of the target test performance index. The above-mentioned data collection script can include: top command, free command, dstst command, iostat command and ceph-s command. Various collection tools can be set in the data collection script to realize the collection of the target test performance index. In the present application, the data collection script can include top command, free command, dstst command, iostat command and ceph-s command. Among them, the top command can be used to collect the memory bar information of each storage node and determine the number and capacity of the memory bar; the free command can be used to collect the memory usage information of the storage device; the dstat command can be used to collect the network transmission speed between storage nodes and the read and write speed of the corresponding disk; the iostat command can be used to collect the read and write speed of a single disk of the storage node and its performance utilization rate; the ceph-s command can be used to collect the overall performance data of the CEPH cluster, including read and write speed and the number of read and write operations (operations) per second.

[0127] Step A2: Save the target test performance index to a data file.

[0128] Step A3: parse the target test performance index in the data file using a data parsing script to obtain a test result.

[0129] Specifically, after collecting and obtaining the target test performance index, it can be saved in a corresponding data file. The target test performance index can be parsed in the data file using the aforementioned data parsing script to obtain the test results related to storage device performance and stability required by the staff. The test results include the aforementioned target test performance index, such as various related data such as CPU idle rate, memory usage, network transmission speed, hard disk read and write speed, single hard disk resource utilization, and overall cluster performance data.

[0130] When analyzing the target test performance index, you can use Linux's built-in text parsing tools to customize the analysis of the target test performance index. Parsing according to a fixed format yields various data related to storage device performance and stability, and then summarizing the parsed data to obtain the test results. Linux's text parsing tools are versatile and efficient, allowing you to read, calculate, sort, and generate reports, making it easier to analyze test performance indices and generate corresponding reports.

[0131] In this embodiment, the test performance index of the storage device and the test results can be obtained during the stress test of the storage device without human participation, thereby avoiding statistical errors caused by human participation and obtaining data related to the performance and stability of the storage device more accurately. At the same time, since the need for human participation is eliminated, the workload and work pressure of developers and testers can be effectively reduced, further reducing the consumption of labor costs, thereby improving overall work efficiency.

[0132] In some optional embodiments, Figure 4 Flowchart of the storage self-stress test method according to an embodiment of the present invention, which can solve the same technical problems as steps S201 to S204, such as Figure 4 As shown, the process includes the following steps:

[0133] Construct data based on the configured IO model; construct an IO context within the storage device; perform IO processing on the storage device; count the IO processing data of the storage device; determine whether the process is complete. If so, the process is complete. If not, the process is executed starting from constructing data based on the configured IO model until the process is complete.

[0134] In this implementation, stress testing is performed directly using the storage device's own capabilities, eliminating the need for servers, peripheral physical devices, and peripheral testing software. This simplifies the testing process and reduces testing costs. Users can set test parameters and scenarios based on their actual needs, allowing for flexible stress testing. Without the need for servers or other peripheral physical devices, test result deviations caused by performance differences due to external factors are avoided, improving test accuracy. A user-friendly interface allows users to perform stress testing with simple settings, without the need for specialized knowledge or skills.

[0135] This embodiment also provides a storage device testing device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0136] This embodiment provides a storage device testing device, such as Figure 5 As shown, including:

[0137] A response module 501 is configured to obtain test parameters through a system interface of a storage device in response to an input operation of the user interface, wherein the test parameters are used to determine test requirements and guide the test process;

[0138] The data construction module 502 is used to apply for a target memory space in the memory of the storage device and generate test data that meets the test requirements in the target memory space according to the test parameters and the test scenario;

[0139] The data processing module 503 is used to process the test data in the target memory space based on the configuration information to obtain data operation instructions;

[0140] The testing module 504 is configured to execute data operation instructions in the target memory space in the storage device according to the test parameters, perform a stress test on the storage device, and obtain a test result.

[0141] In some optional embodiments, the device further comprises:

[0142] A first determining module, configured to determine a first preset number of load levels according to a test parameter;

[0143] A second determining module is configured to determine, based on the test results, test performance indices corresponding to the first preset number of load levels of a second preset number of read / write instruction processing objects in the storage device under the test scenario;

[0144] A third determination module is configured to determine a target read-write instruction processing object based on a test performance index, wherein a difference between the test performance index of the target read-write instruction processing object and the test performance index of other read-write instruction processing objects is greater than a preset threshold, and the other read-write instruction processing objects are read-write instruction processing objects other than the target read-write instruction processing object;

[0145] The first generating module is used to generate an analysis result corresponding to the test result according to the test performance index and the target read and write instruction processing object.

[0146] In some optional embodiments, the device further comprises:

[0147] a fourth determining module, configured to determine a target optimization means corresponding to the analysis result based on a preset correspondence relationship, wherein the preset correspondence relationship is used to determine a relationship between the analysis result and a third preset number of optimization means, and the target optimization means is included in the third preset number of optimization means;

[0148] The second generation module is used to generate optimization suggestions based on the target optimization means.

[0149] In some optional implementations, the data construction module 502 includes:

[0150] A first generating unit, configured to generate data of a preset type corresponding to a test scenario according to test parameters and a data generation algorithm;

[0151] The obtaining unit is used to obtain test data according to the test scenario and preset type of data.

[0152] In some optional implementations, the testing module 504 includes:

[0153] A first determining unit, configured to determine a first preset number of load levels according to a test parameter;

[0154] The test unit is used to pass data operation instructions to the entry function of the read and write instruction processing object in the storage device, instruct the read and write instruction processing object to perform read and write operations under the test scenario and load level according to the test parameters and data operation instructions, and obtain test results based on the read and write operations.

[0155] In some optional embodiments, the testing unit includes:

[0156] An acquisition submodule, configured to acquire test performance indices corresponding to a first preset number of load levels during a read / write operation of a read / write instruction processing object under a test scenario;

[0157] The generation submodule is used to generate test results based on the test performance index.

[0158] In some optional implementations, the data processing module 503 includes:

[0159] a second determining unit, configured to determine a volume name, read / write location information, and a target data block in the test data according to the configuration information;

[0160] a writing unit, configured to write a volume name into a first preset field, write read / write position information into a second preset field, and write a target data block into a third preset field;

[0161] The second generating unit is configured to generate a data operation instruction according to the first preset field, the second preset field, and the third preset field.

[0162] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0163] The storage device testing apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0164] The embodiment of the present invention also provides a computer device having the above Figure 5 The storage device test setup is shown.

[0165] See also Figure 6 , Figure 6 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0166] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include an integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0167] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable at least one processor 10 to execute the method shown in the above embodiment.

[0168] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0169] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0170] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0171] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0172] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0173] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall fall within the scope defined in this application.

Claims

1. A storage device testing method, characterized in that: The method is applied to a central processing unit of a storage device, and the method includes: In response to an input operation of the user interface, obtaining test parameters through the system interface of the storage device, wherein the test parameters are used to determine test requirements and guide the test process; Applying for a target memory space in the memory of the storage device, and generating test data that meets the test requirements in the target memory space according to the test parameters and the test scenario; Processing the test data in the target memory space based on the configuration information to obtain a data operation instruction; The data operation instruction in the target memory space is executed in the storage device according to the test parameters, and a stress test is performed on the storage device to obtain a test result.

2. The method according to claim 1, characterized in that After obtaining the test result, the method further includes: determining a first preset number of load levels according to the test parameters; Determining, based on the test results, test performance indices corresponding to the first preset number of load levels for a second preset number of read / write instruction processing objects in the storage device under the test scenario; Determine a target read-write instruction processing object according to the test performance index, wherein a difference between the test performance index of the target read-write instruction processing object and the test performance index of other read-write instruction processing objects is greater than a preset threshold, and the other read-write instruction processing objects are read-write instruction processing objects other than the target read-write instruction processing object; An analysis result corresponding to the test result is generated according to the test performance index and the target read / write instruction processing object.

3. The method according to claim 2, characterized in that After generating the analysis result corresponding to the test result, the method further includes: Determining a target optimization means corresponding to the analysis result according to a preset corresponding relationship, wherein the preset corresponding relationship is used to determine a relationship between the analysis result and a third preset number of optimization means, and the target optimization means is included in the third preset number of optimization means; Generate optimization suggestions based on the target optimization means.

4. The method according to claim 1, wherein Generating test data that meets the test requirements in the target memory space according to the test parameters and the test scenario includes: Generate data of a preset type corresponding to the test scenario according to the test parameters and the data generation algorithm; The test data is obtained according to the test scenario and the data of the preset type.

5. The method according to claim 1, wherein The step of executing the data operation instruction in the target memory space in the storage device according to the test parameters, performing a stress test on the storage device, and obtaining a test result includes: determining a first preset number of load levels according to the test parameters; Passing the data operation instruction to an entry function of a read / write instruction processing object in the storage device, instructing the read / write instruction processing object to perform a read / write operation under the test scenario and the load level according to the test parameters and the data operation instruction; The test result is obtained according to the read and write operations.

6. The method according to claim 5, characterized in that Obtaining the test result according to the read and write operations includes: Obtaining test performance indexes corresponding to a first preset number of load levels during the read and write operations performed by the read and write instruction processing object in the test scenario; The test result is generated according to the test performance index.

7. The method according to claim 1, characterized in that The processing of the test data in the target memory space based on the configuration information to obtain a data operation instruction includes: Determining a volume name, read / write location information, and a target data block in the test data according to the configuration information; Writing the volume name into a first preset field, writing the read / write position information into a second preset field, and writing the target data block into a third preset field; The data operation instruction is generated according to the first preset field, the second preset field, and the third preset field.

8. A storage device testing device, characterized in that: The device is deployed on a central processing unit of a storage device, and includes: a response module, configured to obtain test parameters through a system interface of the storage device in response to an input operation of the user interface, wherein the test parameters are used to determine test requirements and guide the test process; a data construction module, configured to apply for a target memory space in the memory of the storage device, and generate test data that meets the test requirements in the target memory space according to the test parameters and the test scenario; A data processing module, configured to process the test data in the target memory space based on configuration information to obtain data operation instructions; The test module is used to execute the data operation instruction in the target memory space in the storage device according to the test parameters, perform a stress test on the storage device, and obtain a test result.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the storage device testing method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the storage device testing method according to any one of claims 1 to 7.