Method and apparatus for tuning configuration parameters of a software system

By constructing a configuration structure-aware tuning model and utilizing adaptive fuzzy inference and Gaussian process regression methods, the configuration tuning problem of software systems under unknown internal constraints is solved, achieving low-cost and efficient performance tuning that is applicable to various configuration spaces.

CN117193841BActive Publication Date: 2026-07-14河钢数字技术股份有限公司 +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Under unknown internal constraints, existing technologies result in inefficient configuration and optimization processes for software systems, lacking effective optimization models, which makes it difficult for users to achieve optimal performance.

Method used

By acquiring the tuning objectives and cost model, a configuration structure-aware tuning model is constructed. Adaptive fuzzy inference and Gaussian process regression methods are used to train the tuning model based on offline data. Hyperparameters are then optimized through online interaction to achieve automatic system configuration.

Benefits of technology

Under unknown internal constraints, low-cost and efficient performance tuning is achieved, with fast convergence and adaptability to different configuration spaces, thus improving system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117193841B_ABST
    Figure CN117193841B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of parameter tuning, and provides a configuration parameter tuning method and device of a software system, comprising: obtaining a tuning target and a cost model of the software system; the cost model comprises a cost constraint on the tuning target; determining a tuning model with configuration structure perception based on the tuning target; pre-sampling configuration parameters of the software system for the tuning target, measuring performance generated by the pre-sampled configuration parameters, and obtaining public offline data; based on the cost model and the public offline data, offline training is performed on the tuning model to obtain a hyperparameter combination of the tuning model with the convergence effect of the tuning target within a preset threshold range; based on the hyperparameter combination, the tuning model is interacted with the software system in real time online to obtain target configuration parameters of the software system. The application can perform configuration tuning under unknown internal constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of parameter tuning technology, and in particular relates to a method and apparatus for tuning configuration parameters of a software system. Background Technology

[0002] Modern software systems, such as databases, big data analytics systems, and web servers, allow users to customize the system by selecting and adjusting system parameters to achieve desired functional behavior and non-functional attributes. Because the relationship between configuration and performance is complex and often unknown in practice, tuning a large number of configuration options is extremely difficult for users who lack a deep understanding of the target system.

[0003] Therefore, in most production systems, users will persist with default configurations that may not meet the constraints of the operating environment. Even if human experts are available for a particular system, manual configuration is always labor-intensive and time-consuming, and usually only yields suboptimal solutions. Thus, tuning a large number of configuration options requires a tuning model that can automatically configure the software system to achieve optimal performance.

[0004] Existing work on automatic configuration tuning includes search-based methods, learning-based methods, and generative methods. Search-based methods treat system performance as a black box and directly use search algorithms to search the solution space. While the key insights of search-based methods are simple and intuitive, they often lack prior knowledge about the configuration space, making the search process "less oriented" towards the optimal solution, which often leads to resource-inefficient tuning processes. Learning-based methods build performance prediction models for the target system and, guided by these models, use heuristic search strategies to explore only better configurations, but they lack the key idea of ​​representing the configuration space.

[0005] Some generative methods estimate model parameters based on the distribution of underlying data, rather than learning an accurate predictor. These methods can address configuration tuning problems such as the lack of prior knowledge about the configuration space, resource-inefficient tuning processes, and the lack of key ideas to represent the configuration space. However, these generative methods are still in their early stages. To handle internal constraints, some work in search-based software engineering treats internal constraints as a Boolean satisfiability problem. However, these generative methods cannot be directly applied to configuration tuning problems when unknown internal constraints exist. Summary of the Invention

[0006] To overcome the problems existing in related technologies, this application provides a method and apparatus for optimizing the configuration parameters of a software system, so as to solve the problem of how to perform configuration optimization under unknown internal constraints.

[0007] This application is achieved through the following technical solution:

[0008] In a first aspect, embodiments of this application provide a method for optimizing the configuration parameters of a software system, including:

[0009] Obtain the optimization objectives and cost model of the software system; the cost model includes cost constraints on the optimization objectives.

[0010] Determine a configuration-structure-aware tuning model based on the tuning objectives;

[0011] To optimize the system, the configuration parameters of the software system are pre-sampled, and the performance resulting from the pre-sampled configuration parameters is measured to obtain publicly available offline data.

[0012] Based on the cost model and publicly available offline data, the tuning model is trained offline to obtain the hyperparameter combination of the tuning model whose convergence effect of the tuning target is within a preset threshold range.

[0013] Based on hyperparameter combinations, the optimization model and the software system interact online in real time to obtain the target configuration parameters of the software system.

[0014] In one possible implementation of the first aspect, the tuning objective is formed based on a specific workload in the software system and a set of performance tuning problems to be adjusted; the tuning objective is used to determine the optimal configuration parameters corresponding to the best performance of the software system;

[0015] The optimization objective is expressed as:

[0016]

[0017] Cost constraints are expressed as:

[0018]

[0019] Where C represents the configuration space of the software system under test (SUT), W represents the workload of the SUT, MC represents the number of measurements performed on the SUT, P(c|SUT,W) represents the performance of the software system, and c represents the configuration; |C m | This represents the number of systems that have been tested.

[0020] In one possible implementation of the first aspect, the tuning model includes a configuration structure model, a comparison model, a generation model, and a decoding model;

[0021] Based on the tuning objectives, a configuration-structure-aware tuning model is determined, including:

[0022] Based on the optimization objectives, determine the configuration structure model;

[0023] Based on the configuration structure model, determine the comparison model;

[0024] Generative models are constructed based on comparative models;

[0025] The decoding model is determined based on the configuration structure model and the generation model;

[0026] The optimization model includes a configuration structure model, a comparison model, a generation model, and a decoding model.

[0027] In one possible implementation of the first aspect, the configuration structure model is determined based on the tuning objective, including:

[0028] Encode the configuration space corresponding to the tuning target;

[0029] Based on the tuning objective and the encoded configuration space, the parameters of the configuration structure model are determined using an adaptive fuzzy inference method. The parameters of the configuration structure model include a set of rules for solving the tuning objective and perceptual data trained by the measured configuration.

[0030] The configuration structure model is determined based on the parameters of the configuration structure model.

[0031] In one possible implementation of the first aspect, determining a comparison model based on a configuration structure model includes:

[0032] Based on the configuration structure model, a sample set of comparison results of the encoding of the configuration space and the corresponding performance values ​​generated by the encoding of the configuration space is constructed.

[0033] Obtain the antisymmetric matrix of the sample set of the comparison results, and add two one-time terms to determine the comparator;

[0034] The comparator is trained based on the tested configuration;

[0035] The parameters of the comparison model are derived based on the trained comparator and the Gaussian process regression method; the parameters of the comparison model include the distribution of the comparison results in the comparator.

[0036] The comparison model is determined based on its parameters.

[0037] In one possible implementation of the first aspect, based on a cost model and publicly available offline data, the tuning model is trained offline to obtain a hyperparameter combination of the tuning model whose convergence effect on the tuning objective is within a preset threshold range, including:

[0038] Under the constraints of the cost model, the optimization model is trained offline based on publicly available offline data, the parameters of the configuration structure model under the optimization model are parameterized, and recommended configurations are generated.

[0039] Update the public offline data based on the recommended configuration and its corresponding performance.

[0040] Based on the pre-built test system environment, the trained optimization model, and the updated public offline data, the process is iterated until the optimization target's calculation results converge within a preset threshold range, and the parameters of the current configuration structure model are obtained as the hyperparameter combination of the optimization model.

[0041] In one possible implementation of the first aspect, during the online real-time interaction between the tuning model and the software system, the hyperparameter combination of the tuning model is adjusted using an approximate strategy optimization algorithm based on the target configuration parameters and the performance corresponding to the target configuration parameters.

[0042] Secondly, embodiments of this application provide a configuration parameter tuning apparatus for a software system, which applies the configuration parameter tuning method for a software system as described in the first aspect, including:

[0043] The optimization target and cost model acquisition module is used to acquire the optimization target and cost model of the software system; the cost model includes cost constraints on the optimization target.

[0044] The optimization model determination module is used to determine an optimization model with configuration structure awareness based on the optimization target;

[0045] The acquisition and measurement module is used to presample the configuration parameters of the software system for the optimization target, and measure the performance generated by the presampled configuration parameters to obtain publicly available offline data.

[0046] The first tuning module is used to train the tuning model offline based on the cost model and publicly available offline data, and obtain the hyperparameter combination of the tuning model whose convergence effect of the tuning target is within a preset threshold range.

[0047] The second tuning module is used to interact online in real time with the tuning model based on hyperparameter combinations to obtain the target configuration parameters of the software system.

[0048] Thirdly, embodiments of this application provide a terminal device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the configuration parameter tuning method of the software system as described in the first aspect.

[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the configuration parameter tuning method of the software system as described in the first aspect.

[0050] The advantages of the embodiments in this application compared with related technologies are:

[0051] This application embodiment addresses the system performance tuning problem by determining a tuning objective under cost constraints and establishing a configuration structure-aware tuning framework. The framework is then used to perform offline parameter adjustments and online performance tuning for the tuning objective, thereby solving the system performance tuning problem under unknown internal constraints. This approach offers advantages such as low cost constraints, fast algorithm convergence, and strong adaptability to software systems with different configuration spaces.

[0052] The beneficial effects of the second to fourth aspects mentioned above are described in the beneficial effects of the configuration parameter tuning method for the software system in the first aspect, and will not be repeated here.

[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

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

[0055] Figure 1 This is a flowchart illustrating a method for optimizing configuration parameters of a software system according to an embodiment of this application.

[0056] Figure 2 This is a flowchart illustrating the process of determining a configuration structure-aware tuning model according to an embodiment of this application;

[0057] Figure 3 This is a schematic diagram of the offline training process for an optimized model provided in one embodiment of this application;

[0058] Figure 4 This is a scheduling framework diagram of a software system configuration parameter tuning method provided in an embodiment of this application;

[0059] Figure 5 This is an adaptive fuzzy inference network structure diagram provided in an embodiment of this application;

[0060] Figure 6 This is a schematic diagram of the configuration parameter tuning device for a software system provided in an embodiment of this application;

[0061] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0062] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0063] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0064] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0065] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0066] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0067] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0068] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0069] Currently, users customize systems by selecting and adjusting system parameters to achieve ideal functional behavior and non-functional attributes. Non-functional attributes include system performance, security, and cost. System performance, as one of the most important non-functional attributes, is typically measured by response time, requests per second, and throughput. System performance depends on the type of applications running on the system. Different application types have different configuration options, and the relationship between configuration and system performance is complex. This leads to system tuning problems under unknown internal constraints, as described in the background section.

[0070] Based on the above problems, this application proposes an optimization method that can automatically configure the software system to achieve optimal performance.

[0071] Figure 1 This is a schematic flowchart illustrating a method for optimizing configuration parameters of a software system according to an embodiment of this application. (Refer to...) Figure 1 The detailed method for optimizing the configuration parameters of this software system is as follows:

[0072] A method for optimizing configuration parameters of a software system includes:

[0073] Step 101: Obtain the optimization objectives and cost model of the software system; the cost model includes cost constraints on the optimization objectives.

[0074] For example, in the performance tuning problem of complex systems, the model for the determined tuning objective includes an objective function, a decision space, and constraints. The objective function represents the actual performance of the system; that is, one of the non-functional attributes of the system, the objective function directly affects the user experience and operating costs. It is treated as a black-box function. For a given workload and a defined configuration, a performance model including the objective function is used to represent the operating performance of the given system. Configuration parameters characterize the specific details of the configuration. A configuration can have many specific configuration parameters, such as memory size, CPU model, etc., all of which can be collectively referred to as configuration.

[0075] The decision space comprises all tested configurations, including those generated from offline data records and online data interactions. Each recommended configuration has been validated through actual operation to ensure its effectiveness.

[0076] The cost constraint is a limited number of measurements, including the number of performance measurements corresponding to the measurement configuration (i.e., the number of measurements recorded offline) and the number of measurements of all configurations that participated in the measurement in online data interaction.

[0077] For example, the cost modeling process includes quantitatively defining the system's runtime, algorithm tuning time, etc. The cost model is used to measure the costs incurred due to resource and time consumption. In this embodiment, the main costs of the tuning process are measured in terms of quantity, which is used to characterize the cost constraints on the target algorithm. That is, during the parameter tuning process, any algorithm used in the tuning process completes the tuning work within this cost constraint.

[0078] Tuning objectives are part of the optimization problem framework. For system performance tuning, the defined optimization problem framework includes the objective function, optimization constraints, and performance model. Given a software system under test (SUT) with selected configuration options, a corresponding configuration space C, workload W, and number of measurements MC, the tuning objective is to determine the optimal performance P(c|SUT,W) on the real system and identify the optimal configuration corresponding to this optimal performance, where c is the configuration.

[0079] For example, the tuning objective is formed based on a specific workload in the software system and a set of performance tuning problems to be adjusted; the tuning objective is used to determine the optimal configuration parameters corresponding to the best performance of the software system.

[0080] The optimization objective is expressed as:

[0081]

[0082] Among them, C m Configure the system for testing. For a selected configuration option, run it in the built software system environment to obtain the system performance corresponding to the selected configuration option. At this time, the selected configuration option is the configuration of the tested system.

[0083] For example, a cost model is determined based on the resource and time costs incurred in solving the tuning objective. This cost model includes cost constraints on the objective function of the tuning objective; these constraints are used to determine cost allocation. As the tuning process progresses, the optimal configuration parameters for system performance are ultimately recommended to solve the tuning problem.

[0084] The number of system configurations tested is no greater than the number of performance measurements corresponding to the tested configurations. The cost constraint is expressed as:

[0085]

[0086] Where C represents the configuration space of the software system under test (SUT), W represents the workload of the SUT, MC represents the number of measurements performed on the SUT, P(c|SUT,W) represents the performance of the software system, and c represents the configuration; |C m | This represents the number of systems that have been tested.

[0087] For example, within the framework of optimization problems, the cost allocation and optimization objectives in software system parameter tuning are determined, and the optimization objectives are constrained based on the cost model, enabling quantitative definitions of system runtime, algorithm tuning time, etc.

[0088] Step 102, see Figure 4 Based on the tuning objectives, a configuration-structure-aware tuning model is determined. The tuning model includes a configuration structure model, a comparison model, a generative model, and a decoding model.

[0089] For example, see Figure 2 In step 102, a configuration-structure-aware tuning model is determined based on the tuning objective, including:

[0090] Step 1021: Determine the configuration structure model based on the optimization objective.

[0091] For example, based on the tuning objective, determining the configuration structure model includes: encoding the configuration space corresponding to the tuning objective; and based on the tuning objective and the encoded configuration space D = {d1, d2, ..., d...} N The parameters of the configuration structure model are determined using an adaptive fuzzy inference method. The parameters of the configuration structure model include a set of rules for solving the optimization objective and perceptual data trained by the measured configuration. Based on the parameters of the configuration structure model, the configuration structure model is determined using an adaptive fuzzy inference network.

[0092] For example, in Figure 4 In the context of the problem, given one set of optimization objectives P and constraints c, and another set of optimization objectives P... B and constraint c B The two sets of structure-aware data are encoded to obtain code B and code C respectively. The configuration space is encoded, which plays a role in reducing the dimensionality of the configuration space and extracting the structural features of the configuration space.

[0093] Step 1022: Determine the comparison model based on the configuration structure model.

[0094] For example, determining a comparison model based on a configuration structure model includes: constructing a sample set of comparison results of the corresponding performance values ​​generated by the encoding of the configuration space based on the configuration structure model.

[0095] The comparison of the performance values ​​generated by the encoding of the configuration space is performed using the following formula:

[0096]

[0097] Where, p i and p j Let i be the performance values ​​to be compared, i = 1, 2, ..., N, j = 1, 2, ..., N.

[0098] Obtain the antisymmetric matrix of the sample set of comparison results and add two one-time terms to determine the comparator; train the comparator based on the encoding of the measured configuration. The result of the comparator will represent the input configuration structure encoding p. i The corresponding performance value relative to the reference configuration code p j The corresponding performance value is good or bad; if the value is greater than 0, then p i Performance ratio p j The probability of it being better is higher; if the value is less than 0, then p i Performance ratio p j The likelihood of it being superior is even lower.

[0099] The structure of a comparator can be represented as:

[0100]

[0101] Where A and C are antisymmetric matrices of the encoded configuration space, B is a symmetric matrix, and e and f are column vectors. For the vector d in the configuration space i transpose, For the vector d in the configuration space j The transpose of i, i = 1, 2, ..., N, j = 1, 2, ..., N; due to the need to satisfy antisymmetry, the constant term of the comparator is 0.

[0102] The parameters of the comparison model are derived based on the trained comparator and the Gaussian process regression method; the parameters of the comparison model include the distribution of the comparison results in the comparator; the comparison model is determined based on the parameters of the comparison model.

[0103] The parameters of the comparator are estimated using Gaussian process regression, and the equation for the comparator M in Equation (4) is transformed into a linear form using the matrix vectorization operator Vec and the concatenation operation:

[0104]

[0105] in, w v It is the result of concatenating the matrix Vec operator and w, and the noise ∈ follows a normal distribution.

[0106] Input v into comparator M k The comparator M determines the parameter w. v , to obtain d i and d j The distribution of the comparison results is shown as follows:

[0107]

[0108] Step 1023: Construct a generative model based on the comparison model.

[0109] For example, the generative model is used to parameterize the parameters of the comparison model based on the distribution of the comparison results, and generate the code for the recommended configuration.

[0110] To describe the generator concisely, we define f(d) = M(d, d (B) |w), where , m represents the number of m configurations selected from the configuration space and mapped one-to-one to the rule layer. d (B) It represents the structural features of the optimal configuration in the sample set.

[0111] By using Bayesian inference to parameterize the parameters of the comparison model into Pseudo codes, the distribution of structural features is derived, and the code for the recommended configuration is generated, i.e., structural features are generated.

[0112] Posterior hypotheses about the generated structural features: Where μ k and It is determined by solving the following equation:

[0113]

[0114] Where, d k Satisfying the prior assumptions The posterior probability is:

[0115]

[0116] Where the value of a is 0 or 1, a = (a1, ..., a2) m ).

[0117] Likelihood function:

[0118]

[0119] The likelihood value of the likelihood function and its corresponding conditional probability can be approximated by Monte Carlo integration.

[0120] In summary, this can be based on Randomly generate better-configured structural features

[0121] Step 1024: Determine the decoding model based on the configuration structure model and the generation model. The optimization model includes the configuration structure model, the comparison model, the generation model, and the decoding model.

[0122] For example, the decoding model is used to decode the encoding of the recommended configuration based on the configuration structure model parameters, and the decoder is used to implement the configuration encoding. The inverse operation generates a recommended configuration, which is the newly generated configuration c. new , will c new For subsequent system operation.

[0123] For example, by constructing a configuration structure-aware tuning model, using the concept of configuration encoding to perform dimensionality reduction representation of the configuration space and recommending potential configurations based on Bayesian inference, the configuration space of complex systems can be explored and tuned.

[0124] Step 103: For the optimization target, presample the configuration parameters and measure the performance generated by the presampled configuration parameters to obtain publicly available offline data.

[0125] For example, effective configuration parameters relevant to the tuning objective are collected through presampling, and performance values ​​are obtained by running and measuring the effective configuration parameters. The effective configuration parameters and the performance corresponding to the effective configuration parameters are presented as publicly available offline data.

[0126] The pre-sampling process includes: randomly generating configurations and filtering out valid configuration parameters based on the set of configurations to be adjusted and the mutual constraints between configurations.

[0127] The process of obtaining publicly available offline data includes: setting up a software system environment, running the system to be optimized based on the selected legal configuration parameters for a given workload, measuring and recording its target non-functional attributes, and constructing an offline training sample set as publicly available offline data.

[0128] Step 104: Based on the cost model and publicly available offline data, perform offline training on the tuning model to obtain the hyperparameter combination of the tuning model whose convergence effect of the tuning objective is within a preset threshold range.

[0129] For example, see Figure 3 In step 104, based on the cost model and publicly available offline data, the tuning model is trained offline to obtain the hyperparameter combination of the tuning model whose convergence effect on the tuning objective is within a preset threshold range, including:

[0130] Step 1041: Under the constraints of the cost model, the optimization model is trained offline based on publicly available offline data, the parameters of the configuration structure model under the optimization model are parameterized, and a recommended configuration is generated.

[0131] For example, an adaptive fuzzy inference network is used to train a configuration structure model, which automatically initializes the fuzzy partitioning, resulting in a set of rules for solving the optimization objective and perception data trained by the tested configuration.

[0132] Training the generative model: The mean shift algorithm is applied to determine the cluster center of each tested configuration option, and the information obtained from the cluster by the initial Gaussian membership function is derived to obtain the encoding of the configuration space and the comparison results of the corresponding performance values ​​generated by the encoding of the configuration space.

[0133] Given a SUT with n options, the mean shift algorithm identifies the center of each cluster (e.g., for binary options, they are 0 and 1 respectively), denoted as:

[0134]

[0135] Combining the cluster centers in equation (3), the initial fuzzy partitioning formula for the adaptive fuzzy inference system is:

[0136]

[0137] Equation (11) above determines j = 1, 2, ..., dimk (i) .

[0138] See Figure 5 This embodiment utilizes an adaptive fuzzy inference network to automatically initialize the value layer information of the rule set of the tuning target, including: treating the connection (i.e., rules) between the first two layers of the adaptive fuzzy inference network as a memorized configuration structure; using the rule layer output as a similarity measure between the configuration and the memorized structure; and defining a valid rule that conforms to a preset rule. The preset rule is: there exists at least one configuration such that the emission strength of the rule is greater than a predefined threshold.

[0139] Automatic initialization of rule layer information: First, m configurations need to be selected as a sample set. The sample set includes a portion of high-performance configurations, while the remaining configurations are randomly selected. Second, the mapping between configuration c and rule r is determined. The proportion of high-performance configurations among the m configurations is determined through a hyperparameter optimization method, such as a grid search method.

[0140] The mapping between configuration c and rule r is represented as follows:

[0141]

[0142] Among them, c k =(x1,x2,...,x n ) refers to the anchor point, and R represents [r (1) ,r (2) ,...,r (m) Anchors can quickly take visitors to a specified mapped location.

[0143] Based on the training sample set in step 103, the generation model is trained offline using the parameters of the adaptive fuzzy inference network initialized in step 1041 to obtain the encoding of the recommended configuration. Then, the model parameterization of the configuration structure model built in step 1021 is decoded to generate the recommended configuration.

[0144] For example, the above-mentioned adaptive fuzzy inference network automatically initializes the rule layer information, enabling the algorithm to focus on good configuration.

[0145] Step 1042: Based on the recommended configuration and its corresponding performance, and the trained tuning model, iterate until the calculation result of the tuning target converges within a preset threshold range, and obtain the parameters of the current configuration structure model as the hyperparameter combination of the tuning model.

[0146] For example, the pre-built system environment to be tested is obtained, the system is optimized according to the process of optimizing the model in step 1042, and the public offline data is updated according to the recommended configuration until the calculation result of the optimization target converges within the preset threshold range. The parameters of the current configuration structure model are obtained as the hyperparameter combination of the optimization model. The current public offline data can also be obtained as the result of the recommended configuration in this step, i.e., the initial configuration parameters.

[0147] Step 105: Based on the hyperparameter combination, the optimization model and the software system interact online in real time to obtain the target configuration parameters of the software system.

[0148] For example, in the tuning model under this hyperparameter combination, the configuration recommended by the tuning model is provided to the running software system, and the performance corresponding to the configuration output by the tuning model is measured. Then, the software system that sets the initial configuration parameters has been interacted with, thus completing the current tuning process of the software system and obtaining the recommended configuration result of the software system in step 105, that is, the target configuration parameters.

[0149] For example, during the online real-time interaction between the tuning model and the software system, the hyperparameter combination of the tuning model is adjusted using an approximate strategy optimization algorithm based on the target configuration parameters and the performance corresponding to the target configuration parameters.

[0150] Specifically, based on the performance corresponding to the target configuration parameters, the hyperparameter combination of the tuning model is fine-tuned using an approximation strategy optimization algorithm, so that the tuning model can recommend better target configuration parameters. The recommended target configuration parameters and corresponding performance under the hyperparameter combination of the fine-tuned tuning model are stored in public offline data to serve as data reserves for future tuning.

[0151] To better understand the technical solutions in the above embodiments, one embodiment provides eight widely used configurable software systems to evaluate customer satisfaction with the optimized software system after optimization using the configuration parameter tuning method of this application.

[0152] The evaluation experiments were conducted on two cloud clusters and one cloud server. Each cluster consisted of 3 servers, and each server was equipped with 4... Core™ Xeon CPU @ 2.50GHz and 8GB RAM. This cloud server is equipped with two... Core™ Xeon CPU @ 2.50GHz and 4GB RAM.

[0153] This example selects eight widely used configurable software systems to evaluate Customer Satisfaction Assessment (CSAT). These eight systems include Hadoop, Spark, SQLite, Redis, Tomcat, Apache, x264, and Cassandra. Hadoop is the most popular open-source MapReduce framework; Spark is a general-purpose computing engine for big data processing; SQLite is an open-source relational database management system; Redis is an open-source, high-performance key-value database; Tomcat and Apache are open-source implementations of web application servers; x264 is an open-source video encoder; and Cassandra is an open-source NoSQL database management system.

[0154] For Hadoop and Spark, this example uses Hibench to evaluate their throughput and Redis-Bench to evaluate requests to Redis per second. For Apache and Tomcat, Apache-Bench is used to evaluate requests per second, and YCSB is used to evaluate Cassandra operations per second. For SQLite, TPC-C is used to evaluate its throughput.

[0155] To evaluate the encoding efficiency of x264, this example uses a demonstration video. For each SUT, a subset of configuration options is selected, which are considered performance-critical; this approach of identifying tunable options has been frequently used in previous research. Although using a significant subset of options instead of all options significantly reduces the size of the configuration space, the number of configurations remains enormous, making exhaustive search impractical.

[0156] In this embodiment, Impromptu is used to represent the performance improvement of the optimal configuration generated by the tuning method compared to the default configuration, and Impromptu is used to measure the effectiveness of the tuning method. Given a SUT and a workload W, Impromptu is calculated as:

[0157]

[0158] Among them, C o It is the optimal configuration generated by the tuning method, while C d This is the default configuration.

[0159] The present invention was compared with six state-of-the-art algorithms to evaluate its performance. The six algorithms include Random, ACTGAN, Hyperopt, BestConfig, RHOC, and ACO.

[0160] These six algorithms can be implemented using the source code available in their online repository. A brief description of each algorithm is provided below:

[0161] Randomization is a search-based approach that treats the configuration space as a uniform distribution and selects configurations in an unbiased manner, and is often used as a natural baseline.

[0162] ACTGAN is a generative method designed within the framework of Generative Adversarial Networks (GANs). Its key idea is to capture well-configured hidden structures through a generator and a discriminator.

[0163] Hyperopt is a search-based hyperparameter optimization method based on the Bayesian optimization algorithm.

[0164] BestConfig is a search-based approach that uses a fractional sampling and recursive boundary search algorithm to find the optimal configuration.

[0165] RFHOC is a learning-based approach that uses random forests to build performance prediction models and then uses genetic algorithms to automatically search the configuration space.

[0166] ACO stands for Ant Colony Optimization, a commonly used black-box system optimization algorithm. It is also applicable to tuning problems and is conceptually similar to CSAT, aiming to capture the distribution of better configurations of pheromones used in evolutionary environments.

[0167] Specifically, the performance of Random, ACTGAN, Hyperopt, BestConfig, RGHOC, and ACO compared with the optimization method of this application is shown in Table 1 of the comparative experimental results.

[0168] Table 1. Comparison of performance of Random, ACTGAN, Hyperopt, BestConfig, RGHOC, ACO, and the optimization method of this application.

[0169]

[0170] A configuration parameter tuning method for a software system generates configurations that outperform six other state-of-the-art configuration tuning algorithms. This demonstrates that the present application successfully captures the hidden structure of good configurations, and this configuration structure-aware tuning is a reasonable method for determining the optimal configuration. In particular, by combining it with a structural feature extraction model, the negative impact of high configuration dimensionality can be mitigated, thereby making more effective use of measurement costs.

[0171] It is noteworthy that this application significantly reduces the number of training samples required. Essentially, exploring the configuration space is essential for tuning algorithms. Specifically, optimal configurations employ Recursive Boundary and Search (RBS) to find better configurations around the best configuration in the sample set, RFHOC uses a genetic algorithm to automatically search the configuration space, Hyperopt relies on Business Boolean (BO) for exploration, and ACTGAN uses a generator to find unseen configurations. Note that ACTGAN requires a large number of training samples to learn the generator, and RBS, genetic algorithms, and BO are more prone to getting stuck in suboptimal areas of the search path; therefore, increasing the number of training samples is very useful. In contrast, by utilizing the distribution of previously sampled configurations to traverse the configuration space, the efficiency and focus of the search process are improved, and the risk of getting stuck in suboptimal areas is minimized. Therefore, this invention can find better configurations with fewer training samples.

[0172] This application's validity is confirmed by extensive data measurement, consistent with intuitive understanding of software system data and conclusions drawn from previous work. Furthermore, the superior performance of this application in optimization and internal constraint handling also demonstrates its effectiveness and broad applicability to configurable software systems.

[0173] Regarding the implicit configuration, step 1041 introduces the concept of anchor points, which are essentially part of the optimal configuration. Extensive data experiments have demonstrated that their number should be kept below 6. The applicability of this conclusion also needs to be proven experimentally (e.g., through grid search), but from a tuning perspective, its performance in other system tuning tasks is predictable.

[0174] It is evident that the software system configuration parameter tuning method of the present invention models the software performance tuning problem under the constraint of measurement cost; based on the configuration structure-aware tuning model, it adjusts the hyperparameters of the tuning model using publicly available offline data and online interaction respectively, thereby obtaining the optimal software system performance. It has the advantages of low cost constraint, fast algorithm convergence, and strong adaptability to software systems with different configuration spaces.

[0175] like Figure 6 As shown, a configuration parameter tuning device for a software system is provided. The device includes a tuning target and cost model acquisition module 310, a tuning model determination module 320, an acquisition and measurement module 330, a first tuning module 340, and a second tuning module 350.

[0176] The optimization objective and cost model acquisition module 310 is used to acquire the optimization objective and cost model of the software system; the cost model includes cost constraints on the optimization objective.

[0177] The optimization model determination module 320 is used to determine an optimization model with configuration structure awareness based on the optimization target;

[0178] The acquisition and measurement module 330 is used to presample the configuration parameters of the software system for the optimization target, and measure the performance generated by the presampled configuration parameters to obtain publicly available offline data.

[0179] The first tuning module 340 is used to train the tuning model offline based on the cost model and publicly available offline data, and obtain the hyperparameter combination of the tuning model whose convergence effect of the tuning target is within a preset threshold range.

[0180] The second tuning module 350 is used to interact online in real time with the tuning model and the software system based on hyperparameter combinations to obtain the target configuration parameters of the software system.

[0181] One embodiment of this application provides a terminal device, including a memory and a processor. The memory stores a computer program that can run on the processor. The feature is that when the processor executes the computer program, it implements the configuration parameter tuning method of the software system as described in the above embodiment.

[0182] One embodiment of this application provides the beneficial effects of a terminal device, as described above in the beneficial effects of the software system configuration parameter tuning method.

[0183] It should be understood that the sequence number of each step does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0184] It should be noted that the information interaction and execution process between the above-mentioned devices are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0186] This application also provides a terminal device, see [link to relevant documentation] Figure 7 The terminal device 400 may include at least one processor 410 and a memory 420, wherein the memory 420 stores a computer program 421 that can run on the at least one processor 410, and the processor 410 executes the computer program 421 to implement the steps in any of the above-described method embodiments, for example... Figure 1 Steps 101 to 105 in the illustrated embodiment, and for example Figure 6 Modules 310 to 350 in the illustrated embodiment.

[0187] For example, computer program 421 may be divided into one or more modules / units, one or more of which are stored in memory 420 and executed by processor 410 to complete this application. The one or more modules / units may be a series of computer program segments capable of performing specific functions, which describe the execution process of computer program 421 in terminal device 400.

[0188] Those skilled in the art will understand that Figure 7 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0189] The processor 410 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0190] The memory 420 can be an internal storage unit of the terminal device or an external storage device, such as a plug-in hard drive, a smart media card (SMC), a secure digital card (SD), or a flash card. The memory 420 is used to store the computer program and other programs and data required by the terminal device. The memory 420 can also be used to temporarily store data that has been output or will be output.

[0191] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0192] The software system configuration parameter optimization method provided in this application embodiment can be applied to terminal devices such as computers, tablets, laptops, netbooks, and personal digital assistants (PDAs). This application embodiment does not impose any restrictions on the specific type of terminal device.

[0193] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the various embodiments of the configuration parameter tuning method for the above-described software system.

[0194] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to execute the steps in the various embodiments of the configuration parameter optimization method for the above-described software system.

[0195] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0196] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0197] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0198] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0199] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0200] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for optimizing configuration parameters of a software system, characterized in that, include: Obtain the optimization objective and cost model of the software system; the cost model includes cost constraints on the optimization objective. Based on the aforementioned tuning objectives, a tuning model with configuration structure awareness is determined; To achieve the optimization goal, the configuration parameters of the software system are pre-sampled, and the performance generated by the pre-sampled configuration parameters is measured to obtain publicly available offline data. Based on the cost model and the publicly available offline data, the optimization model is trained offline to obtain the hyperparameter combination of the optimization model whose convergence effect of the optimization target is within a preset threshold range. Based on the hyperparameter combination, the optimization model and the software system are interacted online in real time to obtain the target configuration parameters of the software system; The optimization model includes a configuration structure model, a comparison model, a generation model, and a decoding model; The step of determining a configuration-structure-aware tuning model based on the tuning objective includes: Based on the optimization objectives, the configuration structure model is determined; Based on the configuration structure model, the comparison model is determined; The generative model is constructed based on the comparison model; The decoding model is determined based on the configuration structure model and the generation model; The step of determining the configuration structure model based on the optimization objective includes: The configuration space corresponding to the optimization target is encoded; Based on the optimization objective and the encoded configuration space, the parameters of the configuration structure model are determined using an adaptive fuzzy inference method; the parameters of the configuration structure model include a set of rules for solving the optimization objective and perceptual data trained by the measured configuration; Based on the parameters of the configuration structure model, the configuration structure model is determined; The step of determining the comparison model based on the configuration structure model includes: Based on the configuration structure model, a sample set of comparison results of the encoding of the configuration space and the corresponding performance values ​​generated by the encoding of the configuration space is constructed. Obtain the antisymmetric matrix of the sample set of the comparison results, and add two one-time terms to determine the comparator; The comparator is trained based on the tested configuration encoding; The parameters of the comparison model are derived based on the trained comparator and the Gaussian process regression method; the parameters of the comparison model include the distribution of the comparison results in the comparator; The comparison model is determined based on the parameters of the comparison model.

2. The method for optimizing configuration parameters of a software system as described in claim 1, characterized in that, The tuning objective is formed based on a specific workload in the software system and a set of performance tuning problems to be adjusted; the tuning objective is used to determine the optimal configuration parameters corresponding to the best performance of the software system; The optimization objective is expressed as follows: ; The cost constraint is expressed as follows: ; in, For the software system under test Configuration space, The software system under test The workload, The software system under test The number of measurements This refers to the performance of the software system. For configuration; The number of systems configured as tested.

3. The method for optimizing configuration parameters of a software system as described in claim 1, characterized in that, The step of training the optimization model offline based on the cost model and the publicly available offline data to obtain the hyperparameter combination of the optimization model whose convergence effect on the optimization target is within a preset threshold range includes: Under the constraints of the cost model, the optimization model is trained offline based on the publicly available offline data, the parameters of the configuration structure model under the optimization model are parameterized, and a recommended configuration is generated. Update the publicly available offline data based on the recommended configuration and the performance corresponding to the recommended configuration; Based on the pre-built test system environment, the trained optimization model, and the updated public offline data, the process is iterated until the calculation result of the optimization target converges within a preset threshold range, and the parameters of the current configuration structure model are obtained as the hyperparameter combination of the optimization model.

4. The method for optimizing configuration parameters of a software system as described in claim 1, characterized in that, During the online real-time interaction between the tuning model and the software system, the hyperparameter combination of the tuning model is adjusted using an approximate strategy optimization algorithm based on the target configuration parameters and the performance corresponding to the target configuration parameters.

5. A configuration parameter tuning device for a software system, employing the configuration parameter tuning method for a software system as described in any one of claims 1 to 4, characterized in that, include: The optimization objective and cost model acquisition module is used to acquire the optimization objective and cost model of the software system; the cost model includes cost constraints on the optimization objective. The optimization model determination module is used to determine an optimization model with configuration structure awareness based on the optimization target; The acquisition and measurement module is used to presample the configuration parameters of the software system for the optimization target, and measure the performance generated by the presampled configuration parameters to obtain publicly available offline data. The first optimization module is used to perform offline training on the optimization model based on the cost model and the publicly available offline data, and obtain the hyperparameter combination of the optimization model whose convergence effect of the optimization target is within a preset threshold range. The second optimization module is used to perform online real-time interaction between the optimization model and the software system based on the hyperparameter combination to obtain the target configuration parameters of the software system. The optimization model includes a configuration structure model, a comparison model, a generation model, and a decoding model; The optimization model determination module is specifically used for: Based on the optimization objectives, the configuration structure model is determined; Based on the configuration structure model, the comparison model is determined; The generative model is constructed based on the comparison model; The decoding model is determined based on the configuration structure model and the generation model; The step of determining the configuration structure model based on the optimization objective includes: The configuration space corresponding to the optimization target is encoded; Based on the optimization objective and the encoded configuration space, the parameters of the configuration structure model are determined using an adaptive fuzzy inference method; the parameters of the configuration structure model include a set of rules for solving the optimization objective and perceptual data trained by the measured configuration; Based on the parameters of the configuration structure model, the configuration structure model is determined; The step of determining the comparison model based on the configuration structure model includes: Based on the configuration structure model, a sample set of comparison results of the encoding of the configuration space and the corresponding performance values ​​generated by the encoding of the configuration space is constructed. Obtain the antisymmetric matrix of the sample set of the comparison results, and add two one-time terms to determine the comparator; The comparator is trained based on the tested configuration encoding; The parameters of the comparison model are derived based on the trained comparator and the Gaussian process regression method; the parameters of the comparison model include the distribution of the comparison results in the comparator; The comparison model is determined based on the parameters of the comparison model.

6. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the configuration parameter tuning method for the software system as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the configuration parameter tuning method of the software system as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Hyper-parameter optimization method and device, electronic equipment and storage medium

    CN113609745A

  • Network optimization method and device, electronic equipment and computer readable storage medium

    CN114828045A