Hard disk testing method, device, storage medium and computer program product
By monitoring the input and output task time and link transmission time of the hard disk, a target model is established to accurately detect the hard disk performance, solving the problem of high misjudgment rate in the existing technology and improving the accuracy and efficiency of hard disk testing.
Patent Information
- Application Number
- CN202410693239.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-05-31
Smart Images

Figure CN118260144B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a hard disk testing method, equipment, storage medium and computer program product. Background Art
[0002] Due to the constraints of the current design structure, the performance of current HDDs (Hard Disk Drives) and SSDs (Solid State Disks) will gradually decline as the usage time increases. This characteristic will also be amplified by the influence of server hardware topology and external factors, and the phenomenon of business jams at the business layer will cause data blockage or even crashes. This phenomenon is not covered by the simple hard disk health status, that is, daily hard disk health checks cannot accurately and effectively screen out these hard disks with low performance.
[0003] In the current solution, cluster software monitors the I / O (Input / Output) tasks sent to the hard disk, thereby indirectly reflecting whether the hard disk performance meets the upper-level business requirements. The specific logic used to determine low-performance slow disks is: monitor the command line I / O tasks that come with the system, and determine whether the time taken to receive command feedback exceeds the set threshold. In actual applications, it is found that such a solution has a high probability of misjudgment, that is, when the hard disk is still in normal operation, it is judged as a slow disk that does not meet the performance requirements and is replaced, which increases the cost of using the disk.
[0004] In summary, how to effectively implement hard disk testing and more accurately detect slow disks with low performance is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The object of the present invention is to provide a hard disk testing method, device, storage medium and computer program product to effectively implement hard disk testing and more accurately detect slow disks with low performance.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a hard disk testing method, comprising:
[0008] Send the input and output tasks to the hard disk to be tested;
[0009] For each of the input / output tasks, monitoring the execution time of the input / output task at the physical layer, and the transmission execution time of each link transmission link excluding the physical layer;
[0010] Whenever statistics are triggered, an average value of all the physical layer execution times monitored between the current statistical moment and the previous statistical moment is determined, and it is determined whether the average value exceeds a preset physical layer execution time threshold;
[0011] If yes, then for each link transmission link, determine the average value of all the transmission execution times corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment;
[0012] If, for each link transmission link, the determined average values of all the transmission execution times corresponding to the link transmission link are lower than the time consumption threshold set for the link transmission link, the input and output performance test of the hard disk to be tested is performed.
[0013] On the other hand, for each of the input and output tasks, monitoring the execution time of the input and output task at the physical layer of the physical layer, and the transmission execution time of each link transmission link excluding the physical layer, includes:
[0014] For each of the input / output tasks, monitoring the time taken for the input / output task to enter the application layer and the block storage layer, as the monitored transmission execution time taken for the input / output task in the first link transmission link;
[0015] For each of the input / output tasks, monitoring the time consumed by the input / output task in the block storage layer, as the monitored transmission execution time consumed by the input / output task in the second link transmission link;
[0016] For each of the input / output tasks, the time taken for the input / output task to leave the block storage layer and be completed by the physical layer is monitored, and this is used as the monitored execution time of the input / output task in the physical layer.
[0017] On the other hand, the input and output tasks are sent to the hard disk to be tested, including:
[0018] The input and output tasks in the preset task pool are sent to the hard disk to be tested; wherein the input and output tasks in the task pool are all input and output tasks for writing data.
[0019] On the other hand, the input and output performance test of the hard disk to be tested includes:
[0020] Pre-establishing a target model for reflecting that the hard disk to be tested is in a normal working state;
[0021] Sending input and output tasks to the hard disk to be tested, collecting input and output performance indicators of the hard disk to be tested N times, and determining the input and output performance test results of the hard disk to be tested based on the target model;
[0022] Wherein, N is a positive integer.
[0023] On the other hand, a target model is pre-established to reflect that the hard disk to be tested is in a normal working state, including:
[0024] In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected M times; wherein M is a positive integer;
[0025] Determine the first expected value of the input and output performance index of the hard disk to be tested collected M times m and standard deviation s , and based on the first expected value m and the standard deviation s Establishing a normal distribution function as the first function in the established target model;
[0026] Determine the first expected value m The fluctuation parameters of
[0027] Based on the second expected value m × (1+ a %) and the standard deviation s A normal distribution function is established as the second function in the established target model; wherein, a % represents the first expected value m The fluctuation parameter of
[0028] Based on the third expected value m × (1- a %) and the standard deviation s Establishing a normal distribution function as the third function in the established target model;
[0029] The first function, the second function and the third function are used as a pre-established target model for reflecting that the hard disk to be tested is in a normal working state.
[0030] On the other hand, the first expected value is determined m The fluctuation parameters include:
[0031] Receive a fluctuation parameter setting instruction, and use the value carried in the fluctuation parameter setting instruction as the first expected value m The fluctuation parameter.
[0032] On the other hand, the first expected value is determined m The fluctuation parameters include:
[0033] In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected P times; P is a positive integer;
[0034] After deleting the largest b values and the smallest b values from the input and output performance indicators of the hard disk to be tested collected P times, the input and output performance indicators of the hard disk to be tested collected Q times are obtained, where b is a positive integer, Q is a positive integer and Q=P-2b;
[0035] Determine the average value Q0 and the maximum value Q0 of the input and output performance indicators of the hard disk to be tested collected Q times max And the minimum value Q min ;
[0036] (Q max -Q0) / Q0×100% and (Q0-Q min ) / Q0×100%, the larger value is used as the first expected value determined. m The fluctuation parameter.
[0037] On the other hand, the input / output task is sent to the hard disk to be tested, and the input / output performance index of the hard disk to be tested is collected N times, and based on the target model, the input / output performance test result of the hard disk to be tested is determined, including:
[0038] Sending input and output tasks to the hard disk to be tested, and collecting input and output performance indicators of the hard disk to be tested N times;
[0039] Determine the fourth expected value of the input and output performance index of the hard disk to be tested collected N times m 0;
[0040] Based on the fourth expected value m 0 and the standard deviation s Establish a normal distribution function as the established objective function;
[0041] Based on the comparison between the target model and the target function, an input and output performance test result of the hard disk to be tested is determined.
[0042] On the other hand, based on the comparison between the target model and the target function, determining the input and output performance test result of the hard disk to be tested includes:
[0043] Based on the target model and the target function, respectively determining an overlap area between the target function and the first region, an overlap area between the target function and the second region, an overlap area between the target function and the third region, and an overlap area between the target function and the fourth region;
[0044] Determine the input / output performance test result of the hard disk to be tested based on the overlap area between the objective function and the first area, the overlap area between the objective function and the second area, the overlap area between the objective function and the third area, and the overlap area between the objective function and the fourth area;
[0045] Wherein, for any data point in the first region, the data point is located inside the first function, inside the second function, and inside the third function; for any data point in the fourth region, the data point is located outside the first function, outside the second function, and outside the third function;
[0046] For any data point in the second region, the data point is located inside the first function and outside the second function and / or outside the third function;
[0047] For any data point in the third region, the data point is located outside the first function and inside the second function or inside the third function.
[0048] On the other hand, based on the overlap area between the objective function and the first area, the overlap area between the objective function and the second area, the overlap area between the objective function and the third area, and the overlap area between the objective function and the fourth area, determining the input and output performance test result of the hard disk to be tested, including:
[0049] Determine whether the first condition is met;
[0050] If the first condition is met, determining that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal;
[0051] If the first condition is not met, determining whether the fourth condition is met;
[0052] If the fourth condition is met, determining that the input / output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is abnormal, and stopping the issuance of any input / output task;
[0053] If the fourth condition is not met, determining whether the second condition is met;
[0054] If the second condition is met, determining that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal, and outputting a first-level alarm message;
[0055] If the second condition is not met, determining whether the third condition is met;
[0056] If the third condition is met, it is determined that the input / output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is pending, and a second-level alarm message is output;
[0057] The first condition is that the proportion of the overlapping area between the objective function and the first area in the total area of the inner area of the objective function exceeds a preset first threshold;
[0058] The second condition is that the proportion of the overlapping area between the objective function and the second area in the total area of the inner area of the objective function exceeds a preset second threshold;
[0059] The third condition is that the proportion of the overlapping area between the target function and the third area in the total area of the inner area of the target function exceeds a preset third threshold;
[0060] The fourth condition is that the proportion of the overlapping area between the objective function and the fourth area in the total area of the inner area of the objective function exceeds a preset fourth threshold.
[0061] On the other hand, it also includes:
[0062] After outputting the level 2 warning information, a health status check is performed on the hard disk to be tested.
[0063] On the other hand, it also includes:
[0064] After the first-level alarm information is output, the number of input and output tasks directed to the hard disk to be tested is reduced according to a preset rule for reducing the node service pressure.
[0065] In a second aspect, the present invention provides a computer program product, including a computer program, which implements the steps of the hard disk testing method described above when executed by a processor.
[0066] In a third aspect, the present invention provides a hard disk testing device, comprising:
[0067] Memory for storing computer programs;
[0068] The processor is used to execute the computer program to implement the steps of the hard disk testing method as described above.
[0069] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the hard disk testing method as described above are implemented.
[0070] When applying the solution of the present application, it is considered that the reason why the traditional solution has a high probability of misjudgment is that its judgment logic ignores the processing delay of the upper layer of the cluster. That is to say, all the risks of jamming caused by slow IO are transferred to the underlying hard disk. It is easy for the hard disk to still be able to work normally but be judged as a slow disk that does not meet the performance requirements.
[0071] In this regard, in the solution of the present application, after the input and output tasks are sent to the hard disk to be tested, for each input and output task, not only the execution time of the input and output tasks at the physical layer will be monitored, but also the transmission execution time of the input and output tasks in each link transmission link except the physical layer will be monitored.
[0072] Whenever statistics are triggered, the average value of all physical layer execution times monitored between the current statistical moment and the previous statistical moment is determined, and it is determined whether the average value exceeds the preset physical layer execution time threshold. If it exceeds the preset physical layer execution time threshold, it means that the hard disk to be tested may have low performance, but it may also be caused by other reasons such as upper-layer business jams. For this reason, it is also necessary to determine the average value of all transmission execution times corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment for each link transmission link. If for each link transmission link, the average value of all transmission execution times corresponding to the link transmission link determined is lower than the time threshold set for the link transmission link, it means that there is indeed no problem with each link transmission link except the physical layer. At this time, if the input and output performance test of the hard disk to be tested is performed again, the probability of false detection can be effectively reduced, which is conducive to obtaining more accurate performance test results of the hard disk to be tested.
[0073] In summary, the solution of the present application can effectively implement the performance test of the hard disk to be tested, reduce the probability of false detection, and improve the accuracy of the test results. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.
[0075] Figure 1 A flowchart of a hard disk testing method provided by a specific embodiment of the present invention;
[0076] Figure 2 This is a schematic diagram of the transmission process at the physical level when an IO task is sent to the hard disk to be tested;
[0077] Figure 3 This is a schematic diagram of the transmission process at the protocol level when an IO task is sent to the hard disk to be tested;
[0078] Figure 4 A schematic diagram of a target model in a specific implementation manner;
[0079] Figure 5 is a schematic diagram showing target models of the first area to the fourth area in a specific implementation manner;
[0080] Figure 6 A structural schematic diagram of a hard disk testing device provided by a specific embodiment of the present invention;
[0081] Figure 7 The present invention is a schematic diagram of the structure of a computer-readable storage medium. DETAILED DESCRIPTION
[0082] The core of the present invention is to provide a hard disk testing method, device, storage medium and computer program product, which can effectively implement the performance test of the hard disk to be tested, reduce the probability of false detection, and improve the accuracy of the test results.
[0083] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0084] Please refer to Figure 1 , Figure 1 The following is a flowchart of a hard disk testing method provided in a specific embodiment of the present invention. The hard disk testing method may include the following steps:
[0085] Step S101: Sending the input and output tasks to the hard disk to be tested.
[0086] The input and output tasks are also called IO tasks. When the input and output tasks are sent to the hard disk to be tested, they may include IO tasks for reading data and IO tasks for writing data. In practical applications, they may usually be set as IO tasks for writing data. That is, in a specific implementation of the present invention, sending the input and output tasks to the hard disk to be tested may specifically include:
[0087] The input and output tasks in the preset task pool are sent to the hard disk to be tested; wherein the input and output tasks in the task pool are all input and output tasks for writing data.
[0088] This implementation method takes into account that it is more convenient to perform time statistics for input and output tasks that write data, that is, after the IO task is sent to the hard disk to be tested, when the write operation is completed, the IO task can be regarded as completed, while the IO task that reads data not only requires the IO task to be sent to the hard disk to be tested, but also requires a feedback process. Therefore, in this implementation method, in order to facilitate time statistics, all IO tasks in the task pool can be set as IO tasks that write data.
[0089] The scheme of the present application is used for performing hard disk testing, specifically performing hard disk IO performance testing. There may be various specific conditions for triggering the test. For example, the scheme of the present application may be executed to perform hard disk testing before the first shipment from the factory. For another example, during use, the scheme of the present application may be executed periodically or non-periodically to perform hard disk testing. For another example, the staff may actively decide to execute the scheme of the present application to perform hard disk testing.
[0090] In addition, it can be understood that, since there are usually multiple hard disks in the device to be tested, in practical applications, one or more hard disks can be selected for testing according to actual needs, that is, for any one hard disk, it can be used as a hard disk to be tested and tested according to the principle of the present application scheme. In practical applications, in order to ensure the test efficiency, each hard disk of the device to be tested can be tested at the same time. For example, for a certain device to be tested, there are multiple hard disks to be tested in the device to be tested. Before performing the work of cluster deployment, the IO operation can be simulated, that is, at the cluster end, the task pool of the real business IO model is delegated, and based on the task pool, the IO tasks are issued to each hard disk to be tested of the device to be tested. At this time, the real-time detection of each IO link can be opened in parallel, that is, the IO transmission of each hard disk to be tested can be detected and recorded. In addition, in some occasions, the task pool of the business IO model can also be not used, but directly in the process of the hard disk to be tested processing the IO task of the actual business, the IO performance test of the hard disk to be tested is realized through the present application scheme.
[0091] Step S102: For each input / output task, monitor the execution time of the input / output task at the physical layer, and the transmission execution time of each link transmission link excluding the physical layer.
[0092] For easier understanding, please refer to Figure 2 and Figure 3 , Figure 2 The figure is a schematic diagram of the transmission process of the IO task sent to the hard disk to be tested at the physical layer. Specifically, the IO task is received by the upper-layer business, and after being processed by the kernel task and transmitted through the physical link, it will be sent to the hard disk to be tested for processing. Figure 3This is a schematic diagram of the transmission process at the protocol level when the IO task is sent to the hard disk to be tested. Figure 3 In the example, the IO tasks are sent down in the order of application layer - file system layer - block storage layer - driver layer - hardware layer. In other specific implementations, other forms of protocol layer sequences can be set according to actual needs, but it can be understood that the IO tasks will eventually be sent down to the hardware layer, that is, the hard disk to be tested, and Figure 3 The implementation method is the transmission process of IO tasks at the protocol level that is usually used in practical applications.
[0093] Depend on Figure 3 It can be seen that when each IO task is transmitted through the link, it needs to go through multiple protocol layers, and each layer of the protocol will consume a certain degree of time to allocate and issue IO tasks. When multiple IO tasks are executed in parallel to a certain protocol layer, the IO tasks will be blocked, that is, the delay of a single IO task is accumulated. When the last IO task is issued, the delay may accumulate to the second level, which is the link amplification effect.
[0094] In this regard, in the solution of the present application, the delay in the link process and the final hard disk delay are distinguished, that is, for each IO task, the time consumed by the IO task in the physical layer will be specifically monitored, which is convenient for describing the so-called physical layer execution time. In addition, the time consumed by each link transmission link except the physical layer will also be monitored, which is convenient for describing the so-called transmission execution time of each link transmission link, and subsequent analysis will be carried out on this basis.
[0095] It should also be noted that in the present application, it is necessary to monitor the transmission execution time of each link transmission link except the physical layer, and the specific division method of the link transmission link can be set and adjusted according to actual needs, for example, based on Figure 3 The link transmission link except the physical layer is divided into an application layer, a file system layer, a block storage layer and a driver layer. For another example, in a specific implementation of the present invention, step S102 may specifically include:
[0096] For each input / output task, monitor the time it takes for the input / output task to enter the application layer and then enter the block storage layer, which is used as the transmission execution time of the monitored input / output task in the first link transmission link;
[0097] For each input / output task, monitor the time consumed by the input / output task in the block storage layer, and use the time consumed by the monitored input / output task in the transmission link of the second link as the transmission execution time;
[0098] For each input / output task, the time taken for the input / output task to leave the block storage layer and be completed by the physical layer is monitored, and this is taken as the physical layer execution time taken for the monitored input / output task in the physical layer.
[0099] This implementation method takes into account that the input and output tasks enter the block storage layer through the application layer and the file system layer in turn, and it is more convenient to count the time consumption of this process. Therefore, in this implementation method, for each IO task, the time consumption from entering the application layer to entering the block storage layer will be monitored, which is convenient for description and is called the transmission execution time consumption of the monitored input and output task in the first link transmission link. Afterwards, the time consumption of the IO task in the block storage layer can be monitored, which is convenient for description and is called the transmission execution time consumption of the monitored input and output task in the second link transmission link.
[0100] Finally, this implementation method takes into account that the time taken by the driver layer is very short and usually no lag occurs. Therefore, for each IO task, monitoring the time taken for the IO task to leave the block storage layer and be completed by the physical layer can be regarded as the physical layer execution time of the IO task.
[0101] It can be seen that in this implementation, after the IO task leaves the block storage layer, the remaining execution time of the IO task is regarded as the physical layer execution time of the IO task, which facilitates the monitoring of the physical layer execution time of the IO task. In practical applications, for example, a blktrace link detection command can be issued to implement the operation of step S102.
[0102] Step S103: Whenever statistics are triggered, determine the average value of all physical layer execution time consumed between the current statistical moment and the previous statistical moment, and determine whether the average value exceeds a preset physical layer execution time consumption threshold. If yes, execute step S104.
[0103] The specific timing of triggering statistics can be set and adjusted according to actual conditions. Statistics can be triggered periodically or non-periodically. For example, in one scenario, statistics are performed every certain period of time. In another scenario, statistics can be triggered when all IO tasks are completed. At this time, the average physical layer execution time of all IO tasks is counted.
[0104] Step S104: for each link transmission link, determine the average value of all transmission execution times corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment.
[0105] If the average value determined in step S103 exceeds the preset physical layer execution time threshold, it means that the average value is high, the execution of the IO task occupies a lot of time in the physical layer, and the hard disk to be tested may be a low-performance slow disk. However, the present application takes into account that in this case, it may also be indirectly caused by the blockage of other link transmission links. Therefore, if the input and output performance of the hard disk to be tested is directly tested at this time, it is easy to cause misjudgment, that is, the reliability of the IO performance test results cannot be well guaranteed. Therefore, in the scheme of the present application, after the average value determined in step S103 exceeds the preset physical layer execution time threshold, it is necessary to judge each other link transmission link. Specifically, for each link transmission link, it is necessary to determine the average value of the transmission execution time of all IO tasks corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment.
[0106] Please refer to Table 1 below, which is a statistical table in a specific implementation manner.
[0107] Table 1:
[0108]
[0109] In the example of Table 1, Q to I refers to the first link transmission link in the above implementation mode, and the average value is 0.000017308, which represents the average transmission execution time of each IO task monitored in the first link transmission link between the current statistical moment and the previous statistical moment.
[0110] I to D refer to the second link transmission link in the above implementation mode, and the average value is 0.000160704, which represents the average transmission execution time of each IO task monitored in the second link transmission link between the current statistical moment and the previous statistical moment.
[0111] The 0.000705359 of the link from D to C is the average value of all physical layer execution time monitored between the current statistical moment and the previous statistical moment determined in step S103.
[0112] Step S105: If, for each link transmission link, the determined average values of all transmission execution times corresponding to the link transmission link are lower than the time consumption threshold set for the link transmission link, an input / output performance test is performed on the hard disk to be tested.
[0113] If the average time consumption of all transmission executions corresponding to each link transmission link is lower than the time consumption threshold set for the link transmission link, it means that except for the hardware layer, there are no abnormalities in other links. At this time, the input and output performance test of the hard disk to be tested can usually obtain more accurate test results.
[0114] In addition, it can be understood that the time consumption thresholds set for different link transmission links may be different, and the time consumption thresholds may be designed based on the time consumption of the link transmission link under normal circumstances.
[0115] In practical applications, since the time consumption of each link transmission link is usually short, in order to facilitate comparison, after monitoring the physical layer execution time consumption of the input and output tasks in the physical layer, and the transmission execution time consumption of each link transmission link excluding the physical layer, the physical layer execution time consumption and the transmission execution time consumption of other link transmission links can be converted into time consumption proportions. Accordingly, when the relevant average values are subsequently calculated, the average values of the corresponding time consumption proportions are calculated, and then compared with the relevant threshold values. For example, in one example, the average value of the proportion of all physical layer execution time consumption monitored between the current statistical moment and the previous statistical moment is 71.7608%. Similarly, for the first link transmission link mentioned above, for example, between the current statistical moment and the previous statistical moment, the average value of the proportion of the transmission execution time consumption of each IO task monitored in the first link transmission link is 0.8395%, and for the second link transmission link mentioned above, for example, between the current statistical moment and the previous statistical moment, the average value of the proportion of the transmission execution time consumption of each IO task monitored in the second link transmission link is 7.8104%. It can be seen that compared with the time consumption, the proportion of time consumption can more intuitively reflect the time consumption of each link.
[0116] It should also be noted that after executing the above step S104, if the average transmission execution time of each IO task of one or more link transmission links is not less than the time threshold set for the link transmission link, it means that these link transmission links are also abnormal. At this time, although the input and output performance test of the hard disk to be tested will not be performed, an alarm can be issued to allow the staff to pay attention to this situation. For example, after an alarm is issued in one case, the staff analyzes that this is a normal phenomenon caused by excessive IO pressure and does not need to be processed temporarily. For another example, the staff takes measures such as reducing the amount of IO tasks so that the transmission execution time of each link transmission link except the physical layer can return to normal.
[0117] Further, in a specific embodiment of the present invention, after executing step S103, if the judgment result is that the average value obtained in step S103 does not exceed the preset physical layer execution time threshold, the test process can be directly terminated. In another embodiment, the operation of step S104 can still be continued, so as to determine the average value of all transmission execution time corresponding to each link transmission link monitored between the current statistical moment and the previous statistical moment. Afterwards, for each link transmission link, it can be determined whether the determined average value of all transmission execution time corresponding to the link transmission link is lower than the time threshold set for the link transmission link. If the judgment result of at least one link transmission link is no, it means that there is an abnormality in the link transmission link. At this time, although the input and output performance test of the hard disk to be tested will not be performed, as in the above embodiment, an alarm can be issued so that the staff can pay attention to the situation.
[0118] In a specific implementation of the present invention, the input and output performance test of the hard disk to be tested described in step S105 may specifically include the following two steps:
[0119] Step 1: pre-establish a target model for reflecting that the hard disk to be tested is in a normal working state;
[0120] Step 2: Send the input and output tasks to the hard disk to be tested, collect the input and output performance indicators of the hard disk to be tested N times, and determine the input and output performance test results of the hard disk to be tested based on the target model; where N is a positive integer.
[0121] When performing input and output performance testing on a hard disk to be tested, there can be multiple specific implementation methods. This implementation method takes into account that, in order to achieve the portability of the test, a target model can be established in advance to reflect that the hard disk to be tested is in a normal working state. After the input and output tasks are subsequently sent to the hard disk to be tested and the input and output performance indicators of the hard disk to be tested are collected N times, the target model established previously can be used to conveniently determine the input and output performance test results of the hard disk to be tested.
[0122] For example, in a specific implementation of the present invention, considering that the execution of IO tasks has a certain degree of volatility, a single value cannot be used to measure the input and output performance of the hard disk to be tested, so as to avoid obtaining a test result with insufficient accuracy. In this regard, in this implementation, a target model is established based on a normal distribution function to reflect the volatility of IO tasks.
[0123] Specifically, in a specific implementation of the present invention, the above step 1 may specifically include:
[0124] In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected M times; wherein M is a positive integer;
[0125] Determine the first expected value of the input and output performance index of the hard disk to be tested collected M times m and standard deviation s , and based on the first expected value m and standard deviation s Establishing a normal distribution function as the first function in the established target model;
[0126] Determine the first expected value m The fluctuation parameters of
[0127] Based on the second expected value m × (1+ a %) and standard deviation s A normal distribution function is established as the second function in the established target model; wherein, a % represents the first expected value m The fluctuation parameters of
[0128] Based on the third expected value m × (1- a %) and standard deviation s Establishing a normal distribution function as the third function in the established target model;
[0129] The first function, the second function and the third function are used as pre-established target models for reflecting that the hard disk to be tested is in a normal working state.
[0130] In this implementation, it is necessary to collect the input and output performance indicators of the hard disk to be tested M times in advance when the hard disk to be tested is in normal working state. For example, in one case, for the convenience of implementation, the sar tool or iostat tool can be called to collect the input and output performance indicators of the hard disk to be tested. For example, the indicators can be collected once every second. Then, after 1000 seconds, the input and output performance indicators of the hard disk to be tested collected 1000 times can be obtained, for example, represented as x1 to x 1000 .
[0131] It should be pointed out that the specific collected input and output performance indicators of the hard disk to be tested can be set according to actual needs. For example, in one case, after calling the sar tool or iostat tool, the data is collected once every second, and the specific data collected is the average value of the physical layer execution time of all IO tasks completed within this second. In some cases, the collected indicators may be bandwidth and other indicators.
[0132] Taking M equal to 1000 in the above example as an example, the input and output performance indicators x1 of the hard disk to be tested collected for the first time to the input and output performance indicators x1 of the hard disk to be tested collected for the 1000th time are obtained in sequence. 1000 After that, we can calculate x1 to x 1000 The average value, that is, the first expected value described in this embodiment m , and we can get x1 to x 1000 The standard deviation of s .
[0133] Determine the first expected value of the input and output performance index of the hard disk to be tested collected M times m and standard deviation s After that, based on the first expected value m and standard deviation s The normal distribution function is established as the first function in the established target model, which can be expressed as:
[0134] .
[0135] See also Figure 4 , is a schematic diagram of a target model in a specific implementation mode, Figure 4 The first function is recorded as f1(x). It can be understood that since it is a normal distribution function, in the present application, the horizontal axis represents the IO performance index, and the vertical axis represents the probability. m - s , m + s ), the area of the first function is 68.268949%. In the horizontal axis interval ( m -2 s , m +2 s ), the area of the first function is 95.449974%. In the horizontal axis interval ( m -3 s , m +3 s ), the area of the first function is 99.730020%.
[0136] This implementation also takes into account that the first function established above is based on the input and output performance indicators of the hard disk to be tested collected M times. For example, in the above example, the input and output performance indicators of the hard disk to be tested are collected once per second, and the input and output performance indicators of the hard disk to be tested are obtained 1000 times within 1000 seconds, thereby obtaining the first function. It is understandable that the input and output performance of the hard disk to be tested in the next 1000 seconds will be different from that in the previous 1000 seconds, that is, there will be a certain degree of fluctuation. Therefore, in this implementation, the first expected value is set. m The fluctuation parameter.
[0137] For example, in a specific scenario, the first expected value is determined m The fluctuation parameters may specifically include:
[0138] Receive a fluctuation parameter setting instruction, and use the value carried in the fluctuation parameter setting instruction as the first expected value m The fluctuation parameter.
[0139] This implementation method takes into account that the first expected value m The fluctuation parameter can be determined by the staff based on experience. For example, for a hard disk to be tested, after collecting the input and output performance indicators of the hard disk to be tested for a period of time through the sar tool or the iostat tool, the staff finds that the input and output performance indicators of the hard disk to be tested fluctuate about ±10% of the mean value. Then, the value carried in the fluctuation parameter setting instruction can be set to 10%. In this way, after the hard disk test system receives the fluctuation parameter setting instruction, the first expected value m The fluctuation parameter is set to 10%.
[0140] Determine the first expected value m After the fluctuation parameter, the second expected value can be obtained m × (1+ a %), so that the second expected value m × (1+ a %) and standard deviation s A normal distribution function is established as the second function in the established target model, for example Figure 4 In the example, the second function is denoted as f2(x). Similarly, the first expected value is determined m After the fluctuation parameter, the third expected value can be obtained m × (1- a %), so that the third expected value m × (1- a %) and standard deviation s A normal distribution function is established as the third function in the established target model, for example Figure 4 The third function is recorded as f3(x). It can be seen that the second and third functions are equivalent to the translation of the first function, reflecting the fluctuation of the performance index, and the translation amount is the first expected value. m The fluctuation parameter a %.
[0141] After obtaining the first function, the second function and the third function, in this implementation mode, the target model is obtained, that is, in this implementation mode, the first function, the second function and the third function are used as a pre-established target model for reflecting that the hard disk to be tested is in a normal working state.
[0142] In a specific embodiment of the present invention, the first expected value is determined m The fluctuation parameters may specifically include:
[0143] In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected P times; P is a positive integer;
[0144] After deleting the largest b values and the smallest b values from the input and output performance indicators of the hard disk to be tested collected P times, the input and output performance indicators of the hard disk to be tested collected Q times are obtained, where b is a positive integer, Q is a positive integer and Q=P-2b;
[0145] Determine the average value Q0 and the maximum value Q0 of the input and output performance indicators of the hard disk to be tested collected Q times max And the minimum value Q min ;
[0146] (Q max -Q0) / Q0×100% and (Q0-Q min ) / Q0×100% is the larger value as the first expected value determined. m The fluctuation parameter.
[0147] This implementation method takes into account that if the first expected value is determined by the staff based on experience m The rationality of the value is affected by the staff's level and also increases the staff's workload. In this regard, in this implementation, the input and output performance indicators of the hard disk to be tested are collected P times in advance when the hard disk to be tested is in normal working state, and then the largest b values and the smallest b values are deleted to avoid interference from abnormal data. For the remaining Q data, the average value needs to be calculated and recorded as the average value Q0, and then (Q max -Q0) / Q0×100% and (Q0-Q min ) / Q0×100%, that is, determine the difference between the maximum value of the Q data and Q0 and the difference between the minimum value of the Q data and Q0, and obtain the first expected value based on the larger difference m The fluctuation parameter.
[0148] In a specific implementation of the present invention, the above step 2 may specifically include:
[0149] Send the input and output tasks to the hard disk to be tested, and collect the input and output performance indicators of the hard disk to be tested N times;
[0150] Determine the fourth expected value of the input and output performance index of the hard disk to be tested collected N times m 0;
[0151] Based on the fourth expected value m 0 and standard deviation s Establish a normal distribution function as the established objective function;
[0152] Based on the comparison between the target model and the target function, the input and output performance test results of the hard disk to be tested are determined.
[0153] After pre-establishing a target model to reflect that the hard disk to be tested is in normal working condition, the input and output tasks can be sent to the hard disk to be tested, and the input and output performance indicators of the hard disk to be tested can be collected N times, and then combined with the target model to obtain the input and output performance test results of the hard disk to be tested.
[0154] This implementation method is based on the consideration that when the target model is implemented based on the normal distribution function, in order to facilitate comparison, after collecting the input and output performance indicators of the hard disk to be tested N times, a normal distribution function can also be established. That is, the fourth expected value of the collected N input and output performance indicators of the hard disk to be tested can be determined. m 0.
[0155] It should be emphasized that when establishing the normal distribution function, it is based on the fourth expected value m 0 and standard deviation s Establish a normal distribution function as the target function, that is, the standard deviation is not changed. s Instead of taking the value of , the same value as above is used. This makes it possible to obtain the objective function, which is equivalent to taking the value of Figure 4 The first function f1(x) in the waveform is translated to a certain extent without changing the shape of the waveform. Such a design can greatly facilitate the comparison between the target model and the target function, that is, this implementation method is conducive to more conveniently obtaining the input and output performance test results of the hard disk to be tested.
[0156] Of course, when determining the input and output performance test result of the hard disk to be tested based on the comparison between the target model and the target function, there may be many specific implementation methods. For example, in one embodiment of the present invention, the operation may specifically include:
[0157] Based on the target model and the target function, respectively determine the overlap area between the target function and the first region, the overlap area between the target function and the second region, the overlap area between the target function and the third region, and the overlap area between the target function and the fourth region;
[0158] Determine the input and output performance test result of the hard disk to be tested based on the overlap area between the target function and the first area, the overlap area between the target function and the second area, the overlap area between the target function and the third area, and the overlap area between the target function and the fourth area;
[0159] Wherein, for any data point in the first region, the data point is located inside the first function, inside the second function, and inside the third function; for any data point in the fourth region, the data point is located outside the first function, outside the second function, and outside the third function;
[0160] For any data point in the second region, the data point is located inside the first function and outside the second function and / or outside the third function;
[0161] For any data point in the third region, the data point is located outside the first function and inside the second function or inside the third function.
[0162] This implementation takes into account that each function in the target model and the target function are normal distribution functions. Therefore, the degree of conformity between the target function and the target model can be determined based on the overlapping area, and when the shapes of the waveforms of each function are the same, the calculation of the overlapping area will be very convenient.
[0163] Specifically, after obtaining the objective function, in this implementation, it is necessary to determine the overlapping area between the objective function and the first region, the overlapping area between the objective function and the second region, the overlapping area between the objective function and the third region, and the overlapping area between the objective function and the fourth region.
[0164] Easy to understand and refer to Figure 5 , the first area is a triangular area. For any data point in the first area, the data point is located inside the first function, inside the second function, and inside the third function. Taking the first function as an example, the inside of the first function is the area between the first function and the X-axis. As described above, for the normal distribution function, in the horizontal axis interval ( m -3 s , m +3 s ), its area is 99.730020%, that is, the total area inside the first function can be represented by 1. Figure 5 For example, let the intersection of the first function f1(x) and the second function f2(x) be denoted as (x 01 ,y 01 ), the intersection point of the first function f1(x) and the third function f3(x) is recorded as (x 02 ,y02 ), the intersection point of the second function f2(x) and the third function f3(x) is recorded as (x 03 ,y 03 ), then the area of the first region can be expressed as .
[0165] It can be seen that the first area is the overlap area of the first function, the second function and the third function. And it can be understood that if the overlap area of the target function and the first area is very high, it means that the input and output performance of the hard disk to be tested is very normal with little fluctuation.
[0166] Correspondingly, for any data point in the second region, the data point is located inside the first function, outside the second function and / or outside the third function. Figure 5 The second region is marked with horizontal shadows in the figure. It can be seen that the second region is the remaining region after subtracting the first region from the inner region of the first function. The area of the second region can be expressed as If the overlap area between the objective function and the second region is very high, it means that the input and output performance of the hard disk to be tested has a certain degree of fluctuation.
[0167] Correspondingly, for any data point in the third region, the data point is located outside the first function and inside the second function or inside the third function. Figure 5 The third region is marked with a slash shadow. It can be seen that the third region is the inner region formed by the first function, the second function and the third function, minus the first region and the second region. The area of the third region can be expressed as:
[0168] .
[0169] If the overlap area between the objective function and the third region is very high, it means that the input and output performance of the hard disk to be tested has a large degree of fluctuation.
[0170] Correspondingly, for any data point in the fourth region, the data point is outside the first function, outside the second function, and outside the third function. If the overlap area between the target function and the fourth region is very high, it means that the target function has obviously deviated from the target model. In this case, it can usually be directly determined that the input and output performance of the hard disk to be tested is abnormal.
[0171] In a specific embodiment of the present invention, based on the overlap area between the target function and the first area, the overlap area between the target function and the second area, the overlap area between the target function and the third area, and the overlap area between the target function and the fourth area, the input and output performance test result of the hard disk to be tested is determined, including:
[0172] Determine whether the first condition is met;
[0173] If the first condition is met, it is determined that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal;
[0174] If the first condition is not met, then determine whether the fourth condition is met;
[0175] If the fourth condition is met, it is determined that the input / output performance test result of the hard disk to be tested is that the hard disk to be tested has abnormal performance, and the issuance of any input / output task is stopped;
[0176] If the fourth condition is not met, then determine whether the second condition is met;
[0177] If the second condition is met, it is determined that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal, and a first-level alarm message is output;
[0178] If the second condition is not met, determine whether the third condition is met;
[0179] If the third condition is met, the input / output performance test result of the hard disk to be tested is determined as the hard disk to be tested performance is pending, and a second-level alarm message is output;
[0180] The first condition is that the proportion of the overlapping area of the target function and the first area in the total area of the inner area of the target function exceeds a preset first threshold;
[0181] The second condition is that the proportion of the overlapping area of the target function and the second area in the total area of the inner area of the target function exceeds a preset second threshold;
[0182] The third condition is that the proportion of the overlapping area of the target function and the third area in the total area of the inner area of the target function exceeds a preset third threshold;
[0183] The fourth condition is that the proportion of the overlapping area of the target function and the fourth region in the total area of the inner region of the target function exceeds a preset fourth threshold.
[0184] This implementation method takes into account that it is possible to first determine whether the proportion of the overlapping area of the target function and the first area in the total area of the inner area of the target function exceeds a preset first threshold, and if it exceeds the first threshold, the first condition is satisfied. This means that a large part of the target function is within the first area, indicating that the input and output performance of the hard disk to be tested is very normal with little fluctuation, and therefore, at this time, it can be directly determined that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal.
[0185] If the first condition is not met, it is necessary to determine whether the proportion of the overlapping area of the target function and the fourth area in the total area of the inner area of the target function exceeds the preset fourth threshold. If it exceeds the fourth threshold, the fourth condition is met. At this time, it means that a large part of the target function is in the fourth area, which means that the target function has obviously deviated from the target model. At this time, it can be determined that the input and output performance test results of the hard disk to be tested are abnormal performance of the hard disk to be tested, and considering that such a situation may be caused by hardware damage of the hard disk, link disconnection, etc., it is easy to cause the upper cluster to crash, so any IO task will be stopped immediately to avoid the expansion of the fault and wait for subsequent troubleshooting and repair.
[0186] If neither the fourth condition nor the first condition is satisfied, it means that the hard disk to be tested is neither obviously problematic nor obviously normal, and therefore further determination is required.
[0187] Specifically, it is then necessary to determine whether the second condition is satisfied. If the ratio of the overlap area of the target function and the second region to the total area of the inner region of the target function exceeds a preset second threshold, the second condition is satisfied. In addition, it should be noted that since the area of the second region is usually not too large, the second threshold set should not be too large.
[0188] Under the premise that neither the fourth condition nor the first condition is met, when the second condition is met, it can be determined that the business pressure of the hard disk to be tested is relatively large at this time, but the input and output performance of the hard disk to be tested is usually still normal. Therefore, it can be determined that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal, but a first-level alarm information needs to be output to remind the staff that the business pressure of the hard disk to be tested is relatively large.
[0189] Furthermore, in one embodiment, it may also include:
[0190] After the first-level alarm information is output, the number of input and output tasks directed to the hard disk to be tested is reduced according to the preset rules for reducing the node business pressure.
[0191] This implementation takes into account that, as described above, when a first-level alarm message needs to be output, it means that the business pressure of the hard disk to be tested is relatively large. In order to reduce the pressure of the hard disk to be tested, the number of input and output tasks pointing to the hard disk to be tested can be reduced according to the preset rules for reducing the business pressure of the node.
[0192] The specific content of the rules for reducing the node business pressure can be set and adjusted according to the actual situation. For example, a simple implementation method is to distribute a part of the IO tasks that originally need to be sent to the hard disk to be tested to other hard disks in the same host for processing.
[0193] If the second condition is not met, it is necessary to continue to determine whether the third condition is met. If the overlap area of the target function and the third area accounts for more than the preset third threshold in the total area of the inner area of the target function, it means that the third condition is met. At this time, it is impossible to clearly determine that the performance of the hard disk to be tested is abnormal. Therefore, the input and output performance test results of the hard disk to be tested are determined to be the performance of the hard disk to be tested is pending, that is, further in-depth analysis is required to obtain accurate results, and a secondary alarm message is output. Of course, in some cases, considering that in this case, the risk of abnormal IO performance of the hard disk to be tested is relatively high, it is also possible to directly determine the input and output performance test results of the hard disk to be tested as abnormal performance of the hard disk to be tested in this case.
[0194] Furthermore, in a specific embodiment of the present invention, it may also include:
[0195] After the second-level alarm information is output, the health status of the hard disk to be tested is checked.
[0196] In this implementation, when the third condition is met, in order to more accurately determine the input and output performance of the hard disk to be tested, a health status check of the hard disk to be tested will be performed. There may be multiple specific check items, but it is understandable that in order to ensure accuracy, a more detailed health status check may be performed in this case.
[0197] When applying the solution of the present application, it is considered that the reason why the traditional solution has a high probability of misjudgment is that its judgment logic ignores the processing delay of the upper layer of the cluster. That is to say, all the risks of jamming caused by slow IO are transferred to the underlying hard disk. It is easy for the hard disk to still be able to work normally but be judged as a slow disk that does not meet the performance requirements.
[0198] In this regard, in the solution of the present application, after the input and output tasks are sent to the hard disk to be tested, for each input and output task, not only the execution time of the input and output tasks at the physical layer will be monitored, but also the transmission execution time of the input and output tasks in each link transmission link except the physical layer will be monitored.
[0199] Whenever statistics are triggered, the average value of all physical layer execution times monitored between the current statistical moment and the previous statistical moment is determined, and it is determined whether the average value exceeds the preset physical layer execution time threshold. If it exceeds the preset physical layer execution time threshold, it means that the hard disk to be tested may have low performance, but it may also be caused by other reasons such as upper-layer business jams. For this reason, it is also necessary to determine the average value of all transmission execution times corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment for each link transmission link. If for each link transmission link, the average value of all transmission execution times corresponding to the link transmission link determined is lower than the time threshold set for the link transmission link, it means that there is indeed no problem with each link transmission link except the physical layer. At this time, if the input and output performance test of the hard disk to be tested is performed again, the probability of false detection can be effectively reduced, which is conducive to obtaining more accurate performance test results of the hard disk to be tested.
[0200] In summary, the solution of the present application can effectively implement the performance test of the hard disk to be tested, reduce the probability of false detection, and improve the accuracy of the test results.
[0201] Corresponding to the above method and system embodiments, the embodiments of the present invention further provide a hard disk testing device, a computer-readable storage medium, and a computer program product, which can be referred to in correspondence with the above.
[0202] See also Figure 6 As shown, the device may include:
[0203] Memory 601, used for storing computer programs;
[0204] The processor 602 is used to execute a computer program to implement the steps of the hard disk testing method in any of the above embodiments.
[0205] The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the hard disk testing method in any of the above embodiments are implemented.
[0206] See also Figure 7The computer readable storage medium 70 stores a computer program 71, and when the computer program 71 is executed by the processor, the steps of the hard disk testing method in any of the above embodiments are implemented. The computer readable storage medium 50 mentioned here includes RAM (Random Access Memory), memory, ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), register, hard disk, removable disk, or any other form of storage medium known in the technical field.
[0207] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0208] Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention, and the description of the above embodiments is only used to help understand the technical solution and its core idea of the present invention. It should be pointed out that for ordinary technicians in the technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A hard disk testing method, characterized in that: include: Send the input and output tasks to the hard disk to be tested; For each of the input / output tasks, monitoring the execution time of the input / output task at the physical layer, and the transmission execution time of each link transmission link excluding the physical layer; Whenever statistics are triggered, an average value of all the physical layer execution times monitored between the current statistical moment and the previous statistical moment is determined, and it is determined whether the average value exceeds a preset physical layer execution time threshold; If yes, then for each link transmission link, determine the average value of all the transmission execution times corresponding to the link transmission link monitored between the current statistical moment and the previous statistical moment; If, for each link transmission link, the determined average values of all the transmission execution times corresponding to the link transmission link are lower than the time consumption threshold set for the link transmission link, the input and output performance test of the hard disk to be tested is performed; Performing an input and output performance test on the hard disk to be tested includes: Pre-establishing a target model for reflecting that the hard disk to be tested is in a normal working state; Sending input and output tasks to the hard disk to be tested, collecting input and output performance indicators of the hard disk to be tested N times, and determining the input and output performance test results of the hard disk to be tested based on the target model; Wherein, N is a positive integer; A target model is pre-established to reflect that the hard disk to be tested is in a normal working state, including: In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected M times; wherein M is a positive integer; Determine a first expected value μ and a standard deviation σ of the input and output performance indicators of the hard disk to be tested collected M times, and establish a normal distribution function based on the first expected value μ and the standard deviation σ as a first function in the established target model; Determining a fluctuation parameter of the first expected value μ; A normal distribution function is established based on the second expected value μ×(1+a%) and the standard deviation σ as the second function in the established target model; wherein a% represents the fluctuation parameter of the first expected value μ; Establishing a normal distribution function based on the third expected value μ×(1-a%) and the standard deviation σ as the third function in the established target model; The first function, the second function and the third function are used as a pre-established target model for reflecting that the hard disk to be tested is in a normal working state; Sending an input / output task to the hard disk to be tested, collecting the input / output performance index of the hard disk to be tested N times, and determining the input / output performance test result of the hard disk to be tested based on the target model, including: Sending input and output tasks to the hard disk to be tested, and collecting input and output performance indicators of the hard disk to be tested N times; Determine a fourth expected value μ0 of the input and output performance indicators of the hard disk to be tested collected N times; Establishing a normal distribution function based on the fourth expected value μ0 and the standard deviation σ as the established objective function; Based on the comparison between the target model and the target function, determining the input and output performance test result of the hard disk to be tested; Based on the comparison between the target model and the target function, determining the input and output performance test result of the hard disk to be tested includes: Based on the target model and the target function, respectively determining an overlap area between the target function and the first region, an overlap area between the target function and the second region, an overlap area between the target function and the third region, and an overlap area between the target function and the fourth region; Determine the input / output performance test result of the hard disk to be tested based on the overlap area between the objective function and the first area, the overlap area between the objective function and the second area, the overlap area between the objective function and the third area, and the overlap area between the objective function and the fourth area; Wherein, for any data point in the first region, the data point is located inside the first function, inside the second function, and inside the third function; for any data point in the fourth region, the data point is located outside the first function, outside the second function, and outside the third function; For any data point in the second region, the data point is located inside the first function and outside the second function and / or outside the third function; For any data point in the third region, the data point is located outside the first function and inside the second function or inside the third function.
2. The hard disk testing method according to claim 1, characterized in that: For each of the input / output tasks, monitoring the execution time of the input / output task at the physical layer of the physical layer, and the transmission execution time of each link transmission link excluding the physical layer, including: For each of the input / output tasks, monitoring the time taken for the input / output task to enter the application layer and the block storage layer, as the monitored transmission execution time taken for the input / output task in the first link transmission link; For each of the input / output tasks, monitoring the time consumed by the input / output task in the block storage layer, as the monitored transmission execution time consumed by the input / output task in the second link transmission link; For each of the input / output tasks, the time taken for the input / output task to leave the block storage layer and be completed by the physical layer is monitored, and this is used as the monitored execution time of the input / output task in the physical layer.
3. The hard disk testing method according to claim 1, characterized in that: Send input and output tasks to the hard disk to be tested, including: The input and output tasks in the preset task pool are sent to the hard disk to be tested; wherein the input and output tasks in the task pool are all input and output tasks for writing data.
4. The hard disk testing method according to claim 1, characterized in that: Determining the fluctuation parameter of the first expected value μ includes: A fluctuation parameter setting instruction is received, and a numerical value carried in the fluctuation parameter setting instruction is used as a fluctuation parameter of the first expected value μ.
5. The hard disk testing method according to claim 1, characterized in that: Determining the fluctuation parameter of the first expected value μ includes: In advance, when the hard disk to be tested is in a normal working state, the input and output performance indicators of the hard disk to be tested are collected P times; P is a positive integer; After deleting the largest b values and the smallest b values from the input and output performance indicators of the hard disk to be tested collected P times, the input and output performance indicators of the hard disk to be tested collected Q times are obtained, where b is a positive integer, Q is a positive integer and Q=P-2b; Determine the average value Q0 and the maximum value Q0 of the input and output performance indicators of the hard disk to be tested collected Q times max And the minimum value Q min ; (Q max -Q0) / Q0×100% and (Q0-Q min ) / Q0×100%, the larger value is used as the fluctuation parameter of the first expected value μ.
6. The hard disk testing method according to claim 1, characterized in that: Determining the input / output performance test result of the hard disk to be tested based on the overlap area between the objective function and the first area, the overlap area between the objective function and the second area, the overlap area between the objective function and the third area, and the overlap area between the objective function and the fourth area, including: Determine whether the first condition is met; If the first condition is met, determining that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal; If the first condition is not met, determining whether the fourth condition is met; If the fourth condition is met, determining that the input / output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is abnormal, and stopping the issuance of any input / output task; If the fourth condition is not met, determining whether the second condition is met; If the second condition is met, determining that the input and output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is normal, and outputting a first-level alarm message; If the second condition is not met, determining whether the third condition is met; If the third condition is met, it is determined that the input / output performance test result of the hard disk to be tested is that the performance of the hard disk to be tested is pending, and a second-level alarm message is output; The first condition is that the proportion of the overlapping area between the objective function and the first area in the total area of the inner area of the objective function exceeds a preset first threshold; The second condition is that the proportion of the overlapping area between the objective function and the second area in the total area of the inner area of the objective function exceeds a preset second threshold; The third condition is that the proportion of the overlapping area between the target function and the third area in the total area of the inner area of the target function exceeds a preset third threshold; The fourth condition is that the proportion of the overlapping area between the objective function and the fourth area in the total area of the inner area of the objective function exceeds a preset fourth threshold.
7. The hard disk testing method according to claim 6, characterized in that: Also includes: After outputting the level 2 warning information, a health status check is performed on the hard disk to be tested.
8. The hard disk testing method according to claim 6, characterized in that: Also includes: After the first-level alarm information is output, the number of input and output tasks directed to the hard disk to be tested is reduced according to a preset rule for reducing the node service pressure.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the hard disk testing method according to any one of claims 1 to 8 are implemented.
10. A hard disk testing device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the hard disk testing method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the hard disk testing method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
RAID reconstruction triggering method and apparatus
CN106980468A
Slow disk detection method and device and computer readable storage medium
CN110865896A
Fault detection method and device for storage link, equipment and storage medium
CN111858122A
Storage server fault SAS physical link shielding device and method
CN114281639A
Slow disk detection method and device, electronic equipment and storage medium
CN114415973A
