Storage equipment testing method and device, computer equipment and storage medium
By deploying test methods and modules in the central processor of the storage device and directly using the storage device itself for stress testing, the problems of high testing costs, low efficiency and insufficient accuracy in the prior art are solved, and more efficient and accurate testing is achieved.
Patent Information
- Application Number
- CN202412000281.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art requires a large number of server hosts and switching devices when conducting storage device stress testing, resulting in high testing costs, low efficiency and insufficient accuracy.
By deploying test methods and modules in the central processor of the storage device, the storage device's own capabilities generate test data and execute data operation instructions, and directly conduct stress testing, avoiding dependence on external servers and switching devices.
The test process is simplified, the testing cost is reduced, the testing flexibility and accuracy are improved, and the test results are avoided due to performance differences caused by external factors.
Smart Images

Figure CN119943127A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment testing, and in particular to a storage equipment testing method, device, computer equipment and storage medium. Background Art
[0002] As the core equipment for data storage and management, the performance, stability and reliability of storage devices are crucial to ensuring data security and business continuity. In actual applications, storage devices often face various complex operations and high load pressures. Therefore, it is necessary to perform stress testing (load testing) on storage devices. During the stress testing process, a large number of users will be simulated to access the storage device at the same time or a large amount of data processing and calculation operations will be performed on the storage device to test the storage device's load capacity, performance bottlenecks, stability and other indicators. Through stress testing, the bottlenecks and weaknesses of the storage device can be discovered, and then the storage device can be optimized to improve the performance and stability of the storage device.
[0003] However, as the stability and complexity of storage devices increase, performance limits continue to be broken. Testing the extreme performance of storage devices often requires a large number of server hosts and at least one switching device. The cost of non-storage investment is large and the labor cost is high. In addition, the current stress testing method still has problems such as low testing efficiency and insufficient testing accuracy, which leads to a long project development cycle and is difficult to meet the needs of actual applications.
[0004] Therefore, the related technology has the problem of requiring a large number of server hosts and at least one switching device 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 of requiring a large number of server hosts and at least one switching device to stress test the storage device, resulting in high testing cost, low efficiency and insufficient accuracy.
[0006] In a first aspect, the present invention provides a storage device testing method, the method is applied to a central processor of the storage device, the method comprising:
[0007] In response to an input operation of the user interface, a test parameter is obtained through a system interface of the storage device, wherein the test parameter is used to determine a test requirement and guide a test process;
[0008] 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;
[0009] Process the test data in the target memory space based on the configuration information to obtain data operation instructions;
[0010] According to the test parameters, data operation instructions in the target memory space are executed in the storage device, and the storage device is stress-tested to obtain the test results.
[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. According to 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 test process and reduces the test cost. The test data is processed to obtain data operation instructions, and the storage device is controlled to perform stress testing according to 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, high testing cost, 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] Determine, according to the test results, test performance indexes 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;
[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, and the performance bottlenecks and potential problems of the storage device are determined by comparing the test performance indexes of the read and write instruction processing objects under multiple load levels. In addition, the performance of the storage device is determined based on the test performance indexes of the read and write instruction processing objects.
[0018] In some optional implementations, after generating the analysis result corresponding to the test result, the method further includes:
[0019] Determine the target optimization means corresponding to the analysis result according to the preset corresponding relationship, wherein the preset corresponding relationship is used to determine the 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 the test requirements in the target memory space according to the test parameters and the test scenario includes:
[0023] Generate data of preset types corresponding to the test scenario according to the 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 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:
[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 according to 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 the read and write operation of the read and write instruction processing object, the performance state and health of the read and write instruction processing object are monitored in real time, and the test performance index is recorded. According to the test performance index, a test result is generated, and the test result can be used to analyze the problems and bottlenecks in the test process and provide strong support for optimizing the storage device.
[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] According to the configuration information, determine the volume name, read / write location information, and target data block in the test data;
[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 device, which is deployed in a central processing unit of the storage device, and includes:
[0039] A response module, used to respond to an input operation of the user interface and obtain 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;
[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 the test scenario;
[0041] A data processing module, 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 the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. 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 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 schematic diagram of a flow chart 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 flow chart 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 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the 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 creative work are 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, you can find the bottlenecks and weaknesses of storage devices, and then optimize the storage devices to improve the performance and stability of the system. As the stability and complexity of storage devices increase, 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 in the figure, testing a storage device requires multiple server hosts from server 1 to server N and at least one switch, which requires additional server hosts, switches, and cabinets, resulting in huge non-storage investment costs and high material costs. In addition, a large number of people are required to build additional test environments, resulting in high labor costs and long project development cycles.
[0055] Based on the above content, an embodiment of the present invention provides a storage device testing method, which directly utilizes the capabilities of the storage device itself, constructs and manages 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 method solves the current problems of strong dependence of storage device stress testing or performance tuning on external devices and environments, high material costs for storage device research and development, and high labor costs. This achieves the technical effect of simplifying the test process, reducing test costs, and improving test flexibility and accuracy.
[0056] According to an embodiment of the present invention, a storage device test 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, obtaining test parameters 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, the storage device itself has a CPU, memory, and hard disk, and its operating system runs on the storage device. Storage software is developed in the operating system, and the storage software supports IO (Input / Output) services transmitted from external servers.
[0060] This embodiment adds three software modules to the above storage software, namely, a storage device module, a test control module, and a 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 in 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, so as to achieve 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 the 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, which is a figurative representation of each storage module that performs read and write operations. The IO processing stack is a layered structure, and each layer contains multiple storage modules that can perform read and write operations in parallel.
[0061] In addition, the test control module and user interface module provide external standard API (Application Programming Interface) and programming interface, which can facilitate flexible programming control of external applications, such as writing stress test programs. The storage device module supports capacity and performance expansion to meet the test requirements of different scales and complexities. Expansion can be achieved by adding more storage media, using more advanced storage technology, or increasing cache capacity.
[0062] The storage device module, the test control module, and the user interface module each correspond to a logic program. To execute these logic programs, the central processing unit (CPU) and memory of the storage device itself are required.
[0063] The user inputs the 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 operation in the user interface, obtains the test parameters through the system interface of the storage device. The test parameters, such as test time, load size, data type, etc., are used to determine the test requirements and guide the test process to ensure the accuracy and effectiveness of the test. The system interface, for example, RESTful API (Representational State Transfer API), uses 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, the test scenario is specified by the test executor. For example, the test executor extracts the actual data scenario based on the actual customer, such as e-commerce customers. The data stored by e-commerce customers is mostly read and written in small blocks. In the process of generating test data, the read-write ratio and block size distribution will be extracted to generate test data that meets the test requirements. Test scenarios include: wanting to test the performance of full write, wanting to test the performance of full read, wanting to test the performance of random read and write, wanting to test the performance of specified read-write ratio, wanting to test the performance of compressed data, wanting to test the performance of high concurrency, etc.
[0066] The CPU first applies for a target memory space in the memory of the storage device. The size of the target memory space is, for example, 5GB, 10GB, or other sizes that meet actual needs. The CPU executes the logic program corresponding to the storage device module, inputs the test parameters and test scenarios into the preset rules and algorithms, and automatically generates test data that meets the test requirements in the target memory space according to the preset rules and algorithms. The 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.
[0067] Step S203: Process the test data in the target memory space based on the configuration information to obtain a data operation instruction.
[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 the 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, determines the test time, test duration, and which layer of the native IO processing stack of the test storage is tested based on the test parameters. Based on the above information, the CPU executes the data operation instructions in the target memory space in the storage device, performs a stress test on the storage device, and obtains the test results. During the test, the storage device will be controlled to perform read and write operations in actual scenarios to evaluate its performance, stability, and reliability.
[0072] According to the test parameters and data operation instructions, the CPU controls the storage module in a certain layer specified by the test parameters in the IO processing stack to perform read and write operations, so as to control the storage device to simulate the read and write operations in the actual scene. In addition, a part of the logic program corresponding to the test control module is used to obtain the test results. When the CPU executes this part of the logic program, the CPU collects and analyzes the test performance index of the storage device during the test, such as the read and write speed, response time, I / O throughput, etc., summarizes the test performance index, data operation instruction execution status and other information, and organizes this information to obtain the test results.
[0073] It should be noted that stress testing storage devices has two purposes: to test the performance of storage devices; and to find the performance bottlenecks in storage devices with the help of test control data, and continuously optimize the implementation process to improve the final 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. According to 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 test process and reduces the test cost. The test data is processed to obtain data operation instructions, and the storage device is controlled to perform stress testing according to 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, high testing cost, 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] Determine, according to the test results, test performance indexes 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;
[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 the data during the test, such as read and write speed, response time, I / O throughput, etc. By comparing the test results under different test scenarios and load levels, the performance bottlenecks and potential problems of the storage device can be found.
[0081] A first preset number of load levels is determined according to 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. 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, which is a graphic representation of each storage module that performs read and write operations. The IO processing stack is a layered structure, each layer contains multiple storage modules, and can perform read and write operations in parallel. Therefore, the read and write instruction processing objects are, for example, all storage modules in the entire IO processing stack, storage modules in the first layer of the IO processing stack, etc. The number of read and write instruction processing objects is a second preset number, such as 3, 4, 5... The specific value is set according to 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 is; in this test scenario and the queue depth is 1000, the test performance index of the read-write instruction processing object is, etc.
[0085] The target read-write instruction processing object is determined according to the test performance index. For example, the load level is the queue depth. When the queue depth is 100, the test performance indexes of each read-write instruction processing object are relatively balanced. However, after the queue depth is increased to 1000, only the processing delay in the test performance index of the 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 index of other read-write instruction processing objects is greater than the preset threshold value. The preset threshold value is such as 5ms, 10ms... The specific value is set according to actual needs. The test performance indexes of other read-write instruction processing objects are equivalent. Therefore, the read-write instruction processing object A is used as the target read-write instruction processing object, and the read-write instruction processing objects other than the read-write instruction processing object A are used as other read-write instruction processing objects. Therefore, the target read-write instruction processing object is the performance bottleneck point in the storage device, which needs to be optimized.
[0086] There are two purposes for stress testing storage devices: testing the performance of storage devices; and finding the performance bottlenecks in storage devices with the help of the control data of the test. Therefore, the analysis results corresponding to the test results need to include the performance of the storage devices and the performance bottlenecks. The test performance index of each read-write instruction processing object can determine the performance of the storage device. The target read-write instruction processing object is the performance bottleneck in the storage device. Therefore, the test performance index and the target read-write instruction processing object are integrated to generate the analysis results corresponding to the test results.
[0087] In this embodiment, the test results are analyzed, and the performance bottlenecks and potential problems of the storage device are determined by comparing the test performance indexes of the read and write instruction processing objects under multiple load levels. In addition, the performance of the storage device is determined based on the test performance indexes of the read and write instruction processing objects.
[0088] In some optional implementations, after generating the analysis result corresponding to the test result, the method further includes:
[0089] Determine the target optimization means corresponding to the analysis result according to the preset corresponding relationship, wherein the preset corresponding relationship is used to determine the 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 means suggestions to the user, such as hardware upgrade, software optimization, configuration adjustment, etc. There are a third preset number of optimization means, such as 3, 4, 5... The specific value is set according to actual needs.
[0092] The preset correspondence is manually set. During the storage device development process, different test results are analyzed and refined, the best optimization method for the test results is determined from three preset possible optimization methods, and a preset correspondence between the test results and the best optimization method is constructed. The preset correspondence can reduce secondary analysis and directly present possible optimization methods for the test results.
[0093] According to the preset corresponding relationship, the best optimization means corresponding to the analysis result, namely the target optimization means, is determined. According to the target optimization means, optimization suggestions are generated. The optimization suggestions will help users improve the performance of storage devices and enhance their 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 the test requirements in the target memory space according to the test parameters and the test scenario includes:
[0096] Generate data of preset types corresponding to the test scenario according to the 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 and constructs test data, including: automatically generating test data that meets the test requirements according to preset rules and algorithms. The test data may include various types of data, such as: different block sizes, read-write ratios, read-write ranges, deduplication and compression ratios, etc., as well as various data combinations to meet the needs of different test scenarios.
[0099] Test parameters include test time, load size, data type, etc. Test parameters are the inputs of preset rules and algorithms when constructing test data, that is, the preset rules and algorithms construct test data according to the test parameters. The logic program corresponding to the storage device module is provided with a data generation algorithm, which is a method of generating test data according to the rules, such as malloc memory, random algorithm, hard coding, etc. to construct data that meets the rules. The above rules are what kind of test data to generate, and the rules include but are not limited to: volume name, IO size, IO position, compressibility ratio, read-write ratio, read-write randomness, queue depth size and other information.
[0100] The test scenario is specified by the test executor. For example, the test executor extracts the actual data scenario based on the actual customer, such as e-commerce customers. The data stored by e-commerce customers has more small block reads and writes. In the process of generating test data, the read-write ratio and block size distribution will be extracted to generate test data that meets the test requirements. Test scenarios include: wanting to test the performance of full writes, wanting to test the performance of full reads, wanting to test the performance of random reads and writes, wanting to test the performance of specified read-write ratios, wanting to test the performance of compressed data, wanting to test the performance of high concurrency, etc.
[0101] The CPU obtains test data based on the test scenario and the data of the preset type. For example, if the test scenario is an e-commerce customer, the read-write ratio and block size distribution of the data of the preset type are extracted according to the test scenario, and the test data is obtained by combining the remaining data of the preset type.
[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 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:
[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 according to the test parameters, and 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 a first preset number, such as 3, 4, 5... The specific value is set according to actual needs.
[0108] The test scenario is specified by the test executor. For example, the test executor extracts the actual data scenario based on the actual customer, such as e-commerce customers. The data stored by e-commerce customers is mostly read and written in small blocks. In the process of generating test data, the read-write ratio and block size distribution will be extracted to generate test data that meets the test requirements. Test scenarios include: wanting to test the performance of full write, wanting to test the performance of full read, wanting to test the performance of random read and write, wanting to test the performance of specified read-write ratio, wanting to test the performance of compressed data, wanting to test the performance of high concurrency, etc.
[0109] The storage-native IO processing stack is a logical concept, which is a figurative representation of each storage module that performs read and write operations. The IO processing stack is a layered structure, and each layer contains multiple storage modules that can perform read and write operations in parallel. Therefore, the read and write instruction processing objects are, for example, 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 according to the read and write operations.
[0110] In some optional implementations, obtaining a test result according to 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 stress testing according to the test parameters set by the user. During the test, the storage device is controlled to simulate the read and write operations in the actual scene to evaluate its performance, stability and reliability. Test scenarios include: wanting to test the performance of full write, wanting to test the performance of full read, wanting to test the performance of random read and write, wanting to test the performance of specified read and write ratio, wanting to test the performance of compressed data, wanting to test the performance of high concurrency, etc.
[0114] A first preset number of load levels is determined according to 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. 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 indexes corresponding to the first preset number of load levels during the read and write operations of the read and write instruction processing object in the test scenario. The test performance indexes include: read and write speed, response time, I / O throughput, etc., and summarizes the test performance index, data operation instruction execution status and other information to obtain the test results.
[0116] In this embodiment, during the read and write operation of the read and write instruction processing object, the performance state and health of the read and write instruction processing object are monitored in real time, and the test performance index is recorded. According to the test performance index, a test result is generated, and the test result can be used to analyze the problems and bottlenecks in the test process and provide strong support for optimizing the storage device.
[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] According to the configuration information, determine the volume name, read / write location information, and target data block in the test data;
[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 position, compressibility ratio, read / write ratio, read / write randomness, etc. The volume name is the volume ID, the read / write position information is the IO position, and the target data block is a data block of a 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 is, for example: 1. Convert the volume name into the volume ID and write it into the first preset field; 2. Convert the read / write location information into the volume logical address (lba) and write it into the second preset field; 3. Write the target data block into the third preset field. Thus, the test data is converted into data operation instructions. The first preset field is, for example, the 4th to 10th bits of the IO context, the second preset field is, for example, the 12th to 18th bits of the IO context, and the third preset field is, for example, the 24th to 30th bits of the IO context. The first preset field, the second preset field, the third preset field and other data of the IO context generate 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 the test performance index of the storage device and obtain the test results. The specific process may include steps A1 to A4.
[0124] Step A1, regularly collecting target test performance index from a storage device through a data collection script.
[0125] Specifically, during the performance and stability verification of the storage device, the relevant data generated during the verification process, i.e., the above-mentioned target test performance index, can be collected regularly by setting a corresponding data collection script. The above-mentioned target test performance index can be collected according to actual needs and is not unique, such as the storage space and usage of each node in the storage device and the transmission speed of the network.
[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 may 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 may 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 the read and write speed and the number of read and write ops (operation, operation number) per second.
[0127] Step A2, saving the target test performance index into a data file.
[0128] Step A3, parsing the target test performance index in the data file through a data parsing script to obtain a test result.
[0129] Specifically, after the target test performance index is acquired, it can be saved in a corresponding data file. The target test performance index can be parsed in the data file using the above data parsing script to obtain the test results related to the storage device performance and stability required by the staff. Among them, the test results include the above target test performance index, such as: CPU idle rate, memory usage, network transmission speed, hard disk read and write speed, single hard disk resource usage and cluster overall performance data and other related data.
[0130] When parsing the target test performance index, you can use the text parsing tool that comes with Linux to customize the target test performance index, parse it in a fixed format to obtain various data related to the performance and stability of the storage device, and summarize the parsed data to get the test results. Linux's text parsing tool has multifunctional and efficient performance characteristics, and can be used to read, calculate, sort, and generate reports for data, making it easier to analyze the test performance index 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 is a flow chart of a storage self-stress testing 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 configuration IO model; construct an IO context inside the storage device; perform IO processing on the storage device; count the IO processing data of the storage device; determine whether to end, if so, end, if not, execute subsequent steps starting from constructing data based on the configuration IO model until the end.
[0134] In this embodiment, the stress test is performed directly using the storage device's own capabilities, without the involvement of servers, peripheral physical devices, and peripheral test software, which simplifies the test process and reduces the test cost. Users can set test parameters and test scenarios according to actual needs and perform stress tests flexibly. Since there is no need for the participation of servers and other peripheral physical devices, the test result deviation caused by performance differences of external factors is avoided, and the accuracy of the test is improved. A friendly user interface is provided, and users can perform stress tests with simple settings without the need for professional knowledge and skills.
[0135] In this embodiment, a storage device testing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0136] This embodiment provides a storage device testing device, such as Figure 5 As shown, including:
[0137] A response module 501, for 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;
[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 test module 504 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.
[0141] In some optional embodiments, the device further comprises:
[0142] A first determination module, configured to determine a first preset number of load levels according to a test parameter;
[0143] A second determination module is used to determine, according to the test results, test performance indexes 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 used to determine a target read-write instruction processing object according to a test performance index, wherein the 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-write instruction processing object.
[0146] In some optional embodiments, the device further comprises:
[0147] A fourth determination module is used to determine the target optimization means corresponding to the analysis result according to a preset corresponding relationship, wherein the preset corresponding relationship is used to determine the 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 according to 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 generating algorithm;
[0151] The obtaining unit is used to obtain test data according to the test scenario and data of a preset type.
[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-write instruction processing object in the storage device, instruct the read-write instruction processing object to perform read-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-write operations.
[0155] In some optional embodiments, the test unit includes:
[0156] An acquisition submodule, used to acquire 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;
[0157] The generation submodule is used to generate test results according to 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, used for writing a volume name into a first preset field, writing read and write position information into a second preset field, and writing a target data block into a third preset field;
[0161] The second generating unit is used 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 schematic diagram of the structure 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, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, 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 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. Similarly, multiple computer devices can be connected, and each device provides some 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 executable by at least one processor 10, so that at least one processor 10 executes 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, an application required for at least one function; the data storage area may store data created according to 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 arranged 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 comprises 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 method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, 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 hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. 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 part 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 existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and 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 accessible to the computer.
[0173] Although the embodiments of the present invention have been described in conjunction with 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 are all 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 comprises: 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 instructions in the target memory space are 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; Determine, according to the test result, test performance indexes corresponding to the first preset number of load levels of a second preset number of read / write instruction processing objects in the storage device in the test scenario; Determine a target read-write instruction processing object according to the test performance index, wherein the 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: Determine the target optimization means corresponding to the analysis result according to a preset corresponding relationship, wherein the preset corresponding relationship is used to determine the 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, characterized in that: 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, characterized in that The step of executing the data operation instruction in the target memory space in the storage device according to the test parameter, 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 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 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 The obtaining the test result according to the read and write operations includes: Obtaining test performance indexes corresponding to a first preset number of the 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: According to the configuration information, determining a volume name, read / write location information, and a target data block in the test data; 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 processor of a storage device, and includes: A response module, used for obtaining test parameters through the 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, 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; A data processing module, used for processing the test data in the target memory space based on the configuration information to obtain a data operation instruction; The test module is used to execute the 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.
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.
Citation Information
Patent Citations
Memory testing method and system
CN104575612A
Auxiliary system and method for script performance testing
CN111414303A
Memory test method, device and system
CN114649051A
Storage equipment testing method and device, electronic equipment and storage medium
CN115482876A
Intelligent load test system
US20240256417A1
Cited By
Testing method and device for storage equipment
CN120727079A
Test device, system and method and electronic device
CN122474113A