Computing power adaptation adjusting and optimizing method and device and electronic equipment
By identifying the performance bottleneck window and iteratively optimizing, the problem of low computing power adaptation and tuning efficiency in the existing technology is solved, and a fast and efficient computing power adaptation solution optimization is achieved.
Patent Information
- Application Number
- CN202410940400.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
AI Technical Summary
The existing computing power adaptation and tuning methods have a long test time and low tuning efficiency. The full process test results are complex, making it difficult to obtain the best computing power adaptation solution.
By running the candidate test plan, the computing power adaptation test is carried out, the performance bottleneck window is determined and the relevant data is recorded, the optimization plan is generated, and the preset stop condition is reached is formed to form the target computing power adaptation plan.
The tuning efficiency and quality of computing power adaptation solutions are improved, and the optimization results are quickly obtained through agile verification, avoiding the complexity and inefficiency of the whole process testing.
Smart Images

Figure CN118916222A_ABST
Abstract
Description
Background Art
[0002] With the development of computing power, various heterogeneous computing power hardware, such as NPU (Neural Processing Unit), TPU (Tensor Processing Unit), various video codecs, DPU (Data Processing Unit), etc., are emerging in an endless stream, and the process of localization of computing power is also accelerating. Computing power adaptation (Performance Tuning) is the process of ensuring that various software can run normally on new computing power hardware, involving the matching and adjustment of test cases and environmental configuration parameters. The process of adjusting test cases and environmental configuration parameters to optimize matching performance is called tuning.
[0003] The relevant optimization method for computing power adaptation is to use full-process testing, that is, after adjusting the test case parameters and the environmental configuration parameters of the tested hardware environment, run the complete test case once to obtain information such as the test case score and resource utilization, and perform optimization after comprehensive analysis of the information, and conduct the next round of full-process testing on the optimized results. This method takes a long time to test, has low optimization efficiency, and the analysis of the results of the full-process test is complex and lacks focus, making it difficult to obtain the best computing power adaptation solution.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a computing power adaptation and tuning method, device and electronic device, which are used to improve the tuning efficiency of the computing power adaptation solution and optimize the tuning effect.
[0006] According to a first aspect of an embodiment of the present disclosure, a computing power adaptation and tuning method is provided, including: running a candidate test scheme to perform a computing power adaptation test, determining a target test scheme in the candidate test scheme according to a result of the computing power adaptation test, wherein the candidate test scheme includes a preset test case and a candidate environment configuration parameter; obtaining first operation data of the target test scheme during the computing power adaptation test, and when the first operation data meets a performance bottleneck condition, re-running the target test scheme, determining a performance bottleneck window and recording operating environment data corresponding to the performance bottleneck time point; generating an optimization scheme for the performance bottleneck window according to the first operation data, loading the operating environment data corresponding to the performance bottleneck time point, running the optimization scheme and recording second operation data, wherein the optimization scheme includes the preset test case and the optimization environment configuration parameter; when a preset stop iteration condition is not met, iteratively optimizing the optimization scheme according to the second operation data, and when the preset stop iteration condition is met, determining the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window; determining a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows, wherein the target computing power adaptation scheme includes the preset test case and the target environment configuration parameter.
[0007] In an exemplary embodiment of the present disclosure, when the first operating data meets the performance bottleneck condition, re-running the target test plan, determining the performance bottleneck window and recording the operating environment data corresponding to the performance bottleneck time point includes: re-running the target test plan when the value of the preset system performance indicator in the first operating data meets its corresponding performance bottleneck condition; monitoring the preset system performance indicator during the operation of the target test plan, pausing the test process when the value of the preset system performance indicator meets its corresponding performance bottleneck condition, recording a performance bottleneck time point and its corresponding operating environment data; after the performance bottleneck time point, when the preset system performance indicator does not meet its corresponding performance bottleneck condition for the first time, determining the performance bottleneck window corresponding to the performance bottleneck time point, and recording the duration of the performance bottleneck window.
[0008] In an exemplary embodiment of the present disclosure, the operating environment data includes processor state data, memory data and the execution location of the preset test case; generating an optimization plan for the performance bottleneck window based on the first operating data, loading the operating environment data corresponding to the performance bottleneck time point, running the optimization plan and recording the second operating data include: determining the optimization environment configuration parameters of the performance bottleneck window based on the first operating data; setting the test environment according to the optimization environment configuration parameters; loading the processor state data and the memory data; executing the preset test case according to the execution location; monitoring and recording the second operating data during the running of the preset test case.
[0009] In an exemplary embodiment of the present disclosure, the preset stop iteration condition includes that the current window iteration number reaches the preset window iteration number or the performance bottleneck window duration after optimization is less than a preset threshold. When the preset stop iteration condition is not met, the optimization scheme is iteratively optimized according to the second operating data. When the preset stop iteration condition is met, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window, including: determining the performance bottleneck window duration after optimization corresponding to the optimization scheme according to the second operating data; when the performance bottleneck window duration after optimization is greater than or equal to the preset threshold and the current window iteration number does not reach the preset window iteration number, forming an updated optimization scheme according to the second operating data and the optimization scheme, loading the operating environment data corresponding to the performance bottleneck time point, running the updated optimization scheme and recording the second operating data, and returning to the previous step; when the performance bottleneck window duration after optimization is less than the preset threshold, or the current window iteration number does not reach the preset window iteration number, determining the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window.
[0010] In an exemplary embodiment of the present disclosure, running a candidate test scheme to perform a computing power adaptation test, and determining a target test scheme from the candidate test schemes according to the results of the computing power adaptation test include: forming multiple candidate test schemes according to preset test cases and multiple groups of environmental configuration parameters; setting a test environment based on the environmental configuration parameters in one of the candidate test schemes, and executing the preset test case under the test environment; monitoring multiple preset system performance indicators during the execution of the preset test case to form the first operating data; determining a first score for the candidate test scheme according to the first operating data; and determining the target test scheme according to the first scores of the multiple candidate test schemes.
[0011] In an exemplary embodiment of the present disclosure, determining a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows includes: setting one of the one or more target optimization schemes as the target computing power adaptation scheme; or, determining target environment configuration parameters according to optimization environment configuration parameters of multiple target optimization schemes corresponding to multiple performance bottleneck windows, and generating the target computing power adaptation scheme according to the preset test case and the target environment configuration parameters.
[0012] In an exemplary embodiment of the present disclosure, determining a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows includes: performing a computing power adaptation test on the target computing power adaptation scheme to obtain third operating data of the target computing power adaptation scheme; when the third operating data does not meet the performance bottleneck condition, or the current comprehensive iteration number reaches a preset comprehensive iteration number, ending the tuning; when the third operating data meets the performance bottleneck condition and the current comprehensive iteration number does not reach the preset comprehensive iteration number, re-running the target computing power adaptation scheme, determining the performance bottleneck window and recording the operating environment data corresponding to the performance bottleneck time point, and iteratively tuning the target computing power adaptation scheme.
[0013] According to a second aspect of an embodiment of the present disclosure, a computing power adaptation and tuning device is provided, including: a test scheme determination module, configured to run a candidate test scheme to perform a computing power adaptation test, and determine a target test scheme from the candidate test schemes according to the results of the computing power adaptation test, wherein the candidate test schemes include preset test cases and candidate environment configuration parameters; a bottleneck window detection module, configured to obtain the first running data of the target test scheme during the computing power adaptation test, and when the first running data meets the performance bottleneck condition, re-run the target test scheme to determine the performance bottleneck window and record the running environment data corresponding to the performance bottleneck time point; a bottleneck window optimization module, configured to generate an optimization of the performance bottleneck window according to the first running data. An optimization scheme for a performance bottleneck window, loading the operating environment data corresponding to the performance bottleneck time point, running the optimization scheme and recording the second operating data, wherein the optimization scheme includes the preset test case and the optimization environment configuration parameters; a window iteration optimization module, configured to iteratively optimize the optimization scheme according to the second operating data when the preset stop iteration condition is not met, and to determine the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window when the preset stop iteration condition is met; a comprehensive optimization module, configured to determine a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows, wherein the target computing power adaptation scheme includes the preset test case and the target environment configuration parameters.
[0014] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the methods described above based on instructions stored in the memory.
[0015] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a program is stored, and when the program is executed by a processor, the computing power adaptation and tuning method as described in any one of the above items is implemented.
[0016] The disclosed embodiment determines the target optimization scheme by iteratively optimizing the performance bottleneck windows of the target test scheme separately, and finally obtains the target computing power adaptation scheme by integrating the target optimization schemes of each performance bottleneck window. The optimization is quickly performed through agile verification, which can improve the efficiency and quality of tuning the computing power adaptation scheme.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0019] Figure 1 It is a flowchart of a computing power adaptation and tuning method in an exemplary embodiment of the present disclosure.
[0020] Figure 2 It is a sub-flowchart of step S1 in the exemplary embodiment of the present disclosure.
[0021] Figure 3 is a schematic diagram of a performance bottleneck window in an exemplary embodiment of the present disclosure.
[0022] Figure 4 is a schematic diagram of a performance bottleneck window after optimization in an exemplary embodiment of the present disclosure.
[0023] Figure 5 It is a sub-flowchart of step S4 in the exemplary embodiment of the present disclosure.
[0024] Figure 6 It is a sub-flowchart of step S5 in the exemplary embodiment of the present disclosure.
[0025] Figure 7 is a schematic diagram of an automated tuning system in an exemplary embodiment of the present disclosure.
[0026] Figure 8 is a flow chart of method 100 in an exemplary embodiment of the present disclosure.
[0027] Fig. 9 yes Figure 8 Flowchart of the tuning process of the illustrated embodiment.
[0028] Fig.10 It is a block diagram of a computing power adaptation and tuning device in an exemplary embodiment of the present disclosure.
[0029] Fig.11 is a block diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0031] In addition, the accompanying drawings are only schematic diagrams of the present disclosure, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0032] The exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0033] Figure 1 It is a flowchart of a computing power adaptation and tuning method in an exemplary embodiment of the present disclosure.
[0034] refer to Figure 1 The computing power adaptation and optimization method 100 may include:
[0035] Step S1, running a candidate test scheme to perform a computing power adaptation test, and determining a target test scheme from the candidate test schemes according to the result of the computing power adaptation test, wherein the candidate test schemes include preset test cases and candidate environment configuration parameters;
[0036] Step S2, obtaining the first running data of the target test scheme during the computing power adaptation test process, and when the first running data meets the performance bottleneck condition, re-running the target test scheme, determining the performance bottleneck window and recording the running environment data corresponding to the performance bottleneck time point;
[0037] Step S3, generating an optimization scheme for the performance bottleneck window according to the first operation data, loading the operation environment data corresponding to the performance bottleneck time point, running the optimization scheme and recording the second operation data, wherein the optimization scheme includes the preset test case and the optimization environment configuration parameters;
[0038] Step S4, when the preset stop iteration condition is not met, iteratively optimizing the optimization scheme according to the second operation data, and when the preset stop iteration condition is met, determining the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window;
[0039] Step S5, determining a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows, wherein the target computing power adaptation scheme includes the preset test cases and target environment configuration parameters.
[0040] The disclosed embodiment determines the target optimization scheme by iteratively optimizing the performance bottleneck windows of the target test scheme separately, and finally obtains the target computing power adaptation scheme by integrating the target optimization schemes of each performance bottleneck window. The optimization is quickly performed through agile verification, which can improve the efficiency and quality of tuning the computing power adaptation scheme.
[0041] Next, each step of the computing power adaptation and tuning method 100 is described in detail.
[0042] In step S1, a candidate test scheme is run to perform a computing power adaptation test, and a target test scheme is determined from the candidate test schemes according to the result of the computing power adaptation test. The candidate test schemes include preset test cases and candidate environment configuration parameters.
[0043] In the embodiment of the present disclosure, the test scheme may include a preset test case and a set of environment configuration parameters. The environment configuration parameters are used to configure the test environment. For example, the environment configuration parameters may include hardware configuration parameters, software configuration parameters, network configuration parameters, storage configuration parameters, system configuration parameters, etc.
[0044] Hardware configuration parameters include, for example, processor parameters, memory parameters, storage parameters, etc. Processor (CPU, GPU, DPU, TPU, etc.) parameters may include parameters such as processor model, number of cores, main frequency, video memory capacity, video memory bandwidth, and number of CUDA cores; memory parameters may include memory capacity; storage parameters may include hard disk type (such as SSD, HDD), read and write speed, and storage capacity, etc.
[0045] Software configuration parameters include, for example, operating system parameters, programming language and framework parameters, compiler parameters, dependent library parameters, etc. Among them, operating system (OS) parameters may include the type and scheduling mode of the operating system; programming language and framework parameters may include programming languages (such as Python, R, Java) and corresponding libraries or frameworks (such as TensorFlow, PyTorch, PaddlePaddle); compiler parameters may include versions and configuration options, etc.; dependent library parameters may include versions and configuration options of dependent libraries, etc.
[0046] The network configuration parameters include, for example, bandwidth parameters, delay parameters, network protocol parameters, etc. The bandwidth parameters may include the network bandwidth value; the delay parameters may include the setting of the network delay time; and the network protocol parameters may include the type of network protocol that is suitable for the current test environment and application scenario.
[0047] Storage configuration parameters include, for example, file system parameters, cache strategies, storage media, etc. The file system parameters may include the type of file system; the file system cache strategy (such as write cache, read cache) may include whether to enable write / read cache, etc.; the storage media may include selecting the appropriate storage media type according to application requirements.
[0048] System configuration parameters include, for example, kernel path, system resource limit, time synchronization strategy, etc. Kernel path may include configuration of environment variables (such as PATH, LD_LIBRARY_PATH) so that the program can correctly find and link library files when running; system resource limit (such as ulimit setting) controls the maximum amount of resources that a single process can use. The system resource limit value can avoid program exceptions caused by insufficient resources. For example, when running large-scale data processing tasks, it is necessary to increase the limit of file descriptors; inappropriate time synchronization strategy may lead to data inconsistency or other problems that are difficult to debug. Debugging the time synchronization strategy can achieve time synchronization across nodes.
[0049] The above are only examples. In actual applications, technicians in this field can set various environmental configuration parameters according to actual conditions, such as kernel parameter configuration, large page memory, compiler configuration parameters, etc., to form multiple environmental configuration parameter schemes, which together with test cases constitute a test scheme, and then generate test tasks. By executing the test tasks to run the test scheme, the environmental configuration parameters and programs (determined according to the test cases) that can meet the computing power adaptation goals are determined as the target computing power adaptation scheme with the best computing power adaptation effect.
[0050] In addition to environmental configuration parameters, test cases are also one of the key tools for adjusting system performance during computing power adaptation. Test cases are usually a series of operation sequences that simulate various scenarios and load conditions during system operation, such as scenario simulation, load simulation, data volume and data complexity simulation, resource utilization strategy simulation, abnormal and boundary condition testing, performance indicator evaluation, etc. By adjusting the input data size, number of concurrent requests, request type and frequency, resource utilization, network conditions, test duration and other parameters of the test case, different test cases can be formed to perform computing power adaptation.
[0051] The computing power adaptation solution includes the pairing of test cases and environment configuration parameters. The tuning process of the computing power adaptation solution involves the tuning of test cases and the tuning of environment configuration parameters.
[0052] In the embodiment of the present disclosure, in order to improve the tuning efficiency, a test case is fixed to debug the environment configuration parameters, and multiple candidate test schemes are formed based on a test case (i.e., a preset test case) and multiple groups of candidate environment configuration parameters. After the candidate test scheme with the best performance is set as the target test scheme for tuning, a target computing power adaptation scheme with better performance is formed, and the better environment configuration parameters corresponding to the preset test case are determined.
[0053] Furthermore, after determining the optimal environmental configuration parameters corresponding to the preset test cases, the preset test cases can also be tuned (for example, adjusting the input data size, number of concurrent requests, request type and frequency, resource utilization, network conditions, test duration and other parameters of the preset test cases) to further tune the target computing power adaptation plan from the perspective of the test cases, thereby optimizing the final computing power adaptation plan.
[0054] When there are multiple test cases, the corresponding target computing power adaptation plan can be determined based on each test case, and each test case can be further optimized according to the corresponding target computing power adaptation plan to form multiple preferred computing power adaptation plans. Finally, the computing power adaptation plan with the best computing power adaptation effect is determined among the multiple preferred computing power adaptation plans.
[0055] The following is an explanation of the process of determining the target computing power adaptation solution based on a test case, namely a preset test case. The same is true for other test cases.
[0056] Figure 2 It is a sub-flowchart of step S1 in the exemplary embodiment of the present disclosure.
[0057] refer to Figure 2 In an exemplary embodiment of the present disclosure, step S1 may include:
[0058] Step S11, forming multiple candidate test solutions according to preset test cases and multiple sets of environmental configuration parameters;
[0059] Step S12, setting a test environment based on the environment configuration parameters in one of the candidate test solutions, and executing the preset test case under the test environment;
[0060] Step S13, monitoring a plurality of preset system performance indicators during the execution of the preset test case to form the first operation data;
[0061] Step S14, determining a first score of the candidate test solution according to the first operation data;
[0062] Step S15: determining the target test solution according to the first scores of the multiple candidate test solutions.
[0063] exist Figure 2 In the illustrated embodiment, multiple candidate test schemes can be formed based on the pairing of multiple groups of candidate environment configuration parameters with preset test cases, and each candidate test scheme includes a preset test case and a group of candidate environment configuration parameters. Next, multiple candidate test schemes are tested and the first operating data of the system during the operation of the candidate test scheme is recorded. The computing power adaptation effect of the first operating data is scored based on preset rules to obtain a first score. According to the first score, the candidate test scheme with the best computing power adaptation effect is selected from multiple candidate test schemes as the target test scheme that needs to be further tuned in the future, so as to improve the tuning efficiency.
[0064] The first operation data may include data on the changes in the values of multiple preset system performance indicators over time. The preset system performance indicators may include, for example, resource utilization rate, request response time, request processing volume, and other performance indicators that can reflect the computing power adaptation effect, wherein the resource utilization rate is, for example, processor utilization rate (such as CPU utilization rate), memory utilization rate, etc. Those skilled in the art may set the types of preset system performance indicators that need to be monitored according to the tuning target of computing power adaptation, and the present disclosure does not impose any special restrictions on this.
[0065] The preset scoring rules can be set according to the types of preset system performance indicators. In an exemplary embodiment, the preset scoring rules can set individual scores and weights for each item, and finally obtain a first score based on the weighted calculation results of different items. For example, the score of the CPU usage item can be determined based on the maximum value of the CPU usage and the duration of the maximum value. The higher the CPU usage, the lower the score, and the weight of the CPU usage is set. The same is true for other items such as memory usage. Finally, a first score is obtained based on the individual scores of multiple preset system performance indicators and their corresponding weights. The higher the first score of the first operating data, the better the computing power adaptation effect of the corresponding candidate test scheme.
[0066] The candidate test scheme with the highest score can be set as the target test scheme that needs to be further optimized. Since there is no need to optimize each candidate test scheme (i.e., computing power adaptation scheme), only the target test scheme (computing power adaptation scheme) with the best performance can be further optimized, which can greatly improve the efficiency of computing power adaptation tuning.
[0067] In step S2, the first operating data of the target test scheme in the computing power adaptation test process is obtained. When the first operating data meets the performance bottleneck condition, the target test scheme is re-run to determine the performance bottleneck window and record the operating environment data corresponding to the performance bottleneck time point.
[0068] It can be seen from the above embodiments that each candidate test scheme records the first operating data, and the target test scheme is one of the candidate test schemes. In step S2, the first operating data of the target test scheme can be directly read, and then, based on the first operating data, it is determined whether the target test scheme has a performance bottleneck, that is, whether further tuning is required. If there is a performance bottleneck, further tuning is performed in step S2; if there is no performance bottleneck in the target test scheme, it is determined that the target test scheme is a better computing power adaptation scheme, and no tuning is required, and the tuning is ended.
[0069] Next, the tuning process of the target test scheme that needs further tuning is described in detail.
[0070] In an exemplary embodiment, it can be determined that the target test scheme needs further tuning when the first running data meets the performance bottleneck condition. In the embodiment of the present disclosure, the performance bottleneck condition refers to a preset condition for judging whether the computing power adaptation effect of the current target test scheme meets the computing power adaptation requirements and whether further tuning is required, which can be directly called when used.
[0071] The performance bottleneck condition can be a performance bottleneck condition that is judged by comprehensively considering multiple preset system performance indicators (for example, the performance bottleneck condition is that a performance bottleneck is judged to exist when the value of indicator A is less than a and the value of indicator B is greater than b), or it can be a performance bottleneck condition set for different preset system performance indicators (for example, the performance bottleneck condition corresponding to indicator A is that indicator A is less than a, and the performance bottleneck condition corresponding to indicator B is that indicator B is less than b). When any preset system performance indicator meets its corresponding performance bottleneck condition, it is judged that a performance bottleneck exists and further optimization is required.
[0072] In some embodiments, the target test scheme can be re-run when the value of the preset system performance indicator in the first operation data meets the corresponding performance bottleneck condition. The preset system performance indicator during the operation of the target test scheme is monitored, and when the value of the preset system performance indicator meets the corresponding performance bottleneck condition, the test process is suspended, and a performance bottleneck time point and its corresponding operating environment data are recorded. After the performance bottleneck time point, when the preset system performance indicator does not meet the corresponding performance bottleneck condition for the first time, the performance bottleneck window corresponding to the performance bottleneck time point is determined, and the duration of the performance bottleneck window is recorded.
[0073] In the exemplary embodiment, the performance bottleneck condition is taken as an example, which is a performance bottleneck condition set for different preset system performance indicators, that is, any preset system performance indicator satisfies its corresponding performance bottleneck condition to determine that a performance bottleneck exists. However, in other embodiments of the present disclosure, other types of performance bottleneck conditions may also be set to determine whether the first operating data has a performance bottleneck, that is, whether it needs to continue to be tuned, and the present disclosure does not impose any special restrictions on this.
[0074] When it is determined that the target test plan meets the performance bottleneck condition, run the target test plan again to identify the performance bottleneck window and record the performance bottleneck performance (i.e., operating environment data) corresponding to the performance bottleneck window, so as to facilitate subsequent tuning of each performance bottleneck window.
[0075] Figure 3 is a schematic diagram of a performance bottleneck window in an exemplary embodiment of the present disclosure.
[0076] refer to Figure 3 In an exemplary embodiment, the full-process test can be performed again on the target test scheme, and when any preset system performance indicator (such as resource utilization) monitored meets its corresponding performance bottleneck condition (such as indicator A is less than a), or when several preset system performance indicators meet the performance bottleneck condition (such as the value of indicator A is less than a and the value of indicator B is greater than b), a performance bottleneck time point T1 (also referred to as the starting breakpoint T1 of the performance bottleneck window) is recorded.
[0077] exist Figure 3 In the illustrated embodiment, taking the preset system performance indicator as resource utilization as an example, when it is detected that the resource utilization (for example, the CPU utilization or memory utilization in the preset system performance parameters) meets its corresponding performance bottleneck threshold Vt, the start breakpoint T1 of the performance bottleneck window is marked, the test is paused, and the context information, test data and other status data of the test process are recorded, that is, the operating environment data is saved, and then the test is continued, and the time point of continuing the test is recorded.
[0078] When the resource utilization does not meet its corresponding performance bottleneck threshold Vt for the first time, mark the end breakpoint T2 of the performance bottleneck window, pause the test, determine the performance bottleneck window duration based on the time from the time point of continuing the test to the current time point, i.e., the end breakpoint T2, and record a performance bottleneck window.
[0079] Continue testing, and when it is found that the preset system performance indicators meet the performance bottleneck conditions again (the judgment logic may be different from the previous judgment logic, and the preset system performance indicators judged may be different), record a performance bottleneck window again, and repeat the above process to record the operating environment data of the performance bottleneck window and the duration of the performance bottleneck window. After completing the full-process test of the target test plan, multiple performance bottleneck windows and their corresponding operating environment data and performance bottleneck window durations may be recorded. The causes and manifestations of each performance bottleneck window are different (the types and values of the preset system performance indicators are different, and the operating environment data are different). Each performance bottleneck window can be tuned separately in the future to improve the tuning efficiency and tuning quality.
[0080] By monitoring and analyzing the preset system performance indicators during the test, the parts with greater resource load pressure are intercepted as the focus of tuning. The intercepted breakpoint information (i.e., operating environment data) can be used repeatedly to improve the tuning efficiency.
[0081] In step S3, an optimization plan for the performance bottleneck window is generated based on the first operating data, the operating environment data corresponding to the performance bottleneck time point is loaded, the optimization plan is run and the second operating data is recorded, and the optimization plan includes the preset test case and the optimization environment configuration parameters.
[0082] In an exemplary embodiment, the operating environment data may include processor state data, memory data, and the execution location of a preset test case. Step S3 can determine the optimized environment configuration parameters of the performance bottleneck window based on the first operating data, set the test environment according to the optimized environment configuration parameters, load the processor state data and memory data, execute the preset test case according to the execution location, and then monitor and record the second operating data during the running of the preset test case.
[0083] Among them, determining the optimization environment configuration parameters of the performance bottleneck window according to the first operating data can be based on the preset system performance indicators that cause the performance bottleneck window, judging the resource distribution of the performance bottleneck window, and then judging the cause of the performance bottleneck according to the type and value of the preset system performance indicators that meet the performance bottleneck conditions and the iterative optimization strategy that has been implemented (of course, no optimization strategy may have been implemented), and selecting a suitable optimization configuration option in the optimization configuration scheme library based on the cause, determining the tuning configuration of the option, and obtaining a set of optimization environment configuration parameters.
[0084] The logic for determining the cause of the performance bottleneck and the optimization configuration options corresponding to one or more causes can be pre-set to form an optimization configuration solution library. Finally, an optimization solution is formed based on the optimization environment configuration parameters and preset test cases, and the optimization solution is subsequently verified and iteratively optimized. When there are multiple performance bottleneck time points, an optimization solution needs to be generated for each performance bottleneck time point.
[0085] By formulating a tuning strategy specifically for each performance bottleneck time point based on the resource distribution at each performance bottleneck time point, this is more targeted and more efficient than tuning for the entire test process.
[0086] In addition to the processor state data, memory data and the execution location of the preset test case mentioned above, the operating environment data may also include other context information of the test process.
[0087] Exemplarily, when saving the operating environment data at the performance bottleneck time point, the CPU state (register value), memory content (possibly a snapshot of some key memory areas or the global memory state), and other required system states (such as device status, file system status, etc.) at the start breakpoint (i.e., the performance bottleneck time point) can be saved to a persistent storage medium (such as a hard disk).
[0088] When it is necessary to restore the state of the start breakpoint, read the previously saved operating environment data, and restore the system operating state corresponding to the performance bottleneck time point according to the saved operating environment data. For example, the saved register state and other CPU-related state information can be reloaded into the CPU, and the saved memory content can be reloaded into the memory (for example, the value of the key memory area is restored to the state when it was saved); if the test process involves devices (such as external devices, network connections, etc.), the state of these devices can also be restored to the same state as when they were saved; in addition, if there are operations on the file system during the test, it may also be necessary to ensure that the file system is in the state when it was saved to maintain consistency.
[0089] Once the system status at the start breakpoint of the performance bottleneck window, i.e. the performance bottleneck time point, is restored, the execution flow of the preset test case can be controlled to continue from the execution position corresponding to the performance bottleneck time point (e.g. a line of code) instead of starting from the beginning.
[0090] In some embodiments, a preset test case can be executed starting from the performance bottleneck time point until the preset test case is completed, and the complete optimization effect of the optimization scheme can be verified based on the second running data recorded from the performance bottleneck time point to the completion of the preset test case.
[0091] In other embodiments, in order to improve testing efficiency, the execution of preset test cases can be stopped when the preset termination conditions are met, and the optimization effect of the optimization scheme on the current performance bottleneck window can be determined based on the second running data recorded from the performance bottleneck time point to the stop of the execution of the preset test cases, and the optimization scheme can be iteratively tuned, or the tuning can be ended.
[0092] Exemplarily, the preset termination condition may include that all preset system performance parameters do not meet the performance bottleneck condition (i.e., the performance bottleneck ends), or that all preset system performance parameters do not meet the performance bottleneck condition within the performance bottleneck window duration (measured in step S2) corresponding to the current performance bottleneck time point (i.e., it is determined that the performance bottleneck window is eliminated, regardless of what is outside the performance bottleneck window). When the preset test case is stopped according to the preset termination condition, the end time point can be recorded, the test duration can be calculated to determine the optimized performance bottleneck window duration, and the second operation data that has been recorded can be saved. Subsequently, the optimization effect of the optimization scheme is evaluated based on the optimized performance bottleneck window duration and the second operation data.
[0093] Figure 4 is a schematic diagram of a performance bottleneck window after optimization in an exemplary embodiment of the present disclosure.
[0094] refer to Figure 4 , still taking the preset system performance parameter as resource utilization as an example, Figure 3 The illustrated embodiments correspond to each other for ease of comparison.
[0095] Load the operating environment data of the performance bottleneck time point T1 to restore the system state at the performance bottleneck time point. Monitor resource utilization, and when the resource utilization reaches the corresponding performance bottleneck threshold Vt, record the start time point T3 of the optimized performance bottleneck window when the optimization plan is running. At this time, the test can be paused, and the operating environment data of the start time point T3 of the optimized performance bottleneck window can be saved as part of the second operation data. Continue testing, record the time point of continued testing, monitor resource utilization, and record the end time point T4 corresponding to the optimized performance bottleneck window when the resource utilization does not meet the performance bottleneck threshold Vt for the first time after the start time point T3. Determine the length of the optimized performance bottleneck window based on the time point of continued testing and the end time point T4 as part of the second operation data.
[0096] It should be noted that if the resource utilization does not reach the corresponding performance bottleneck threshold Vt, the optimized performance bottleneck window duration can be set to 0.
[0097] In an exemplary embodiment, in addition to the above-mentioned optimized performance bottleneck window duration and the operating environment data of the starting time point T3 of the optimized performance bottleneck window, other contents of the second operating data may correspond to the first operating data, for example, the types of preset system performance parameters recorded and the recording methods are the same.
[0098] exist Figure 4 In the illustrated embodiment, the first operating data is the operating data of the full-process test, and the second operating data is the operating data of the optimization scheme in the performance bottleneck window. Corresponding to the performance bottleneck window and the optimization scheme, different performance bottleneck windows correspond to different second operating data, and different optimization schemes correspond to different second operating data.
[0099] In step S4, when the preset stop iteration condition is not met, the optimization scheme is iteratively optimized according to the second operating data, and when the preset stop iteration condition is met, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window.
[0100] In an exemplary embodiment, the preset stop iteration condition includes that the current window iteration number reaches the preset window iteration number or the performance bottleneck window duration after optimization is less than a preset threshold.
[0101] Figure 5 It is a sub-flowchart of step S4 in the exemplary embodiment of the present disclosure.
[0102] refer to Figure 5 , step S4 performs iterative optimization within the bottleneck window, and step S4 may include:
[0103] Step S41, determining the optimized performance bottleneck window duration corresponding to the optimization scheme according to the second operation data;
[0104] Step S42, when the optimized performance bottleneck window duration is greater than or equal to the preset threshold value and the current window iteration number does not reach the preset window iteration number, an updated optimization plan is formed according to the second operation data and the optimization plan, the operation environment data corresponding to the performance bottleneck time point is loaded, the updated optimization plan is run and the second operation data is recorded, and the previous step is returned;
[0105] Step S43, when the optimized performance bottleneck window duration is less than a preset threshold, or the current window iteration number does not reach the preset window iteration number, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window.
[0106] exist Figure 5 In the illustrated embodiment, the current window iteration number is initialized to 0 and the value of the preset window iteration number, and the preset window iteration number is used to limit the convergence of the program.
[0107] If the optimization scheme does not eliminate the performance bottleneck state at the corresponding performance bottleneck time point, for example, the performance bottleneck window duration after optimization is greater than or equal to the preset threshold, and the number of current window iterations does not reach the preset window iteration number, the optimization scheme for the performance bottleneck time point is generated again according to the current optimization scheme and its corresponding second operating data. After updating the current window iteration number, the newly generated optimization scheme is set as the current optimization scheme, the test environment is set according to the optimization environment setting parameters in the current optimization scheme, the operating environment data corresponding to the performance bottleneck time point is reloaded, the operating environment of the target test scheme at the performance bottleneck time point is restored, and the preset test case is executed at the saved execution location to record the second operating data corresponding to the newly generated optimization scheme, i.e., the current optimization scheme, to verify the optimization effect of the current optimization scheme.
[0108] If the optimization scheme has eliminated the performance bottleneck state at the corresponding performance bottleneck time point, that is, the duration of the optimized performance bottleneck window is less than the preset threshold (the duration of the optimized performance bottleneck window is set to 0 when there is no performance bottleneck window), or the current window iteration number does not reach the preset window iteration number, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window.
[0109] The above iterative optimization process is performed on each performance bottleneck window of the target test solution until the target optimization solution corresponding to each performance bottleneck window is determined. The target optimization solution may eliminate the corresponding performance bottleneck window, or it may reduce the performance bottleneck window duration of the corresponding performance bottleneck window, or it may change the performance bottleneck performance of the performance bottleneck window, for example, it eliminates the performance bottleneck of a more important preset system performance parameter but causes a performance bottleneck of a less important system performance parameter. The above performances can all be regarded as the disappearance of the performance bottleneck window. The target test solution must at least be able to make its corresponding performance bottleneck window disappear.
[0110] By performing iterative optimization within each performance bottleneck window, agile verification of the tuning plan for the performance bottleneck can be achieved. Compared with overall tuning of the test plan and conducting full-process testing, the embodiment of the present disclosure can quickly obtain a target optimization plan that eliminates or minimizes the performance bottleneck state of each performance bottleneck window, obtains the optimized environment configuration parameters, and finally obtains an overall optimization plan by integrating the target optimization plans corresponding to each performance bottleneck window, thereby greatly improving the tuning efficiency and tuning effect.
[0111] In step S5, a target computing power adaptation scheme is determined according to the target optimization scheme corresponding to one or more performance bottleneck windows, and the target computing power adaptation scheme includes the preset test cases and target environment configuration parameters.
[0112] It should be noted that in the embodiments of the present disclosure, the candidate test scheme, the target test scheme, the optimization scheme, the target optimization scheme, and the target computing power adaptation scheme are all computing power adaptation schemes, and all include preset test cases and a set of environmental configuration parameters, but they are named differently to clearly illustrate their functions. The preset test cases corresponding to different names are the same, but the environmental configuration parameters corresponding to different names are not exactly the same.
[0113] In some embodiments, when there are multiple performance bottleneck windows, one of the target optimization solutions corresponding to the multiple performance bottleneck windows can be selected as the most important target optimization solution, that is, the target computing power adaptation solution.
[0114] In other embodiments, when there are multiple performance bottleneck time points, the target environment configuration parameters can also be determined based on the optimization environment configuration parameters of multiple target optimization schemes corresponding to multiple performance bottleneck windows, and the target computing power adaptation scheme can be generated based on preset test cases and target environment configuration parameters.
[0115] Figure 6 It is a sub-flowchart of step S5 in the exemplary embodiment of the present disclosure.
[0116] refer to Figure 6 In an exemplary embodiment of the present disclosure, step S5 may include:
[0117] Step S51, determining a second score of the target optimization scheme according to second operation data of the target optimization scheme;
[0118] Step S52, when there is more than one performance bottleneck time point, determine the target computing power adaptation plan according to the second score of the target optimization plan corresponding to each performance bottleneck time point.
[0119] Figure 6 The embodiment shown is to determine the target computing power adaptation scheme based on the overall effect of each target optimization scheme. The determination method can be to select one from multiple target optimization schemes, or to select the N target optimization schemes with the highest second scores, and then form an optimization scheme as the target computing power adaptation scheme based on the improvement methods of these target optimization schemes (for example, increasing the value of a certain item or reducing the value of a certain item, changing the xx type to the yy type, etc.), the common improvement items (the types of parameters that are improved together), etc. The second score is used to represent the optimization effect of the target optimization scheme. The method of determining the second score can be the same as Figure 2 The manner of determining the first score in the embodiments is the same or different, and the present disclosure does not impose any particular limitation on this.
[0120] In some embodiments, the target optimization scheme corresponding to the most important or most serious performance bottleneck windows can also be selected according to the importance or severity of the performance bottleneck window to determine the target computing power adaptation scheme. For example, the performance bottleneck severity of performance bottleneck window A is the highest, and the target optimization scheme of performance bottleneck window A can be set as the target computing power adaptation scheme. Alternatively, the performance bottleneck severity of performance bottleneck window A and performance bottleneck window B is the highest, and the target optimization schemes of performance bottleneck window A and performance bottleneck window B can be combined to determine the target computing power adaptation scheme, or the second highest score in the target optimization schemes of performance bottleneck window A and performance bottleneck window B is set as the target computing power adaptation scheme. In this method, when the performance bottleneck window is determined in step S2, the performance bottleneck window A (or performance bottleneck window A and performance bottleneck window B) with the highest performance bottleneck severity can be found, and subsequently only the optimization scheme and target optimization scheme need to be determined for performance bottleneck window A (or performance bottleneck window A and performance bottleneck window B), and the target optimization scheme is iteratively optimized without processing other performance bottleneck windows, which greatly improves the tuning efficiency.
[0121] After the target computing power adaptation plan is formed comprehensively, a full-process test can be performed to determine whether the effect of the target computing power adaptation plan meets the tuning target. If it does not meet the tuning target, each performance bottleneck window can be iteratively tuned to form a target optimization plan with better performance, or the method of determining the target computing power adaptation plan according to each target optimization plan can be iteratively adjusted to form a target computing power adaptation plan with better performance. The present disclosure does not impose any special restrictions on this.
[0122] In an exemplary embodiment, the process of iteratively adjusting the target computing power adaptation scheme may include: performing a computing power adaptation test on the target computing power adaptation scheme, and obtaining the third operating data of the target computing power adaptation scheme; when the third operating data does not meet the performance bottleneck condition, or the current comprehensive number of iterations reaches a preset comprehensive number of iterations, ending the tuning; when the third operating data meets the performance bottleneck condition and the current comprehensive number of iterations does not reach the preset comprehensive number of iterations, re-running the target computing power adaptation scheme, determining the performance bottleneck window and recording the operating environment data corresponding to the performance bottleneck time point, and iteratively tuning the target computing power adaptation scheme.
[0123] When there are multiple preset test cases, after determining the target computing power adaptation scheme with the best tuning effect corresponding to the preset test case, the preset test case can be replaced to determine the target computing power adaptation schemes corresponding to the multiple preset test cases respectively, and the final computing power adaptation scheme can be comprehensively determined based on several schemes with the best performance among the multiple target computing power adaptation schemes.
[0124] Figure 7 is a schematic diagram of an automated tuning system in an exemplary embodiment of the present disclosure. Figure 7The automated tuning system 700 shown can be used to execute the above-mentioned computing power adaptation tuning method 100.
[0125] refer to Figure 7 The automated tuning system 700 may include a test scheduling module 711, a test execution module 712, a monitoring and breakpoint module 713, and an optimization analysis module 714 deployed on a control node 71, as well as test software 721, monitoring software 722, and breakpoint management software 723 for running test tasks deployed on a test node 72.
[0126] The control node 71 is the computer node where the main control module of the tuning system 700 is located, and can be remotely connected to the computer node being tested; the test node 72 is the computer node being tested, and is installed with software tools such as test software 721, monitoring software 722, and breakpoint management software 723, among which the breakpoint management software 723 is responsible for the discovery, saving, and loading of the start breakpoint and end breakpoint of the performance bottleneck window.
[0127] The test arrangement module 711 is used to integrate the test environment and execution information, i.e., the test cases, and arrange the test schemes of multiple cases, multiple environments, and multiple configurations, including the test case configuration component 7111 and the test environment configuration component 7112. The test case configuration component 7111 is used to arrange the test case parameters, the test case execution order, etc. of the test case, and form various different test case configurations according to the user input to test the application load or application configuration of the system; the test environment configuration component 7112 is used to configure the test environment parameters to form the environment configuration parameters, and the environment configuration parameters include, for example, kernel parameter configuration, large page memory, compiler, etc., and can form various different tested environment configurations according to the user input to test the performance of the tested environment under different environment configuration parameters. The test arrangement module 711 can select different test case configurations and test environment configurations to form test tasks according to the user input requirements, comprehensively arrange the test cases and environment configuration parameters, take into account the complex environment configuration scheme and numerous window breakpoint tests, and expand the applicability of the system.
[0128] The test execution module 712 is used to control the specific configuration and execution process of the test environment, including an environment configuration execution component 7121 and a test case execution component 7122. Among them, the environment configuration execution component 7121 is used to modify the environment configuration parameters of the test node 72; the test case execution component 7122 is used to control the test software 721 (i.e., the test case) to start running at a specified breakpoint. The test task formed in the test arrangement module 711 is sent to the test execution module 712 for specific test execution. The environment configuration execution component 7121 will generate an environment configuration instruction according to the environment configuration parameters of the test task, connect the tested environment with the control node 71, and send the environment configuration instruction to the test node 72 for execution. The test case execution component 7122 will generate a test instruction according to the test task information and send it to the test node 72 for execution. After the test is started, the test case execution component 7122 collects the logs and test results of the test execution. At the same time, the environment resource monitoring component 7121 of the monitoring and breakpoint module 713 starts to obtain the resource utilization of the test environment.
[0129] The monitoring and breakpoint module 713 is used to control the environmental resource monitoring of the tested node during the test process, set breakpoints according to resource utilization, and includes an environmental resource monitoring component 7131 and a bottleneck window breakpoint component 7132. Among them, the environmental resource monitoring component 7131 is used to obtain resource monitoring information in real time from the monitoring software 722, including CPU utilization, memory utilization, etc.; the bottleneck window breakpoint component 7132 is used to suspend the test process according to the breakpoint trigger condition (such as resource utilization reaching a threshold), save the test process context information (i.e., operating environment data), and can also record the breakpoint end context information according to the breakpoint end trigger condition. When encountering a breakpoint to execute the test, the saved breakpoint context information is loaded, and the test starts to end the breakpoint.
[0130] After forming the candidate test plans, the test system performs a full-process test on each candidate test plan to obtain the first operating data under the completed test, and determines the test score (first score), performance bottleneck window duration, system resource consumption (such as the value of preset system performance parameters) and other information based on the first operating data.
[0131] After determining the target test scheme with the best performance according to each candidate test scheme, determine whether the system performance corresponding to the target test scheme meets the requirements (i.e., whether it meets the performance bottleneck condition). If the system performance does not meet the requirements, i.e., the target test scheme meets the performance bottleneck condition, determine whether the current comprehensive iteration number reaches the preset comprehensive iteration number. If it does not reach the preset comprehensive iteration number, enter the window tuning stage. Otherwise, end the tuning process.
[0132] During the window tuning phase, the system will re-execute the full-process test of the target test plan, and when the monitored resource utilization reaches its corresponding performance bottleneck threshold, the system will determine the starting breakpoint of the performance bottleneck window, i.e., the performance bottleneck time point, suspend the test process, and record the context information of the test process, test data, and other operating environment data. After saving the operating environment data, the test will continue to be executed, and the time point of continuing the test will be recorded. When the system resources are less than their corresponding bottleneck threshold for the first time after the starting breakpoint, the test will be suspended, the end breakpoint of the performance bottleneck window will be determined, and the duration from continuing the test to the end breakpoint will be calculated as the performance bottleneck window duration corresponding to the performance bottleneck time point. By monitoring and analyzing the resource utilization during the test process, the part with greater resource load pressure is intercepted as the focus of tuning, and the intercepted breakpoint information can be used repeatedly, which improves the tuning efficiency.
[0133] After the full process test of the acquisition window is completed, the bottleneck window optimization configuration process is entered, and the bottleneck window optimization configuration is performed through the optimization analysis module 714.
[0134] The optimization analysis module 714 can form optimized environment configuration parameters according to the first operation data of the performance bottleneck window, such as resource utilization and environment configuration parameters. The optimization analysis module 714 includes a bottleneck optimization configuration component 7141 and an optimization solution comprehensive component 7142. Among them, the bottleneck optimization configuration component 7141 is used to select the optimization configuration scheme of the system under test according to the resource bottleneck information in the performance bottleneck window, and synchronize it to the test arrangement module 711 to form an optimization scheme corresponding to the performance bottleneck window; the optimization solution comprehensive component 7142 is used to comprehensively analyze the resource optimization conditions in each performance bottleneck window (i.e., the target optimization scheme corresponding to each performance bottleneck time point), comprehensively formulate an optimization scheme, i.e., a target computing power adaptation scheme, and conduct an overall test for verification.
[0135] In an exemplary embodiment, the bottleneck optimization configuration component 7141 can determine the cause of the performance bottleneck according to the resource distribution of each performance bottleneck window and the iterative optimization strategies of the previous rounds, select the appropriate optimization configuration option in the optimization configuration solution library according to the cause, and generate the tuning configuration of the option. By formulating the tuning strategy according to the situation of the resource window, it is more targeted compared to the tuning of the full process test.
[0136] The test arrangement module 711 performs a window tuning test based on the information input by the bottleneck optimization configuration component 7141. The breakpoint management software 723 running on the test node 72 loads the corresponding breakpoint state, i.e., the operating environment data at the performance bottleneck time point, according to the input breakpoint information. After loading, the preset test case is executed from the saved execution position, and the test is performed within the bottleneck window to monitor and record the changes in resource utilization. When the monitored resource utilization is less than the corresponding performance bottleneck threshold, the test process is terminated, the end time point is recorded, and the test duration is calculated to determine the length of the optimized performance bottleneck window. By verifying the tuning configuration within the performance bottleneck window, it is more agile.
[0137] Next, the monitoring and breakpoint module 713 sends the performance bottleneck window test information, including the optimized performance bottleneck window duration and resource utilization change of each optimization solution corresponding to each performance bottleneck window, back to the optimization analysis module 714 .
[0138] The optimization analysis module 714 determines whether the performance bottleneck window has disappeared according to the performance bottleneck window duration and resource utilization information after optimization of the performance bottleneck window, and deletes the disappeared performance bottleneck window from the iteration tuning queue. It determines whether there are still performance bottleneck windows. If so, it determines whether the current window iteration number of the performance bottleneck window has reached the preset window iteration number. If not, it enters the next round of tuning window test. If so, it sets the best performance optimization scheme corresponding to each current performance bottleneck window as the target optimization scheme corresponding to each performance bottleneck window, and performs comprehensive optimization based on the target optimization scheme of each performance bottleneck window.
[0139] After receiving the information of each performance bottleneck window of each iteration (including resource utilization and target optimization plan), the optimization plan synthesis component 7142 selects the solution combination according to the importance of various resources, the optimization effect of each solution on resource utilization, the shortening effect of the performance bottleneck window duration, etc., generates the target computing power adaptation plan, and sends the target computing power adaptation plan to the test arrangement module 711 for full-process test verification. By synthesizing the tuning options of each performance bottleneck window to form a tuning strategy, forming a target computing power adaptation plan, and verifying the tuning strategy from a global perspective, it is possible to avoid the drift of performance bottleneck windows and the increase and decrease of resources, thereby improving the reliability of the tuning plan.
[0140] Figure 8 is a flow chart of method 100 in an exemplary embodiment of the present disclosure.
[0141] refer to Figure 8 In step S81, test case configuration and test environment configuration are performed to form candidate test plans, and test tasks are generated according to the candidate test plans.
[0142] In step S82, the test task is executed, and the resource utilization of the tested environment is monitored at the same time, and the first operation data of each candidate test solution is obtained. After the test is completed, the target test solution is determined according to the first operation data, and the performance bottleneck of the target test solution is judged. When it is judged that the target test solution has a performance bottleneck, the performance bottleneck window optimization process of step S83 is entered.
[0143] In step S83, rerun the target test plan, determine the performance bottleneck time point (the start breakpoint of the performance bottleneck window) according to the resource utilization threshold, save the operating environment data (breakpoint information), determine the end breakpoint of the performance bottleneck window according to the resource utilization, and identify the performance bottleneck window.
[0144] In step S84, the system is optimized and configured according to the resource distribution characteristics of the performance bottleneck window of the target test solution, that is, the system is tuned according to the resource bottleneck in the performance bottleneck window to form an optimization solution.
[0145] In step S85, the optimization effect of the optimization scheme is verified in the corresponding performance bottleneck window. If the optimization scheme makes the performance bottleneck window disappear, or has reached the preset number of window iterations, stop window tuning and enter step S86; if the optimization scheme fails to make the performance bottleneck window disappear, and has not reached the preset number of window iterations, return to step S84 to re-optimize the configuration and perform window tuning, so as to find the optimization scheme that makes the performance bottleneck window disappear as much as possible as the target optimization scheme.
[0146] In step S86, the optimization scheme with the best optimization effect is set as the target optimization scheme corresponding to the performance bottleneck window.
[0147] In step S87, the tuning parameters (tuning options) of the target optimization scheme corresponding to each performance bottleneck window are comprehensively considered to determine the final tuning scheme, and the target computing power adaptation scheme is obtained. Return to step S81 to verify the overall tuning scheme of the target computing power adaptation scheme, that is, configure the test case and test environment according to the target computing power adaptation scheme, and perform the above test.
[0148] Repeat the above process until there is no performance bottleneck time point in the current target computing power adaptation plan, or the current comprehensive iteration number reaches the preset comprehensive iteration number, stop the tuning process, and determine the target computing power adaptation plan with the best current effect.
[0149] Figure 8 The illustrated embodiment focuses on the relationship between two iterative tunings (window iterative tuning and overall computing power adaptation scheme iterative tuning).
[0150] Fig. 9 yes Figure 8 Flowchart of the tuning process of the illustrated embodiment.
[0151] refer to Fig. 9 In an exemplary embodiment, the tuning process may include:
[0152] In step S901, candidate test plans are formed according to preset test cases and candidate environment configuration parameters.
[0153] Step S902: Perform a full-process test on each candidate test solution to determine the target test solution with the best performance.
[0154] Step S903, determine whether the target test plan meets the performance bottleneck condition. If not, it means that the target test plan meets the computing power adaptation requirements and there is no performance bottleneck, and the tuning ends; if yes, go to step S904.
[0155] Step S904, determining whether the current number of comprehensive iterations has reached the preset number of comprehensive iterations, if so, ending the tuning, if not, proceeding to step S905.
[0156] Step S905: re-run the target test solution to obtain the operating environment data corresponding to the performance bottleneck window.
[0157] Step S906: Optimize and configure each performance bottleneck window to form an optimization plan for the performance bottleneck window.
[0158] Step S907, loading the operating environment data corresponding to the performance bottleneck window, performing a window breakpoint test, and running the optimization solution.
[0159] Step S908, recording the second operation data of the optimization scheme, determining the optimization effect of the optimization scheme according to the second operation data, and obtaining window optimization information.
[0160] Step S909, determine whether the optimized performance bottleneck window duration of the performance bottleneck window is less than a preset threshold, so as to determine whether the performance bottleneck window disappears. If yes, set the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window, and proceed to step S911. If no, proceed to step S910.
[0161] Step S910, determine whether the current window iteration number reaches the preset window iteration number, if yes, proceed to step S911, if not, return to step S906 to update the optimization plan and re-test.
[0162] Step S911, integrate the optimization plans of each window, that is, determine the target computing power adaptation plan according to the target optimization plan corresponding to each performance bottleneck window, return to step S901 to verify the target computing power adaptation plan, and end the tuning when there is no performance bottleneck in the target computing power adaptation plan, otherwise iterate and update the target computing power adaptation plan until the preset comprehensive iteration number is reached and the tuning is ended.
[0163] The disclosed embodiment is based on an automated tuning method for a performance bottleneck window, which intercepts the performance bottleneck window in the target test solution, performs iterative configuration tuning on the performance bottleneck window, starts a breakpoint state by loading the performance bottleneck window, and quickly verifies the tuning effect in the window. This can provide an agile verification method, improve the efficiency of fine-tuning and multi-parameter tuning, and verify in an important performance bottleneck window, which is highly targeted and the tuning effect is quickly apparent. Finally, according to the bottleneck resource weights, tuning effects, and tuning options corresponding to each performance bottleneck window, the tuning configurations in each performance bottleneck window are combined to select the configuration options with better comprehensive effects, and full-process testing and verification are performed, which can improve the reliability and tuning effect of the tuning solution.
[0164] Corresponding to the above method embodiments, the present disclosure also provides a computing power adaptation and optimization device, which can be used to execute the above method embodiments.
[0165] Fig.10 It is a block diagram of a computing power adaptation and tuning device in an exemplary embodiment of the present disclosure.
[0166] refer to Fig.10 , the computing power adaptation and tuning device 1000 may include:
[0167] A test scheme determination module 101 is configured to run a candidate test scheme to perform a computing power adaptation test, and determine a target test scheme from the candidate test schemes according to the result of the computing power adaptation test, wherein the candidate test schemes include preset test cases and candidate environment configuration parameters;
[0168] The bottleneck window detection module 102 is configured to obtain the first running data of the target test solution during the computing power adaptation test, and when the first running data meets the performance bottleneck condition, re-run the target test solution, determine the performance bottleneck window and record the running environment data corresponding to the performance bottleneck time point;
[0169] The bottleneck window optimization module 103 is configured to generate an optimization scheme for the performance bottleneck window according to the first operation data, load the operation environment data corresponding to the performance bottleneck time point, run the optimization scheme and record the second operation data, wherein the optimization scheme includes the preset test case and the optimization environment configuration parameters;
[0170] The window iterative optimization module 104 is configured to iteratively optimize the optimization scheme according to the second operation data when a preset stop iteration condition is not met, and determine the current optimization scheme as a target optimization scheme corresponding to the performance bottleneck window when the preset stop iteration condition is met;
[0171] The comprehensive optimization module 105 is configured to determine a target computing power adaptation scheme according to the target optimization scheme corresponding to one or more performance bottleneck windows, and the target computing power adaptation scheme includes the preset test cases and target environment configuration parameters.
[0172] Since the functions of the device 1000 have been described in detail in the corresponding method embodiments, the present disclosure will not elaborate on them here.
[0173] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0174] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0175] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0176] Refer to the following Fig.11 The electronic device 1100 according to this embodiment of the present invention is described. Fig.11 The electronic device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0177] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include but are not limited to: at least one processing unit 1110, at least one storage unit 1120, and a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110).
[0178] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1110 can perform the method shown in the embodiment of the present disclosure.
[0179] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and / or a cache storage unit 11202 , and may further include a read-only storage unit (ROM) 11203 .
[0180] The storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0181] Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0182] The electronic device 1100 may also communicate with one or more external devices 1200 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0183] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0184] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0185] The program product for implementing the above method according to an embodiment of the present invention can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0186] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0187] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0188] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0189] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0190] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0191] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and concept of the present disclosure are indicated by the claims.
Claims
1. A computing power adaptation and optimization method, It is characterized in that include: Run the candidate test scheme to perform a computing power adaptation test, and determine a target test scheme from the candidate test schemes according to the result of the computing power adaptation test, wherein the candidate test schemes include preset test cases and candidate environment configuration parameters; Obtain the first running data of the target test scheme during the computing power adaptation test process, and when the first running data meets the performance bottleneck condition, re-run the target test scheme to determine the performance bottleneck window and record the running environment data corresponding to the performance bottleneck time point; Generate an optimization plan for the performance bottleneck window according to the first operation data, load the operation environment data corresponding to the performance bottleneck time point, run the optimization plan and record the second operation data, the optimization plan includes the preset test case and the optimization environment configuration parameters; When the preset stop iteration condition is not reached, iteratively optimizing the optimization scheme according to the second operation data, and when the preset stop iteration condition is reached, determining the current optimization scheme as the target optimization scheme corresponding to the performance bottleneck window; A target computing power adaptation scheme is determined according to the target optimization scheme corresponding to one or more performance bottleneck windows, and the target computing power adaptation scheme includes the preset test cases and target environment configuration parameters.
2. The computing power adaptation and tuning method according to claim 1, It is characterized in that When the first operating data meets the performance bottleneck condition, re-running the target test solution, determining the performance bottleneck window and recording the operating environment data corresponding to the performance bottleneck time point includes: When the value of the preset system performance indicator in the first operation data meets the corresponding performance bottleneck condition, re-running the target test plan; Monitor the preset system performance indicators during the operation of the target test scheme, and when the value of the preset system performance indicators meets the corresponding performance bottleneck condition, suspend the test process and record a performance bottleneck time point and its corresponding operating environment data; After the performance bottleneck time point, when the preset system performance indicator fails to meet its corresponding performance bottleneck condition for the first time, a performance bottleneck window corresponding to the performance bottleneck time point is determined, and the duration of the performance bottleneck window is recorded.
3. The computing power adaptation and tuning method according to claim 1, It is characterized in that The operating environment data includes processor state data, memory data, and the execution location of the preset test case; generating an optimization plan for the performance bottleneck window according to the first operating data, loading the operating environment data corresponding to the performance bottleneck time point, running the optimization plan and recording the second operating data includes: Determine the optimization environment configuration parameters of the performance bottleneck window according to the first operation data; Set up the test environment according to the optimized environment configuration parameters; Loading the processor state data and the memory data; Execute the preset test case according to the execution position; Monitor and record the second running data during the running of the preset test case.
4. The computing power adaptation and tuning method according to claim 1, It is characterized in that The preset stop iteration condition includes that the number of current window iterations reaches the preset number of window iterations or the duration of the performance bottleneck window after optimization is less than a preset threshold. When the preset stop iteration condition is not met, the optimization scheme is iteratively optimized according to the second operation data. When the preset stop iteration condition is met, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window, including: Determine the duration of the optimized performance bottleneck window corresponding to the optimization scheme according to the second operation data; When the optimized performance bottleneck window duration is greater than or equal to the preset threshold value, and the current window iteration number does not reach the preset window iteration number, an updated optimization scheme is formed according to the second operation data and the optimization scheme, the operation environment data corresponding to the performance bottleneck time point is loaded, the updated optimization scheme is run and the second operation data is recorded, and the previous step is returned; When the duration of the optimized performance bottleneck window is less than the preset threshold, or the current window iteration number does not reach the preset window iteration number, the current optimization scheme is determined as the target optimization scheme corresponding to the performance bottleneck window.
5. The computing power adaptation and tuning method according to claim 1, It is characterized in that Running the candidate test schemes to perform a computing power adaptation test, and determining a target test scheme from the candidate test schemes according to the result of the computing power adaptation test includes: Form multiple candidate test plans based on preset test cases and multiple sets of environment configuration parameters; Setting a test environment based on the environment configuration parameters in one of the candidate test solutions, and executing the preset test case in the test environment; Monitoring a plurality of preset system performance indicators during the execution of the preset test case to form the first operation data; determining a first score for the candidate test solution based on the first operating data; The target test solution is determined according to the first scores of the plurality of candidate test solutions.
6. The computing power adaptation and tuning method according to claim 1, It is characterized in that Determining a target computing power adaptation solution according to the target optimization solution corresponding to one or more performance bottleneck windows includes: Setting one of the one or more target optimization schemes as the target computing power adaptation scheme; Alternatively, the target environment configuration parameters are determined according to the optimization environment configuration parameters of multiple target optimization solutions corresponding to multiple performance bottleneck windows, and the target computing power adaptation solution is generated according to the preset test cases and the target environment configuration parameters.
7. The computing power adaptation and tuning method according to claim 1, It is characterized in that Determining a target computing power adaptation solution according to the target optimization solution corresponding to one or more performance bottleneck windows includes: Performing a computing power adaptation test on the target computing power adaptation solution to obtain third operation data of the target computing power adaptation solution; When the third operation data does not meet the performance bottleneck condition, or the current comprehensive iteration number reaches a preset comprehensive iteration number, the tuning is terminated; When the third operating data meets the performance bottleneck condition and the current comprehensive iteration number does not reach the preset comprehensive iteration number, re-run the target computing power adaptation plan, determine the performance bottleneck window and record the operating environment data corresponding to the performance bottleneck time point, and iteratively tune the target computing power adaptation plan.
8. A computing power adaptation and tuning device, It is characterized in that include: A test scheme determination module is configured to run a candidate test scheme to perform a computing power adaptation test, and determine a target test scheme from the candidate test schemes according to a result of the computing power adaptation test, wherein the candidate test schemes include preset test cases and candidate environment configuration parameters; A bottleneck window detection module is configured to obtain first running data of the target test solution during the computing power adaptation test, and when the first running data meets the performance bottleneck condition, re-run the target test solution, determine the performance bottleneck window and record the running environment data corresponding to the performance bottleneck time point; a bottleneck window optimization module, configured to generate an optimization scheme for the performance bottleneck window according to the first operating data, load the operating environment data corresponding to the performance bottleneck time point, run the optimization scheme and record the second operating data, wherein the optimization scheme includes the preset test case and the optimization environment configuration parameters; a window iterative optimization module, configured to iteratively optimize the optimization scheme according to the second operation data when a preset stop iteration condition is not met, and determine the current optimization scheme as a target optimization scheme corresponding to the performance bottleneck window when the preset stop iteration condition is met; The comprehensive optimization module is configured to determine a target computing power adaptation scheme based on the target optimization scheme corresponding to one or more performance bottleneck windows, and the target computing power adaptation scheme includes the preset test cases and target environment configuration parameters.
9. An electronic device, It is characterized in that include: Memory; as well as A processor coupled to the memory, the processor being configured to execute the method according to any one of claims 1 to 7 based on instructions stored in the memory.
10. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
