Methods, devices, and electronic equipment for system parameter tuning

By employing a divide-and-conquer strategy in the computer system, and utilizing clustering and gradient optimization methods to find locally optimal configuration parameters in each parameter group, the challenges of performance prediction caused by the curse of dimensionality and data heterogeneity are overcome. This approach enables the determination of globally optimal configuration parameters and improves the performance of the computer system.

CN114840403BActive Publication Date: 2025-11-14ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210474087.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-11-14
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing technologies make it difficult to accurately predict operational performance in computer system parameter tuning due to the curse of dimensionality and data heterogeneity, resulting in inaccurate parameter tuning and affecting the effectiveness of computer performance optimization.

Method used

A strategy of first dividing and then combining is adopted. Through clustering and gradient optimization, the local optimal configuration parameters are first found in each parameter group using a performance prediction model with local properties. Then, the global optimal configuration parameters are determined, thus avoiding the need to train a performance prediction model with global properties.

Benefits of technology

It enables accurate configuration parameter tuning, ensuring that the computer system performance reaches its optimal state, and improving the accuracy and efficiency of parameter tuning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840403B_ABST
    Figure CN114840403B_ABST
Patent Text Reader

Abstract

This application proposes a method, apparatus, and electronic device for system parameter tuning. The method includes: acquiring preset configuration parameters for the computer system and a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program; clustering the configuration parameters according to the configuration parameters and the first evaluation result to obtain a first preset number of parameter groups; for each parameter group, using a performance prediction model corresponding to the parameter group, tuning the configuration parameters along a direction that improves the performance prediction result output by the performance prediction model using a gradient optimization method, to determine the locally optimal configuration parameters corresponding to each parameter group; and determining the globally optimal configuration parameters corresponding to all parameter groups based on the locally optimal configuration parameters, thereby enabling the computer system to be configured based on the globally optimal configuration parameters to optimize the computer system performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, specifically to a method, apparatus, and electronic device for system parameter optimization. Background Technology

[0002] The performance of a computer system is related to its configuration parameters. These configuration parameters can include system parameters across multiple dimensions. System parameters refer to configuration items in the computer system that can be dynamically set and affect system performance, such as kernel configuration parameters and application configuration parameters.

[0003] Current mainstream configuration parameter tuning methods are primarily based on Bayesian theory. That is, based on real-time feedback on computer performance tuning results, a global prediction model dynamically searches for better configuration parameters within a pre-defined parameter space, resulting in improved computer performance. This optimization framework is relatively universal and has been widely used in recent years not only for parameter tuning in computer systems but also for hyperparameter tuning of deep learning models.

[0004] The global prediction model is used to predict the computer's operating performance when the system parameters are optimized according to the configuration parameters. The "global" aspect is primarily reflected in the model's ability to effectively predict all configuration parameters within the parameter space.

[0005] However, due to the curse of dimensionality and the heterogeneity of data, it is often difficult to obtain a global predictive model that can accurately predict the performance of the operation, thus making it impossible to accurately tune parameters and consequently affecting the optimization effect on computer performance. Summary of the Invention

[0006] In view of this, this application discloses at least one method for system parameter tuning. The method may include: obtaining preset configuration parameters for a computer system, and a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program; the first evaluation result is used to evaluate the performance of the computer system; clustering the configuration parameters according to the configuration parameters and the first evaluation result to obtain a first preset number of parameter groups; for each parameter group, using a performance prediction model corresponding to the parameter group, tuning the configuration parameters along a direction that improves the performance prediction result output by the performance prediction model using gradient optimization, to determine the locally optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on each group of configuration parameters within the parameter group and the first evaluation result corresponding to each group of configuration parameters; and determining the globally optimal configuration parameters corresponding to all parameter groups based on the locally optimal configuration parameters.

[0007] In some embodiments, clustering the configuration parameters according to the configuration parameters and the first evaluation result to obtain multiple parameter groups includes: initially dividing the configuration parameters into the first preset number of parameter groups based on a first preset number of center parameters selected from the configuration parameters; for each group of configuration parameters, reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters; wherein, there is a second linear relationship between the configuration parameters and the first evaluation result corresponding to the configuration parameters, and the second linear relationship has the highest matching degree with the first linear relationship corresponding to the target parameter group; the first linear relationship is obtained by fitting each group of configuration parameters and the first evaluation result of each group of configuration parameters in the target parameter group.

[0008] In some embodiments, the step of reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation results corresponding to the configuration parameters includes: for each parameter group, using the configuration parameters in each group and the first evaluation results of each group of configuration parameters to fit a first linear regression model corresponding to each parameter group; the first linear regression model is used to indicate the first linear relationship; using the first linear regression model corresponding to each parameter group to predict the configuration parameters to obtain a second evaluation result corresponding to each parameter group; obtaining a prediction error corresponding to each parameter group based on the second evaluation result and the first evaluation result; the prediction error indicates the degree of matching between the second linear relationship and the first linear relationship corresponding to each parameter group; and reclassifying the configuration parameters into target parameter groups corresponding to the minimum prediction error.

[0009] In some embodiments, the step of reclassifying the configuration parameters into target parameter groups for each group of configuration parameters according to the configuration parameters and the first evaluation result corresponding to the configuration parameters includes: repeatedly performing the step of reclassifying the configuration parameters into target parameter groups for each group of configuration parameters in multiple groups of configuration parameters according to the configuration parameters and the first evaluation result corresponding to the configuration parameters, until the configuration parameters in each parameter group no longer change, or, after completing one reclassification of parameter groups for each group of configuration parameters, refitting the second linear regression model for each parameter group to match the first linear programming model.

[0010] In some embodiments, when the larger the first evaluation result and the performance prediction result are, indicating better performance of the computer system, the gradient optimization method includes gradient ascent; when the smaller the first evaluation result and the performance prediction result are, indicating better performance of the computer system, the gradient optimization method includes gradient descent.

[0011] In some embodiments, when the gradient optimization method is gradient descent, the step of using the performance prediction model corresponding to the parameter group and employing gradient optimization to fine-tune the configuration parameters along the direction that improves the performance prediction results output by the performance prediction model, and determining the locally optimal configuration parameters corresponding to each parameter group, includes: for each parameter group, repeatedly using gradient descent along the direction that improves the performance prediction results output by the performance prediction model, adjusting the current optimal configuration parameters in the parameter group using parameter change step size, generating multiple sets of new configuration parameters for configuration parameter fine-tuning, and adding the generated multiple sets of new configuration parameters to the parameter group; for each parameter group, determining the configuration parameter within the parameter group corresponding to the minimum first evaluation result as the locally optimal configuration parameter corresponding to the parameter group.

[0012] In some embodiments, the step of repeatedly using gradient descent to adjust the current optimal configuration parameters in the parameter group along a direction that improves the performance prediction results output by the performance prediction model, using parameter change step size, to generate multiple sets of new configuration parameters, and adding the generated multiple sets of new configuration parameters to the parameter group, includes: repeatedly performing the following steps on the parameter group until a preset number of executions is reached or a preset condition is met: training the performance prediction model based on each set of configuration parameters in the parameter group and the first evaluation results corresponding to each set of configuration parameters; determining the configuration parameter corresponding to the smallest first evaluation result among the first evaluation results corresponding to each set of configuration parameters as the current optimal configuration parameter; generating new configuration parameters according to the current optimal configuration parameters and parameter change step size along a direction that improves the performance prediction results output by the trained performance prediction model using gradient descent; and adding the generated new configuration parameters to the parameter group.

[0013] In some embodiments, generating new configuration parameters according to the gradient descent method, along a direction that improves the performance prediction result output by the trained performance prediction model, based on the current optimal configuration parameters and the parameter change step size, includes: determining the gradient of the performance prediction model at the current optimal configuration parameters based on the current optimal parameters; the gradient indicating the change in the prediction result of the performance prediction model at the current optimal configuration parameters; generating new configuration parameters based on the difference between the current optimal configuration parameters and the parameter change step size when the gradient is positive; and generating new configuration parameters based on the sum of the current optimal configuration parameters and the parameter change step size when the gradient is negative.

[0014] In some embodiments, the parameter change step size includes the product of an adjustment coefficient and a preset unit step size; the method for determining the adjustment coefficient includes: comparing the current optimal configuration parameter determined in each gradient descent with the current optimal configuration parameter determined in the previous gradient descent; increasing the adjustment coefficient when the current optimal configuration parameter determined in each gradient descent is a newly added configuration parameter in the previous gradient descent during a second preset number of consecutive gradient descents; and decreasing the adjustment coefficient when the current optimal configuration parameter determined in each gradient descent remains unchanged during a third preset number of consecutive gradient descents.

[0015] In some embodiments, the method for determining the adjustment coefficient further includes: determining the adjustment coefficient as a weighted sum of the first adjustment coefficient in the current gradient descent process and the second adjustment coefficient in the historical gradient descent process.

[0016] In some embodiments, during the training of the performance prediction model, a first evaluation result corresponding to the configuration parameters in other parameter groups and the configuration parameters in other parameter groups is added; the training of the performance prediction model based on each group of configuration parameters in the parameter groups and the first evaluation result corresponding to each group of configuration parameters includes: performing multiple rounds of training on the performance prediction model; wherein each round of training includes: inputting each configuration parameter in the other parameter groups into the performance prediction model to obtain a third evaluation result; inputting each group of configuration parameters in the parameter groups into the performance prediction model to obtain a fourth evaluation result; adjusting the model parameters of the performance prediction model based on the weighted sum of a first error between the third evaluation result and the first evaluation result of each group of configuration parameters in the other parameter groups, and a second error between the fourth evaluation result and the first evaluation result of each group of configuration parameters in the parameter groups.

[0017] In some embodiments, the neural network includes any of the following types: multilayer perceptron; convolutional neural network; graph convolutional neural network.

[0018] This application also proposes a system parameter tuning apparatus, comprising: an acquisition module for acquiring preset configuration parameters for a computer system and first evaluation results corresponding to the configuration parameters obtained using a preset benchmark program; the first evaluation results are used to evaluate the performance of the computer system; a clustering module for clustering the configuration parameters according to the configuration parameters and the first evaluation results to obtain a first preset number of parameter groups; a tuning module for tuning the configuration parameters for each parameter group using a performance prediction model corresponding to the parameter group and employing a gradient optimization method to tune the configuration parameters in a direction that improves the performance prediction results output by the performance prediction model, thereby determining the locally optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on each group of configuration parameters within the parameter group and the first evaluation results corresponding to each group of configuration parameters; and a configuration module for determining the globally optimal configuration parameters corresponding to all parameter groups based on the locally optimal configuration parameters.

[0019] This application proposes an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor executes the executable instructions to implement a system parameter tuning method as shown in any of the foregoing embodiments.

[0020] This application also proposes a computer-readable storage medium storing a computer program for causing a processor to perform a system parameter tuning method as shown in any of the foregoing embodiments.

[0021] The aforementioned scheme is equivalent to adopting a strategy of first dividing and then combining. First, a local performance prediction model is used in each parameter group to optimize the configuration parameters through gradient descent to find the locally optimal configuration parameters in each parameter group. Then, the globally optimal configuration parameters are determined. Compared with related technologies, there is no need to train a globally optimal performance prediction model, so the configuration parameters can be accurately optimized, and then the globally optimal configuration parameters can be obtained to complete the parameter configuration of the computer system and make the system perform optimally.

[0022] It should be understood that the general description above and the detailed description below are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in one or more embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in one or more embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating a method for system parameter tuning according to an embodiment of this application;

[0025] Figure 2 This is a flowchart illustrating a linear regression clustering method according to an embodiment of this application;

[0026] Figure 3 This is a flowchart illustrating a linear regression clustering method according to an embodiment of this application;

[0027] Figure 4 This is a flowchart illustrating a method for determining local optimal parameters based on gradient descent, as shown in an embodiment of this application.

[0028] Figure 5 This is a flowchart illustrating a gradient descent-based configuration parameter tuning method according to an embodiment of this application.

[0029] Figure 6 This is a schematic diagram illustrating a parameter grouping process based on linear regression, as shown in an embodiment of this application.

[0030] Figure 7 This is a flowchart illustrating a parameter tuning method based on local gradient descent, as shown in an embodiment of this application.

[0031] Figure 8 This is a schematic diagram of a system parameter tuning device shown in an embodiment of this application;

[0032] Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0033] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.

[0034] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items. It should also be understood that the word “if” as used herein, depending on the context, can be interpreted as “when,” “in response to a determination,” or “when…”.

[0035] Based on this, this application proposes a method for system parameter tuning. This method can obtain preset configuration parameters for the computer system and a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program; the first evaluation result is used to evaluate the performance of the computer system; based on the configuration parameters and the first evaluation result, the configuration parameters are clustered to obtain a first preset number of parameter groups; for each parameter group, the configuration parameters are tuned using a performance prediction model corresponding to the parameter group and a gradient descent method to determine the locally optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on each group of configuration parameters within the parameter group and the first evaluation result corresponding to each group of configuration parameters; based on the locally optimal configuration parameters, the globally optimal configuration parameters corresponding to all parameter groups are determined.

[0036] The aforementioned scheme is equivalent to adopting a strategy of first dividing and then combining. First, a local performance prediction model is used in each parameter group to optimize the configuration parameters through gradient descent to find the locally optimal configuration parameters in each parameter group. Then, the globally optimal configuration parameters are determined. Compared with related technologies, there is no need to train a globally optimal performance prediction model, so the configuration parameters can be accurately optimized, and then the globally optimal configuration parameters can be obtained to complete the parameter configuration of the computer system and make the system perform optimally.

[0037] The following description, in conjunction with the accompanying drawings, illustrates the embodiments. Please refer to the attached figures. Figure 1 , Figure 1 This is a flowchart illustrating a method for system parameter tuning according to an embodiment of this application.

[0038] Figure 1The system parameter tuning method shown can be applied to electronic devices. The electronic device can execute the method by incorporating software logic corresponding to this system parameter tuning method. The type of electronic device can be a laptop, computer, server, mobile phone, PDA, etc. This application does not specifically limit the type of electronic device. The electronic device can also be a client device or a server device.

[0039] like Figure 1 As shown, the method may include steps S102-S108. Unless otherwise specified, this application does not specifically limit the order in which these steps are performed.

[0040] In step S102, preset configuration parameters for the computer system are obtained, along with a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program.

[0041] The computer system refers to a carrier capable of running client or server programs. The computer system may include computer hardware, an operating system running on the computer, and client or server programs deployed within the operating system. The operating system may be Windows, Linux, macOS, etc. The client may be a chat client, a food ordering client, a music client, etc., and the server may be a backend server, a database, etc. This application does not limit the specific types of operating systems, clients, or servers.

[0042] The configuration parameters may include system parameters in at least two dimensions. In some methods, system parameters in each dimension can be uniformly assigned values ​​in the parameter space and combined into two or more sets of configuration parameters, so that the preset configuration parameters can be evenly distributed in the system parameter space.

[0043] The system parameters refer to configuration items in a computer system that can be dynamically set and affect the computer system's performance. Examples include kernel configuration parameters and application configuration parameters. Adjusting the kernel configuration parameters can affect the operating system's performance, and adjusting the application configuration parameters can affect the performance of the computer system running the application. It is understood that the configuration parameters referred to in this application can include system parameters in at least two dimensions, where each dimension can affect computer performance. For example, parameters that can affect computer performance include parameters in both kernel and application configuration dimensions, and these two dimensions can be combined into a set of configuration parameters.

[0044] The benchmark program is used to evaluate the performance of the computer system after it has been configured with the specified configuration parameters. In other words, the benchmark program quantifies the impact of the configuration parameters on computer performance. In some embodiments, the benchmark program can be deployed on the computer system whose performance is to be measured. When measuring performance, the computer system can be configured according to the configuration parameters, and then the performance evaluation results can be obtained by running the benchmark program. For details on how to use a benchmark program to evaluate computer performance, please refer to relevant technologies; these will not be elaborated upon here.

[0045] In this application, the evaluation result obtained using a benchmark procedure that can quantify the performance is referred to as the first evaluation result. The first evaluation result is used to assess the performance of the computer system. In some embodiments, the first evaluation result can be a performance score, performance rating, etc., through which the performance can be quantified. In some embodiments, the indicative relationship between the first evaluation result and the computer system performance can be determined according to requirements. That is, a lower first evaluation result can represent better computer system performance, or a higher first evaluation result can represent better computer system performance.

[0046] It is understood that the benchmark program evaluates the performance based on the actual operating state of the computer system. Therefore, its first evaluation result can be understood as real and reliable, that is, the first evaluation result can be used as the real feedback of the computer performance after the computer system is configured with the configuration parameters.

[0047] In some embodiments, in S102, a parameter space preset for each system parameter within the configuration parameters can be obtained first. The parameter space indicates the value range of the system parameter.

[0048] Then, system parameters can be sampled from the parameter space using a sampling method, and then combined into multiple sets of configuration parameters. In some methods, stratified random sampling (such as Latin hypercube sampling) can be used to sample system parameters from the parameter space, and then combine them into multiple sets of configuration parameters, so that the multiple sets of configuration parameters can be evenly distributed in the system parameter space.

[0049] Then, the computer system can be configured for each set of configuration parameters, and the benchmark program can be used to measure the first evaluation result corresponding to each set of configuration parameters.

[0050] S104, based on the multiple sets of configuration parameters and the first evaluation result, cluster the multiple sets of configuration parameters to obtain a first preset number of parameter groups.

[0051] The clustering refers to the process of grouping similar configuration parameters together. Each parameter group includes at least one set of configuration parameters. The first preset number can be set according to requirements.

[0052] In some embodiments, common clustering methods (e.g., K-means) can be used to group similar configuration parameters together to form parameter groups.

[0053] For example, the clustering could be K-means clustering. In some approaches, configuration parameters can be treated as one-dimensional vectors, and the similarity between configuration parameters can be determined by calculating Mahalanobis distance, Euclidean distance, etc., and the clustering can be completed based on the similarity.

[0054] In some embodiments, a novel linear regression (K-regression) clustering method can be proposed, which can group configuration parameters with similar linear correlations into a parameter group, maximizing the linear correlation within the parameter group and minimizing the linear correlation between parameter groups. This makes the data within each parameter group roughly linearly arranged, reducing the possibility of saddle points and local optima, improving the efficiency of gradient optimization methods, and thus improving the efficiency of parameter tuning and system parameter tuning.

[0055] Please see Figure 2 , Figure 2 This is a flowchart illustrating a linear regression clustering method according to an embodiment of this application. Figure 2 The illustrated method is a supplementary explanation of S104. For example... Figure 2 As shown, the clustering method may include steps S202-S204. Unless otherwise specified, this application does not limit the order in which these steps are performed.

[0056] S202, based on the first preset number of center parameters selected from the configuration parameters, the configuration parameters are initially divided to obtain the first preset number of parameter groups.

[0057] The first preset quantity can be set in advance according to the needs, such as 3, 4, or 5.

[0058] In this step, a first preset number of configuration parameters can be randomly selected from the configuration parameters as the center parameter. The center parameter can be understood as the center point in the parameter group.

[0059] Then, referring to the K-means method, the configuration parameters can be regarded as one-dimensional vectors. Based on the similarity (Mahathano distance, Euclidean distance, etc.) between each configuration parameter and each central parameter, each configuration parameter can be initially divided into the parameter group to which the central parameter with the highest similarity belongs, thus obtaining the first preset number of parameter groups.

[0060] S204, for each group of configuration parameters, based on the configuration parameters and the first evaluation result corresponding to the configuration parameters, the configuration parameters are reclassified into target parameter groups.

[0061] There is a second linear relationship between the configuration parameters and the first evaluation results corresponding to the configuration parameters, and the second linear relationship has the highest matching degree with the first linear relationship corresponding to the target parameter group; the first linear relationship is obtained by fitting each group of configuration parameters and the first evaluation results of each group of configuration parameters in the target parameter group.

[0062] In this application, the linear relationship between the configuration parameters to be clustered and their corresponding first evaluation results is called the second linear relationship, and the linear relationship obtained by fitting the configuration parameters of each group within the parameter group and the first evaluation results of each group of configuration parameters is called the first linear relationship.

[0063] The highest matching degree means that the matching degree between the second linear relationship and the first linear relationship corresponding to the target parameter group is higher than the matching degree between the second linear relationship and the first linear relationship corresponding to other parameter groups.

[0064] To facilitate comparison of the matching degree, this application designs an index called prediction error. The prediction error refers to the predicted performance evaluation result of the computer if configured with the given parameters, obtained using a first linear relationship obtained through fitting and the configuration parameters of the cluster to be clustered. The difference between the performance evaluation result and the actual evaluation result is then defined as the prediction error. The actual evaluation result is the first evaluation result corresponding to the configuration parameters of the cluster to be clustered, obtained based on a benchmark program.

[0065] A smaller prediction error indicates that the predicted result obtained through the first linear relationship is closer to the true value, meaning a higher degree of matching between the second and first linear relationships. Conversely, a larger prediction error indicates that the predicted result obtained through the first linear relationship is further from the true value, meaning a lower degree of matching between the second and first linear relationships. Therefore, the prediction error metric can quantify the degree of matching between the second and first linear relationships; comparing prediction errors allows for a comparison of the degree of matching.

[0066] It should be noted that, referring to the principle of using prediction error to indicate the matching degree, other indicators that can also indicate the matching degree are also within the scope of protection of this application. For example, variable error can also be used. That is, the first evaluation result corresponding to the configuration parameters to be clustered is input into the first linear relationship to obtain the predicted configuration parameters, and the variable error is obtained based on the difference between the predicted configuration parameters and the configuration parameters to be clustered. This variable error can also indicate the matching degree.

[0067] In step S204, the prediction error corresponding to the configuration parameters to be clustered is determined using the first linear relationship corresponding to each parameter group. The configuration parameters to be clustered are then reassigned to the target parameter group corresponding to the minimum prediction error to complete the linear regression-based clustering. After clustering, configuration parameters with similar linear correlations are grouped together, maximizing the linear correlation within each parameter group and minimizing the linear correlation between parameter groups. This results in the data within each parameter group being roughly linearly arranged, reducing the possibility of saddle points and local optima, improving the efficiency of the gradient optimization method, and consequently improving the efficiency of parameter tuning and system parameter tuning.

[0068] Please see Figure 3 , Figure 3 This is a flowchart illustrating a linear regression clustering method according to an embodiment of this application. Figure 3 The illustrated steps are supplementary explanations to S204. Each set of configuration parameters requires execution. Figure 3 The steps are illustrated. For example... Figure 3 As shown, the method may include steps S302-S308. Unless otherwise specified, this application does not specifically limit the order in which these steps are performed.

[0069] S302, for each parameter group, using the configuration parameters of each group within the parameter group and the first evaluation result of each group of configuration parameters, a first linear regression model corresponding to each parameter group is fitted.

[0070] If we consider the configuration parameter as variable x and its corresponding evaluation result as y, the first linear relationship can be expressed as: y1=a1*x1+b1.

[0071] In general, parameter grouping includes multiple sets of configuration parameters to obtain multiple sets of x1 and y1. A linear regression model can be obtained through data fitting. Methods for data fitting can be found in relevant technologies and will not be detailed here. In this application, the linear regression model obtained by data fitting before each step of re-dividing the configuration parameters is referred to as the first linear regression model.

[0072] S304, using the first linear regression model corresponding to each of the parameter groups, the configuration parameters are predicted to obtain the second evaluation result corresponding to each of the parameter groups.

[0073] In this step, the configuration parameters are input into the first linear regression model corresponding to each parameter group to obtain the second evaluation result predicted by each first linear regression model. This step also requires mapping the second evaluation result to the parameter groups corresponding to each first linear regression model for subsequent reclassification.

[0074] S306, Based on the second evaluation result and the first evaluation result, obtain the prediction error corresponding to each of the parameter groups respectively.

[0075] The prediction error indicates the degree of matching between the second linear relationship and the first linear relationship corresponding to each parameter group. For a conceptual explanation of prediction error, please refer to the preceding content; it will not be elaborated upon here.

[0076] The first evaluation result can be used as the true value, and the second evaluation result can be used as the predicted value. The prediction error can be obtained based on the difference between the two.

[0077] The smaller the prediction error, the closer the prediction result obtained through the first linear relationship is to the true value; that is, the higher the matching degree between the second linear relationship and the first linear relationship. Conversely, the larger the prediction error, the further the prediction result obtained through the first linear relationship is from the true value; that is, the lower the matching degree between the second linear relationship and the first linear relationship.

[0078] S308, the configuration parameters are reclassified into target parameter groups corresponding to the minimum prediction error.

[0079] For each set of configuration parameters, S302-S308 are executed, which means that based on the linear relationship between the configuration parameters and their corresponding first evaluation results, the parameters of each set of configuration parameters are regrouped, so that the configuration parameters are regrouped to the target parameter group that best matches the linear relationship.

[0080] In some embodiments, the step of reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters can be performed multiple times for each of the multiple sets of configuration parameters until the configuration parameters in each parameter group no longer change, or, after completing one reclassification of the parameter groups for each set of configuration parameters, the second linear regression model obtained by refitting for each parameter group matches the first linear programming model.

[0081] After each re-partitioning step, the current configuration parameters within each parameter group can be compared with those before the re-partitioning step. If there are no changes, it indicates that the clustering has reached a stable state, and the clustering result can be output. If changes are still occurring, it indicates that the clustering has not yet stabilized, and the re-partitioning step can continue.

[0082] or,

[0083] After each re-division step, a second linear regression model is obtained by refitting the data for each parameter group. This second model is then compared with the first linear regression models performed before the re-division step. If they match (e.g., they are identical, or the matching degree reaches a preset threshold (e.g., 95% or 97%)), the clustering has reached a stable state, and the clustering result can be output. If they do not match, the clustering is not yet stable, and the re-division step can continue.

[0084] For example, for each of the multiple sets of configuration parameters, steps S302-S308 can be executed multiple times. After each execution of S302-S308, it can be determined whether the clustering is in a stable state using the aforementioned method. If stable, the clustering can be terminated and the final parameter grouping result obtained. Otherwise, steps S302-S308 can be executed again until the clustering reaches a stable state.

[0085] This ensures the effectiveness of linear regression clustering, which groups configuration parameters with similar linear correlations into a single parameter group, maximizing the linear correlation within the parameter group and minimizing the linear correlation between parameter groups.

[0086] S106, for each parameter group, using the performance prediction model corresponding to the parameter group, the configuration parameters are tuned in the direction that makes the performance prediction result output by the performance prediction model better through gradient optimization, and the local optimal configuration parameters corresponding to each parameter group are determined.

[0087] The performance prediction model can be a prediction model generated based on any type of neural network. The input to the performance prediction model is configuration parameters, and the output is the performance prediction result for the computer system. In some embodiments, the neural network includes any of the following types: multilayer perceptron; convolutional neural network; graph convolutional neural network. Comparing neural networks with stronger fitting capabilities can effectively improve the parameter tuning effect.

[0088] The performance prediction model is a neural network model trained based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters. During model training, each group of configuration parameters can be used as the model input, and the first evaluation result corresponding to each group of configuration parameters can be used as the labeled value (true value). Supervised training is employed to train the performance prediction model. For an explanation of supervised training methods, please refer to relevant technical documents. The trained performance prediction model can then be used to predict the performance of computer systems based on configuration parameters.

[0089] The performance prediction model takes configuration parameters as input and outputs predicted performance evaluation results. The objective of this application is to optimize computer system performance, specifically to improve the performance prediction results output by the performance prediction model. To achieve this goal, a gradient optimization approach can be used, gradually adjusting the configuration parameters to obtain parameters that improve computer system performance, thus completing configuration parameter tuning. Configuration parameter tuning can be understood as the process of expanding the parameter grouping to include more configuration parameters that improve computer system performance. After completing the tuning, locally optimal configuration parameters within the parameter grouping can be determined.

[0090] The locally optimal configuration parameter is determined relative to parameter groups. According to S104, multiple sets of configuration parameters can be clustered to obtain multiple non-overlapping parameter groups. Each parameter group may include a subset of configuration parameters. In S106, for each parameter group, the optimal configuration parameter within that group can be determined. This optimal configuration parameter is optimal within that parameter group, but may not be optimal across all parameter groups. That is, the locally optimal configuration parameter is optimal within its own parameter group, but may not be optimal across all parameter groups.

[0091] Gradient optimization methods can include gradient ascent and gradient descent.

[0092] Among them, gradient ascent refers to the method of gradually increasing the performance prediction result (model output) by adjusting the configuration parameters (model input); gradient descent refers to the method of gradually decreasing the performance prediction result (model output) by adjusting the configuration parameters (model input).

[0093] The choice between gradient ascent and gradient descent for parameter tuning can be configured according to requirements. In some embodiments, where a larger first evaluation result and a larger performance prediction result indicate better computer system performance, the gradient optimization method includes gradient ascent; where a smaller first evaluation result and a smaller performance prediction result indicate better computer system performance, the gradient optimization method includes gradient descent.

[0094] It is understandable that regardless of whether gradient ascent or gradient descent is used, the goal is to improve the computer performance indicated by the performance prediction results output by the performance prediction model by adjusting the configuration parameters.

[0095] Let's take gradient descent as an example. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating a method for determining local optimal parameters based on gradient descent, as shown in an embodiment of this application. Figure 4 The illustrated steps are supplementary explanations to S106. For example... Figure 4As shown, the method may include steps S402-S404. Unless otherwise specified, this application does not limit the order in which these steps are performed.

[0096] S402, for each parameter group, the gradient descent method can be used multiple times to adjust the current optimal configuration parameters in the parameter group along the direction that makes the performance prediction result output by the performance prediction model better, using the parameter change step size, to generate multiple sets of new configuration parameters for configuration parameter tuning, and to add the generated multiple sets of new configuration parameters to the parameter group.

[0097] In gradient descent, the smaller the performance prediction result, the better the computer system performance.

[0098] The currently optimal parameter refers to the parameter that, during the current gradient descent process, optimizes system performance and belongs to the parameter group. In other words, it is the system parameter that minimizes the first evaluation result during the current gradient descent process.

[0099] During each gradient descent process, the current optimal parameters can be adjusted using the parameter change step size to obtain new configuration parameters that improve the performance prediction results output by the performance prediction model. Multiple executions of gradient descent can continuously fine-tune the configuration parameters. Subsequently, multiple sets of the generated new configuration parameters can be added to the parameter group, thus saving each newly generated configuration parameter. Ultimately, locally optimal configuration parameters can be determined from the parameter group.

[0100] Please see Figure 5 , Figure 5 This is a flowchart illustrating a gradient descent-based configuration parameter tuning method according to an embodiment of this application. Figure 5 The illustrated steps are a detailed explanation of S402. Figure 5 The illustrated steps involve performing a gradient descent process for a single parameter group. In step S402, this process needs to be performed multiple times for each parameter group. Figure 5 The illustrated steps continue until the preset number of executions is reached or the preset conditions are met.

[0101] The preset conditions can be set according to requirements. In some embodiments, the preset conditions may include determining the current optimal configuration parameters as the same set of configuration parameters during the gradient descent process for a third consecutive preset number of rounds. The third preset number can be set according to requirements, such as 10, 20, or 30.

[0102] like Figure 5 As shown, the method may include steps S502-S508. Unless otherwise specified, this application does not limit the order in which these steps are performed.

[0103] S502, the performance prediction model is trained based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters.

[0104] In this step, each set of configuration parameters can be used as the model input, and the first evaluation result corresponding to each set of configuration parameters can be used as the labeled value (true value). The performance prediction model can be trained in multiple rounds using a supervised training method.

[0105] The process of one round of training is illustrated using the performance prediction model based on a multilayer perceptron (MLP) as an example.

[0106] It can be done via g i The performance prediction model is represented by MLP(x) = g(x). Here, i represents the i-th parameter group, x represents the model input, and g(x) represents the parameter grouping. i (x) is the model output of the performance prediction model corresponding to the i-th parameter not grouped; MLP(x) indicates the operation formula of the multilayer perceptron.

[0107] In one round of training, each set of configuration parameters can be used as input x into the performance prediction model to obtain the prediction result g. i (x). Then, based on the preset loss function, such as the mean loss function argmax(MSE(y)), i g i (x))), then the true value y can be obtained. i With prediction result g i The loss information between (x) can be used to adjust the model parameters using backpropagation.

[0108] In some embodiments, during the training of the performance prediction model, the configuration parameters in other parameter groups and the first evaluation results corresponding to the configuration parameters in other parameter groups can be added.

[0109] The training methods may include:

[0110] The performance prediction model is trained multiple times. In some methods, it can be trained multiple times until a preset number of rounds are reached, or the accuracy of the performance prediction model on the test set may decrease instead of increase.

[0111] In each round of training:

[0112] Each configuration parameter within the other parameter group can be input into the performance prediction model to obtain a third evaluation result;

[0113] Input the configuration parameters of each group within the parameter group into the performance prediction model to obtain the fourth evaluation result;

[0114] The model parameters of the performance prediction model are adjusted based on the weighted sum of the first error between the third evaluation result and the first evaluation result of each group of configuration parameters in the other parameter groups, and the second error between the fourth evaluation result and the first evaluation result of each group of configuration parameters in the parameter groups.

[0115] Therefore, when training the performance prediction model, the first error information from the global system parameters can be incorporated to enhance the model training effect and thus improve the parameter optimization effect. It is worth noting that in this application, the error information needs to be multiplied by a relatively small weight (e.g., 0.1) to introduce the first error without causing the model to have difficulty converging.

[0116] S504, the configuration parameter corresponding to the smallest first evaluation result among the first evaluation results of each group of configuration parameters is determined as the current optimal configuration parameter.

[0117] In gradient descent, a smaller first evaluation result indicates better computer system performance. In this step, the first evaluation results corresponding to each configuration parameter within the parameter group are compared to obtain the smallest first evaluation result. The configuration parameter corresponding to the smallest first evaluation result is then determined as the current optimal configuration parameter. In this application, the current optimal configuration parameter can be denoted as x. best .

[0118] S506, According to the gradient descent method, new configuration parameters are generated along the direction that makes the performance prediction results output by the completed performance prediction model better, based on the current optimal configuration parameters and the parameter change step size.

[0119] Specifically, in S506, the gradient of the performance prediction model at the current optimal configuration parameter can be determined based on the current optimal parameter.

[0120] Based on the principle of gradient, we can use the formula... Calculate the gradient. Where g′ i (x best The value ) indicates the gradient of the performance prediction model at the current optimal configuration parameters; step is a preset unit step size. Compared to the configuration parameters, step is generally much smaller.

[0121] The gradient indicates how the performance prediction model changes its prediction at the current optimal parameter configuration. A positive gradient indicates that increasing the parameter value beyond the current optimal parameter configuration results in a larger performance prediction, meaning worse computer system performance; conversely, a negative gradient indicates that increasing the parameter value beyond the current optimal parameter configuration results in a smaller performance prediction, meaning better computer system performance.

[0122] Based on the aforementioned principle, when the gradient is positive, a new configuration parameter can be generated based on the difference between the current optimal configuration parameter and the parameter change step size; when the gradient is negative, a new configuration parameter can be generated based on the sum of the current optimal configuration parameter and the parameter change step size, thereby obtaining a new configuration parameter that improves the performance of the computer system.

[0123] Expressed by the formula, that is, in g′ i (x best When x is greater than 0, let x new =x best -σ*step; where x new This represents the new configuration parameter; σ*step represents the parameter change step size. In g′ i (x best When x is less than 0, let x new =x best +σ*step. The aforementioned steps will generate new configuration parameters that improve the performance of the computer system.

[0124] In some embodiments, the parameter change step size can be a fixed step size preset according to requirements, that is, σ and step are both preset values ​​that remain unchanged. That is, the parameters are adjusted according to the preset parameter change step size each time.

[0125] In some embodiments, the parameter variation step size includes the product of an adjustment coefficient and a preset unit step size. The adjustment coefficient can be automatically adjusted according to the actual tuning situation to determine a more suitable parameter variation step size and improve parameter tuning efficiency.

[0126] Specifically, the current optimal configuration parameter determined in each gradient descent can be compared with the current optimal configuration parameter determined in the previous gradient descent. If, during a second preset number of consecutive gradient descents, the current optimal configuration parameter determined in each gradient descent is a newly added configuration parameter from the previous gradient descent, the adjustment coefficient is increased. If, during a third preset number of consecutive gradient descents, the current optimal configuration parameter determined in each gradient descent remains unchanged, the adjustment coefficient is decreased.

[0127] The second preset quantity and the third preset quantity can be set according to requirements. For example, the second preset quantity can be 3 or 4, and the third preset quantity can be 5 or 6.

[0128] In the case where the optimal configuration parameters determined in each gradient descent of the second preset number of consecutive gradient descents are all the newly added configuration parameters from the previous gradient descent, it can be said that each gradient descent can indeed obtain new configuration parameters that improve the performance of the computer system. This is often the case at the beginning of gradient descent. Increasing the adjustment coefficient to increase the parameter adjustment step size can find the optimal configuration parameters more quickly and complete parameter tuning.

[0129] If the optimal configuration parameters determined in each gradient descent step remain unchanged during the third consecutive preset number of gradient descent steps, it indicates that each gradient descent step has not yielded new configuration parameters that improve the performance of the computer system. In this case, it is often near the end of the gradient descent process that reducing the adjustment coefficient can reduce the parameter adjustment step size, thereby ensuring that the optimal configuration parameters can be found.

[0130] Let's take σ*step, representing the parameter change step size, as an example. Here, σ is the adjustment coefficient, and step is the preset unit step size.

[0131] If no new configuration parameters that improve the performance of the computer system are obtained in 5 consecutive rounds, σ can be appropriately reduced, for example, σ = σ / 2. If new configuration parameters that improve the performance of the computer system are obtained in 3 consecutive rounds, σ can be appropriately increased, for example, σ = σ*2. In this way, the adjustment coefficient can be adjusted automatically according to the actual tuning situation to determine a more suitable parameter change step size, find the optimal configuration parameters faster, and improve the efficiency of parameter tuning.

[0132] In some embodiments, gradient descent can be performed using inertial gradients.

[0133] Specifically, the adjustment coefficient can be determined by the weighted sum of the first adjustment coefficient in the current gradient descent process and the second adjustment coefficient in the historical gradient descent processes. This allows the previous adjustment coefficient to be continued in subsequent gradient descent processes, helping to accelerate the finding of optimal system parameters.

[0134] This can be expressed by the formula: σ2=σ1+ω*σ history Where σ2 is the adjustment coefficient to be determined. σ1 is the first adjustment coefficient in the current gradient descent process. The method for determining this first adjustment coefficient can refer to the aforementioned embodiment. history This is the second adjustment coefficient in the historical gradient descent process. ω is the weighting coefficient (also known as the inertia value). This allows for gradient propagation, which helps to accelerate the finding of optimal system parameters.

[0135] S508, add the generated new configuration parameters to the parameter group.

[0136] By executing S502-S508 multiple times for each parameter group, the configuration parameters within the parameter group can be expanded, thus completing parameter tuning.

[0137] S404, for each parameter group, the configuration parameter corresponding to the minimum first evaluation result within the parameter group is determined as the locally optimal configuration parameter corresponding to the parameter group.

[0138] In this step, each parameter can be grouped, and the configuration parameter corresponding to the smallest first evaluation result within the group can be selected as the locally optimal configuration parameter.

[0139] By using S402-S404, the locally optimal configuration parameters corresponding to each parameter group can be determined.

[0140] S108, Based on the locally optimal configuration parameters, determine the globally optimal configuration parameters corresponding to all the parameter groups.

[0141] The globally optimal configuration parameter is determined by grouping all the parameters. This globally optimal configuration parameter is the configuration parameter that optimizes the computer system performance from the multiple sets of configuration parameters obtained in S102.

[0142] In this step, the first evaluation results corresponding to the optimal configuration parameters of each parameter group can be compared to obtain the smallest first evaluation result, and the configuration parameter corresponding to the smallest first evaluation result can be used as the global optimal configuration parameter.

[0143] Once the globally optimal configuration parameters are determined, the computer system can be configured according to these parameters to ensure optimal system performance.

[0144] In the aforementioned scheme, the steps described in S102-S108 are equivalent to adopting a strategy of first dividing and then combining. First, in each parameter group, a performance prediction model with local properties is used to optimize the configuration parameters through gradient descent to find the locally optimal configuration parameters in each parameter group. Then, the globally optimal configuration parameters are determined. Compared with related technologies, there is no need to train a performance prediction model with global properties, so the configuration parameters can be accurately optimized, and then the globally optimal configuration parameters are obtained to complete the parameter configuration of the computer system, so that the system performance is optimal.

[0145] The following is an example illustrating the method for configuring parameters on a server-side computer system that carries a database.

[0146] The computer system can adjust system parameters, including kernel parameters and database attribute parameters. These system parameters each have a preset parameter space. These parameter spaces can be preset by experienced personnel.

[0147] This solution is explained in three parts: parameter grouping, parameter tuning, and parameter configuration.

[0148] Part 1: Parameter Grouping

[0149] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating a parameter grouping process based on linear regression, as shown in an embodiment of this application. Figure 6 As shown, the method may include steps S601-S607. Unless otherwise specified, this application does not limit the order in which these steps are performed.

[0150] S601 performs Latin hypercube sampling based on the parameter space corresponding to each system parameter to obtain N sets of configuration parameters.

[0151] S602, for each set of configuration parameters, a first performance score is obtained using a preset benchmark program for each set of configuration parameters. The first performance score indicates the performance of the computer system.

[0152] This step yields N sets of configuration parameters and a first performance score for each set. A lower first performance score indicates better computer system performance.

[0153] S603 treats N sets of configuration parameters as N points, with each configuration parameter as a one-dimensional vector. K center points are randomly selected from the N points, and for each point, the principle of minimum distance is used to perform preliminary division to generate K clusters.

[0154] S604, for each cluster, uses the configuration parameters within the cluster and the first performance score corresponding to the configuration parameters to fit the first linear regression model f1.

[0155] This step can be found in S302 and will not be explained here. This step generates K first linear regression models.

[0156] S605: For each of the N points, use K f1 values ​​to predict the second performance score, and determine the loss between each predicted second performance score and the actual first performance score. Then, reassign the points to the clusters corresponding to the minimum loss. After performing S605 for each point, K new clusters can be obtained.

[0157] S606, perform linear regression on the newly generated K clusters to obtain K second linear regression models f2.

[0158] In step S607, for each cluster, check if f2 and f1 are consistent. If they are inconsistent, continue with steps S604-S607. If they are consistent, stop clustering and output the current K clusters as the final grouping parameters.

[0159] By using S601-S607, the K-regression method can be used to group configuration parameters with similar linear correlations into a parameter group, maximizing the linear correlation within the parameter group and minimizing the linear correlation between parameter groups. This makes the data within each parameter group roughly linearly arranged, reducing the possibility of saddle points and local optima, improving the efficiency of gradient optimization methods, and thus improving the efficiency of parameter tuning and system parameter tuning.

[0160] Part Two: Parameter Tuning.

[0161] After completing the first part of parameter grouping, we have K parameter groups. During parameter tuning, each parameter group in the K parameter groups can be regarded as a local domain.

[0162] Please see Figure 7 , Figure 7 This is a flowchart illustrating a parameter tuning method based on local domain gradient descent, as shown in an embodiment of this application. Each local domain needs to be executed. Figure 7 The steps are illustrated. For example... Figure 7 As shown, the method may include steps S701-S708. Unless otherwise specified, this application does not limit the order in which these steps are performed.

[0163] S701 trains a preset local prediction model using configuration parameters within the local domain and their corresponding first performance scores.

[0164] In this step, the local prediction model is a multiple perceptron (MLP). The training steps can be found in S502.

[0165] S702 determines the current optimal configuration parameter corresponding to the lowest first performance score based on the first performance score corresponding to the configuration parameter in each local domain.

[0166] S703, Based on the current optimal parameters, determine the gradient of the performance prediction model at the current optimal configuration parameters.

[0167] This step can be referenced from the gradient calculation section in S506.

[0168] S704, calculate the parameter change step size based on the adjustment coefficient and the preset unit step size, and adjust the current optimal configuration parameters using the parameter change step size to obtain new configuration parameters.

[0169] This step can refer to the section in S506 above that uses parameter change step size to generate new configuration parameters. The adjustment coefficient can be adjusted according to the actual tuning situation to determine a more suitable parameter change step size, find the optimal configuration parameters faster, and improve parameter tuning efficiency.

[0170] S705, add the new configuration parameters to the local domain.

[0171] S706, determine whether the current round number has reached the preset round number. If not, continue executing S701-S706. If it has, terminate parameter tuning and output the locally optimal configuration parameters corresponding to the minimum first performance score within the local domain.

[0172] By performing S701-S706 for each local domain, the locally optimal configuration parameters corresponding to each local domain can be obtained, and then the globally optimal configuration parameters can be selected from them.

[0173] Part Three: Parameter Configuration.

[0174] After completing the first two parts, the globally optimal configuration parameters can be obtained. This step can be used to configure the server computer system carrying the database based on the globally optimal configuration parameters to ensure optimal database performance.

[0175] The aforementioned scheme is equivalent to adopting a strategy of first dividing and then combining. First, in each local domain, a local prediction model with local properties is used to fine-tune the parameters through gradient descent to find the locally optimal configuration parameters in each local domain. Then, the globally optimal configuration parameters are determined. Compared with related technologies, there is no need to train a global prediction model, so the parameters can be accurately fine-tuned, and then the globally optimal configuration parameters can be obtained to complete the parameter configuration of the computer system, so that the system performance is optimal.

[0176] Corresponding to any of the embodiments described above, this application also proposes an apparatus for system parameter tuning.

[0177] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating the structure of a system parameter tuning device according to an embodiment of this application. As shown in the figure, the system parameter tuning device 800 may include:

[0178] The acquisition module 810 acquires preset configuration parameters for the computer system and a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program; the first evaluation result is used to evaluate the performance of the computer system.

[0179] Clustering module 820 clusters the configuration parameters according to the configuration parameters and the first evaluation result to obtain a first preset number of parameter groups;

[0180] The tuning module 830, for each parameter group, uses the performance prediction model corresponding to the parameter group and employs gradient optimization to tune the configuration parameters in a direction that improves the performance prediction results output by the performance prediction model, thereby determining the local optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on the configuration parameters of each group within the parameter group and the first evaluation results corresponding to each group of configuration parameters.

[0181] The configuration module 840 determines the globally optimal configuration parameters corresponding to all the parameter groups based on the locally optimal configuration parameters.

[0182] In some embodiments, the clustering module 820 further includes:

[0183] Based on a first preset number of center parameters selected from the configuration parameters, the configuration parameters are initially divided to obtain the first preset number of parameter groups;

[0184] For each group of configuration parameters, the configuration parameters are reclassified into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters;

[0185] Among them, there is a second linear relationship between the configuration parameters and the first evaluation results corresponding to the configuration parameters, and the second linear relationship has the highest matching degree with the first linear relationship corresponding to the target parameter group; the first linear relationship is obtained by fitting each group of configuration parameters and the first evaluation results of each group of configuration parameters in the target parameter group.

[0186] In some embodiments, the clustering module 820 further includes:

[0187] For each parameter group, a first linear regression model corresponding to each parameter group is obtained by fitting the configuration parameters of each group and the first evaluation result of each group of configuration parameters; the first linear regression model is used to indicate the first linear relationship.

[0188] Using the first linear regression model corresponding to each parameter group, the configuration parameters are predicted to obtain the second evaluation result corresponding to each parameter group.

[0189] Based on the second evaluation result and the first evaluation result, a prediction error corresponding to each parameter group is obtained; the prediction error indicates the degree of matching between the second linear relationship and the first linear relationship corresponding to each parameter group.

[0190] The configuration parameters are reclassified into target parameter groups corresponding to the minimum prediction error.

[0191] In some embodiments, the clustering module 820 further includes:

[0192] The process involves repeatedly performing the step of reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters, until the configuration parameters in each parameter group no longer change, or, after reclassifying the parameter groups for each set of configuration parameters, refitting the second linear regression model for each parameter group to match the first linear programming model.

[0193] In some embodiments, where the larger the first evaluation result and the performance prediction result are, the better the performance of the computer system, the gradient optimization method includes the gradient ascent method;

[0194] In cases where the smaller the first evaluation result and the performance prediction result, the better the performance of the computer system, the gradient optimization method includes the gradient descent method.

[0195] In some embodiments, when the gradient optimization method is gradient descent, the tuning module 830 further includes:

[0196] For each parameter group, the gradient descent method is used multiple times to adjust the current optimal configuration parameters in the parameter group along the direction that makes the performance prediction results output by the performance prediction model better, using the parameter change step size, generating multiple sets of new configuration parameters for configuration parameter tuning, and adding the generated multiple sets of new configuration parameters to the parameter group;

[0197] For each parameter group, the configuration parameter corresponding to the minimum first evaluation result within the parameter group is determined as the locally optimal configuration parameter corresponding to the parameter group.

[0198] In some embodiments, the tuning module 830 further includes:

[0199] The following steps are executed multiple times for the parameter group until a preset number of executions is reached or a preset condition is met:

[0200] The performance prediction model is trained based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters.

[0201] The configuration parameter corresponding to the smallest first evaluation result among the first evaluation results of each group of configuration parameters is determined as the current optimal configuration parameter;

[0202] According to the gradient descent method, new configuration parameters are generated along the direction that makes the performance prediction results output by the trained performance prediction model better, based on the current optimal configuration parameters and the parameter change step size.

[0203] Add the generated new configuration parameters to the parameter group.

[0204] In some embodiments, the tuning module 830 further includes:

[0205] Based on the current optimal parameters, the gradient of the performance prediction model at the current optimal configuration parameters is determined; the gradient indicates the change in the prediction result of the performance prediction model at the current optimal configuration parameters.

[0206] When the gradient is positive, a new configuration parameter is generated based on the difference between the current optimal configuration parameter and the parameter change step size;

[0207] When the gradient is negative, new configuration parameters are generated based on the sum of the current optimal configuration parameters and the parameter change step size.

[0208] In some embodiments, the parameter variation step size includes the product of an adjustment coefficient and a preset unit step size, and the tuning module 830 further includes:

[0209] The optimal configuration parameters determined in each gradient descent step are compared with the optimal configuration parameters determined in the previous gradient descent step.

[0210] In the case where the current optimal configuration parameter determined in each gradient descent is a newly added configuration parameter in the previous gradient descent, the adjustment coefficient is increased during the second consecutive gradient descent process.

[0211] During the third consecutive preset number of gradient descent processes, if the current optimal configuration parameters determined in each gradient descent process do not change, the adjustment coefficient is reduced.

[0212] In some embodiments, the tuning module 830 further includes:

[0213] The adjustment coefficient is determined by the weighted sum of the first adjustment coefficient in the current gradient descent process and the second adjustment coefficient in the historical gradient descent process.

[0214] In some embodiments, during the training of the performance prediction model, the configuration parameters in other parameter groups and the first evaluation results corresponding to the configuration parameters in other parameter groups are added.

[0215] The optimization module 830 further includes:

[0216] The performance prediction model is trained in multiple rounds; each round of training includes:

[0217] The configuration parameters within the other parameter group are input into the performance prediction model to obtain the third evaluation result;

[0218] Input the configuration parameters of each group within the parameter group into the performance prediction model to obtain the fourth evaluation result;

[0219] The model parameters of the performance prediction model are adjusted based on the weighted sum of the first error between the third evaluation result and the first evaluation result of each group of configuration parameters in the other parameter groups, and the second error between the fourth evaluation result and the first evaluation result of each group of configuration parameters in the parameter groups.

[0220] In some embodiments, the neural network includes any of the following types:

[0221] Multilayer perceptron; Convolutional neural network; Graph convolutional neural network.

[0222] The aforementioned scheme is equivalent to adopting a strategy of first dividing and then combining. First, a local performance prediction model is used in each parameter group to optimize the configuration parameters through gradient descent to find the locally optimal configuration parameters in each parameter group. Then, the globally optimal configuration parameters are determined. Compared with related technologies, there is no need to train a globally optimal performance prediction model, so the configuration parameters can be accurately optimized, and then the globally optimal configuration parameters can be obtained to complete the parameter configuration of the computer system and make the system perform optimally.

[0223] The embodiments of the system parameter tuning apparatus shown in this application can be applied to electronic devices. Accordingly, this application discloses an electronic device that may include a processor.

[0224] Memory used to store processor-executable instructions.

[0225] The processor is configured to invoke executable instructions stored in the memory to implement the system parameter tuning method shown in any of the foregoing embodiments.

[0226] Please see Figure 9 , Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application.

[0227] like Figure 9 As shown, the electronic device may include a processor for executing instructions, a network interface for network connectivity, memory for storing operational data for the processor, and non-volatile memory for storing instructions corresponding to the device for system parameter tuning.

[0228] The embodiments of the device can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of its host electronic device reading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, besides... Figure 9 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device is located in the embodiment may also include other hardware depending on the actual function of the electronic device, which will not be described in detail here.

[0229] It is understandable that, in order to improve processing speed, the instructions for the system parameter tuning device can also be directly stored in memory, which is not limited here.

[0230] This application proposes a computer-readable storage medium storing a computer program that can be used to cause a processor to execute the system parameter tuning method shown in any of the foregoing embodiments.

[0231] Those skilled in the art will understand that one or more embodiments of this application can be provided as a method, system, or computer program product. Therefore, one or more embodiments of this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (which may include, but are not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0232] In this application, “and / or” means having at least one of two options. For example, “A and / or B” can include three options: A, B, and “A and B”.

[0233] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the data processing device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0234] The specific embodiments of this application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0235] The embodiments of the subject matter and functional configurations described in this application can be implemented as: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware that may include the structures disclosed in this application and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this application can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the configuration of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.

[0236] The processing and logic flows described in this application can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by configuring based on input data and generating output. The processing and logic flows can also be executed by dedicated logic circuits—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the apparatus can also be implemented as dedicated logic circuits.

[0237] A computer suitable for executing computer programs may include, for example, a general-purpose and / or special-purpose microprocessor, or any other type of CPU. Typically, the CPU receives instructions and data from read-only memory and / or random access memory. The basic components of a computer may include a CPU for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer may also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer may be configurably coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.

[0238] Computer-readable media suitable for storing computer program instructions and data can include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROMs and DVD-ROMs. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.

[0239] While this application contains numerous specific implementation details, these should not be construed as limiting the scope of any disclosure or the scope of the claims, but rather are primarily used to describe the features of specific embodiments of a particular disclosure. Certain features described in the multiple embodiments of this application may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation of a sub-combination.

[0240] Similarly, although the configurations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these configurations to be executed in the specific order shown or sequentially, or requiring all illustrated configurations to be executed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the described embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0241] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.

[0242] The above are merely preferred embodiments of one or more embodiments of this application and are not intended to limit the scope of one or more embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this application should be included within the scope of protection of one or more embodiments of this application.

Claims

1. A method for system parameter tuning, comprising: Obtain preset configuration parameters for the computer system, and obtain a first evaluation result corresponding to the configuration parameters using a preset benchmark program; The first evaluation result is used to assess the performance of the computer system; Based on the configuration parameters and the first evaluation result, the configuration parameters are clustered to obtain a first preset number of parameter groups; For each parameter group, the performance prediction model corresponding to the parameter group is used, and the configuration parameters are tuned in the direction that makes the performance prediction result output by the performance prediction model better, through gradient optimization, to determine the local optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters. Based on the locally optimal configuration parameters, determine the globally optimal configuration parameters corresponding to all the parameter groups.

2. The method according to claim 1, wherein clustering the configuration parameters according to the configuration parameters and the first evaluation result to obtain a first preset number of parameter groups includes: Based on a first preset number of center parameters selected from the configuration parameters, the configuration parameters are initially divided to obtain the first preset number of parameter groups; For each group of configuration parameters, the configuration parameters are reclassified into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters; Among them, there is a second linear relationship between the configuration parameters and the first evaluation result corresponding to the configuration parameters, and the matching degree between the second linear relationship and the first linear relationship corresponding to the target parameter group is the highest; The first linear relationship is obtained by fitting the configuration parameters of each group within the target parameter group and the first evaluation result of each group of configuration parameters.

3. The method according to claim 2, wherein reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters includes: For each parameter group, the first linear regression model corresponding to each parameter group is obtained by fitting the configuration parameters of each group and the first evaluation result of each group of configuration parameters. The first linear regression model is used to indicate the first linear relationship; Using the first linear regression model corresponding to each parameter group, the configuration parameters are predicted to obtain the second evaluation result corresponding to each parameter group. Based on the second evaluation result and the first evaluation result, the prediction error corresponding to each parameter group is obtained; The prediction error indicates the degree of matching between the second linear relationship and the first linear relationship corresponding to each parameter group; The configuration parameters are reclassified into target parameter groups corresponding to the minimum prediction error.

4. The method according to claim 3, further comprising: After regrouping the parameters for each set of configuration parameters, the second linear regression model, which is refitted for each parameter group, matches the first linear regression model.

5. The method according to claim 2, wherein for each group of configuration parameters, the step of reclassifying the configuration parameters into target parameter groups based on the configuration parameters and the first evaluation result corresponding to the configuration parameters includes: The process of reclassifying the configuration parameters into target parameter groups for each group of configuration parameters is repeated multiple times, based on the configuration parameters and the first evaluation result corresponding to the configuration parameters, until the configuration parameters in each parameter group no longer change.

6. The method according to claim 1, wherein the larger the first evaluation result and the performance prediction result, the better the performance of the computer system, the gradient optimization method includes the gradient ascent method; In cases where smaller values ​​for the first evaluation result and the performance prediction result indicate better computer system performance, the gradient optimization method includes the gradient descent method.

7. The method according to claim 1, wherein when the gradient optimization method is gradient descent, the step of, for each parameter group, using the performance prediction model corresponding to the parameter group, and through gradient optimization, optimizing the configuration parameters in a direction that improves the performance prediction results output by the performance prediction model, and determining the locally optimal configuration parameters corresponding to each parameter group, includes: For each parameter group, the gradient descent method is used multiple times to adjust the current optimal configuration parameters in the parameter group along the direction that makes the performance prediction results output by the performance prediction model better, using the parameter change step size, generating multiple sets of new configuration parameters for configuration parameter tuning, and adding the generated multiple sets of new configuration parameters to the parameter group; For each parameter group, the configuration parameter corresponding to the minimum first evaluation result within the parameter group is determined as the locally optimal configuration parameter corresponding to the parameter group.

8. The method according to claim 7, wherein the step of repeatedly using gradient descent to adjust the current optimal configuration parameters in the parameter group along the direction that improves the performance prediction result output by the performance prediction model, using parameter change step size, to generate multiple sets of new configuration parameters, and adding the generated multiple sets of new configuration parameters to the parameter group, comprises: The following steps are executed multiple times for the parameter group until a preset number of executions is reached or a preset condition is met: The performance prediction model is trained based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters. The configuration parameter corresponding to the smallest first evaluation result among the first evaluation results of each group of configuration parameters is determined as the current optimal configuration parameter; According to the gradient descent method, new configuration parameters are generated along the direction that makes the performance prediction results output by the trained performance prediction model better, based on the current optimal configuration parameters and the parameter change step size. Add the generated new configuration parameters to the parameter group.

9. The method according to claim 8, wherein generating new configuration parameters according to the gradient descent method, along a direction that improves the performance prediction result output by the trained performance prediction model, and based on the current optimal configuration parameters and the parameter change step size, comprises: Based on the current optimal configuration parameters, determine the gradient of the performance prediction model at the current optimal configuration parameters; The gradient indicates how the performance prediction model changes its prediction results at the current optimal configuration parameters; When the gradient is positive, a new configuration parameter is generated based on the difference between the current optimal configuration parameter and the parameter change step size; When the gradient is negative, new configuration parameters are generated based on the sum of the current optimal configuration parameters and the parameter change step size.

10. The method according to claim 9, wherein the parameter change step size includes the product of an adjustment coefficient and a preset unit step size; The method for determining the adjustment coefficient includes: The optimal configuration parameters determined in each gradient descent step are compared with the optimal configuration parameters determined in the previous gradient descent step. In the case where the current optimal configuration parameter determined in each gradient descent is a newly added configuration parameter in the previous gradient descent, the adjustment coefficient is increased during the second consecutive preset number of gradient descent processes. During the third consecutive preset number of gradient descent processes, if the current optimal configuration parameters determined in each gradient descent process do not change, the adjustment coefficient is reduced.

11. The method according to claim 10, wherein the method for determining the adjustment coefficient further comprises: The adjustment coefficient is determined by the weighted sum of the first adjustment coefficient in the current gradient descent process and the second adjustment coefficient in the historical gradient descent process.

12. The method according to claim 8, wherein during the training of the performance prediction model, a first evaluation result corresponding to the configuration parameters in other parameter groups and the configuration parameters in other parameter groups is added; The step of training the performance prediction model based on the configuration parameters of each group within the parameter group and the first evaluation result corresponding to each group of configuration parameters includes: The performance prediction model is trained in multiple rounds; each round of training includes: The configuration parameters within the other parameter group are input into the performance prediction model to obtain the third evaluation result; Input the configuration parameters of each group within the parameter group into the performance prediction model to obtain the fourth evaluation result; The model parameters of the performance prediction model are adjusted based on the weighted sum of the first error between the third evaluation result and the first evaluation result of each group of configuration parameters in the other parameter groups, and the second error between the fourth evaluation result and the first evaluation result of each group of configuration parameters in the parameter groups.

13. The method according to claim 1, wherein the neural network comprises any of the following types: Multilayer perceptron; Convolutional neural network; Graph convolutional neural network.

14. A system parameter tuning apparatus, comprising: The acquisition module acquires preset configuration parameters for the computer system and a first evaluation result corresponding to the configuration parameters obtained using a preset benchmark program. The first evaluation result is used to assess the performance of the computer system; The clustering module clusters the configuration parameters according to the configuration parameters and the first evaluation result to obtain a first preset number of parameter groups; The parameter grouping includes at least one set of configuration parameters; The tuning module, for each parameter group, uses the performance prediction model corresponding to the parameter group and employs gradient optimization to tune the configuration parameters in a direction that improves the performance prediction results output by the performance prediction model, thereby determining the local optimal configuration parameters corresponding to each parameter group; the performance prediction model is a neural network model trained based on the configuration parameters of each group within the parameter group and the first evaluation results corresponding to each group of configuration parameters. The configuration module determines the globally optimal configuration parameters corresponding to all the parameter groups based on the locally optimal configuration parameters.

15. An electronic device comprising: processor; Memory used to store processor-executable instructions; The processor executes the executable instructions to implement the system parameter tuning method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Distributed cluster storage method, system and device and computer readable storage medium

    CN110650208A

  • Hyper-parameter optimization device and method

    CN111160459A