Database online parameter tuning method and device for dynamic load
By employing an online parameter tuning method, which utilizes contextual Gaussian processes and clustering algorithms to recommend parameter configurations within the local trust domain subspace, the problem of database performance degradation under dynamic load is solved, achieving real-time performance optimization and efficient tuning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF SOFTWARE - CHINESE ACAD OF SCI
- Filing Date
- 2023-06-20
- Publication Date
- 2026-05-01
AI Technical Summary
Existing database parameter tuning methods are difficult to adapt to changing workload requirements in dynamic load scenarios, resulting in performance degradation. Furthermore, offline tuning processes are time-consuming and expensive, and cannot provide real-time optimization.
A database online parameter tuning method oriented towards dynamic load is adopted. By periodically collecting workload information, a multi-model library of parameter recommendations is dynamically generated, and parameter configurations are recommended within a local trust domain subspace. Contextual Gaussian processes and clustering algorithms are used to match models to achieve real-time performance optimization.
It achieves real-time performance improvement of the database under dynamic load, reduces tuning time and cost, adapts to dynamic load changes, and improves the real-time performance and efficiency of database operation.
Smart Images

Figure CN116756119B_ABST
Abstract
Description
Online Parameter Tuning Method and Apparatus for Databases Under Dynamic Load Technical Field
[0001] This invention relates to a database parameter tuning tool, and more particularly to an online database parameter tuning method and apparatus for dynamic load, belonging to the field of computer software. Background Technology
[0002] In recent years, with the rapid development of the Internet and big data technologies, database systems have become an indispensable part of enterprise applications. Databases contain a large number of configuration parameters, which affect database performance by controlling memory allocation, I / O control, and logging. Database parameter tuning has become one of the key technologies for ensuring high performance and high reliability of database systems.
[0003] Traditional database parameter tuning relies on database administrators (DBAs) manually adjusting parameter values to improve database performance using their extensive experience and expert knowledge. However, manual tuning is time-consuming and labor-intensive, and prone to errors due to the administrator's subjective experience and human factors. To address the problems of traditional tuning methods, machine learning techniques for database parameter tuning have become widely used. These tuning methods and tools typically run workloads on a replicated target database instance. In each iteration, the tuning tool recommends a parameter configuration, applies it to the replicated database instance, executes the required workload to evaluate performance metrics under the recommended parameter configuration, and finally updates the machine learning model. The tuning tool continuously repeats this iterative process until the model converges or reaches the maximum number of tuning iterations, ultimately applying the optimal parameters recommended by the model or the trained model to the actual database.
[0004] With the development of cloud services, more and more enterprises are migrating their businesses to the cloud and choosing to deploy their databases in cloud environments. Previous machine learning-based database parameter tuning methods were all offline methods. These methods optimized database performance by running a given workload on a replicated database instance and using machine learning algorithms to adjust database parameter configurations. However, in production environments, workloads from real-world applications are dynamically changing, and existing offline tuning methods cannot adapt to this dynamism, risking performance degradation with their recommended parameter configurations. Furthermore, because offline tuning needs to be performed on a replicated database instance, users need to create a new database instance and clone the workload and data from a snapshot of the original database each time they have tuning needs. This cloning process is very time-consuming and incurs significant costs for tuning tasks.
[0005] In existing inventions, parameter tuning often involves a limited number of parameters, requiring the prior acquisition of efficient data to screen sensitive parameters and conduct simulated tuning tests (CN114168216A), resulting in a long preparation time. Furthermore, some inventions are designed for a single scenario, only providing optimization for the storage engine parameters of a single database (CN114398342A), limiting their usability. For parameter management of some database containers, the tuning process even involves copying the container (CN115080190A), which incurs additional overhead. Finally, multi-model tuning methods based on offline training are limited in their use when handling new and unknown loads, and the model can only be fine-tuned during the tuning process (CN115705322A), meaning that model updates may not keep pace with dynamic load changes in some scenarios.
[0006] As the demand for database parameter tuning increases, current methods cannot effectively adapt to changing workload requirements and struggle to provide real-time parameter optimization during business load operation. Summary of the Invention
[0007] To address the adaptability issues of the aforementioned database parameter tuning methods under dynamic load scenarios, this invention aims to provide an online database parameter tuning method and apparatus for dynamic loads. This method periodically collects information about the current workload in the database, dynamically generates or updates a multi-model library of recommended parameters, matches recommended parameter models to the current load, recommends parameter configurations in a trust domain subspace, and modifies the dynamic system parameter values of the database online, thereby improving the real-time performance of the database under dynamic loads.
[0008] The present invention adopts the following technical solution:
[0009] A method for online parameter tuning of a database oriented towards dynamic load, the method comprising:
[0010] Calculate the current workload feature vector of the database and match the category to which the workload feature vector belongs to obtain the corresponding parameter recommendation model;
[0011] Collect the parameter configuration P of the database i-1 And database performance Q i-1 Where i represents the iteration round;
[0012] Based on the corresponding parameter recommendation model, the parameter configuration P i-1 and the database performance Q i-1 Inferring the parameter configuration P corresponding to the workload feature vector. i ;
[0013] Configure the parameters P i Apply to the database;
[0014] If the optimization budget limit is not met, let i = i + 1, and return to the parameter configuration P that collected the database. i-1 And database performance Q i-1 The upper limit of the optimization budget can be the maximum number of optimization iterations or the maximum optimization duration, which is not limited in this invention.
[0015] Under the premise of meeting the upper limit of the tuning budget, based on the database performance Q i After obtaining all the parameter configurations P i Select one parameter to configure the output.
[0016] Furthermore, the current workload feature vector of the computational database includes:
[0017] Read the current SQL log file of the database and preprocess the SQL log file into readable query statements;
[0018] Extract keywords from the query statement and encode the keywords into a query statement feature vector;
[0019] Parse the execution plan of the query statement in the database and encode the execution plan into an execution plan feature vector;
[0020] By concatenating the feature vector of the query statement with the feature vector of the execution plan, the current workload feature vector is obtained.
[0021] Furthermore, the keywords in the query statement include: query type information, data table information, and operation information;
[0022] Encoding the keywords into a query statement feature vector includes:
[0023] Generate a vocabulary list based on all keywords in the query statements in the training set;
[0024] Replace the keywords in the query statement with the vocabulary index in the vocabulary list to obtain an uncompressed query statement feature vector;
[0025] The uncompressed query statement feature vector is reduced in dimensionality based on the pre-trained first autoencoder model, and then averaged in the vertical direction to obtain the query statement feature vector.
[0026] Further, encoding the execution plan into an execution plan feature vector includes:
[0027] An execution plan information encoding table is generated based on the execution plan information corresponding to the query statements in the training set; wherein, the execution plan information includes: operation node information, estimated cost and cost information;
[0028] Extract the execution plan information from the execution plan, and generate an uncompressed execution plan feature vector for the query statement based on the execution plan information encoding table;
[0029] The uncompressed execution plan feature vector is reduced in dimensionality based on a pre-trained second autoencoder model, and then averaged in the vertical direction to obtain the execution plan feature vector.
[0030] Further, the step of matching the category to which the workload feature vector belongs to obtain the corresponding parameter recommendation model includes:
[0031] Retrieve workload feature vectors, parameter configurations, and database performance from historical database information;
[0032] Based on the workload feature vectors, parameter configurations, and database performance in the historical information, the DBSCAN algorithm is used to perform load information clustering analysis to divide the workload feature vectors into multiple types.
[0033] The SVM algorithm is used to learn and divide the workload feature vectors in the historical information into multiple types of decision boundaries.
[0034] The workload feature vector is matched to the category it belongs to based on the decision boundary to obtain the parameter recommendation model corresponding to the workload feature vector.
[0035] Furthermore, the recommendation model based on the corresponding parameters and the parameter configuration P i-1 and the database performance Q i-1 Inferring the parameter configuration P corresponding to the workload feature vector. i ,include:
[0036] The parameter configuration point θ that best performs in the recommended model based on the corresponding parameters is given. best Construct a hypercube region {θ|∥θ-θ} centered at the x-axis. best ∥2≤R tr}∩Θ; where θ is the parameter configuration of the local trust domain subspace, Θ represents the entire parameter configuration space, and R tr The size of the controlled local trust domain subspace, the R tr The initial value is the default radius R. base ;
[0037] P is configured based on the parameters. i-1 The database performance Qi-1 And the workload feature vector, in the local trust domain subspace θ, select the next point to be evaluated;
[0038] The parameter configuration corresponding to the next point to be evaluated is regarded as parameter configuration P. i .
[0039] Furthermore, the method also includes:
[0040] Continuous recommendation τ succ The parameter configuration P is better than the previous performance. i When the radius R of the local trust domain subspace θ changes to the radius R ′ Among them, R <R ′ ≤R max R max θ represents the upper bound of the radius of the local trust domain subspace;
[0041] And / or,
[0042] Continuous recommendation τ fai The parameter configuration with even worse performance (p) i When the radius R of the local trust domain subspace θ changes to the radius R″, and when R″ = R min In this case, the radius of the local trust domain subspace θ is initialized to the default radius R. base Where R>R″≥R min R min Let θ denote the lower bound of the radius of the local trust domain subspace θ.
[0043] An online database parameter tuning device for dynamic load, the device comprising:
[0044] The load feature extraction module is used to calculate the current workload feature vector of the database;
[0045] The control module is used to collect the parameter configuration P from the database. i-1 And database performance Q i-1 Configure the parameters P i The application is applied to the database; where i represents the iteration round number;
[0046] The parameter recommendation module is used to match the category to which the workload feature vector belongs in order to obtain the corresponding parameter recommendation model; based on the corresponding parameter recommendation model and the parameter configuration P i-1 and the database performance Q i-1 Inferring the parameter configuration P corresponding to the workload feature vector. i ;
[0047] In cases where the optimization budget limit is not met, let i = i + 1, and return to the recommendation model based on the corresponding parameters to obtain the workload feature vector F. i Corresponding parameter configuration P i ; while meeting the upper limit of the tuning budget, based on the database performance Q i After obtaining all the parameter configurations P i Select one parameter to configure the output.
[0048] A computer device, characterized in that the computer device comprises: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the online database parameter tuning method for dynamic load as described above.
[0049] A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the online database parameter tuning method for dynamic load as described above.
[0050] Compared with the prior art, the present invention has at least the following advantages:
[0051] 1. This invention designs a clustering-based contextual Gaussian process multi-model and model matching method. Compared with previous inventions that only model the relationship between parameters and configurations, this invention uses contextual Gaussian processes to additionally model load information. At the same time, it uses multi-model algorithms and load feature-based model matching, which can effectively cope with dynamic workload scenarios.
[0052] 2. This invention designs a method for parameter recommendation in a local trust domain subspace. Compared with optimizing the entire parameter configuration space, this invention can quickly recommend parameter configurations with better performance, and does not require pre-sorting of database parameters, thus achieving greater cumulative performance improvement during database operation. Attached Figure Description
[0053] Figure 1 is a framework diagram of the online database parameter tuning tool for dynamic load according to the present invention.
[0054] Figure 2 is a flowchart of the parameter recommendation module of the present invention.
[0055] Figure 3 is a diagram of the trust domain subspace change rules of the present invention. Detailed Implementation
[0056] The present invention will be described in more detail below with reference to specific embodiments.
[0057] The online database parameter tuning method for dynamic load of the present invention can be divided into two stages: training and testing.
[0058] During the training phase, submitted query statements are first sampled and analyzed from the database to extract the load feature vector of the current workload. Then, the corresponding machine learning model is matched based on the extracted load feature vector, and the model recommends database parameter configuration based on the load feature vector. After that, the recommended database configuration is configured in the online application database, database performance index information is collected, and the machine learning model is updated accordingly. Finally, the above three steps are repeated periodically to obtain a better performing machine learning model.
[0059] During the testing phase, the current workload feature vector of the database can be calculated based on the training content, and the category to which the workload feature vector belongs can be matched to obtain the corresponding parameter recommendation model. Then, based on the parameter configuration and database performance collected in each iteration, and combined with the corresponding parameter recommendation model, the parameter configuration corresponding to the workload feature vector can be inferred. Next, the parameter configuration calculated by the corresponding parameter recommendation model is applied to the database. Finally, it is determined whether the current iteration meets the upper limit of the tuning budget, and if so, an optimal parameter configuration is output based on the database performance.
[0060] The present invention also discloses an online parameter tuning device for databases under dynamic load, as shown in Figure 1, which mainly includes the following three functional modules: a control module, a load feature extraction module, and a parameter recommendation module.
[0061] 1. Control Module
[0062] In the method of this invention, the control module is responsible for the interaction between the tool and the database, as well as the interaction between the various modules in the tool, and is also responsible for transmitting data during the interaction process.
[0063] The interaction between the control module and the database includes collecting database performance metrics and configuring database parameters.
[0064] The interaction between the control module and the other modules of the tool includes the function of initiating the load feature extraction module and the function of the parameter recommendation module.
[0065] The control module is responsible for transmitting data including load feature information extracted by the load feature extraction module, parameter configurations recommended by the parameter recommendation module, and performance index data from the database.
[0066] 2. Load Feature Extraction Module
[0067] In the method of the present invention, the load feature extraction module includes a parser and a trainer, which are used to parse the current workload features of the database and train the feature vector dimensionality reduction model, respectively.
[0068] The parser samples the query statements of the current workload, and the parsed features include:
[0069] (1) Query statement features: Parse all sampled Query statements, extract load feature information including Query type information (e.g., Insert, Update, Delete, Select), data table information (Table), and operation information (e.g., Join, Limit), and encode it into feature vectors.
[0070] (2) Execution plan features: parse the execution plans of all sampled query statements in the database (usually viewed with Explain), extract the operation node information and corresponding estimated cost and cost information in the execution plan, and encode them into feature vectors.
[0071] The trainer trains a vector dimensionality reduction model from historical data and saves the model parameters. The trained model is used to perform dimensionality reduction on the extracted workload feature vectors during the tuning process, and is finally passed to the parameter recommendation model. The dimensionality reduction model uses an autoencoder model, which performs self-supervised learning through historical data, effectively compressing the input vector to a lower dimension.
[0072] 3. Parameter Recommendation Module
[0073] In the method of this invention, the parameter recommendation module is used to recommend parameter configurations with better performance for the database under the current workload. The parameter recommendation module first maintains a dynamically adjustable list of database parameters, and also maintains a multi-model library, where each model corresponds to a type of workload, used to recommend corresponding parameter configurations. This module also includes a model matching method and a parameter recommendation method.
[0074] The parameter recommendation module's operation flow is shown in Figure 2. The module starts upon receiving a parameter recommendation request and load characteristic information, matching the corresponding model in the multi-model library; it recommends database parameter configurations for the model, sends them to the control module, and waits for a response; after receiving performance index data from the database, the parameter recommendation module updates the multi-model library.
[0075] The method for generating the above multi-model library is as follows:
[0076] The module uses the DBSCAN algorithm to perform load information clustering analysis on all existing historical information (load information, parameter configuration, performance). All historical information in the same cluster generates a contextual Gaussian process model (Reference: Krause A, Ong C. Contextual Gaussian process bandit optimization[J]. Advances in neural information processing systems, 2011, 24), thereby dividing the load information into multiple types and generating a corresponding parameter recommendation model for each load type, forming a multi-model library.
[0077] The matching method for the above model is as follows:
[0078] After using the DBSCAN algorithm to cluster different load information into various load categories, the module simultaneously uses the SVM algorithm to learn the decision boundaries for this classification. When the module receives new load feature information, the SVM algorithm can quickly match the category to which the load feature belongs based on the learned decision boundaries and recommend a model using the corresponding parameters.
[0079] To avoid the frequent process of regenerating multiple models and training decision boundaries, this invention employs an adaptive approach. In each round of tuning, DBSCAN clustering is performed first. The quality of the clustering results is comprehensively evaluated by comparing the silhouette coefficients of the old and new clusters and adjusting the mutual information metric (AMI). When the silhouette coefficient of the old cluster is less than that of the new cluster and the AMI is less than a threshold, the new clustering results are used to generate a new multi-model library and train a new decision boundary; otherwise, the original multi-model library and decision boundary remain unchanged.
[0080] The recommended method for the above parameters is as follows:
[0081] When the context Gaussian process model receives context representing load feature information, it uses the Upper Confidence Bound (UCB) algorithm to recommend the next point to be evaluated, i.e., the parameter configuration of the database. To accelerate the parameter recommendation process, in this invention, the context Gaussian process selects the next point to be evaluated from the local trust domain subspace during the recommendation. The trust domain subspace is defined as follows:
[0082] The parameter configuration point θ that provides the best performance for the database in the current model. best The hypercube region centered at {θ|∥θ-θ best ∥2≤R tr}∩Θ, where θ is the parameter configuration of the current local trust domain subspace, Θ is the original space, i.e., the entire parameter configuration space, R trThe size of the trust domain subspace is controlled by this region, which shifts as the optimal configuration point changes. The rule governing the change in the trust domain radius is shown in Figure 3: when a module continuously recommends τ... succ With better parameter configurations, the radius changes to twice its previous value; when the module continuously recommends τ fail With even worse parameter configurations, the radius changes to half its previous value. The module also defines the upper and lower limits R of the radius. max and R min When the radius reaches its upper limit, further increases are prohibited; when the radius reaches its lower limit, the radius is initialized to the default value R. base .
[0083] Based on the above three modules forming the main body of the optimization tool, the optimization steps and module interactions of this invention are as follows:
[0084] 1. The control module first initiates a command to start the load feature extraction module and waits for the return information;
[0085] 2. The load feature extraction module extracts the workload feature information from the database and sends it to the control module;
[0086] 3. The control module receives the feature information, sends it to the parameter recommendation module to request recommended parameters, and waits for the return information;
[0087] 4. The control module receives the recommended parameters and applies them to the database, then waits for the database performance data to be collected;
[0088] 5. The control module collects database performance metrics data under recommended parameters and sends them to the parameter recommendation module for information storage and updating of the machine learning model.
[0089] The above describes the tuning steps of this invention within one tuning cycle. During database operation load, this invention continuously repeats the above periodic parameter tuning process, thereby maintaining the real-time operating performance of the database at a good level.
[0090] The following section uses a domestically produced database as the target database. Based on the relevant database API, an interactive interface is implemented using Python. A typical OLTP load balancing model, TPC-C, is used to simulate a dynamic load scenario, periodically changing the new-order transaction ratio to 15%, 45%, and 75%. The specific implementation steps are as follows.
[0091] Import the TPC-C dataset (approximately 10GB) into the database using a third-party load testing tool. Start the load testing tool (set the load testing task to 3 minutes, changing the new-order transaction ratio at the end of each load testing cycle, so that the transaction ratio cycles through 15%, 45%, and 75). Start the tool of this invention and begin working:
[0092] 1. The load feature extraction module extracts the current workload information.
[0093] After the tool starts, the control module first reads the tool configuration file, which contains the database connection address and tuning information. Once tuning begins, the control module connects to the database using the specified driver. The control module interacts with the database to enable SQL logging and sends a command to start the load feature extraction module. After sampling for 3 seconds, the load feature extraction module stops logging and reads the SQL log file, preprocessing it into readable query text. The load feature extraction module parses all queries, extracts all keywords to generate a vocabulary, and replaces all keywords in the queries with the indices from the vocabulary to generate multiple query vectors. Then, a pre-trained autoencoder model is used to reduce the dimensionality of all these vectors and average them vertically to obtain a compressed query feature vector. The load feature extraction module then uses the `EXPLAIN` statement to obtain the execution plan for each query, encodes all execution plans using a set encoding template to obtain multiple execution plan vectors, uses the pre-trained autoencoder model to reduce the dimensionality of all these vectors, and averages them vertically to obtain a compressed execution plan feature vector. Finally, the two vectors are concatenated to obtain the load feature vector, which represents the load feature information.
[0094] 2. The parameter recommendation module recommends parameter configurations based on load characteristic information.
[0095] After receiving the load feature vector, the control module sends it to the parameter recommendation module. The parameter recommendation module first uses the trained decision boundary to select the load type, that is, to match the context Gaussian process model corresponding to the load feature vector. The context Gaussian process model uses the load feature vector as context and uses the UCB algorithm to select the next point to be evaluated in the local trust domain subspace, which is then passed to the control module as a recommendation parameter and applied to the database by the control module.
[0096] 3. Feedback performance data optimization model
[0097] After the current cycle ends, the control module retrieves the performance data from the database under the recommended parameter configuration and feeds it back to the parameter recommendation module. The parameter recommendation module uses the <load information, parameter configuration, performance> from this cycle as a sample point and combines it with historical information to optimize the current model library and decision boundary. The tool repeats steps 1-3 above to iteratively optimize the existing machine learning model.
[0098] In summary, since the online optimization scenario targeted by this invention requires rapid recommendation, parameter recommendation is only performed in the local trust domain subspace, thus meeting the real-time requirements in the online optimization process.
[0099] This invention is based on clustering-based multi-model generation and model matching. It uses a contextual Gaussian process as the base model, effectively combining the relationship between load, parameters, and performance (previous inventions often only modeled parameters and performance, ignoring load variations). Simultaneously, it employs a clustering-based multi-model algorithm to effectively handle dynamic workload scenarios, and model matching based on decision boundaries can find the most suitable model for the current operating load.
[0100] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and to implement it accordingly. Those skilled in the art will understand that various substitutions, changes, and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the content disclosed in the embodiments of this specification; the scope of protection of the present invention is defined by the claims.
Claims
1. A method for online parameter tuning of a database oriented towards dynamic load, characterized in that, The method includes: calculating the current workload feature vector of the database, and matching the category to which the workload feature vector belongs to obtain the corresponding parameter recommendation model; collecting the parameter configuration of the database. and database performance ;in, Indicates the number of iteration rounds; based on the corresponding parameter recommendation model, the parameter configuration... and the database performance Inferring the parameter configuration corresponding to the workload feature vector. Configure the parameters Apply to the database; if the tuning budget cap is not met, let And return to the parameter configuration of the database that was collected. and database performance ; based on the database performance, while meeting the upper limit of the tuning budget. After obtaining all parameter configurations Select one parameter configuration output; wherein, the parameter configuration is based on the corresponding parameter recommendation model. and the database performance Inferring the parameter configuration corresponding to the workload feature vector. This includes: recommending the parameter configuration points that best perform the model based on the corresponding parameters. Construct a hypercube region centered on [the target region]. ;in, For parameter configuration of the local trust domain subspace, This represents the entire parameter configuration space. The size of the controlled local trust domain subspace, the The initial value is the default radius. Based on the parameter configuration The database performance and the workload feature vector, in the local trust domain subspace Select the next point to be evaluated; treat the parameter configuration corresponding to the next point to be evaluated as the parameter configuration. 。 2. The method as described in claim 1, characterized in that, The calculation of the current workload feature vector of the database includes: reading the current SQL log file of the database, preprocessing the SQL log file into readable query statements; extracting keywords from the query statements and encoding the keywords into query statement feature vectors; parsing the execution plan of the query statement in the database and encoding the execution plan into execution plan feature vectors; and concatenating the query statement feature vectors and the execution plan feature vectors to obtain the current workload feature vector.
3. The method as described in claim 2, characterized in that, The keywords in the query statement include: query type information, data table information, and operation information; encoding the keywords into a query statement feature vector includes: generating a vocabulary list based on all keywords in the query statements in the training set; replacing the keywords in the query statement with the vocabulary index in the vocabulary list to obtain an uncompressed query statement feature vector; and averaging the uncompressed query statement feature vector in the vertical direction after dimensionality reduction based on a pre-trained first autoencoder model to obtain the query statement feature vector.
4. The method as described in claim 2, characterized in that, The step of encoding the execution plan into an execution plan feature vector includes: generating an execution plan information encoding table based on the execution plan information corresponding to the query statement in the training set; wherein, the execution plan information includes: operation node information, estimated cost and cost information; extracting the execution plan information from the execution plan, and generating an uncompressed execution plan feature vector of the query statement based on the execution plan information encoding table; and averaging the uncompressed execution plan feature vector in the vertical direction after dimensionality reduction based on a pre-trained second autoencoder model to obtain the execution plan feature vector.
5. The method as described in claim 1, characterized in that, The step of matching the category to which the workload feature vector belongs to obtain the corresponding parameter recommendation model includes: acquiring workload feature vectors, parameter configurations, and database performance from historical database information; performing load information clustering analysis using the DBSCAN algorithm based on the workload feature vectors, parameter configurations, and database performance from the historical information to divide the workload feature vectors into multiple types; using the SVM algorithm to learn decision boundaries that divide the workload feature vectors from the historical information into multiple types; and matching the category to which the workload feature vector belongs according to the decision boundaries to obtain the parameter recommendation model corresponding to the workload feature vector.
6. The method as described in claim 1, characterized in that, The method further includes: continuous recommendation. Better parameter configuration for secondary performance At that time, the local trust domain subspace radius Change in radius ;in, , Represents the local trust domain subspace Upper limit of radius; and / or, continuous recommendation Even worse performance parameter configuration At that time, the local trust domain subspace radius Change in radius And in In the case of the local trust domain subspace The radius is initialized to the default radius. ;in, , Represents the local trust domain subspace The lower limit of the radius.
7. A database online parameter tuning device for dynamic load, characterized in that, The device includes: a load feature extraction module for calculating the current workload feature vector of the database; and a control module for collecting the parameter configuration of the database. and database performance Configure the parameters Applied to the database; wherein, Indicates the iteration round number; the parameter recommendation module is used to match the category to which the workload feature vector belongs to obtain the corresponding parameter recommendation model; based on the corresponding parameter recommendation model and the parameter configuration and the database performance Inferring the parameter configuration corresponding to the workload feature vector. Among them, in the case of not meeting the optimization budget cap, let The process is then returned to the recommendation model based on the corresponding parameters to obtain the workload feature vector. Corresponding parameter configuration ; based on the database performance, while meeting the upper limit of the tuning budget. After obtaining all parameter configurations Select a parameter configuration output; the recommendation model based on the corresponding parameter, the parameter configuration and the database performance Inferring the parameter configuration corresponding to the workload feature vector. This includes: recommending the parameter configuration points that best perform the model based on the corresponding parameters. Construct a hypercube region centered on [the target region]. ;in, For parameter configuration of the local trust domain subspace, This represents the entire parameter configuration space. The size of the controlled local trust domain subspace, the The initial value is the default radius. Based on the parameter configuration The database performance and the workload feature vector, in the local trust domain subspace Select the next point to be evaluated; treat the parameter configuration corresponding to the next point to be evaluated as the parameter configuration. 。 8. A computer device, characterized in that, The computer device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the online database parameter tuning method for dynamic load as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the online database parameter tuning method for dynamic load as described in any one of claims 1-6.
Citation Information
Patent Citations
Parameter tuning method and device and storage medium
CN114168216A
Database storage engine optimization system based on dynamic adjustment of RocksDB parameters
CN114398342A
Intelligent real-time dynamic parameter configuration method and system after database containerization
CN115080190A
Database management system, data processing method and equipment
CN115705322A
Load-aware-oriented multi-mode database ArangoDB parameter tuning method
CN114706840A