A method and apparatus for virtual machine tuning

By automatically finding the optimal configuration parameters of the virtual machine through Gaussian distribution and sampling function, combined with hardware resource monitoring, the problems of time-consuming and labor-intensive virtual machine tuning and reliance on experience are solved, and a highly efficient and safe global optimal solution is achieved.

CN110825493BActive Publication Date: 2026-03-10WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-31
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies require manual analysis and recording in virtual machine tuning, which is time-consuming, labor-intensive, and relies on experience. They cannot automatically and comprehensively determine the optimal parameters, especially for up to 700 performance-related parameters.

Method used

The confidence interval is determined by Gaussian distribution, and the optimal configuration parameters are automatically found using a preset acquisition function. Combined with hardware resource utilization monitoring, overload is avoided and the global optimal solution is found quickly.

Benefits of technology

It enables the efficient finding of the optimal configuration parameters of a virtual machine with fewer trials, avoiding local optima and improving tuning efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110825493B_ABST
    Figure CN110825493B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for virtual machine optimization. The method includes: acquiring multiple virtual machine parameter sets; determining confidence intervals for the multiple virtual machine parameter sets according to a pre-set confidence level using a Gaussian distribution; determining the optimization configuration parameters corresponding to the confidence intervals using a preset acquisition function; determining the actual processing power per unit time obtained by the virtual machine under the optimization configuration parameters; and if the actual processing power per unit time obtained by the virtual machine under the optimization configuration parameters does not meet the preset processing power per unit time, then adding the virtual machine parameter set corresponding to the optimization configuration parameters in the next round of optimization. This invention determines the optimization configuration parameters through a preset acquisition function and continues to search for the next known parameter set when the optimization configuration parameters do not meet the conditions. This can find the optimal configuration in fewer trials, thereby avoiding traversing configuration parameters and finding the global optimum more likely and efficiently, without getting trapped in local optima.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for virtual machine optimization. Background Technology

[0002] The current mainstream approach to virtual machine tuning is to use auxiliary tools to manually analyze the causes of problems and then modify the parameters accordingly for retesting to automate the search for optimal parameters. This process requires analysis step-by-step, followed by manual recording and comparison of the results after parameter tuning. This iterative process is time-consuming, labor-intensive, inefficient, and prone to errors.

[0003] Furthermore, the above methods rely on the experience of the tuner and can only be tested on a few specific parameters, while there are more than 700 performance-related parameters for virtual machines. Therefore, there is an urgent need for a method that can automatically and comprehensively determine the optimal parameters for virtual machines. Summary of the Invention

[0004] This invention provides a method and apparatus for virtual machine tuning, which solves the problem of automatically and comprehensively determining the optimal parameters for virtual machines.

[0005] In a first aspect, embodiments of the present invention provide a method for virtual machine tuning, comprising:

[0006] Through at least one round of optimization, the configuration parameters of the virtual machine that meet the preset processing capacity per unit time under a set concurrency level are determined; the optimization operations include:

[0007] Obtain multiple virtual machine parameter groups; wherein each virtual machine parameter group includes configuration parameters and processing capacity per unit time; each virtual machine parameter group is used to represent the processing capacity per unit time obtained by the virtual machine configured according to the configuration parameters through actual operation under the set concurrency level;

[0008] The multiple virtual machine parameter groups are used to determine a confidence interval that meets the preset confidence level through a Gaussian distribution. The confidence interval is used to represent the predicted processing volume per unit time corresponding to each set of configuration parameters.

[0009] The optimization configuration parameters corresponding to the confidence interval are determined by a preset acquisition function;

[0010] Determine the processing volume per unit time actually obtained by the virtual machine under the tuning configuration parameters;

[0011] If the actual processing volume per unit time obtained by the optimization configuration parameters does not meet the preset processing volume per unit time, then the virtual machine parameter group corresponding to the optimization configuration parameters will be added in the next round of optimization.

[0012] It should be noted that the problem of finding a set of configuration parameters that optimizes the system's processing capacity per unit time is generally called a black-box optimization problem. The relationship function between the input and output is unknown, and each trial from input to output is time-consuming. Therefore, a method that can quickly find the optimal solution is needed.

[0013] The above scheme uses a preset processing volume per unit time. The search ends when the preset processing volume is exceeded. The processing volume per unit time for each set of configuration parameters is predicted based on a Gaussian distribution. The optimized configuration parameters are determined by a preset acquisition function. If the optimized configuration parameters do not meet the conditions, the search continues with the next set of known parameters. No test set is required, nor is the set of parameters to be adjusted limited. The next parameter configuration can be predicted after one experiment, and the optimal configuration can be found in fewer experiments. This avoids traversing the configuration parameters and finds the global optimum more likely and efficiently, rather than getting stuck in local optima.

[0014] Optionally, the method further includes:

[0015] Determine the actual hardware resource utilization rate of the virtual machine under the tuning configuration parameters;

[0016] Before adding the virtual machine parameter group corresponding to the tuning configuration parameters in the next round of tuning operations, the following is also included:

[0017] It is determined that the actual hardware resource utilization rate under the optimized configuration parameters does not exceed the first threshold.

[0018] Optionally, the method further includes:

[0019] If the actual hardware resource utilization rate under the tuning configuration parameters is greater than the first threshold, then the interval corresponding to the tuning configuration parameters is removed from the confidence interval.

[0020] The optimization configuration parameters are re-determined from the confidence interval using the acquisition function;

[0021] Determine the processing volume per unit time actually obtained by the virtual machine under the tuning configuration parameters;

[0022] If the actual processing volume per unit time obtained by the optimization configuration parameters does not meet the preset processing volume per unit time, then the virtual machine parameter group corresponding to the optimization configuration parameters will be added in the next round of optimization.

[0023] It should be noted that for individual configuration parameter groups, the corresponding processing capacity per unit time meets the preset processing capacity per unit time, but the hardware utilization rate exceeds the range that the virtual machine can bear during the process. Therefore, this group of tuning parameters cannot be used as a tuning parameter group and should be deleted from the confidence interval.

[0024] The above solution avoids system damage due to overload by removing configuration parameters whose hardware utilization exceeds the virtual machine's capacity from the confidence interval through real-time monitoring of current hardware resource utilization.

[0025] Optionally, determining the tuning configuration parameters corresponding to the confidence interval through a preset acquisition function includes:

[0026] Determine the feature values ​​corresponding to the confidence intervals; wherein, the feature values ​​include the expected value and variance of the confidence intervals corresponding to each set of configuration parameters;

[0027] The set of configuration parameters that maximize the value of the preset acquisition function are used as the optimization configuration parameters.

[0028] The above scheme uses a preset data acquisition function set based on experience. Feature values ​​are quantities that characterize the confidence interval features corresponding to the configuration parameters. Feature values ​​can be expected value, variance, standard deviation, mean, etc. For example, a large expected value indicates that the processing capacity per unit time corresponding to this set of configuration parameters may be large; a large variance indicates uncertainty about the predicted processing capacity per unit time corresponding to this set of configuration parameters, meaning that the understanding of this set of configuration parameters is insufficient and further exploration is needed; at the same time, a large variance also indicates that this set of configuration parameters may have a global optimum. When selecting the next set of configuration parameters through the prediction function value, one should not only consider the expected value or variance, but also combine multiple values ​​contained in the feature values ​​to find the global optimum with a higher probability and efficiency, rather than getting trapped in local optima.

[0029] It should be noted that as business grows, the number of concurrent connections will continue to increase. Multiple sets of different concurrency levels can be tested at low cost to obtain the optimal virtual machine parameter configuration. The system can dynamically adjust the virtual machine configuration parameters based on the current business concurrency. When the configuration parameters corresponding to the maximum value of the collected function are greater than one set, the virtual machine parameters are obtained through multi-threading, meaning multiple virtual machines are tested simultaneously, each with different configuration parameters, thus improving testing efficiency.

[0030] Secondly, embodiments of the present invention provide a virtual machine tuning apparatus, comprising:

[0031] The acquisition module is used to acquire multiple virtual machine parameter groups; wherein each virtual machine parameter group includes configuration parameters and processing capacity per unit time; each virtual machine parameter group is used to represent the processing capacity per unit time obtained by the virtual machine configured according to the configuration parameters through actual operation under the set concurrency level;

[0032] The processing module is used to determine a confidence interval that meets a preset confidence level for the multiple virtual machine parameter groups through a Gaussian distribution. The confidence interval is used to represent the predicted processing capacity per unit time corresponding to each set of configuration parameters. The module then determines the tuning configuration parameters corresponding to the confidence interval through a preset acquisition function. Finally, it determines the actual processing capacity per unit time obtained by the virtual machine under the tuning configuration parameters. If the actual processing capacity per unit time obtained by the tuning configuration parameters does not meet the preset processing capacity per unit time, the virtual machine parameter group corresponding to the tuning configuration parameters is added in the next round of tuning operations.

[0033] Optionally, the processing module is further configured to:

[0034] Determine the actual hardware resource utilization rate of the virtual machine under the tuning configuration parameters;

[0035] Before adding the virtual machine parameter group corresponding to the tuning configuration parameters in the next round of tuning operations, the following is also included:

[0036] It is determined that the actual hardware resource utilization rate under the optimized configuration parameters does not exceed the first threshold.

[0037] Optionally, the processing module is further configured to:

[0038] If the actual hardware resource utilization rate under the tuning configuration parameters is greater than the first threshold, then the interval corresponding to the tuning configuration parameters is removed from the confidence interval.

[0039] The optimization configuration parameters are re-determined from the confidence interval using the acquisition function;

[0040] Determine the processing volume per unit time actually obtained by the virtual machine under the tuning configuration parameters;

[0041] If the actual processing volume per unit time obtained by the optimization configuration parameters does not meet the preset processing volume per unit time, then the virtual machine parameter group corresponding to the optimization configuration parameters will be added in the next round of optimization.

[0042] Optionally, the processing module is specifically used for:

[0043] Determine the feature values ​​corresponding to the confidence intervals; wherein, the feature values ​​include the expected value and variance of the confidence intervals corresponding to each set of configuration parameters;

[0044] The set of configuration parameters that maximize the value of the preset acquisition function are used as the optimization configuration parameters.

[0045] Thirdly, embodiments of the present invention provide a computer-controlled device, comprising:

[0046] Memory, used to store program instructions;

[0047] A processor is configured to invoke program instructions stored in the memory and execute the method described in the first aspect according to the obtained program.

[0048] Fourthly, embodiments of the present invention provide a computer-readable non-volatile storage medium including computer-readable instructions, which, when read and executed by a computer, cause the computer to perform the method described in the first aspect above. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present invention;

[0051] Figure 2 A flowchart illustrating a virtual machine tuning method provided in an embodiment of the present invention;

[0052] Figure 3 A flowchart illustrating a virtual machine tuning method provided in an embodiment of the present invention;

[0053] Figure 4a , Figure 4b and Figure 4c A schematic diagram illustrating a virtual machine tuning method provided in an embodiment of the present invention;

[0054] Figure 5 This is a schematic diagram of a virtual machine tuning device provided in an embodiment of the present invention. Detailed Implementation

[0055] To better understand the above technical solutions, the following will describe the above technical solutions in detail with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0056] Figure 1 An exemplary system architecture applicable to an embodiment of the present invention is shown, which may include a virtual machine 100, a called application 200, and a dynamic optimizer 300.

[0057] Among them, virtual machine 100 is used to initiate a stress test based on a set concurrency level after calling the called application 200, so as to determine the actual processing volume per unit time obtained by the virtual machine.

[0058] The dynamic optimizer 300 is used in this scheme to determine the configuration parameters of the virtual machine 100 and distribute the configuration parameters to the virtual machine 100; the virtual machine 100 feeds back the test output results to the dynamic optimizer 300 so that the dynamic optimizer 300 can find the next set of configuration parameters as the configuration parameters for the next round of the virtual machine 100.

[0059] It should be noted that the above Figure 1 The structure shown is merely an example, and the embodiments of the present invention are not limited thereto.

[0060] To better explain the above embodiments, the present invention determines the configuration parameters of the virtual machine that meet the preset unit time processing capacity under a set concurrency level through at least one round of optimization operations. The optimization operations include, for example, Figure 2 The steps shown, Figure 2 An exemplary process is shown for a method of virtual machine tuning, which can be performed by a virtual machine tuning apparatus.

[0061] like Figure 2 As shown, the process specifically includes:

[0062] Step 201: Obtain multiple virtual machine parameter groups.

[0063] It should be noted that each virtual machine parameter group includes configuration parameters and processing capacity per unit time. Each virtual machine parameter group represents the processing capacity per unit time obtained by a virtual machine configured according to the configuration parameters under a set concurrency level through actual operation. When tuning a virtual machine, the initial configuration parameters in the virtual machine parameter group are obtained based on historical experience. For example, several effective configuration parameters may be determined based on the experience of the tuning personnel, and stress tests may be performed on the virtual machine based on each configuration parameter to obtain the actual processing capacity per unit time. Alternatively, the configuration parameters in the initial virtual machine parameter group can be randomly set, and stress tests may be performed on the randomly set configuration parameters.

[0064] Step 202: Determine the confidence intervals that meet the preset confidence level for multiple virtual machine parameter groups using a Gaussian distribution.

[0065] In this step, a Gaussian distribution is used to obtain prediction information and its confidence level based on known information. In other words, the predicted processing capacity per unit time and the confidence level of each prediction result can be obtained from the known virtual machine parameter set. Specifically, the confidence interval is used to represent the predicted processing capacity per unit time for each set of configuration parameters. The preset confidence level can be set according to the specific tuning requirements. To reduce errors, the confidence level can be set higher, such as to 95%.

[0066] Step 203: Determine the tuning configuration parameters corresponding to the confidence interval through a preset acquisition function.

[0067] Specifically, at least one configuration parameter is selected from the various configuration parameters using the confidence interval in step 202 as the tuning configuration parameter. The purpose of tuning the configuration parameter is to conduct subsequent stress tests to determine whether the tuned configuration parameter can be used as the final configuration parameter that meets the virtual machine requirements; or, the tuned configuration parameter can be used as the virtual machine parameter group for the next round of tuning, thus repeating the process to obtain the final configuration parameter that meets the virtual machine requirements. The criticality of this step is evident from the role of the tuning configuration parameter. If the data acquisition function is configured improperly, multiple rounds of tuning may be required to find the final configuration parameter that meets the virtual machine requirements; if the data acquisition function is configured properly, the final configuration parameter that meets the virtual machine requirements may be found in just a few rounds of tuning. The stress test described above generally involves giving a concurrency level, such as 300, inputting a set of configuration parameters into the virtual machine, and obtaining the corresponding processing volume per unit time through actual operation. During actual operation, hardware resource utilization is monitored, and parameters that exceed a reasonable range are excluded as final configuration parameters.

[0068] In actual optimization, the acquisition function can be set in various ways. This embodiment of the invention provides the following method. Specifically, the feature values ​​corresponding to the confidence intervals are determined. These feature values ​​include the expected value and variance of the confidence interval corresponding to each set of configuration parameters. Specifically, the processing volume per unit time corresponding to each set of configuration parameters is a set of data predicted by the dynamic optimizer, and the expected value and variance of the set are calculated using a formula. The set of configuration parameters that maximizes the value of the acquisition function is then used as the optimization configuration parameters.

[0069] It should be noted that the preset data acquisition function is set based on experience. The data acquisition function can also be called a utility function, but it is generally referred to as the data acquisition function. There are many types of data acquisition functions, and the eigenvalues ​​are quantities that characterize the confidence interval features corresponding to the configuration parameters. The eigenvalues ​​can be the expected value, variance, standard deviation, mean, etc., or a weighted combination of multiple values. For example, a relatively simple function is UCB (Upper Confidence Bound), whose function is: UCB = μ(x) + kσ(x), where μ is the expected value, σ is the variance, and k is the adjustment parameter, which can be intuitively understood as the upper confidence boundary. A large expected value indicates that the processing capacity per unit time corresponding to this set of configuration parameters may be large; a large variance indicates that the processing capacity per unit time corresponding to the prediction of this set of configuration parameters is uncertain, that is, the configuration parameters are not well understood and need further exploration; at the same time, a large variance also indicates that this set of configuration parameters may have a globally optimal solution. When selecting the next set of configuration parameters based on the predicted function values, it is not enough to consider only the expectation or variance. Multiple values ​​contained in the feature values ​​must be combined to find the global optimum more likely and efficiently, avoiding getting trapped in local optima. Of course, the preset acquisition function in this scheme is not limited to UCB mentioned above; it can also be EI (expected improvement), etc.

[0070] Step 204: Obtain the processing volume per unit time of the virtual machine under the actual running conditions of the optimized configuration parameters.

[0071] The specific method for obtaining step 204 is not limited; for specific implementation methods, please refer to [reference needed]. Figure 1 The system operation process is used for this purpose. It should be noted that, for low-cost testing, multiple virtual machines can be used simultaneously to configure multiple sets of different virtual machine parameters. When the configuration parameter corresponding to the maximum value of the collected function is greater than one set, the virtual machine parameters are obtained by multiple threads, meaning multiple virtual machines run the experiment simultaneously, each inputting different configuration parameters, thus improving experimental efficiency.

[0072] Step 205: Determine whether the actual processing volume per unit time obtained by the optimized configuration parameters meets the preset processing volume per unit time. If not, proceed to step 206.

[0073] Step 206: In the next round of optimization, add the virtual machine parameter group corresponding to the optimization configuration parameters and return to step 201 until the configuration parameters of the virtual machine that meet the preset unit time processing capacity under the set concurrency are obtained.

[0074] It should be noted that the problem of finding a set of configuration parameters that optimizes the system's processing capacity per unit time is generally called a black-box optimization problem. The relationship function between the input and output is unknown, and each trial from input to output is time-consuming. Therefore, a method that can quickly find the optimal solution is needed.

[0075] The above scheme uses a preset processing capacity per unit time. The search ends when the preset processing capacity is exceeded. Based on a preset probability distribution and multiple virtual machine parameter groups, the processing capacity per unit time corresponding to each set of configuration parameters is predicted. The optimization configuration parameters are determined through a preset acquisition function. If the optimization configuration parameters do not meet the conditions, they are used as known parameter groups to continue searching for the next one. No test set is required, nor is the set of parameters to be adjusted limited. The next parameter configuration can be predicted after one experiment, and the optimal configuration can be found in a smaller number of experiments. This avoids traversing the configuration parameters and finds the global optimal solution with a higher probability and efficiency, rather than getting stuck in local optima.

[0076] Furthermore, in special cases where the hardware resource utilization of a virtual machine exceeds a reasonable range during actual operation under optimized configuration parameters, this invention also provides a method for virtual machine optimization, specifically addressing scenarios where the virtual machine's actual operation under optimized configuration parameters... Figure 3 This is a flowchart illustrating a method for virtual machine tuning.

[0077] like Figure 3 As shown, the process specifically includes:

[0078] Step 301: Determine the actual hardware resource utilization of the virtual machine under the optimized configuration parameters.

[0079] It should be noted that the statistics include the usage of hardware resources, including but not limited to CPU, memory, disk I / O, and network.

[0080] Step 302: Determine whether the current hardware resource utilization rate is greater than the first threshold; if yes, proceed to step 303; if no, continue to step 205.

[0081] Step 303: Remove the intervals corresponding to the tuning configuration parameters from the confidence intervals.

[0082] Specifically, when the server resource utilization rate exceeds a reasonable range, the set of tuning configuration parameters is considered invalid and removed from the confidence interval, and the data collection function is re-entered.

[0083] It should be noted that for individual configuration parameter groups, the corresponding processing capacity per unit time meets the preset processing capacity per unit time, but the hardware utilization rate exceeds the range that the virtual machine can bear during the process. Therefore, this group of tuning parameters cannot be used as a tuning parameter group and should be deleted from the confidence interval.

[0084] Step 304: Re-determine the tuning configuration parameters from the confidence interval using the acquisition function and return to step 301.

[0085] The above scheme avoids system damage due to overload by removing configuration parameters whose hardware utilization exceeds the virtual machine's capacity from the confidence interval through real-time monitoring of current hardware resource utilization. Specifically, when the processing capacity per unit time corresponding to a set of configuration parameters meets the preset processing capacity per unit time, but the hardware utilization of a single virtual machine is overloaded, it indicates that the set of configuration parameters is unsafe. Therefore, it is removed from the confidence interval and recalculated according to the acquisition function, thus improving the safety of the experiment.

[0086] Furthermore, to better explain the above embodiments, the following example, using a concurrency of 100, is illustrated with simulation diagrams. Figure 4a , Figure 4b and Figure 4c The diagram shown is a schematic representation of a virtual machine tuning method provided in an embodiment of the present invention.

[0087] like Figure 4a As shown in the figure above, the solid line represents the target curve obtained based on each virtual machine parameter group (i.e., the target curve is obtained based on the configuration parameters of the actual running virtual machine; this scheme is used to demonstrate that the curve obtained through this scheme is similar to the target curve). The observed points are the four points in the figure, which represent four virtual machine parameter groups obtained based on four sets of configuration parameters. The horizontal axis represents the configuration parameters of the virtual machine, and the vertical axis represents the processing volume per unit time corresponding to the configuration parameters. The 95% confidence curve interval calculated based on the Gaussian distribution is shown in the shaded area. The dashed line represents the mean μ of the unknown point obtained by the Gaussian regression process. At the same time, the Gaussian process also gives the standard deviation σ of the unknown point. It can be seen that the closer to the known point, the smaller the standard deviation; the farther away from the known point, the larger the standard deviation. This indicates that the uncertainty of the unknown point based on the Gaussian distribution is increasing. The predicted curve calculated by the acquisition function is shown below. Figure 4a As shown by the curve in the figure below, the horizontal axis is... Figure 4a The above graph corresponds to the virtual machine's configuration parameters. The vertical axis represents the function value of the acquisition function corresponding to the configuration parameters. The points marked with an asterisk are the points that maximize the function value of the acquisition function, which are the current optimal prediction points. The horizontal axis corresponding to the optimal point represents the optimized configuration parameters. Experiments are conducted using the configuration parameters corresponding to that point to obtain... Figure 4b The image above, as shown Figure 4b As shown in the figure above, the 95% confidence curve interval (shaded area) is calculated based on the Gaussian distribution using the 5 observed points. This process is repeated to obtain... Figure 4b The following diagram shows how to obtain the configuration parameters for the next experiment, repeating this process until the processing volume per unit time in the experiment exceeds the preset processing volume per unit time, at which point the loop exits. Figure 4c In the result shown in the image below, the point marked with a star is the predicted optimal point. We can see that the x-coordinate of the point marked with a star corresponds to... Figure 4c The processing capacity of the target curve per unit time in the above figure is very close to the maximum value, which means it is very close to the true global optimal solution.

[0088] Based on the same technological concept Figure 5 An exemplary embodiment of the present invention provides the structure of a virtual machine tuning apparatus that can execute the process of a virtual machine tuning method.

[0089] like Figure 5 As shown, the device may include:

[0090] The acquisition module 501 acquires multiple virtual machine parameter groups; each virtual machine parameter group includes configuration parameters and processing capacity per unit time; each virtual machine parameter group is obtained by the virtual machine through actual operation under the set concurrency level;

[0091] The processing module 502 is used to determine a confidence interval that meets a preset confidence level for the multiple virtual machine parameter groups through a Gaussian distribution, wherein the confidence interval is used to represent the predicted processing capacity per unit time corresponding to each set of configuration parameters; determine the tuning configuration parameters corresponding to the confidence interval through a preset acquisition function; obtain the actual processing capacity per unit time obtained by the virtual machine under the tuning configuration parameters; if the actual processing capacity per unit time obtained by the tuning configuration parameters does not meet the preset processing capacity per unit time, then add the virtual machine parameter group corresponding to the tuning configuration parameters in the next round of tuning operation.

[0092] Optionally, the processing module is further configured to:

[0093] Determine the actual hardware resource utilization rate of the virtual machine under the tuning configuration parameters;

[0094] Before adding the virtual machine parameter group corresponding to the tuning configuration parameters in the next round of tuning operations, the following is also included:

[0095] It is determined that the actual hardware resource utilization rate under the optimized configuration parameters does not exceed the first threshold.

[0096] Optionally, the processing module is further configured to:

[0097] If the actual hardware resource utilization rate under the tuning configuration parameters is greater than the first threshold, then the interval corresponding to the tuning configuration parameters is removed from the confidence interval.

[0098] The optimization configuration parameters are re-determined from the confidence interval using the acquisition function;

[0099] Determine the processing volume per unit time actually obtained by the virtual machine under the tuning configuration parameters;

[0100] If the actual processing volume per unit time obtained by the optimization configuration parameters does not meet the preset processing volume per unit time, then the virtual machine parameter group corresponding to the optimization configuration parameters will be added in the next round of optimization.

[0101] Optionally, the processing module is specifically used for:

[0102] Determine the feature values ​​corresponding to the confidence intervals; wherein, the feature values ​​include the expected value and variance of the confidence intervals corresponding to each set of configuration parameters;

[0103] The set of configuration parameters that maximize the value of the preset acquisition function are used as the optimization configuration parameters.

[0104] Based on the same technical concept, embodiments of the present invention also provide a computing controlled device, comprising:

[0105] Memory, used to store program instructions;

[0106] The processor is used to call program instructions stored in the memory and execute the virtual machine tuning method described above according to the obtained program.

[0107] Based on the same technical concept, embodiments of the present invention also provide a computer-readable non-volatile storage medium, including computer-readable instructions, which, when read and executed by a computer, cause the computer to perform the above-described virtual machine tuning method.

[0108] Finally, it should be noted that those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0109] This invention is described with reference to flowchart illustrations and / or block diagrams of the method, controlled device (system), and computer program product according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing controlled device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing controlled device, generate instructions for implementing the process. Figure 1 A process or multiple and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing controlled device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0111] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method of virtual machine tuning, the method comprising: The method comprises the following steps: determining a configuration parameter of a virtual machine under a preset concurrency to meet a preset throughput per unit time through at least one round of tuning operation; the tuning operation comprises the following steps: obtaining a plurality of virtual machine parameter groups; wherein each virtual machine parameter group comprises a configuration parameter and a throughput per unit time; each virtual machine parameter group is used to represent the throughput per unit time obtained by actually running the virtual machine configured according to the configuration parameter under the preset concurrency; determining a confidence interval meeting a preset confidence level of the plurality of virtual machine parameter groups through Gaussian distribution, wherein the confidence interval is used to represent the predicted throughput per unit time corresponding to each configuration parameter group; determining a tuning configuration parameter corresponding to the confidence interval through a preset acquisition function, wherein the tuning configuration parameter is used to perform stress testing on the virtual machine under the preset concurrency; obtaining the actual throughput per unit time of the virtual machine under the tuning configuration parameter; if the actual throughput per unit time corresponding to the tuning configuration parameter does not meet the preset throughput per unit time, then adding the virtual machine parameter group corresponding to the tuning configuration parameter in the next round of tuning operation.

2. The method of claim 1, wherein, The method further comprises the following steps: determining the hardware resource usage rate of the virtual machine actually running under the tuning configuration parameter; before adding the virtual machine parameter group corresponding to the tuning configuration parameter in the next round of tuning operation, the method further comprises the following steps: determining that the hardware resource usage rate actually running under the tuning configuration parameter is not greater than a first threshold value.

3. The method of claim 2, wherein, The method further comprises the following steps: if the hardware resource usage rate actually running under the tuning configuration parameter is greater than the first threshold value, then removing the interval corresponding to the tuning configuration parameter from the confidence interval; re-determining the tuning configuration parameter from the confidence interval through the acquisition function; obtaining the actual throughput per unit time of the virtual machine under the tuning configuration parameter; if the actual throughput per unit time corresponding to the tuning configuration parameter does not meet the preset throughput per unit time, then adding the virtual machine parameter group corresponding to the tuning configuration parameter in the next round of tuning operation.

4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the tuning configuration parameter corresponding to the confidence interval through the preset acquisition function comprises the following steps: determining a characteristic value corresponding to the confidence interval; wherein the characteristic value comprises an expectation and a variance of the confidence interval corresponding to each configuration parameter group; determining the configuration parameter group making the function value of the acquisition function maximum as the tuning configuration parameter through the preset acquisition function.

5. A virtual machine tuning apparatus, characterized by comprising: The method comprises the following steps: an obtaining module is configured to obtain a plurality of virtual machine parameter groups; wherein each virtual machine parameter group comprises a configuration parameter and a throughput per unit time; each virtual machine parameter group is used to represent the throughput per unit time obtained by actually running the virtual machine configured according to the configuration parameter under the preset concurrency; The processing module is configured to: determine a confidence interval of each of the plurality of virtual machine parameter groups according to a Gaussian distribution and a preset confidence level, the confidence interval being used to represent a predicted processing capacity per unit time corresponding to each of the plurality of virtual machine parameter groups; determine an optimized configuration parameter corresponding to the confidence interval according to a preset acquisition function, the optimized configuration parameter being used to perform a stress test on the virtual machine under a set concurrency; obtain an actual processing capacity per unit time of the virtual machine under the optimized configuration parameter; and increase the virtual machine parameter group corresponding to the optimized configuration parameter in a next round of optimization operation if the actual processing capacity per unit time under the optimized configuration parameter does not meet a preset processing capacity per unit time.

6. The apparatus of claim 5, wherein, The processing module is further configured to: determine a hardware resource usage rate of the virtual machine when the virtual machine is actually running under the optimized configuration parameter; before increasing the virtual machine parameter group corresponding to the optimized configuration parameter in the next round of optimization operation, the processing module is further configured to: determine that the hardware resource usage rate when the virtual machine is actually running under the optimized configuration parameter is not greater than a first threshold value.

7. The apparatus of claim 6, wherein, The processing module is further configured to: remove the interval corresponding to the optimized configuration parameter from the confidence interval if the hardware resource usage rate when the virtual machine is actually running under the optimized configuration parameter is greater than the first threshold value; determine the optimized configuration parameter from the confidence interval again according to the acquisition function; determine the actual processing capacity per unit time of the virtual machine under the optimized configuration parameter; increase the virtual machine parameter group corresponding to the optimized configuration parameter in the next round of optimization operation if the actual processing capacity per unit time under the optimized configuration parameter does not meet the preset processing capacity per unit time.

8. The device of any one of claims 5 to 7, wherein, The processing module is specifically configured to: determine a characteristic value corresponding to the confidence interval, wherein the characteristic value includes an expectation and a variance of the confidence interval corresponding to each of the plurality of virtual machine parameter groups; determine a configuration parameter group that maximizes a function value of the acquisition function as the optimized configuration parameter according to the preset acquisition function.

9. A computing device, comprising: The method comprises: a memory configured to store program instructions; a processor configured to invoke the program instructions stored in the memory to perform the method according to any one of claims 1 to 4.

10. A computer-readable non-transitory storage medium, characterized in that, computer-readable instructions that, when read and executed by a computer, cause the computer to perform the method according to any one of claims 1 to 4.

11. A computer program product, characterised in that, when it is run on a computer, causes the computer to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Bayesian optimization techniques and applications

    US20180349158A1