Device read-write pressure test method and electronic device

By determining the test queue depth and grouping tests based on hard drive attribute parameters, the problem of low testing efficiency in multi-hard drive storage architectures is solved, and more efficient performance evaluation is achieved.

CN120762983BActive Publication Date: 2025-11-28INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511280073.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-11-28
Estimated Expiration
2045-09-09

AI Technical Summary

Technical Problem

The increased number of hard drives within the storage architecture makes it difficult to conduct accurate performance tests efficiently, resulting in low testing efficiency.

Method used

By obtaining the attribute parameters of each hard drive, its test queue depth is determined. With the global queue depth as a constraint, the hard drives are divided into multiple target hard drive groups for parallel read and write stress testing, avoiding the risk of overflow caused by insufficient queue capacity.

Benefits of technology

It improves the efficiency of batch hard drive testing and the accuracy of performance analysis, avoids the risk of overflow during the testing process, and achieves more accurate performance evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762983B_ABST
    Figure CN120762983B_ABST
Patent Text Reader

Abstract

The application provides a device read-write stress test method and an electronic device, which can be applied to the technical field of hard disk testing. The device read-write stress test method comprises the following steps: in response to a test request, determining the test queue depth of each hard disk included in a to-be-tested device based on the attribute parameters of the hard disks; taking the global queue depth of the to-be-tested device as the maximum queue depth of parallel testing, dividing the hard disks into a plurality of target hard disk groups based on the test queue depth of each hard disk; and performing parallel read-write stress testing on the hard disks included in the target hard disk groups to obtain the test result of the to-be-tested device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of hard disk testing, and more particularly, to a device read-write stress testing method and an electronic device. BACKGROUND

[0002] With the increasing demand of servers for storage, the storage architecture adapting to high storage performance is also constantly updated and upgraded. In the process of building and assembling the storage architecture, the storage architecture set in the server needs to be systematically tested for performance, that is, the storage hard disks in the storage architecture need to be tested for I / O (Input / Output) stress. However, as the number of hard disks in the storage architecture increases, it is difficult to efficiently and accurately test the performance of a large number of storage hard disks. SUMMARY

[0003] Therefore, the present application provides a device read-write stress testing method and an electronic device.

[0004] One aspect of the present application provides a device read-write stress testing method, comprising: in response to a test request, determining a test queue depth of each of a plurality of hard disks included in a device to be tested based on attribute parameters of each of the plurality of hard disks; taking a global queue depth of the device to be tested as a maximum queue depth for parallel testing, and dividing the plurality of hard disks into a plurality of target hard disk groups based on the test queue depth of each of the plurality of hard disks; and performing parallel read-write stress testing on the hard disks included in the target hard disk groups to obtain a test result of the device to be tested.

[0005] Another aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0006] Another aspect of the present application provides a computer-readable storage medium storing computer-executable instructions, which when executed, implement the method as described above.

[0007] Another aspect of the present application provides a computer program product, which comprises computer-executable instructions, which when executed, implement the method as described above.

[0008] According to the embodiment of the present application, in response to a request for performance testing of a large number of hard disks in a storage architecture, the attribute parameters of each hard disk to be tested and the attribute parameters of the host controller are acquired, and then the test queue depth of each hard disk is determined. The test queue depth of each hard disk is measured from multiple dimensions based on the attribute parameters of each hard disk, and the resource consumption required by each hard disk of different types and different capacities is accurately quantified, so as to provide accurate grouping basis when grouping the performance testing of multiple hard disks.

[0009] According to the embodiment of the present application, the global queue depth determined by the attribute parameters of the host controller is used as the total constraint for grouping multiple hard disks, and multiple target hard disk groups satisfying the maximum queue depth and having respective performance characteristics are divided from the multiple hard disks according to the test queue depth of each hard disk. The hard disks in each target hard disk group are subjected to read-write stress testing, so that the performance test results of each hard disk can be obtained. The test grouping of multiple hard disks is performed based on the reference of the test queue depth of each hard disk under the total constraint of the test capability of the host controller, so that the overflow risk caused by the limited queue bearing capacity and the large number of hard disks in the testing process can be avoided, and the test efficiency and performance analysis accuracy in batch testing of hard disks are improved. BRIEF DESCRIPTION OF DRAWINGS

[0010] The above and other objects, features and advantages of the present application will become more apparent from the following description of the embodiments of the present application with reference to the accompanying drawings.

[0011] Figure 1 A scenario diagram of the application of the device read-write stress testing method according to the embodiment of the present application is shown;

[0012] Figure 2 A flowchart of the device read-write stress testing method according to the embodiment of the present application is shown;

[0013] Figure 3 A schematic diagram of a hard disk array according to the embodiment of the present application is shown;

[0014] Figure 4 A flowchart of the method for dividing multiple hard disks into multiple target hard disk groups according to the embodiment of the present application is shown;

[0015] Figure 5 A flowchart of the whole process of the device read-write stress testing method according to the embodiment of the present application is shown;

[0016] Figure 6 A block diagram of the device read-write stress testing apparatus according to the embodiment of the present application is shown;

[0017] Figure 7A block diagram of an electronic device is shown according to a device read-write pressure test method of embodiments of the present application. DETAILED DESCRIPTION

[0018] Embodiments of the present application will be described below with reference to the accompanying drawings. However, it should be understood that the description is merely exemplary and is not intended to limit the scope of the present application. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of embodiments of the present application. However, it will be apparent to one skilled in the art that one or more embodiments can be practiced without these specific details. In other instances, well-known structures and techniques have been omitted in order to avoid obscuring the concepts of the present application.

[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the term "includes" and tautological expressions thereof, means the inclusion of the stated features, steps, operations, and / or components but not to the exclusion of one or more other features, steps, operations, or components.

[0020] All terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined herein. It should be noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of the specification, and should not be interpreted in an idealized or overly formal way.

[0021] In the case where expressions similar to "at least one of A, B, and C, and the like" are used, it should be generally construed that the meaning is interpreted as the meaning commonly understood by one of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).

[0022] As the server's storage demand is increasing, the storage architecture that adapts to high storage performance is also constantly updated and upgraded. In the process of building and assembling the storage architecture, the storage architecture set in the server needs to be systematically tested for performance, that is, the storage hard disks in the storage architecture need to be tested for IO pressure. However, as the number of hard disks in the storage architecture is increasing, it is difficult to efficiently and accurately test the performance of a large number of storage hard disks.

[0023] In the embodiments of the present application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) comply with the relevant legal regulations, are used for legal purposes, and do not violate public order and good customs. In particular, necessary measures have been taken for user personal information to prevent illegal access to user personal information data, maintain user personal information security, network security and national security.

[0024] In the embodiments of the present application, the authorization or consent of the user is obtained before the user's personal information is acquired or collected.

[0025] The embodiments of the present application provide a device read-write stress test method, including: in response to a test request, determining a test queue depth of each of a plurality of hard disks included in a device to be tested based on attribute parameters of each of the plurality of hard disks; taking a global queue depth of the device to be tested as a maximum queue depth of parallel testing, and dividing the plurality of hard disks into a plurality of target hard disk groups based on the test queue depth of each of the plurality of hard disks; and performing parallel read-write stress testing on the hard disks included in the target hard disk groups to obtain a test result of the device to be tested.

[0026] Figure 1 An application scenario diagram of the device read-write stress test method according to the embodiments of the present application is shown. It should be noted that, Figure 1 The shown is only an example of an application scenario to which the embodiments of the present application can be applied, to help those skilled in the art understand the technical content of the present application, but does not mean that the embodiments of the present application cannot be used in other devices, systems, environments or scenarios.

[0027] As Figure 1 shown, the application scenario of the device read-write stress test method according to the embodiments can include a first hard disk expansion device 101, a second hard disk expansion device 102, a third hard disk expansion device 103, a network protocol 104 and a server 105. The network protocol 104 is used as a medium to provide a communication link between the first hard disk expansion device 101, the second hard disk expansion device 102, the third hard disk expansion device 103 and the server 105. The network protocol 104 can include various connection types, such as wired and / or wireless communication links, etc.

[0028] The user can use the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103 to interact with the server 105 through the network protocol 104 to receive or send hard disk parameters and the like. Various types of solid state disks can be provided in the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103, such as an SSD hard disk (Solid State Drive), an HDD hard disk (Hard Disk Drive), and the like (only as an example).

[0029] The server 105 can be a server that provides various services, such as a computing device that performs hard disk management and hard disk performance testing on the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103.

[0030] It should be noted that the device read-write stress test method provided by the embodiments of the present application can generally be executed by the server 105. Correspondingly, the device read-write stress test device provided by the embodiments of the present application can generally be provided in the server 105. The device read-write stress test method provided by the embodiments of the present application can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first hard disk expansion device 101, the second hard disk expansion device 102, the third hard disk expansion device 103, and / or the server 105. Correspondingly, the device read-write stress test device provided by the embodiments of the present application can also be provided in a server or a server cluster different from the server 105 and capable of communicating with the first hard disk expansion device 101, the second hard disk expansion device 102, the third hard disk expansion device 103, and / or the server 105.

[0031] Alternatively, the device read-write stress test method provided by the embodiments of the present application can also be executed by the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103, or by other terminal devices different from the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103. Correspondingly, the device read-write stress test system provided by the embodiments of the present application can also be provided in the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103, or in other devices different from the first hard disk expansion device 101, the second hard disk expansion device 102, and the third hard disk expansion device 103.

[0032] It should be understood that Figure 1 The number of hard disk expansion devices, network protocols, and servers in the above-mentioned embodiments is only illustrative. According to the needs of implementation, there can be any number of hard disk expansion devices, networks, and servers.

[0033] Figure 2A flowchart of a device read-write stress test method according to an embodiment of the present application is shown.

[0034] As shown in Figure 2 the device read-write stress test method can include operations S210-S230.

[0035] In operation S210, in response to a test request, based on attribute parameters of each of a plurality of hard disks included in a device under test, a test queue depth of each of the plurality of hard disks is determined.

[0036] In operation S220, based on the test queue depth of each of the plurality of hard disks, the plurality of hard disks are divided into a plurality of target hard disk groups, with a global queue depth of the device under test as a maximum queue depth of parallel testing.

[0037] In operation S230, parallel read-write stress tests are performed on hard disks included in the target hard disk groups to obtain a test result of the device under test.

[0038] The device under test can include a plurality of hard disks under test and a SAS controller (Serial Attached SCSI Controller). The plurality of hard disks under test can be grouped and tested by a host controller.

[0039] The attribute parameters of each hard disk can include basic parameters such as a type parameter of the hard disk.

[0040] The test queue depth of each hard disk can be determined by the smaller queue parameter of the attribute parameter of each hard disk and a maximum queue depth parameter of a single hard disk allowed by a SAS controller in a server. The maximum queue depth parameter of the single hard disk of the SAS controller can be set by controller hardware or drive firmware, to limit the occupation of controller resources by a single hard disk, and to avoid blocking the global I / O channel by a single high-load device.

[0041] A global total queue depth parameter of the host controller is then obtained from attribute parameters of the host controller in the server, and the global total queue depth parameter of the host controller is used as a reference for the number of hard disks that can be tested. Based on the test queue depth of each hard disk, the plurality of hard disks are grouped, so that a plurality of target hard disk groups that meet multi-dimensional indicators of quantity, performance, and capacity can be obtained, so that the plurality of hard disks in the plurality of target hard disk groups can be subjected to parallel read-write stress tests that are adapted to the characteristics of the groups, to obtain accurate performance evaluation results for each hard disk.

[0042] According to the embodiment of the present application, in response to a request for performance testing of a large number of hard disks in a storage architecture, the attribute parameters of each hard disk to be tested and the attribute parameters of the host controller are obtained, and then the test queue depth of each hard disk is determined. The test queue depth of each hard disk is measured from multiple dimensions based on the attribute parameters of each hard disk itself, and the resource consumption required by each hard disk of different types and different capacities is accurately quantified, so as to provide accurate grouping basis when grouping performance testing of multiple hard disks.

[0043] According to the embodiment of the present application, the global queue depth determined by the attribute parameters of the host controller is used as the total constraint for grouping multiple hard disks, and multiple hard disks are divided into multiple target hard disk groups that meet the maximum queue depth and have respective performance characteristics according to the test queue depth of each hard disk. Read and write stress testing is performed on the hard disks in each target hard disk group, so that the performance test results of each hard disk can be obtained. The test queue depth of each hard disk itself is used as the basis for grouping multiple hard disks for testing under the total constraint of the test capability of the host controller, so that the risk of overflow caused by limited queue carrying capacity and a large number of hard disks during testing can be avoided, and the test efficiency and performance analysis accuracy during batch testing of hard disks can be improved.

[0044] The method shown in Figures 3-5 will be further described below with reference to specific embodiments. Figure 2

[0045] Figure 3 A schematic diagram of a hard disk array according to an embodiment of the present application is shown.

[0046] As shown in Figure 3 , the hard disk array can include a host controller and multiple hard disk expansion cabinets, specifically including hard disk expansion cabinets 1, 2, …, N. The host controller can include a CPU (Central Processing Unit), multiple memories, and multiple SAS controllers. The SAS controllers can be electrically connected to the RC root complex (Root Complex) of the CPU through the PCIE protocol (Peripheral Component Interconnect Express) for data communication. The multiple hard disk expansion cabinets can communicate with each other through the SAS protocol, and each hard disk expansion cabinet can include an SSD hard disk or an HDD hard disk. The multiple hard disk expansion cabinets can perform grouping test interaction processing with the CPU (Central Processing Unit) through the SAS controller.

[0047] ​According to an embodiment of the present application, the attribute parameter of the hard disk can include a type, a capacity and a rated queue depth of the hard disk.

[0048] The rated queue depth of the hard disk can be represented as a maximum number of concurrent I / O requests that the hard disk can handle, i.e., a maximum number of input / output (I / O) operations that the hard disk can handle at a time.

[0049] According to an embodiment of the present application, the method for determining the test queue depth of each of the plurality of hard disks based on the attribute parameter of each of the plurality of hard disks included in the device under test can include the following operations.

[0050] According to an embodiment of the present application, the test weight of the hard disk is determined based on the type and the capacity of the hard disk.

[0051] The plurality of hard disks under test can include a plurality of SSD hard disks (Solid State Drives) and a plurality of HDD hard disks (Hard Disk Drives). According to different types of hard disks, the performance of the hard disk can be defined, and in combination with the capacity of the hard disk, a corresponding test weight can be assigned to each hard disk, so as to obtain the test queue depth of the hard disk according to the test weight of each hard disk.

[0052] According to an embodiment of the present application, specifically, the method for determining the test weight of the hard disk based on the type and the capacity of the hard disk can include the following operations.

[0053] According to an embodiment of the present application, in a case where the type of the hard disk is a first hard disk type, the test weight of the hard disk is determined as a first preset weight.

[0054] According to an embodiment of the present application, in a case where the type of the hard disk is a second hard disk type, the test weight of the hard disk is determined based on the capacity of the hard disk.

[0055] The first hard disk type can be an SSD type. Since the rated queue depth of the SSD hard disk is usually much larger than that of the HDD hard disk, the test weight of the SSD hard disk can be determined as the first preset weight. When the test weight is the first preset weight, it can be represented as formula (1).

[0056] Performance_Factor_i = 1.0 (1);

[0057] Wherein, Performance_Factor_i can represent the test weight, and 1.0 can represent the value of the first preset weight.

[0058] The second hard disk type can be an HDD type. Since an HDD hard disk can generally have a plurality of different capacity sizes, the test weight of each HDD hard disk can be determined according to the capacity of the HDD hard disk.

[0059] According to embodiments of the present application, specifically, the method for determining the test weight of the hard disk based on the capacity of the hard disk can include the following operations.

[0060] According to embodiments of the present application, in a case where the capacity of the hard disk is less than or equal to a first preset capacity, the test weight of the hard disk is determined as a second preset weight.

[0061] According to embodiments of the present application, in a case where the capacity of the hard disk is greater than the first preset capacity and less than or equal to a second preset capacity, the test weight of the hard disk is determined as a third preset weight.

[0062] According to embodiments of the present application, in a case where the capacity of the hard disk is greater than the second preset capacity, the test weight of the hard disk is determined as a fourth preset weight.

[0063] According to embodiments of the present application, the first preset weight is greater than the fourth preset weight, the fourth preset weight is greater than the third preset weight, and the third preset weight is greater than the second preset weight.

[0064] The capacity of the HDD hard disk can be divided into three capacity levels, and different preset weights of different sizes can be assigned to the HDD hard disks of each capacity level. For example, the first preset capacity can be 2T, and the second preset capacity can be 10T. For an HDD hard disk with a capacity less than or equal to 2T, the test weight can be a second preset weight. For an HDD hard disk with a capacity greater than 2T and less than or equal to 10T, the test weight can be a third preset weight. For an HDD hard disk with a capacity greater than 10T, the test weight can be a fourth preset weight. Specifically, when the test weight is the second preset weight, it can be as shown in formula (2). When the test weight is the third preset weight, it can be as shown in formula (3). When the test weight is the fourth preset weight, it can be as shown in formula (4).

[0065] Performance_Factor_i=0.2 (2);

[0066] 0.2 can represent the value of the second preset weight.

[0067] Performance_Factor_i=0.5 (3);

[0068] 0.5 can represent the value of the third preset weight.

[0069] Performance_Factor_i=0.8 (4);

[0070] wherein 0.8 can represent a value of the fourth preset weight.

[0071] According to the embodiments of the present application, since the hard disks to be tested can include multiple hard disk types and multiple hard disk capacities, in order to more accurately perform test grouping for each hard disk, the test weight of each hard disk can be determined according to the type and capacity of the hard disk. First, according to the type of the hard disk, the test weight of the hard disk of the first hard disk type is directly determined as the first test weight, and the hard disk of the second hard disk type needs to be further divided according to its capacity, so as to determine the test weight to which the hard disk of the second hard disk type belongs. Multiple hierarchical divisions are realized according to the type and capacity of the hard disk, and the characteristics and potential performance advantages of the hard disks of various types and capacities are reflected through different weight values, so as to obtain the test queue depth of the hard disk according to the test weight of the hard disk.

[0072] According to the embodiments of the present application, the test queue depth of the hard disk is obtained based on the rated queue depth of the hard disk, the test weight, and the single-disk maximum queue depth of the device to be tested.

[0073] According to the embodiments of the present application, specifically, the method for obtaining the test queue depth of the hard disk based on the rated queue depth of the hard disk, the test weight, and the single-disk maximum queue depth of the device to be tested can include the following operations.

[0074] According to the embodiments of the present application, the target queue depth is obtained based on the smaller value between the rated queue depth of the hard disk and the single-disk maximum queue depth of the device to be tested.

[0075] According to the embodiments of the present application, the test queue depth of the hard disk is obtained by weighting the target queue depth based on the test weight.

[0076] Since the SAS controller itself has the limitation of the single-disk maximum queue depth, it is necessary to determine the target queue depth based on the smaller value between the rated queue depth of the hard disk and the single-disk maximum queue depth of the device to be tested. For example, the single-disk maximum queue depth of the SAS controller is 128, the rated queue depth of the first HDD hard disk is 64, and the rated queue depth of the second SSD hard disk is 256, then for the first HDD hard disk, the target queue depth can be 64, and for the second SSD hard disk, the target queue depth can be 128.

[0077] Then, the test queue depth of each hard disk can be obtained by weighting the target queue depth of each hard disk using the test weight of each hard disk. The test queue depth of each hard disk can be obtained as shown in formula (5).

[0078] (5);

[0079] Wherein, Weight_i can be represented as a test queue depth, min() can be represented as taking the minimum value, MaxQD_disk_i can be represented as a rated queue depth, Controller_PerDevice_QD can be represented as a single-disk maximum queue depth, and Performance_Factor_i can be represented as a test weight.

[0080] According to the embodiments of the present application, the target queue depth is obtained based on the smaller value between the rated queue depth of the hard disk and the single-disk maximum queue depth of the device under test, and then the target queue depth is weighted according to the obtained test weight to obtain the test queue depth of the hard disk, which realizes determining the test weight of each hard disk from the two angles of the type and capacity of each hard disk, and then fusing the maximum queue depths of the controller and the hard disk to further fuse the test weight containing the type and capacity information of the hard disk and the target queue depth, so that the difference in the consumption of controller resources by different types of hard disks can be accurately quantified, and the test queue depth of the hard disk containing multi-dimensional information is obtained.

[0081] According to the embodiments of the present application, the plurality of hard disks includes a plurality of first hard disks of a first hard disk type and a plurality of second hard disks of a second hard disk type.

[0082] According to the embodiments of the present application, the method of dividing the plurality of hard disks into a plurality of target hard disk groups based on the respective test queue depths of the plurality of hard disks can include the following operations.

[0083] Figure 4 A flowchart of a method of dividing a plurality of hard disks into a plurality of target hard disk groups according to an embodiment of the present application is shown.

[0084] As shown in Figure 4 The method of dividing a plurality of hard disks into a plurality of target hard disk groups can include operations S410-S430.

[0085] In operation S410, the plurality of first hard disks is divided into a plurality of first hard disk groups based on the global queue depth and the respective test queue depths of the plurality of first hard disks.

[0086] In operation S420, the plurality of first hard disk groups is filled with the plurality of second hard disks based on the global queue depth and the respective test queue depths of the plurality of second hard disks to obtain a plurality of second hard disk groups.

[0087] In operation S430, when it is determined that the plurality of second hard disks are all filled into the plurality of first hard disk groups, the plurality of target hard disk groups is obtained based on the plurality of second hard disk groups.

[0088] The global queue depth can be determined based on the total queue depth of the SAS controller, the system safety factor, and the average single-disk concurrency depth of the I / O testing tool. The total queue depth of the SAS controller can be characterized as the maximum number of concurrent I / O request commands that the SAS controller (or HBA (Host Bus Adapter) / RAID (Redundant Array of Independent Disks) card) in the host controller can simultaneously handle at the hardware level. The total queue depth of the SAS controller is the upper limit of the global resource pool of the entire controller chip or firmware, and is independent of the number of connected hard drives. The average single-disk concurrency depth of the I / O testing tool can be an inherent parameter of the testing tool. The system safety factor can be characterized as the buffering factor used to predetermine the SAS controller's grouping processing of hard drives and during the testing process; the system safety factor is typically set within the range of 0.8 ≤ <1.0, the system safety factor can be determined through incremental fio (Flexible I / O) testing. For example, by obtaining historical test records of the SAS controller, and based on these records, a queue overflow error can be triggered when the number of concurrent I / O requests is ≥14200, thus enabling... =0.85 to accommodate the safety margin.

[0089] The total queue depth of the SAS controller can be calculated based on the single-channel queue depth of the SAS controller and the number of channels inside the SAS controller. The total queue depth of the SAS controller can be shown in formula (6).

[0090] Controller_Total_QD = Per-Channel_QD × Number of Channels (6);

[0091] Controller_Total_QD can be used to represent the total queue depth of the SAS controller, and Per-Channel_QD can be used to represent the single-channel queue depth of the SAS controller.

[0092] The total queue depth of the SAS controller is calculated according to the single-channel queue depth of the SAS controller and the number of channels inside the SAS controller, and then the global queue depth is determined according to the total queue depth of the SAS controller, the system safety factor and the average single-disk concurrency depth of the I / O test tool. Thus, by introducing the system safety factor into the global queue depth, the system margin can be dynamically adapted, the test stability can be improved, and the burst congestion of the hard disk test can be avoided. Then, the global queue depth is taken as the core constraint condition for the hard disk grouping, and a plurality of hard disks are divided according to the optimal queue depth limit, so that the I / O test request of the hard disk in the test grouping can be prevented from exceeding the upper limit of the queue of the controller, thereby avoiding the problem of test interruption and queue overflow.

[0093] The global queue depth can be as shown in formula (7).

[0094] (7);

[0095] Wherein, Max_Weight_Group can represent the global queue depth, System_Safety_Factor can represent the system safety factor, and Avg_Concurrency_per_disk can represent the average single-disk concurrency depth of the I / O test tool.

[0096] The average single-disk concurrency depth of the I / O test tool can be obtained by averaging a plurality of single-disk concurrency depths, and the single-disk concurrency depth can be as shown in formula (8).

[0097] Concurrency_per_disk=numjobs iodepth (8);

[0098] Wherein, Concurrency_per_disk can represent the single-disk concurrency depth, numjobs can represent the number of simultaneously running work threads, and iodepth can represent the maximum number of I / O requests that can be simultaneously queued for processing by each work thread.

[0099] The first hard disk can be an SSD hard disk, and the second hard disk can be an HDD hard disk.

[0100] After determining the global queue depth, the first hard disk is divided into a plurality of first hard disk groups to be tested according to the test queue depth of each first hard disk.

[0101] Then the total test queue depth of each first hard disk group does not necessarily equal the global queue depth, so that the second hard disks can be appropriately inserted into a certain first hard disk group according to the test queue depth of each second hard disk, to obtain a plurality of target hard disk groups. So that the total test queue depth of each first hard disk group infinitely approaches the global queue depth without exceeding the global queue depth.

[0102] According to the embodiments of the present application, by taking the determined global queue depth as a constraint condition for hard disk division, a plurality of first hard disks are divided into a plurality of first hard disk groups according to the determined test queue depth of each first hard disk, and then the second hard disks are adaptively filled into each first hard disk group based on the determined test queue depth of each second hard disk without exceeding the global queue depth, to obtain a plurality of target hard disk groups. The core idea of the greedy algorithm is realized, the global queue depth is taken as a core constraint condition, a plurality of first hard disk groups are constructed by using a plurality of first hard disks, and then the second hard disks are filled into each first hard disk group without exceeding the global queue depth, so that the total test queue depth of the first hard disk group infinitely approaches the global queue depth, the single test scale is maximized as much as possible, and the test efficiency and resource utilization are improved.

[0103] According to the embodiments of the present application, specifically, the method for dividing a plurality of first hard disks into a plurality of first hard disk groups based on the global queue depth of the device under test and the test queue depth of each first hard disk can include the following operations.

[0104] According to the embodiments of the present application, the plurality of first hard disks are traversed, and based on the test queue depth of the current first hard disk and the test queue depth of each first hard disk included in the current hard disk group, a first queue depth sum value is obtained.

[0105] According to the embodiments of the present application, in the case where the first queue depth sum value is less than or equal to the global queue depth, the current first hard disk is divided into the current first test hard disk group.

[0106] According to the embodiments of the present application, in the case where the first queue depth sum value is greater than the global queue depth, a first hard disk group is obtained based on the current hard disk group, and a new hard disk group is generated based on the current first hard disk.

[0107] The test queue depth of each first hard disk can be sorted in descending order according to the test queue depth of each first hard disk. Then, the plurality of first hard disks are traversed to establish test hard disk groups, and the establishment condition of each hard disk group is that the test queue depth and value of each first hard disk in the group is less than or equal to the global queue depth. Each first hard disk is sequentially divided into the current first test hard disk group until the first test hard disk group is determined as the first hard disk group when a first hard disk is added, the group number is recorded, and a new hard disk group is established and the first hard disk is divided into the new hard disk group.

[0108] The relationship between the first queue depth and value of the hard disk group and the global queue depth can be shown in formula (9).

[0109] (9);

[0110] wherein, The first queue depth and value can be represented.

[0111] According to an embodiment of the present application, specifically, based on the global queue depth and the test queue depth of each second hard disk, the plurality of second hard disks are used to fill the plurality of first hard disk groups to obtain a plurality of second hard disk groups. The method can include the following operations.

[0112] According to an embodiment of the present application, the plurality of second hard disks are traversed, and based on the test queue depth of the current second hard disk, the test queue depth of each first hard disk included in the current hard disk group, and the test queue depth of each second hard disk included in the current hard disk group, a second queue depth and value is obtained.

[0113] According to an embodiment of the present application, in the case that the second queue depth and value is less than or equal to the global queue depth, the current second hard disk is filled into the current hard disk group.

[0114] According to an embodiment of the present application, in the case that the second queue depth and value is greater than the global queue depth, a second hard disk group is obtained based on the current hard disk group.

[0115] The test queue depth of each second hard disk can be sorted in descending order according to the test queue depth of each second hard disk. Then, the plurality of second hard disks are traversed, and each second hard disk is sequentially divided into each first hard disk group. After the second hard disk is divided into the first hard disk group, the second queue depth and value is obtained according to the test queue depth of the second hard disk, the test queue depth of each first hard disk included in the current hard disk group, and the test queue depth of each second hard disk included in the current hard disk group, and the second queue depth and value is calculated.

[0116] Then, a judgment is made according to the second queue depth and value and the global queue depth, and in the case that the second queue depth and value is less than or equal to the global queue depth, it is confirmed that the second hard disk is filled into the current hard disk group, and in the case that the second queue depth and value is greater than the global queue depth, the second hard disk cannot be filled into the current hard disk group, and the original hard disk group is confirmed as the second hard disk group, the group number is recorded, and then the second hard disk needs to be filled into the next first hard disk group, and the confirmation of the second queue depth and value and the global queue depth is re-performed.

[0117] The relationship between the second queue depth and value and the global queue depth can be shown in formula (10).

[0118] (10);

[0119] wherein, It can be represented as the second queue depth and value.

[0120] According to the embodiments of the present application, by traversing a plurality of first hard disks, according to the global queue depth and the test queue depth of the first hard disks, in the case that the first queue depth and value does not exceed and infinitely approaches the global queue depth, a plurality of first hard disk groups are constructed, and then a plurality of second hard disks are traversed, according to the first queue depth and value of each first hard disk group and the test queue depth of the second hard disks, in the case that the second queue depth and value does not exceed the global queue depth, the second hard disks are filled into any first hard disk group until it cannot be filled, and a second hard disk group is obtained. By taking the global queue depth as the core constraint condition, according to the test queue depth of each hard disk, the first hard disk group and the second hard disk group infinitely approaching the global queue depth are constructed, so that the single test scale is maximized as much as possible, thereby improving the test efficiency and resource utilization.

[0121] According to the embodiments of the present application, in the case that at least one target hard disk in the plurality of second hard disks is not filled into the plurality of first hard disk groups, based on the global queue depth and the respective test queue depths of the at least one target hard disk, the at least one target hard disk is divided into at least one third hard disk group.

[0122] According to the embodiments of the present application, based on the plurality of second hard disk groups and the at least one third hard disk group, a plurality of target hard disk groups are obtained.

[0123] In the case that the total test queue depth of each first hard disk group has infinitely approached the global queue depth and it is impossible to fill the second hard disk into each first hard disk group, the remaining plurality of second hard disks can be divided based on the global queue depth as a constraint condition, to obtain at least one third hard disk group. Then, the plurality of second hard disk groups and the at least one third hard disk group at this time are taken as target hard disk groups.

[0124] According to the embodiments of the present application, in the case that the second hard disk cannot be filled into the existing first hard disk group and second hard disk group, at least one third hard disk group is divided according to the global queue depth and the test queue depth of the remaining second hard disk, so as to realize the division of the test group of the batch of multiple hard disks.

[0125] Figure 5 The whole process flowchart of the device read-write stress test method according to the embodiments of the present application is shown.

[0126] As shown in Figure 5 , it is confirmed that the batch test of multiple hard disks is performed S501, the attribute parameters of each hard disk and the parameters of the SAS controller are obtained S502, the test weight of the hard disk is determined based on the type and capacity of the hard disk, the test weight of each hard disk is determined according to the type of the hard disk, then the test queue depth of the hard disk is obtained according to the rated queue depth of the hard disk, the test weight and the maximum queue depth of the device to be tested S503, and the test queue depths of the multiple first hard disks and the multiple second hard disks are sorted in descending order according to the test queue depth of each hard disk S504.

[0127] The multiple first hard disks are traversed, the first queue depth sum and value are obtained based on the test queue depth of the current first hard disk and the test queue depths of the first hard disks included in the current hard disk group S505, it is judged whether the first queue depth sum and value of the current hard disk group is greater than the global queue depth S506, in the case that the first queue depth sum and value is greater than the global queue depth, the first hard disk group is obtained based on the current hard disk group and the grouping serial number is recorded S507, in the case that the first queue depth sum and value is less than or equal to the global queue depth, the current first hard disk is divided into the current first test hard disk group, until the first queue depth sum and value of the current hard disk group is greater than the global queue depth and the grouping serial number is recorded S508, it is judged whether the first hard disks are all traversed S509, in the case that there are untraversed first hard disks, the above operation is repeatedly performed, in the case that the first hard disks are all traversed, the multiple first hard disk groups are obtained.

[0128] S510, determining whether the second queue depth sum value of the current hard disk group is greater than the global queue depth S511, in the case that the second queue depth sum value is greater than the global queue depth, obtaining a second hard disk group based on the current hard disk group and recording the grouping sequence number S512, in the case that the second queue depth sum value is less than or equal to the global queue depth, filling the current second hard disk to the current hard disk group S513, until the first queue depth sum value of the current hard disk group is greater than the global queue depth and the grouping sequence number is recorded, in the case that there is at least one target hard disk in the plurality of second hard disks that is not filled into the plurality of first hard disk groups, dividing the at least one target hard disk into at least one third hard disk group based on the global queue depth and the test queue depth of the at least one target hard disk S514, determining whether the second hard disks are all traversed S515, in the case that there is an untraversed second hard disk, repeating the above operations, in the case that the second hard disks are all traversed, performing parallel read-write stress testing on each hard disk group to obtain a test result S516.

[0129] Figure 6 A block diagram of a device read-write stress testing apparatus according to an embodiment of the present application is shown.

[0130] As shown in Figure 6 , the device read-write stress testing apparatus can include a determination module 610, a division module 620, and a testing module 630.

[0131] The determination module 610 is configured to, in response to a test request, determine a test queue depth of each hard disk based on an attribute parameter of each hard disk included in a device under test. The determination module 610 can be configured to perform the operation S210 described above, and thus repeated description is omitted here.

[0132] The division module 620 is configured to divide the plurality of hard disks into a plurality of target hard disk groups based on the test queue depth of each hard disk, with a global queue depth of the device under test as a maximum queue depth of parallel testing. The division module 620 can be configured to perform the operation S220 described above, and thus repeated description is omitted here.

[0133] The testing module 630 is configured to perform parallel read-write stress testing on the hard disks included in the target hard disk group to obtain a test result of the device under test. The testing module 630 can be configured to perform the operation S230 described above, and thus repeated description is omitted here.

[0134] According to an embodiment of the present application, any of the determining module 610, the dividing module 620 and the testing module 630 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of the other modules, and implemented in one module. According to an embodiment of the present application, at least one of the determining module 610, the dividing module 620 and the testing module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. or implemented in hardware or firmware, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the determining module 610, the dividing module 620 and the testing module 630 can be at least partially implemented as a computer program module which, when executed, can perform the corresponding function.

[0135] Figure 7 A block diagram of an electronic device is shown according to the method of device read-write pressure testing of an embodiment of the present application.

[0136] As shown in Figure 7 , an electronic device according to an embodiment of the present application includes a processor 701 which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 701 can also include an on-board memory for cache use. The processor 701 can include a single processing unit or multiple processing units for performing different actions of the method processes according to an embodiment of the present application.

[0137] In the RAM 703, various programs and data required for the operation of the electronic device are stored. The processor 701, the ROM 702 and the RAM 703 are connected to each other through a bus 704. The processor 701 performs various operations of the method processes according to an embodiment of the present application by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs can also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 can also perform various operations of the method processes according to an embodiment of the present application by executing the programs stored in the one or more memories.

[0138] According to an embodiment of the present application, the electronic device can further include an input / output (I / O) interface 705 connected to the bus 704. The electronic device can further include one or more of the following components connected to the input / output (I / O) interface 705: an input part 706 including a keyboard, a mouse, etc.; an output part 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 708 including a hard disk, etc.; and a communication part 709 including a network interface card such as a LAN card, a modem, etc. The communication part 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as necessary. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 710 as necessary, so that a computer program read therefrom is installed in the storage part 708 as necessary.

[0139] According to an embodiment of the present application, the method flow according to the embodiments of the present application can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-described functions defined in the system of the embodiments of the present application are performed. According to an embodiment of the present application, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0140] The present application also provides a computer-readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or can exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, which, when executed, implement the methods according to the embodiments of the present application.

[0141] According to an embodiment of the present application, the computer readable storage medium can be a non-transitory computer readable storage medium. For example, it can include, but is not limited to, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing. In this application, a computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.

[0142] For example, according to an embodiment of the present application, the computer readable storage medium can include one or more memories of ROM 702 and / or RAM 703 described above and / or other than ROM 702 and RAM 703.

[0143] Embodiments of the present application also include a computer program product, which includes a computer program containing program codes for executing the method provided by the embodiments of the present application, and when the computer program product is run on an electronic device, the program codes are used to make the electronic device implement the device read-write pressure test method provided by the embodiments of the present application.

[0144] When the computer program is executed by the processor 701, the above-mentioned functions defined in the system / apparatus of the embodiments of the present application are executed. According to an embodiment of the present application, the system, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0145] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed, downloaded and installed in the form of signals on network media, and be downloaded and installed through the communication part 709 and / or installed from the detachable medium 711. The program codes contained in the computer program can be transmitted by any appropriate network media, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.

[0146] According to an embodiment of the present application, program code for implementing the computer programs provided by the embodiments of the present application can be written in any combination of one or more programming languages, and specifically, can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, such as Java, C++, python, "C" language, or similar programming languages. The program code can be executed entirely on a user computing device, partially on a user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).

[0147] The flow diagrams and the block diagrams in the drawings are illustrations of possible architectures, functions, and operations for systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may

[0148] The embodiments of the present application are described above. However, these embodiments are merely for the purpose of illustration, and are not intended to limit the scope of the present application. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.

Claims

1. A method for testing device read / write stress, characterized in that, The method includes: In response to a test request, the test queue depth of each of the multiple hard drives included in the device under test is determined based on their respective attribute parameters. This includes: weighting the smaller value between the maximum queue depth of a single hard drive and the rated queue depth of the hard drive based on the attribute parameters of the hard drive to obtain the test queue depth of the hard drive. The rated queue depth of the hard drive represents the maximum number of concurrent I / O requests that the hard drive can handle, and the maximum queue depth of a single hard drive is the maximum number of concurrent I / O requests allowed by the device under test for a single hard drive. Using the global queue depth of the device under test (DUT) as the maximum queue depth for parallel testing, and based on the individual test queue depths of the multiple hard drives, the multiple hard drives are divided into multiple target hard drive groups. This includes: constructing multiple basic hard drive groups using multiple first hard drives, and then, without exceeding the global queue depth, filling each hard drive group with second hard drives. The first hard drives are SSDs, and the second hard drives are HDDs. The global queue depth represents the maximum number of concurrent I / O requests for the DUT during a single parallel test; and Parallel read / write stress tests are performed on the hard drives included in the target hard drive group to obtain the test results of the device under test.

2. The method according to claim 1, characterized in that, The attribute parameters of the hard drive include the type and capacity of the hard drive; The step of determining the test queue depth for each of the multiple hard drives included in the device under test (DUT) comprises: Based on the type and capacity of the hard drive, determine the test weight of the hard drive; and The test queue depth of the hard drive is obtained based on the rated queue depth of the hard drive, the test weight, and the maximum queue depth of a single drive in the device under test, including: The target queue depth is obtained based on the smaller of the rated queue depth of the hard drive and the maximum queue depth of a single disk in the device under test; and The target queue depth is weighted based on the test weights to obtain the test queue depth of the hard disk.

3. The method according to claim 2, characterized in that, The determination of the test weight of the hard drive based on its type and capacity includes: If the hard drive is of type 1, then the test weight of the hard drive is determined to be a first preset weight; and If the hard drive is of type two, the test weight of the hard drive is determined based on its capacity.

4. The method according to claim 3, characterized in that, Determining the test weight of the hard drive based on its capacity includes: If the capacity of the hard drive is less than or equal to the first preset capacity, the test weight of the hard drive is determined to be the second preset weight. If the capacity of the hard drive is greater than the first preset capacity and less than or equal to the second preset capacity, the test weight of the hard drive is determined to be a third preset weight; and If the capacity of the hard drive is greater than the second preset capacity, the test weight of the hard drive is determined to be the fourth preset weight; Wherein, the first preset weight is greater than the fourth preset weight, the fourth preset weight is greater than the third preset weight, and the third preset weight is greater than the second preset weight.

5. The method according to claim 1, characterized in that, The plurality of hard disks includes a plurality of first hard disks of a first type and a plurality of second hard disks of a second type; The step of dividing the multiple hard drives into multiple target hard drive groups based on the test queue depth of each of the multiple hard drives includes: Based on the global queue depth and the test queue depth of each of the multiple first hard disks, the multiple first hard disks are divided into multiple first hard disk groups; Based on the global queue depth and the test queue depths of the multiple second hard drives, the multiple first hard drive groups are filled with the multiple second hard drives to obtain multiple second hard drive groups; and If it is determined that multiple second hard disks are filled into multiple first hard disk groups, multiple target hard disk groups are obtained based on the multiple second hard disk groups.

6. The method according to claim 5, characterized in that, The method of dividing the multiple first hard drives into multiple first hard drive groups based on the global queue depth of the device under test and the test queue depth of each of the multiple first hard drives includes: Traverse multiple first hard disks, and obtain the first queue depth and value based on the current first hard disk's test queue depth and the test queue depth of each first hard disk included in the current hard disk group; If the depth of the first queue is less than or equal to the global queue depth, the current first hard disk is assigned to the current first test hard disk group; and If the depth of the first queue is greater than the depth of the global queue, the first hard disk group is obtained based on the current hard disk group, and a new hard disk group is generated based on the current first hard disk.

7. The method according to claim 5, characterized in that, Based on the global queue depth and the test queue depths of the multiple second hard drives, the multiple first hard drive groups are filled with the multiple second hard drives to obtain multiple second hard drive groups, including: Traverse multiple second hard drives, and obtain the second queue depth and value based on the current second hard drive's test queue depth, the test queue depth of each first hard drive in the current hard drive group, and the test queue depth of each second hard drive in the current hard drive group; If the second queue depth and value are less than or equal to the global queue depth, the current second hard drive is filled into the current hard drive group; and If the depth of the second queue is greater than the depth of the global queue, the second hard disk group is obtained based on the current hard disk group.

8. The method according to claim 5, characterized in that, The method further includes: In the case where at least one target hard drive among multiple second hard drives is not filled into multiple first hard drive groups, based on the global queue depth and the test queue depth of each of the at least one target hard drive, the at least one target hard drive is divided into at least one third hard drive group; and Based on multiple second hard disk groups and at least one third hard disk group, multiple target hard disk groups are obtained.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Cloud disk IO time delay automatic detection method

    CN111124777A

  • Solid state drive performance testing method and device, storage medium and electronic device

    CN119782058A