Input and output performance test monitoring method and system, terminal and medium

By dynamically calculating the timeout time and monitoring process detection, the problem of inaccurate setting of io timeout time in storage device performance test is solved, and the testing efficiency and resource utilization are improved.

CN119201723APending Publication Date: 2024-12-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411301392.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, in the performance test of storage device, the io timeout time setting is inaccurate, resulting in test cases waiting for timeout or execution not to be completed, resulting in waste of resources and reducing testing efficiency.

Method used

By configuring the probe io process, obtaining bandwidth values ​​and calculating dynamic timeout time, starting the monitoring process to detect the running status, and judging the test process execution results based on the detection results.

Benefits of technology

Improve the adaptability and accuracy of timeout time, reduce waiting time, rationally utilize the test environment, and improve testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201723A_ABST
    Figure CN119201723A_ABST
Patent Text Reader

Abstract

The invention relates to the field of system performance testing, and particularly discloses an input and output performance test monitoring method and system, a terminal and a medium, and the method comprises the steps: configuring parameters for detecting an io process; executing the test case, issuing a detection io process when the fio test process is executed, and obtaining a bandwidth value output by executing the detection io process; calculating the timeout time of the fio test process according to the bandwidth value; executing the fio test process and starting the test monitoring process, wherein the test monitoring process detects the running state of the fio test process within the timeout time; and judging an execution result of the fio test process according to a detection result of the test monitoring process and a return parameter of the fio test process. The timeout time is calculated according to the bandwidth value, the timeout time is dynamically adjusted according to the performance of io detection, the adaptability and accuracy of the timeout time are improved, the test environment is reasonably utilized, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of system performance testing, and in particular to an input and output performance testing monitoring method, system, terminal and medium. Background Art

[0002] For storage devices, testers will use the fio tool for testing. The testing principle of the fio tool is as follows: Figure 1 As shown in the figure, the host sends io, the hardware process and software process handle io, and the host waits for the return result of io. However, during the test, there will be io timeout, io cannot return within the expected time, and even the host cannot wait for io to return, so fio cannot end normally. Io that cannot return normally will cause environmental abnormalities, causing subsequent test cases to be unable to continue to execute, resulting in a waste of test resources and reduced test progress.

[0003] The current method is to increase the timeout limit of the test case during batch automated testing, start the monitoring process to monitor the return results of the test case and the execution time of the test case. When the execution time of the test case exceeds the set test case timeout, the environment will be automatically restarted and the test case will continue to be re-executed. However, this method has the problem of inaccurate timeout setting. Due to the differences between test cases and test environments, the fixed timeout setting will not accurately reflect the actual situation of the test case. Some test cases have a timeout setting that is too long, resulting in an exception in the middle of the test case. It is necessary to wait for the timeout before restarting the environment, which leads to a waste of environmental resources and reduces the progress of the test. The timeout setting for some test cases is too short, resulting in the case being unable to be executed within the timeout, which increases the difficulty of positioning and reduces the progress of the test. Summary of the invention

[0004] To solve the above problems, the present invention provides an input-output performance test monitoring method, system, terminal and medium to improve the adaptability and accuracy of the timeout period and improve the test efficiency.

[0005] In a first aspect, the technical solution of the present invention provides an input-output performance test monitoring method, comprising the following steps: Configure the parameters for detecting the io process; Execute the test case. When the fio test process is executed, send the detection io process to obtain the bandwidth value output by the detection io process. Calculate the timeout period of the fio test process according to the bandwidth value; Execute the fio test process and start the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period; The execution result of the fio test process is determined based on the detection result of the test monitoring process and the return parameters of the fio test process.

[0006] In an optional implementation, the parameters of the detection io process are configured, specifically including: Configure the data block size of the detection io process, the data block size is smaller than the block size threshold; Configure the detection io process to run according to the time dimension; Configure the running time of the detection io process, and the running time is less than the time threshold.

[0007] In an optional implementation, when the fio test process is executed, a detection io process is sent down to obtain a bandwidth value output by the detection io process, specifically including: Step 1: Check whether the currently executed fio test process is the first fio test process of the test case. If so, execute step 2; otherwise, execute step 5. Step 2: Send the detection IO process to detect whether the detection IO process is executed successfully. If it is executed successfully, obtain the benchmark bandwidth value output by the execution detection IO process and execute step 3. If it fails, determine and feedback the test case execution failure; Step 3, multiplying the reference bandwidth value by the margin coefficient and rounding down to obtain a margin bandwidth value, wherein the margin coefficient is greater than 0 and less than 1; Step 4, saving the surplus bandwidth value to a storage area; Step 5: Obtain the margin bandwidth value from the storage area.

[0008] In an optional implementation, calculating the timeout period of the fio test process according to the bandwidth value specifically includes: Get the input parameters of the fio test process; Check if the input parameters of the fio test process have a standard running time; If it exists, get the standard running time and calculate the timeout time = standard running time + preset buffer time; If it does not exist, get the io quantity and concurrent thread quantity of each thread in the input parameters of the fio test process; Calculate the total IO executed by the fio test process = the number of IOs per thread * the number of concurrent threads; Calculate the timeout time = round up (total IO execution amount of the fio test process / remaining bandwidth value).

[0009] In an optional implementation, a test monitoring process is started, and the test monitoring process detects the running status of the fio test process within the timeout period, specifically including: Step 1: Start a non-blocking test monitoring process and query the process ID of the current fio test process; Step 2: Check whether the current running time of the test monitoring process is less than or equal to the timeout time. If so, execute step 3; otherwise, execute step 6. Step 3: Check whether the current fio test process exists according to the process ID. If it exists, execute step 4; otherwise, execute step 5. Step 4, calculating the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, and returning to step 2 after the waiting time; Step 5, exit the test monitoring process with exit code 0; Step 6: Check whether the current fio test process exists according to the process ID. If it exists, go to step 7; otherwise, go to step 8. Step 7, exit the test monitoring process with exit code 1; Step 8: Exit the test monitoring process with exit code 0.

[0010] In an optional implementation, step 4 calculates the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, specifically including: The backoff time is calculated using the exponential backoff method, which increases exponentially by 2. Calculate the remaining cycle time = round up (timeout time - current running time of the test monitoring process); The minimum value between the filter backoff time and the remaining cycle time is used as the waiting time for the next query of the fio test process.

[0011] In an optional implementation, judging the fio test process execution result according to the detection result of the test monitoring process and the return parameter of the fio test process specifically includes: Step 1, obtain the exit code of the test monitoring process; Step 2, determine whether the exit code of the test monitoring process is 0. If not, it means that the fio test process has not been completed within the timeout period, and then go to step 3. If yes, it means that the fio test process has been completed within the timeout period, and then go to step 4. Step 3: Return an error code to the test case result receiving end; Step 4, obtain the return code of the fio test process; Step 5, determine whether the return code of the fio test process is 0. If so, it indicates that the fio test process is executed successfully, and then go to step 6. Otherwise, it indicates that the fio test process fails to execute, and then go to step 7. Step 6: Return the successful execution of the fio test process to the test case result receiving terminal; Step 7: Return an error code to the test case result receiving end.

[0012] In a second aspect, the technical solution of the present invention provides an input-output performance test monitoring system, comprising: Detection io parameter configuration module: configure the parameters of the detection io process; Bandwidth value acquisition module: executes test cases, sends the detection io process when executing the fio test process, and obtains the bandwidth value output by the detection io process; A timeout calculation module: calculates the timeout of the fio test process according to the bandwidth value; fio test process monitoring module: executes the fio test process and starts the test monitoring process, and the test monitoring process detects the running status of the fio test process within the timeout period; Process execution result judgment module: judges the fio test process execution result according to the detection result of the test monitoring process and the return parameters of the fio test process.

[0013] In a third aspect, the technical solution of the present invention provides a terminal, including: A memory, used for storing an input and output performance test monitoring program; A processor is used to implement the steps of the input-output performance test monitoring method as described in any one of the above items when executing the input-output performance test monitoring program.

[0014] In a fourth aspect, the technical solution of the present invention provides a computer-readable storage medium, on which an input / output performance test monitoring program is stored. When the input / output performance test monitoring program is executed by a processor, the steps of the input / output performance test monitoring method as described in any one of the above items are implemented.

[0015] The input / output performance test monitoring method, system, terminal and medium provided by the present invention have the following beneficial effects compared with the prior art: before executing the fio test process, a detection io process is first issued to obtain a bandwidth value reflecting the test case execution environment, and a timeout time is calculated according to the bandwidth value, so that the timeout time is dynamically adjusted according to the performance of the detection io, and the adaptability and accuracy of the timeout time are improved. There is no need to manually and frequently modify the timeout time of the use case due to differences in the environment and the use case. The use case has strong adaptability, solves the problem of too long timeout time and too short timeout time, reduces the waiting time for executing the use case, reasonably uses the test environment, and improves the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions of 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.

[0016] Figure 1 This is a schematic diagram of the testing principle of the fio tool.

[0017] Figure 2 It is a flow chart of an input and output performance testing and monitoring method provided by an embodiment of the present invention.

[0018] Figure 3 This is a schematic diagram of the timeout calculation process.

[0019] Figure 4 It is a flowchart of the test monitoring process detecting the running status of the fio test process within the timeout period.

[0020] Figure 5 This is a flowchart of the fio test process execution result judgment process.

[0021] Figure 6 The present invention provides an input-output performance test monitoring system structure schematic diagram.

[0022] Figure 7 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] 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.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0025] The key terms appearing in the present invention are explained below.

[0026] fio: fio is the abbreviation of Flexible I / O Tester, which is an advanced Linux disk benchmark tool that supports multiple I / O engines and rich options.

[0027] io: io is the abbreviation of Input / Output. It describes the data exchange process between the computer system and the outside world.

[0028] Figure 2 This is a flow chart of an input and output performance test monitoring method provided by an embodiment of the present invention. Figure 2 The execution subject may be an input / output performance test monitoring system. The input / output performance test monitoring method provided in the embodiment of the present invention is executed by a computer device, and accordingly, the input / output performance test monitoring system runs in the computer device. According to different requirements, the order of the steps in the flowchart may be changed, and some may be omitted.

[0029] like Figure 2 As shown, the method includes the following steps.

[0030] S1, configure the parameters of the detection io process.

[0031] S2, execute the test case, when executing the fio test process, send the detection io process, and obtain the benchmark bandwidth value output by the execution detection io process.

[0032] S3: Calculate the timeout period of the fio test process according to the reference bandwidth value.

[0033] S4, executing the fio test process and starting the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period.

[0034] S5, judging the execution result of the fio test process according to the detection result of the test monitoring process and the return parameter of the fio test process.

[0035] The input and output performance test monitoring method provided in this embodiment first sends a detection io process to obtain a bandwidth value reflecting the test environment and performance before starting the fio test process, calculates the timeout time according to the bandwidth value, realizes adaptive dynamic adjustment of the test case, and avoids setting the timeout time too long or too short. The steps of the present invention are further described in detail below.

[0036] S1, configure the parameters of the detection io process.

[0037] The principles for configuring the parameters of the detection io process are: 1) The parameters of the fio test tool are as simple as possible and the running time is short, ensuring that the detection io process operation does not take up too many resources and time; 2) Select parameters with poor bandwidth performance. Generally speaking, the smaller the block size, the smaller the bandwidth. This is because the amount of data processed by each io operation is small, resulting in more io operations and higher overhead, thereby reducing the overall bandwidth.

[0038] Based on the above principles, the configuration of the detection io process parameters in this embodiment includes the following three aspects.

[0039] (1) Configure the data block size of the detection io process. The data block size is smaller than the block size threshold.

[0040] (2) Configure the detection io process to run according to the time dimension.

[0041] (3) Configure the running time of the detection io process, and the running time is less than the time threshold.

[0042] Exemplarily, the detection io process parameters are: block size is 4k, running according to the time dimension, and the running time is 10 seconds.

[0043] S2, execute the test case, when executing the fio test process, send the detection io process, and obtain the bandwidth value output by the execution detection io process.

[0044] S2.1, detect whether the currently executed fio test process is the first fio test process of the test case, if so, execute step 2.2, otherwise step 2.5.

[0045] S2.2, send the detection io process to detect whether the detection io process is executed successfully. If it is executed successfully, obtain the benchmark bandwidth value output by the execution detection io process and execute step 2.3. If it fails, determine and feedback the test case execution failure.

[0046] In step 2.3, the reference bandwidth value is multiplied by the margin coefficient and the result is rounded down to obtain a margin bandwidth value, where the margin coefficient is greater than 0 and less than 1.

[0047] Step 2.4, saving the surplus bandwidth value to a storage area; S2.5, obtain the bandwidth value from the storage area.

[0048] When each test case executes to the fio step, the detection io process is first issued. When a test case contains multiple fio steps, because the configuration parameters of the environment are the same, it is only necessary to issue the detection io process when entering the fio step for the first time. The other fio steps use the bandwidth value obtained for the first time. When the detection io process fails, the test case execution fails.

[0049] When the detection io process is successfully completed, the bandwidth value in the fio standard output is obtained, and the bandwidth value is recorded as the baseline bandwidth value. The obtained baseline bandwidth value is multiplied by the margin coefficient and rounded down to obtain the margin bandwidth value, which is used to calculate the timeout of the fio test process. For example, the margin coefficient is 0.8, and the margin bandwidth value obtained by multiplying the baseline bandwidth value by 0.8 and then rounding down is used as the standard for calculating the timeout time. The purpose of multiplying by 0.8 is to allow the fio test process to have more margin time.

[0050] S3: Calculate the timeout period of the fio test process according to the bandwidth value.

[0051] Figure 3 This is a schematic diagram of the timeout calculation process. Figure 3 As shown, calculating the timeout period of the fio test process according to the bandwidth value includes the following steps.

[0052] S3.1, obtain the input parameters of the fio test process.

[0053] S3.2, detect whether the input parameters of the fio test process have a standard running time.

[0054] S3.3, if it exists, obtain the standard running time and calculate the timeout time = standard running time + preset buffer time.

[0055] S3.4, if it does not exist, obtain the io quantity and concurrent thread quantity of each thread in the input parameters of the fio test process.

[0056] S3.5, calculate the total io amount executed by the fio test process = the number of ios per thread * the number of concurrent threads.

[0057] S3.6, calculate the timeout time = round up (the total IO amount executed by the fio test process / the remaining bandwidth value).

[0058] First, determine whether the input parameters of the fio test process contain the running time parameter. If so, add a fixed buffer time to the running time in the input parameters and record it as the timeout of the fio test process. For example, timeout = the running time in the fio test process input parameters + 300 seconds, and timeout is the timeout of the fio test process in seconds.

[0059] If there is no running time parameter in the input parameters of the fio test process, first the io number of each thread and the number of concurrent threads are recorded as size and job respectively, and then the total amount of executed io is calculated as size*job, then the timeout time of the fio test process timeout = round up (size*job / residual bandwidth value).

[0060] S4, executing the fio test process and starting the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period.

[0061] Start a non-blocking fio test process and record the process ID of the fio test process. According to the input parameters of the test case, splice the input parameters into a command format that fio can recognize and send it to fio for execution.

[0062] Start a non-blocking monitoring process. Within the calculated time, dynamically adjust the waiting time and loop to determine whether the fio process exists. If the fio process disappears within the calculated time, set the process exit code to 0, indicating a normal exit from the monitoring process. If the fio process still exists after the calculated time, set the process exit code to 1, indicating a timeout and exit from the monitoring process. Figure 4 This is a flow chart of the test monitoring process detecting the running status of the fio test process within the timeout period, such as Figure 4 As shown, the following steps are included.

[0063] Step 4.1, start a non-blocking test monitoring process and query the process ID of the current fio test process.

[0064] Step 4.2, check whether the current running time of the test monitoring process is less than or equal to the timeout time, if so, execute step 4.3, otherwise execute step 4.6.

[0065] Step 4.3, check whether the current fio test process exists according to the process number. If it exists, execute step 4.4, otherwise execute step 4.5.

[0066] Step 4.4, calculate the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, and return to step 4.2 after the waiting time.

[0067] Step 4.5: Exit the test monitoring process with exit code 0.

[0068] Step 4.6, check whether the current fio test process exists according to the process number. If it exists, execute step 4.7, otherwise execute step 4.8.

[0069] Step 4.7: Exit the test monitoring process with exit code 1.

[0070] Step 4.8: Exit the test monitoring process with exit code 0.

[0071] First, query the process number of the fio test process, which will be used to query whether the fio test process exists in the subsequent query. Implement a loop operation within the timeout period of the fio test process, and within the specified timeout period, loop to query whether the fio test process exists at a dynamically adjusted waiting time interval. After each query, if the fio test process does not exist, it exits with an exit code of 0, indicating that the test monitoring process ends normally. If the timeout period is short, since the loop will exit directly after waiting for a certain period of time in the loop, it is necessary to query again whether the fio test process exists before exiting the test monitoring process. If the fio test process exists, it exits with an exit code of 1, indicating that the test monitoring process detects that the fio process is still running; if the fio test process does not exist, it exits with an exit code of 0, indicating that the test monitoring process ends normally.

[0072] Considering that the fio test process may take a long time to execute, if a fixed time interval is set between two queries on whether the fio test process exists, it may cause the waiting time to be too short, increasing the system burden, or the waiting time to be too long, reducing the test efficiency. This embodiment dynamically adjusts the waiting time to avoid too long or too short waiting time. The waiting time refers to the time interval between two queries on whether the fio test process exists.

[0073] Step 4.4 calculates the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, which specifically includes the following steps.

[0074] S4.4.1, calculate the backoff time according to the exponential backoff method, and the exponential backoff method increases by a multiple of 2.

[0075] S4.4.2, calculate the remaining cycle time = round up (timeout time - current running time of the test monitoring process).

[0076] S4.4.3, filter the minimum value between the backoff time and the remaining cycle time as the waiting time for the next query of the fio test process.

[0077] If the fio test process exists, the backoff time is calculated according to the exponential backoff method (the time of the exponential backoff calculation increases exponentially, 1s for the first time, 2s for the second time, 4s for the third time, and so on, increasing exponentially by 2), and the minimum value of the backoff time calculated by the exponential backoff and the remaining cycle time (the total time minus the running time rounded up, in this embodiment the total time is the calculated overspeed time, and the running time refers to the time the test monitoring process has been running) is used as the waiting time, until the timeout time is exceeded and the loop is exited.

[0078] This embodiment uses exponential backoff to obtain the minimum value of the exponential backoff calculation time and the remaining cycle time, and dynamically adjusts the waiting time for cyclically determining whether the fio process exists, thereby avoiding excessive waiting time, increasing the flexibility of the waiting time, reducing the system load, and improving resource utilization.

[0079] S5, judging the execution result of the fio test process according to the detection result of the test monitoring process and the return parameter of the fio test process.

[0080] The execution result of the fio step is determined based on the exit code of the test monitoring process and the return value of the fio test process. When the test monitoring process exits with an exit code other than 0, the fio step fails to execute. When the test monitoring process exits normally, the return value of the fio test process is further checked. If the return value of the fio test process is non-0, the fio step fails to execute; otherwise, the fio step executes successfully. Figure 5 This is a schematic diagram of the fio test process execution result judgment process, such as Figure 5 As shown, judging the execution result of the fio test process includes the following steps.

[0081] Step 5.1, obtain the exit code of the test monitoring process.

[0082] Step 5.2, determine whether the exit code of the test monitoring process is 0. If not, it means that the fio test process was not completed within the timeout period, and execute step 5.3. If yes, it means that the fio test process was completed within the timeout period, and execute step 5.4.

[0083] Step 5.3, return an error code to the test case result receiving end.

[0084] Step 5.4, get the return code of the fio test process.

[0085] Step 5.5, determine whether the return code of the fio test process is 0. If so, it indicates that the fio test process is executed successfully, and execute step 5.6. Otherwise, it indicates that the fio test process fails to execute, and execute step 5.7.

[0086] Step 5.6: Return the successful execution of the fio test process to the test case result receiving terminal.

[0087] Step 5.7, return an error code to the test case result receiving end.

[0088] The execution result of the fio test process in this embodiment is judged by the exit code of the test monitoring process and the return code of the fio test process. First, the exit code of the test monitoring process is checked. When the exit code of the test monitoring process is not 0, it means that the fio test process has not been completed normally within the timeout period, and the test case execution fails. At this time, an error code is returned to the end receiving the case result, indicating that the case execution failed. When the exit code of the test monitoring process is 0, it means that the fio test process execution is completed within the timeout period, and the return code of the fio test process needs to be further judged. If the return code of the fio test process is not 0, it means that an error occurs during the execution of the fio test process, and the test case execution fails. At this time, an error code is returned to the end receiving the case result, indicating that the case execution fails; if the return code of the fio test process is 0, it means that the fio test process is executed successfully, the test result of the fio test process is output, the fio step is executed successfully, and the fio step success is returned to the end receiving the case result.

[0089] An embodiment of an input-output performance test monitoring method is described in detail above. Based on the input-output performance test monitoring method described in the above embodiment, an embodiment of the present invention further provides an input-output performance test monitoring system corresponding to the method.

[0090] Figure 6 It is a schematic block diagram of the structure of an input / output performance test monitoring system provided by an embodiment of the present invention. The input / output performance test monitoring system 600 can be divided into multiple functional modules according to the functions it performs. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.

[0091] The detection io parameter configuration module 610: configures the parameters of the detection io process.

[0092] The bandwidth value acquisition module 620 executes the test case, sends the detection io process when executing the fio test process, and obtains the bandwidth value output by the detection io process.

[0093] The timeout calculation module 630 calculates the timeout of the fio test process according to the bandwidth value.

[0094] The fio test process monitoring module 640 executes the fio test process and starts the test monitoring process, which detects the running status of the fio test process within the timeout period.

[0095] Process execution result judgment module 650: judges the fio test process execution result according to the detection result of the test monitoring process and the return parameter of the fio test process.

[0096] In an optional implementation, the detection io parameter configuration module 610 configures the parameters of the detection io process, specifically including: Configure the data block size of the detection io process, the data block size is smaller than the block size threshold; Configure the detection io process to run according to the time dimension; Configure the running time of the detection io process, and the running time is less than the time threshold.

[0097] In an optional implementation, when the fio test process is executed, the bandwidth value acquisition module 620 sends a detection io process to obtain the bandwidth value output by the detection io process, specifically including: Step 1: Check whether the currently executed fio test process is the first fio test process of the test case. If so, execute step 2; otherwise, execute step 5. Step 2: Send the detection IO process to detect whether the detection IO process is executed successfully. If it is executed successfully, obtain the benchmark bandwidth value output by the execution detection IO process and execute step 3. If it fails, determine and feedback the test case execution failure; Step 3, multiplying the reference bandwidth value by the margin coefficient and rounding down to obtain a margin bandwidth value, wherein the margin coefficient is greater than 0 and less than 1; Step 4, saving the surplus bandwidth value to a storage area; Step 5: Obtain the margin bandwidth value from the storage area.

[0098] In an optional implementation, the timeout calculation module 630 calculates the timeout of the fio test process according to the bandwidth value, specifically including: Get the input parameters of the fio test process; Check if the input parameters of the fio test process have a standard running time; If it exists, get the standard running time and calculate the timeout time = standard running time + preset buffer time; If it does not exist, get the io quantity and concurrent thread quantity of each thread in the input parameters of the fio test process; Calculate the total IO executed by the fio test process = the number of IOs per thread * the number of concurrent threads; Calculate the timeout time = round up (total IO execution amount of the fio test process / remaining bandwidth value).

[0099] In an optional implementation, the fio test process monitoring module 640 starts a test monitoring process, and the test monitoring process detects the running status of the fio test process within the timeout period, specifically including: Step 1: Start a non-blocking test monitoring process and query the process ID of the current fio test process; Step 2: Check whether the current running time of the test monitoring process is less than or equal to the timeout time. If so, execute step 3; otherwise, execute step 6. Step 3: Check whether the current fio test process exists according to the process ID. If it exists, execute step 4; otherwise, execute step 5. Step 4, calculating the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, and returning to step 2 after the waiting time; Step 5, exit the test monitoring process with exit code 0; Step 6: Check whether the current fio test process exists according to the process ID. If it exists, go to step 7; otherwise, go to step 8. Step 7, exit the test monitoring process with exit code 1; Step 8: Exit the test monitoring process with exit code 0.

[0100] In an optional implementation, step 4 calculates the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, specifically including: The backoff time is calculated using the exponential backoff method, which increases exponentially by 2. Calculate the remaining cycle time = round up (timeout time - current running time of the test monitoring process); The minimum value between the filter backoff time and the remaining cycle time is used as the waiting time for the next query of the fio test process.

[0101] In an optional implementation, the process execution result determination module 650 determines the fio test process execution result according to the detection result of the test monitoring process and the return parameter of the fio test process, specifically including: Step 1, obtain the exit code of the test monitoring process; Step 2, determine whether the exit code of the test monitoring process is 0. If not, it means that the fio test process has not been completed within the timeout period, and then go to step 3. If yes, it means that the fio test process has been completed within the timeout period, and then go to step 4. Step 3: Return an error code to the test case result receiving end; Step 4, obtain the return code of the fio test process; Step 5, determine whether the return code of the fio test process is 0. If so, it indicates that the fio test process is executed successfully, and then go to step 6. Otherwise, it indicates that the fio test process fails to execute, and then go to step 7. Step 6: Return the successful execution of the fio test process to the test case result receiving terminal; Step 7: Return an error code to the test case result receiving end.

[0102] The input-output performance test monitoring system of this embodiment is used to implement the aforementioned input-output performance test monitoring method. Therefore, the specific implementation method of the system can be seen in the embodiment part of the input-output performance test monitoring method in the previous text. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be introduced in detail here.

[0103] In addition, since the input-output performance test monitoring system of this embodiment is used to implement the aforementioned input-output performance test monitoring method, its function corresponds to that of the aforementioned method and will not be described in detail here.

[0104] Figure 7 A schematic diagram of the structure of a terminal 700 provided in an embodiment of the present invention includes: a processor 710, a memory 720 and a communication unit 730. The processor 710 is used to implement the following steps when implementing the input and output performance test monitoring program stored in the memory 720: Configure the parameters for detecting the io process; Execute the test case. When the fio test process is executed, send the detection io process to obtain the bandwidth value output by the detection io process. Calculate the timeout period of the fio test process according to the bandwidth value; Execute the fio test process and start the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period; The execution result of the fio test process is determined based on the detection result of the test monitoring process and the return parameters of the fio test process.

[0105] The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0106] The computer storage medium stores an input / output performance test monitoring program, and when the input / output performance test monitoring program is executed by the processor, the following steps are implemented: Configure the parameters for detecting the io process; Execute the test case. When the fio test process is executed, send the detection io process to obtain the bandwidth value output by the detection io process. Calculate the timeout period of the fio test process according to the bandwidth value; Execute the fio test process and start the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period; The execution result of the fio test process is determined based on the detection result of the test monitoring process and the return parameters of the fio test process.

[0107] The above disclosure is only a preferred embodiment of the present invention, but the present invention is not limited thereto. Any non-creative changes that can be thought of by a person skilled in the art, as well as several improvements and modifications made without departing from the principle of the present invention, should fall within the protection scope of the present invention.

Claims

1. A method for monitoring input and output performance testing, characterized in that: The following steps are involved: Configure the parameters for detecting the io process; Execute the test case. When the fio test process is executed, send the detection io process to obtain the bandwidth value output by the detection io process. Calculate the timeout period of the fio test process according to the bandwidth value; Execute the fio test process and start the test monitoring process, the test monitoring process detects the running status of the fio test process within the timeout period; The execution result of the fio test process is determined based on the detection result of the test monitoring process and the return parameters of the fio test process.

2. The input-output performance test monitoring method according to claim 1, characterized in that: Configure the parameters for detecting the io process, including: Configure the data block size of the detection io process, the data block size is smaller than the block size threshold; Configure the detection io process to run according to the time dimension; Configure the running time of the detection io process, and the running time is less than the time threshold.

3. The input-output performance test monitoring method according to claim 1, characterized in that: When the fio test process is executed, the detection io process is sent to obtain the bandwidth value output by the detection io process, including: Step 1: Check whether the currently executed fio test process is the first fio test process of the test case. If so, execute step 2; otherwise, execute step 5. Step 2: Send the detection IO process to detect whether the detection IO process is executed successfully. If it is executed successfully, obtain the benchmark bandwidth value output by the execution detection IO process and execute step 3. If it fails, determine and feedback the test case execution failure; Step 3, multiplying the reference bandwidth value by the margin coefficient and rounding down to obtain a margin bandwidth value, wherein the margin coefficient is greater than 0 and less than 1; Step 4, saving the surplus bandwidth value to a storage area; Step 5: Obtain the margin bandwidth value from the storage area.

4. The input-output performance test monitoring method according to claim 3, characterized in that: The timeout period of the fio test process is calculated according to the bandwidth value, specifically including: Get the input parameters of the fio test process; Check if the input parameters of the fio test process have a standard running time; If it exists, get the standard running time and calculate the timeout time = standard running time + preset buffer time; If it does not exist, get the io quantity and concurrent thread quantity of each thread in the input parameters of the fio test process; Calculate the total IO executed by the fio test process = the number of IOs per thread * the number of concurrent threads; Calculate the timeout time = round up (total IO execution amount of the fio test process / remaining bandwidth value).

5. The input-output performance test monitoring method according to any one of claims 1 to 4, characterized in that: Start the test monitoring process, which detects the running status of the fio test process within the timeout period, specifically including: Step 1: Start a non-blocking test monitoring process and query the process ID of the current fio test process; Step 2: Check whether the current running time of the test monitoring process is less than or equal to the timeout time. If so, execute step 3; otherwise, execute step 6. Step 3: Check whether the current fio test process exists according to the process ID. If it exists, execute step 4; otherwise, execute step 5. Step 4, calculating the waiting time for the next query of the fio test process according to the current running time of the test monitoring process, and returning to step 2 after the waiting time; Step 5, exit the test monitoring process with exit code 0; Step 6: Check whether the current fio test process exists according to the process ID. If it exists, go to step 7; otherwise, go to step 8. Step 7, exit the test monitoring process with exit code 1; Step 8: Exit the test monitoring process with exit code 0.

6. The input-output performance test monitoring method according to claim 5, characterized in that: Step 4 calculates the waiting time for the next query of the fio test process based on the current running time of the test monitoring process, including: The backoff time is calculated using the exponential backoff method, which increases exponentially by 2. Calculate the remaining cycle time = round up (timeout time - current running time of the test monitoring process); The minimum value between the filter backoff time and the remaining cycle time is used as the waiting time for the next query of the fio test process.

7. The input-output performance test monitoring method according to claim 5, characterized in that: The execution result of the fio test process is determined based on the detection result of the test monitoring process and the return parameters of the fio test process, including: Step 1, obtain the exit code of the test monitoring process; Step 2, determine whether the exit code of the test monitoring process is 0. If not, it means that the fio test process has not been completed within the timeout period, and then go to step 3. If yes, it means that the fio test process has been completed within the timeout period, and then go to step 4. Step 3: Return an error code to the test case result receiving end; Step 4, obtain the return code of the fio test process; Step 5, determine whether the return code of the fio test process is 0. If so, it indicates that the fio test process is executed successfully, and then go to step 6. Otherwise, it indicates that the fio test process fails to execute, and then go to step 7. Step 6: Return the successful execution of the fio test process to the test case result receiving terminal; Step 7: Return an error code to the test case result receiving end.

8. An input and output performance test monitoring system, characterized in that: include, Detection io parameter configuration module: configure the parameters of the detection io process; Bandwidth value acquisition module: executes test cases, sends the detection io process when executing the fio test process, and obtains the bandwidth value output by the execution detection io process; A timeout calculation module: calculates the timeout of the fio test process according to the bandwidth value; fio test process monitoring module: executes the fio test process and starts the test monitoring process, and the test monitoring process detects the running status of the fio test process within the timeout period; Process execution result judgment module: judges the fio test process execution result according to the detection result of the test monitoring process and the return parameters of the fio test process.

9. A terminal, characterized in that: include: A memory, used for storing an input and output performance test monitoring program; A processor is used to implement the steps of the input-output performance test monitoring method as described in any one of claims 1-7 when executing the input-output performance test monitoring program.

10. A computer-readable storage medium, characterized in that: The readable storage medium stores an input / output performance test monitoring program, which, when executed by a processor, implements the steps of the input / output performance test monitoring method as described in any one of claims 1-7.