A database parameter configuration confirmation method, device, equipment and storage medium
Patent Information
- Application Number
- CN202611247428.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-14
- Publication Date
- 2026-10-13
AI Technical Summary
一旦该功能被启用,这些未经充分验证的参数配置可能对数据库性能产生不可预测的影响,甚至带来潜在风险
[0014]可见,本实施例中,基于预设优化算法、数据库优化目标确定目标数据库的候选参数配置,并利用内置领域知识库对候选参数配置进行约束校验和更新,得到待评估配置;预设优化算法包括一个或多个预设优化算法;基于决策模型、目标工作负载和调节基准对待评估配置进行评估,得到相应的目标评估结果;目标工作负载占总工作负载的目标百分比基于当前评估阶段确定;基于目标评估结果对预设优化算法进行优化,得到更新后的预设优化算法;重复执行基于更新后的预设优化算法确定目标数据库的候选参数配置、待评估配置和目标评估结果,更新预设优化算法的过程,直至满足预设停止条件;基于重复执行的过程中确定的各目标评估结果从各待评估配置中确定目标参数配置,以使目标数据库基于目标参数配置进行配置后,满足数据库优化目标。即,通过自动生成数据库的配置,并利用模型按照评估阶段调用对应百分比的工作负载对配置进行评估,直到调节停止后,选择最优的配置条件。同时在调节过程中不断根据当前的评估结果对预设优化算法进行优化处理。这样一来,可以动态对数据库的数据进行调节,避免了大量不必要的资源浪费。
Smart Images

Figure CN122903398A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database management technology, and in particular to a method, apparatus, device, and storage medium for confirming database parameter configuration. Background Technology
[0002] In practical applications of database systems, a large number of tunable parameters are built-in to adapt to diverse business scenarios. These parameters have a significant impact on database performance: different parameter configurations in the same scenario can lead to huge performance differences, and the same configuration may perform drastically differently in different scenarios. Therefore, timely and accurate parameter tuning is crucial to ensuring efficient database operation when new scenarios emerge. Traditionally, parameter tuning mainly relies on manual tuning by database administrators. However, with the surge in the number of parameters, the increasing diversity of workloads, and the continuous development of cloud computing, the complexity and difficulty of manual tuning are constantly rising, posing a severe challenge to maintaining high database performance. To address this, researchers have proposed automated parameter tuning techniques to assist administrators in efficiently completing tuning tasks. Current automated tuning methods often treat the database as a black box, optimizing solely through the analysis of configuration and performance data, ignoring domain knowledge and the internal functions of the database, and there is room for improvement in tuning efficiency. First, existing methods often neglect domain knowledge based on database principles and practical experience, which may lead to recommendations that violate these rules, reducing tuning efficiency. Secondly, existing methods require running the entire workload to evaluate the actual performance of each configuration. However, for poorly performing configurations, this evaluation is time-consuming and yields little benefit, severely slowing down the overall tuning process. There is an urgent need to introduce an early stopping strategy to terminate inefficient configurations prematurely. Finally, treating the database as a black box may lead to tuning parameters related to inactive features when optimizing overall performance. Once the feature is enabled, these unverified parameter configurations may have unpredictable impacts on database performance and even introduce potential risks.
[0003] Therefore, how to improve overall performance while meeting users' needs for fine-tuning database functions has become a critical issue that urgently needs to be addressed. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, device, and storage medium for confirming database parameter configurations, which can achieve automatic optimization of database parameters. The specific solution is as follows: Firstly, this application discloses a method for confirming database parameter configuration, including: Based on the preset optimization algorithm and the database optimization objective, candidate parameter configurations for the target database are determined, and the candidate parameter configurations are constrained, verified, and updated using the built-in domain knowledge base to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms; The configuration to be evaluated is assessed based on the decision model, target workload, and adjustment baseline to obtain the corresponding target evaluation results; the target percentage of the target workload to the total workload is determined based on the current evaluation phase. The preset optimization algorithm is optimized based on the target evaluation results to obtain the updated preset optimization algorithm; Repeat the process of determining the candidate parameter configuration, the configuration to be evaluated, and the target evaluation results of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm, until the preset stopping condition is met; Based on the evaluation results of each objective determined during repeated execution, the target parameter configuration is determined from each configuration to be evaluated, so that the target database, after being configured based on the target parameter configuration, meets the database optimization objective.
[0005] Optionally, before determining the candidate parameter configuration for the target database based on a preset optimization algorithm and database optimization objectives, the following steps are also included: Obtain the database optimization targets for the target database; Establish a connection with the target database, collect the target database's metadata and historical performance metrics, and determine the target database's tuning benchmark based on the metadata and historical performance metrics.
[0006] Optionally, the candidate parameter configurations are constrained, validated, and updated using the built-in domain knowledge base to obtain the configuration to be evaluated, including at least one of the following: Determine whether each parameter in the candidate parameter configuration meets the preset constraints in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not meet the preset constraints, then update at least one parameter in the candidate parameter configuration that does not meet the preset constraints to the target parameter critical value. Determine whether each parameter in the candidate parameter configuration meets the preset parameter conditions in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not meet the preset parameter conditions, then label or add a penalty item to the parameter configuration that does not meet the preset parameter conditions.
[0007] Optionally, the configuration to be evaluated is assessed based on the decision model, target workload, and tuning baseline to obtain the corresponding target evaluation results, including: Based on the current evaluation phase, determine the target percentage of the total workload occupied by the target workload, and slice the total workload based on the target percentage to obtain the first workload; The first evaluation result is obtained by testing the configuration to be evaluated based on the first workload. The first score value corresponding to the first evaluation result is determined based on the decision model and adjustment benchmark, and it is determined whether the first score value is greater than the preset score threshold. If the first score is less than the preset score threshold, the evaluation of the configuration to be evaluated will be terminated. If the first score is greater than or equal to the preset score threshold, the total workload is sliced to obtain the second workload; the target percentage of the second workload in the total workload is greater than the target percentage of the first workload in the total workload. A second workload is executed to test the configuration to be evaluated in order to obtain a second evaluation result; The second score value corresponding to the second evaluation result is determined based on the decision model and adjustment benchmark, and it is determined whether the second score value is greater than the preset score threshold. If the second score is greater than or equal to the preset score threshold, the total workload is executed to test the configuration to be evaluated in order to obtain the corresponding target evaluation result.
[0008] Optionally, the total workload can be sliced based on a target percentage to obtain a first workload, including: A first workload is extracted from the total workload based on a target percentage; the first workload contains all types of database operations corresponding to the target database.
[0009] Optionally, before evaluating the configuration to be evaluated based on the decision model, target workload, and tuning baseline to obtain the corresponding target evaluation results, the following steps are also included: An initial performance prediction model is constructed based on a time series model, and the initial performance prediction model is processed using a decision formula to obtain a decision model; the sensitivity coefficient in the decision model is determined based on the current evaluation stage.
[0010] Optionally, the target parameter configuration is determined from each configuration to be evaluated based on the evaluation results of each target determined during repeated execution, including: Based on the evaluation results of each objective determined during repeated execution, the optimal objective parameter configuration is selected from each objective configuration to be evaluated.
[0011] Secondly, this application discloses a database parameter configuration confirmation device, comprising: The parameter configuration generation module is used to determine candidate parameter configurations for the target database based on a preset optimization algorithm and database optimization objectives, and to perform constraint verification and updates on the candidate parameter configurations using a built-in domain knowledge base to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms. The parameter evaluation module is used to evaluate the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark to obtain the corresponding target evaluation results; the target percentage of the target workload to the total workload is determined based on the current evaluation stage. An optimization algorithm determination module is used to optimize the preset optimization algorithm based on the target evaluation result to obtain an updated preset optimization algorithm; The algorithm optimization module is used to repeatedly execute the process of determining the candidate parameter configuration, the configuration to be evaluated, and the target evaluation results of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm until the preset stopping condition is met. The parameter determination module is used to determine the target parameter configuration from each of the configurations to be evaluated based on the evaluation results of each target determined during repeated execution, so that the target database, after being configured based on the target parameter configuration, meets the database optimization objective.
[0012] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute computer programs to implement the aforementioned database parameter configuration confirmation method.
[0013] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned database parameter configuration confirmation method.
[0014] As can be seen, in this embodiment, candidate parameter configurations for the target database are determined based on a preset optimization algorithm and database optimization objectives. The candidate parameter configurations are then constrained, validated, and updated using a built-in domain knowledge base to obtain the configuration to be evaluated. The preset optimization algorithm includes one or more preset optimization algorithms. The configuration to be evaluated is evaluated based on a decision model, target workload, and adjustment benchmark to obtain corresponding target evaluation results. The target percentage of the target workload to the total workload is determined based on the current evaluation stage. The preset optimization algorithm is optimized based on the target evaluation results to obtain an updated preset optimization algorithm. The process of determining the candidate parameter configurations, the configuration to be evaluated, and the target evaluation results based on the updated preset optimization algorithm, and updating the preset optimization algorithm, is repeated until a preset stopping condition is met. Based on the target evaluation results determined during the repeated execution, the target parameter configuration is determined from each configuration to be evaluated, so that the target database, after being configured based on the target parameter configuration, meets the database optimization objectives. That is, the database configuration is automatically generated, and the model is used to evaluate the configuration according to the corresponding percentage of workload called in the evaluation stage until the adjustment stops, at which point the optimal configuration conditions are selected. Simultaneously, the preset optimization algorithm is continuously optimized based on the current evaluation results during the adjustment process. This allows for dynamic adjustment of the database data, avoiding a significant waste of resources. Attached Figure Description
[0015] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart of a database parameter configuration confirmation method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a specific domain knowledge fusion engine disclosed in this invention; Figure 3 This is a flowchart of a specific database parameter configuration confirmation method disclosed in this invention; Figure 4 This is a schematic diagram of a database parameter configuration confirmation device disclosed in this invention; Figure 5 This is a structural diagram of an electronic device disclosed in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0018] The terms "comprising" and "having," and any variations thereof, in the specification and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may include steps or units not listed.
[0019] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0020] Database parameters have a significant impact on performance, and manual tuning is becoming increasingly difficult. Existing automated methods often treat the database as a black box, ignoring domain knowledge and lacking early intervention strategies for inefficient configurations, resulting in low tuning efficiency. Furthermore, tuning parameters of inactive functions may introduce potential risks. Therefore, this application will specifically introduce a database parameter configuration verification method that can solve the above problems.
[0021] See Figure 1 As shown in the figure, this application discloses a database parameter configuration confirmation method, including: Step S11: Based on the preset optimization algorithm and the database optimization objective, determine the candidate parameter configuration of the target database, and use the built-in domain knowledge base to perform constraint verification and update the candidate parameter configuration to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms.
[0022] In this embodiment, before determining the candidate parameter configuration of the target database based on a preset optimization algorithm and database optimization goals, the process further includes: obtaining the database optimization goals for the target database; establishing a connection with the target database, collecting the target database's metadata and historical performance metrics, and determining the tuning baseline for the target database based on the metadata and historical performance metrics. Specifically, the database administrator (DBA) submits workloads (such as SQL (Structured Query Language) scripts) and performance goals (such as maximizing throughput or minimizing latency) to the tuning system. The system connects to the target database and automatically collects metadata (such as hardware specifications and candidate parameter configurations) and historical performance metrics as the tuning baseline.
[0023] In this embodiment, the candidate parameter configuration is constrained, validated, and updated using a built-in domain knowledge base to obtain the configuration to be evaluated. This includes at least one of the following: determining whether each parameter in the candidate parameter configuration satisfies the preset constraints in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not satisfy the preset constraints, then updating at least one parameter in the candidate parameter configuration that does not satisfy the preset constraints to the target parameter critical value; determining whether each parameter in the candidate parameter configuration satisfies the preset parameter conditions in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not satisfy the preset parameter conditions, then labeling or adding penalty terms to the parameter configuration that does not satisfy the preset parameter conditions. A new parameter configuration is proposed using a preset optimization algorithm (such as Bayesian optimization). Then, the configuration is checked using the built-in domain knowledge base (rules, constraints). Specifically, if the configuration violates hard constraints (such as memory overflow), it is automatically updated to the nearest valid point. If the configuration violates empirical suggestions, it is labeled as "low-yield" or a penalty term is added to the optimization objective. It should be noted that this step mainly utilizes, for example, Bayesian optimization. Figure 2 The domain knowledge fusion engine shown is implemented as follows. Specifically, the preset constraints include the following: physical constraint: shared_buffers ≤ system memory × 0.8; logical constraint: wal_buffers = shared_buffers × 0.03; empirical rule: max_connections > number of application threads × 2. Preset parameters can be set based on a dynamic knowledge graph. The nodes of the dynamic knowledge graph represent parameters / value ranges / performance metrics, and the edges represent constraint relationships (inclusion / exclusion / dependency).
[0024] Step S12: Evaluate the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark to obtain the corresponding target evaluation results; the target percentage of the target workload to the total workload is determined based on the current evaluation stage.
[0025] In this embodiment, before evaluating the configuration to be evaluated using a decision model, target workload, and tuning baseline to obtain the corresponding target evaluation results, the process further includes: constructing an initial performance prediction model based on a time series model, and processing the initial performance prediction model using a decision formula to obtain a decision model; the sensitivity coefficient in the decision model is determined based on the current evaluation stage. It should be noted that this application uses an early stop decision model. The system uses a pre-trained performance prediction model (such as a time series prediction model based on LSTM or Transformer) to predict the final performance after a complete run based on the initial performance curve trend. The decision formula (conceptually simplified) is: IF predicted_perf(config_x) < baseline_perf × sensitivity_factor THEN TERMINATE. Where predicted_perf(config_x): the final performance of configuration X predicted by the model. baseline_perf: the performance baseline of the default configuration or the current optimal configuration. sensitivity_factor: the sensitivity coefficient (e.g., 0.7), which can be dynamically adjusted according to the tuning stage. It can be more aggressive in the early stages (e.g., 0.8) and more conservative in the later stages (e.g., 0.6).
[0026] The decision-making process is based on a set of heuristic rules and resource thresholds. A rule engine is set up, for example, `IF (number of queries with full table scans > threshold) AND (average lock wait time > threshold) THEN TERMINATE`. Then, a comprehensive scoring function is created, such as `Contention_Score = a × CPU_wait + b × IO_queue_length + c × Lock_wait_time`. If this score exceeds a critical value, the process terminates. Further, it is observed whether performance metrics deteriorate sharply with increasing load (the second derivative of the performance degradation curve is negative and its absolute value is large). Then, a progressive evaluation is used to more accurately assess the most promising configurations that have passed the first two layers of screening.
[0027] Specifically, the remaining portion of the workload continues to run (e.g., from 10% to 100%); multiple dynamic checkpoints are set (e.g., at 30%, 50%, and 70% load), and at each checkpoint, the early termination conditions are re-evaluated (using more comprehensive data to recalculate the Layer 2 rules and scores). Termination may still occur if performance suddenly deteriorates or new bottlenecks are discovered. Configurations that successfully run to the end of the workload will receive a highly reliable and complete performance evaluation report. During the run, the frequency of Layer 3 checkpoints is dynamically adjusted based on the remaining time and the number of candidate configurations. If time is tight, checkpoints can be more frequent, and early termination decisions can be more decisive. For exceptionally high-performing configurations, the evaluation can even be terminated early and they can be directly marked as the new baseline to accelerate subsequent comparisons.
[0028] In this embodiment, the configuration to be evaluated is evaluated using a decision model, a target workload, and an adjustment benchmark to obtain a corresponding target evaluation result. This includes: determining a target percentage of the total workload based on the current evaluation stage, and slicing the total workload based on the target percentage to obtain a first workload; testing the configuration to be evaluated based on the first workload to obtain a first evaluation result; determining a first score value corresponding to the first evaluation result based on the decision model and adjustment benchmark, and determining whether the first score value is greater than a preset score threshold; if the first score value is less than the preset score threshold, terminating the evaluation of the configuration to be evaluated; if the first score value is greater than or equal to the preset score threshold, slicing the total workload to obtain a second workload; the target percentage of the second workload in the total workload is greater than the target percentage of the first workload in the total workload; executing the second workload to test the configuration to be evaluated to obtain a second evaluation result; determining a second score value corresponding to the second evaluation result based on the decision model and adjustment benchmark, and determining whether the second score value is greater than a preset score threshold; if the second score value is greater than or equal to the preset score threshold, executing the total workload to test the configuration to be evaluated to obtain the corresponding target evaluation result. The process involves slicing the total workload based on a target percentage to obtain the first workload. This first workload includes all types of database operations corresponding to the target database. In summary, the updated configuration is implemented on the database, and the execution workload is tested in three phases. It's important to note that the workload represents the actual scale of business requests, task types, and access behaviors handled by the database. In the first database evaluation, only 1% of the workload is executed to quickly predict its final performance. If the prediction is extremely poor, the evaluation is immediately terminated. In the second evaluation, 10% of the workload is executed to analyze for potential bottlenecks such as resource contention. If serious problems are found, the evaluation is terminated. In the third evaluation, the high-quality configurations that passed the first two rounds of screening continue to run the full workload to obtain accurate performance data. Specifically, a very small subset (0.1% - 1%) is randomly selected from the full workload. This subset must include all types of operations (read, write, update, transactions, etc.) to ensure representativeness. Run this micro-batch workload under the new configuration. Due to its small size, execution time is typically between a few seconds and a minute. The system collects initial performance metrics for this phase (such as throughput TPS_initial, average latency Latency_initial, resource utilization, etc.). This allows identification of configurations with initially acceptable performance but serious potential bottlenecks (such as resource contention, lock conflicts). These bottlenecks may not be apparent in the micro-batch but will be exposed under larger loads.Then scale the workload up to a larger, more representative subset (5% - 10%). At this stage, in addition to collecting overall performance metrics, it is crucial to enable detailed database monitoring, collecting: execution plans (explain plans) to identify issues such as excessive full table scans, inefficient index usage, and expensive sorting operations; resource monitoring to monitor key resource metrics such as CPU wait times, I / O queuing, lock wait times, and buffer hit rates; and critical path analysis to identify the most time-consuming individual queries or transactions.
[0029] Step S13: Optimize the preset optimization algorithm based on the target evaluation results to obtain the updated preset optimization algorithm.
[0030] In this embodiment, the performance data contained in the evaluation results is fed back to the preset optimization algorithm. The preset optimization algorithm updates itself based on the obtained performance data and updates the probability model accordingly, thereby intelligently proposing the next better configuration.
[0031] Step S14: Repeat the process of determining the candidate parameter configuration, the configuration to be evaluated, and the target evaluation results of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm, until the preset stopping condition is met.
[0032] In this embodiment, after obtaining the optimized algorithm, the process jumps to the step of evaluating the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark to obtain the corresponding target evaluation results, until the database adjustment time reaches the target adjustment time, or the performance of the target data reaches the preset database optimization target.
[0033] Step S15: Based on the evaluation results of each target determined during repeated execution, determine the target parameter configuration from each configuration to be evaluated, so that the target database, after being configured based on the target parameter configuration, meets the database optimization target.
[0034] In this embodiment, the target parameter configuration is determined from each configuration to be evaluated based on the evaluation results of each target determined during repeated execution. This includes selecting the optimal configuration to be evaluated from each configuration to be evaluated based on the evaluation results of each target determined during repeated execution. Specifically, after the loop ends, the configuration with the best performance is selected from all tested configurations. The system outputs the final recommended configuration to the DBA, along with a detailed tuning report explaining the reasons for adjusting key parameters and their impact on each functional module. In addition, configuration data with poor evaluation results in each evaluation process can be collected, and the information corresponding to this configuration data can be analyzed to determine the parameters that have a significant impact on each functional module and will cause adverse effects. A corresponding report is generated so that the database management policy can improve or adjust the parameter.
[0035] As can be seen, in this embodiment, as Figure 3 As shown, the process involves determining candidate parameter configurations for the target database based on a preset optimization algorithm and database optimization objectives. A built-in domain knowledge base is used to constrain and update these candidate parameter configurations, resulting in a configuration to be evaluated. The preset optimization algorithm includes one or more algorithms. The configuration to be evaluated is then assessed based on a decision model, target workload, and adjustment benchmark, yielding corresponding target evaluation results. The target percentage of the target workload in the total workload is determined based on the current evaluation stage. The preset optimization algorithm is then optimized based on the target evaluation results, resulting in an updated preset optimization algorithm. The process of determining candidate parameter configurations, the configuration to be evaluated, and the target evaluation results based on the updated preset optimization algorithm, and updating the preset optimization algorithm, is repeated until a preset stopping condition is met. Based on the target evaluation results determined during the repeated execution, target parameter configurations are determined from each configuration to be evaluated, ensuring that the target database, after being configured based on the target parameter configuration, meets the database optimization objectives. In other words, the database configuration is automatically generated, and the model uses the corresponding percentage of workload to evaluate the configuration according to the evaluation stage until adjustment stops, at which point the optimal configuration conditions are selected. Simultaneously, the preset optimization algorithm is continuously optimized based on the current evaluation results during the adjustment process. By employing a dynamic, tiered early-stop mechanism, inefficient configuration evaluations can be quickly identified and terminated, avoiding significant unnecessary resource waste. Experiments show that this method can save over 85% of ineffective evaluation time, enabling tuning tasks that would normally take hours or even days to be completed in minutes to hours. This allows for dynamic adjustment of the database, further preventing substantial unnecessary resource waste.
[0036] refer to Figure 4 This application also discloses a database parameter configuration confirmation device, comprising: The parameter configuration generation module 11 is used to determine the candidate parameter configuration of the target database based on the preset optimization algorithm and the database optimization objective, and to perform constraint verification and update on the candidate parameter configuration using the built-in domain knowledge base to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms; The parameter evaluation module 12 is used to evaluate the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark, and obtain the corresponding target evaluation results; the target percentage of the target workload to the total workload is determined based on the current evaluation stage. The optimization algorithm determination module 13 is used to optimize the preset optimization algorithm based on the target evaluation results to obtain the updated preset optimization algorithm; Algorithm optimization module 14 is used to repeatedly execute the process of determining the candidate parameter configuration, the configuration to be evaluated and the target evaluation result of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm until the preset stopping condition is met; The parameter determination module 15 is used to determine the target parameter configuration from each configuration to be evaluated based on the evaluation results of each target determined during repeated execution, so that the target database can meet the database optimization target after being configured based on the target parameter configuration.
[0037] As can be seen, in this embodiment, the database configuration is automatically generated, and the model evaluates the configuration by calling the corresponding percentage of workload according to the evaluation phase. Once adjustment stops, the optimal configuration conditions are selected. Simultaneously, the preset optimization algorithm is continuously optimized based on the current evaluation results during the adjustment process. This allows for dynamic adjustment of the database data, avoiding significant unnecessary resource waste.
[0038] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the database parameter configuration confirmation method disclosed in any of the foregoing embodiments. Furthermore, the electronic device in this embodiment may specifically be an electronic computer.
[0039] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0040] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0041] The operating system 221 is used to manage and control the various hardware devices on the electronic device and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the database parameter configuration confirmation method executed by the electronic device as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0042] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed database parameter configuration confirmation method. The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0043] Furthermore, this application also discloses a computer program product, including a computer program / instructions; wherein, when the computer program / instructions are executed by a processor, they implement the aforementioned disclosed database parameter configuration confirmation method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0044] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0045] Those skilled in the art will further 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. 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.
[0046] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0047] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0048] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for confirming database parameter configuration, characterized in that, include: Based on a preset optimization algorithm and database optimization objectives, candidate parameter configurations for the target database are determined, and the candidate parameter configurations are constrained, verified, and updated using a built-in domain knowledge base to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms. The configuration to be evaluated is evaluated based on the decision model, target workload, and adjustment benchmark to obtain the corresponding target evaluation results; The target percentage of the target workload to the total workload is determined based on the current evaluation phase; The preset optimization algorithm is optimized based on the target evaluation results to obtain the updated preset optimization algorithm; Repeat the process of determining the candidate parameter configuration, the configuration to be evaluated, and the target evaluation results of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm, until the preset stopping condition is met; Based on the evaluation results of each target determined during repeated execution, target parameter configurations are determined from each configuration to be evaluated, so that the target database, after being configured based on the target parameter configurations, satisfies the database optimization target.
2. The database parameter configuration confirmation method according to claim 1, characterized in that, Before determining the candidate parameter configuration of the target database based on the preset optimization algorithm and database optimization objective, the process also includes: Obtain the database optimization target for the target database; A connection is established with the target database, metadata and historical performance metrics of the target database are collected, and the adjustment benchmark of the target database is determined based on the metadata and historical performance metrics.
3. The database parameter configuration confirmation method according to claim 1, characterized in that, The step of using a built-in domain knowledge base to perform constraint verification and update on the candidate parameter configuration to obtain the configuration to be evaluated includes at least one of the following: Determine whether each parameter in the candidate parameter configuration satisfies the preset constraints in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not satisfy the preset constraints, then update at least one parameter in the candidate parameter configuration that does not satisfy the preset constraints to the target parameter critical value. Determine whether each parameter in the candidate parameter configuration meets the preset parameter conditions in the built-in domain knowledge base; if at least one parameter in the candidate parameter configuration does not meet the preset parameter conditions, then label or add a penalty item to the parameter configuration in the candidate parameter configuration that does not meet the preset parameter conditions.
4. The database parameter configuration confirmation method according to claim 1, characterized in that, The evaluation of the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark yields the corresponding target evaluation results, including: Based on the current evaluation phase, a target percentage of the total workload is determined, and the total workload is sliced based on the target percentage to obtain the first workload; The configuration to be evaluated is tested based on the first workload to obtain a first evaluation result; The first score value corresponding to the first evaluation result is determined based on the decision model and adjustment benchmark, and it is determined whether the first score value is greater than a preset score threshold. If the first score is less than the preset score threshold, the evaluation of the configuration to be evaluated is terminated. If the first score is greater than or equal to the preset score threshold, the total workload is sliced to obtain a second workload; the target percentage of the second workload in the total workload is greater than the target percentage of the first workload in the total workload. The second workload is executed to test the configuration to be evaluated in order to obtain a second evaluation result; Based on the decision model and the adjustment benchmark, a second score value corresponding to the second evaluation result is determined, and it is determined whether the second score value is greater than the preset score threshold. If the second score value is greater than or equal to the preset score threshold, then the total workload is executed to test the configuration to be evaluated in order to obtain the corresponding target evaluation result.
5. The database parameter configuration confirmation method according to claim 4, characterized in that, The step of slicing the total workload based on the target percentage to obtain the first workload includes: A first workload is extracted from the total workload based on the target percentage; the first workload includes all types of database operations corresponding to the target database.
6. The database parameter configuration confirmation method according to claim 1, characterized in that, Before evaluating the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark to obtain the corresponding target evaluation result, the method further includes: An initial performance prediction model is constructed based on a time series model, and the initial performance prediction model is processed using a decision formula to obtain the decision model; the sensitivity coefficient in the decision model is determined based on the current evaluation stage.
7. The database parameter configuration confirmation method according to any one of claims 1 to 6, characterized in that, The target parameter configuration is determined from each of the evaluation results of the targets determined during repeated execution, including: Based on the evaluation results of each target determined during repeated execution, the optimal target parameter configuration is selected from each of the target configurations to be evaluated.
8. A database parameter configuration confirmation device, characterized in that, include: The parameter configuration generation module is used to determine candidate parameter configurations for the target database based on a preset optimization algorithm and database optimization objectives, and to perform constraint verification and updates on the candidate parameter configurations using a built-in domain knowledge base to obtain the configuration to be evaluated; the preset optimization algorithm includes one or more preset optimization algorithms. The parameter evaluation module is used to evaluate the configuration to be evaluated based on the decision model, target workload, and adjustment benchmark, and obtain the corresponding target evaluation results. The target percentage of the target workload to the total workload is determined based on the current evaluation phase; An optimization algorithm determination module is used to optimize the preset optimization algorithm based on the target evaluation result to obtain an updated preset optimization algorithm; The algorithm optimization module is used to repeatedly execute the process of determining the candidate parameter configuration, the configuration to be evaluated, and the target evaluation results of the target database based on the updated preset optimization algorithm, and updating the preset optimization algorithm until the preset stopping condition is met. The parameter determination module is used to determine the target parameter configuration from each of the configurations to be evaluated based on the evaluation results of each target determined during repeated execution, so that the target database, after being configured based on the target parameter configuration, meets the database optimization objective.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the database parameter configuration confirmation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the database parameter configuration confirmation method as described in any one of claims 1 to 7.