System parameter tuning method and device, equipment, storage medium and product

By obtaining and adjusting configuration items for multiple processors and application types, a tuning knowledge base is formed, which solves the problem of large tuning workload in multi-processor systems, and realizes flexible and efficient system parameter tuning, which is suitable for a variety of processors and application types scenarios.

CN120371532AActive Publication Date: 2025-07-25LANGCHAO ELECTRONIC INFORMATION IND CO LTD

Patent Information

Application Number
CN202510847288.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-07-25
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

In multi-processor and application-type server systems, the prior art requires retuning for each scenario, resulting in high workload and inability to adapt to multiple dimensions such as performance, power consumption, and resource usage.

Method used

By obtaining configuration items of multiple processors and application types, the first tuning strategy is obtained and adjusted in the actual environment to form a tuning knowledge base. Using the general configuration items in the database to tune the current system parameters, only a few specific configuration items need to be adjusted.

Benefits of technology

It reduces the workload and complexity of system parameter tuning, realizes flexible tuning in a variety of processors and application types scenarios, and has good portability and practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371532A_ABST
    Figure CN120371532A_ABST
Patent Text Reader

Abstract

The invention discloses a system parameter adjusting and optimizing method and device, equipment, a storage medium and a product, relates to the technical field of operating systems, and obtains a first adjusting and optimizing strategy according to configuration items of various processors and application types. And adjusting configuration items in the first tuning strategy to obtain a second tuning strategy. And obtaining an adjustment and optimization knowledge base according to the relevance between each configuration item and the processor and the application type in the second adjustment and optimization strategy. Adjusting and optimizing the specific configuration item of the current system by using the universal configuration item matched with the current system in the adjusting and optimizing knowledge base; and adjusting the parameters of the current system according to the general configuration item and the optimized specific configuration item. Parameter adjustment and optimization are carried out on the current system depending on the adjustment and optimization knowledge base, adjustment and optimization only need to be carried out on a small number of specific configuration items, and the adjustment and optimization workload and complexity are greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of operating systems, and particularly to a method, device, equipment, storage medium, and product for optimizing system parameters. Background Art

[0002] A server is a complex system composed of software and hardware, including a processor, memory, storage device, firmware, operating system, compiler, and upper-layer applications, etc. Each component is a complex small system, and the configuration of these components will directly affect the overall performance and power consumption of the system.

[0003] With the popularization of multi-core heterogeneous processors, the types of processors used in server systems are becoming more and more diverse. The instruction sets and architecture characteristics on different types of processors are also different. Therefore, the parameter configurations and optimization schemes on different processor platforms are not universal. And the optimization methods for different types of upper-layer applications are also different.

[0004] Currently, peak workload is used for stress testing, and the system status is observed through a performance monitoring tool to determine the performance bottleneck, and the configurable items causing the bottleneck are optimized. When the hardware platform or business scenario changes, the original optimization scheme may no longer be applicable and needs to be readjusted and optimized. If re-optimization is performed in each scenario, there will be problems of large workload and partial work duplication.

[0005] It can be seen that how to reduce the workload of system parameter optimization under multi-processors and application types is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0006] This application provides a method, device, equipment, storage medium, and product for optimizing system parameters to at least solve the problem of large workload of system parameter optimization under multi-processors and application types in the related art.

[0007] This application provides a method for optimizing system parameters, including: Obtaining a first optimization strategy according to the configuration items of multiple processors and application types; Adjusting the configuration items in the first optimization strategy to obtain a second optimization strategy; Obtaining an optimization knowledge base based on the relevance between each configuration item in the second optimization strategy and the processor and application type; Using the general configuration items in the optimization knowledge base that match the current system to optimize the specific configuration items of the current system; Adjusting the parameters of the current system based on the general configuration items and the optimized specific configuration items.

[0008] The present application provides a system parameter tuning device, including a first obtaining unit, an adjustment unit, a second obtaining unit, a tuning unit, and an adjustment unit; The first obtaining unit is configured to obtain a first tuning strategy according to configuration items of multiple processors and application types; The adjustment unit is configured to adjust the configuration items in the first tuning strategy to obtain a second tuning strategy; The second obtaining unit is configured to obtain a tuning knowledge base according to the relevance between each configuration item in the second tuning strategy and the processor and application type; The tuning unit is configured to use the general configuration items in the tuning knowledge base that match the current system to tune the specific configuration items of the current system; The adjustment unit is configured to adjust the parameters of the current system according to the general configuration items and the tuned specific configuration items.

[0009] The present application provides an electronic device, including: A memory for storing a computer program; A processor, configured to implement the steps of any one of the above system parameter tuning methods when executing the computer program.

[0010] The present application provides a computer-readable storage medium, in which a computer program is stored, and wherein the computer program, when executed by a processor, implements the steps of any one of the above system parameter tuning methods.

[0011] The present application provides a computer program product, including a computer program, and the computer program, when executed by a processor, implements the steps of any one of the above system parameter tuning methods.

[0012] Based on the configuration items of various processors and application types in this application, a first tuning strategy is obtained. Considering that in the actual execution environment, the first tuning strategy may deviate from the actual situation, the configuration items in the first tuning strategy can be adjusted to obtain a second tuning strategy. By considering optimization objectives in multiple dimensions such as resource usage, performance, and power consumption during the tuning process, the obtained tuning strategy is more practical. According to the relevance of each configuration item in the second tuning strategy to the processor and application type, a tuning knowledge base is obtained. Obtaining a tuning knowledge base based on tuning strategies covering multiple processors and application types can support tuning in scenarios of multiple processors and application types. The tuning strategy is flexible and has good portability. In practical applications, the general configuration items in the tuning knowledge base that match the current system can be used to tune the specific configuration items of the current system; based on the general configuration items and the tuned specific configuration items, the parameters of the current system are adjusted. When tuning the parameters of the current system relying on the tuning knowledge base, only a small number of specific configuration items under the current system need to be tuned on the basis of the general configuration items, which greatly reduces the workload and complexity of tuning. And as the number of specific scenarios covered by the tuning knowledge base increases, ultimately only the tuning strategy in the specific scenario needs to be directly matched in the tuning knowledge base to achieve parameter tuning. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0014] Figure 1 It is a flowchart of a method for tuning system parameters provided by an embodiment of the present application; Figure 2 It is a schematic diagram of obtaining characteristic parameters and adjustable parameters provided by an embodiment of the present application; Figure 3 It is a flowchart of an optimization method for a first tuning strategy provided by an embodiment of the present application; Figure 4 It is a flowchart of a method for tuning specific configuration items of the current system provided by an embodiment of the present application; Figure 5 It is a structural diagram of an overall method framework for system parameter tuning provided by an embodiment of the present application; Figure 6 It is a schematic structural diagram of a system parameter tuning device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0015] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.

[0016] It should be noted that in the description of the present application, the terms "including", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0017] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0018] As the core of providing services, the performance and power consumption of the server are directly related to user experience, business continuity, and cost. The server includes a processor, memory, storage devices, firmware, an operating system, a compiler, and upper-layer applications, etc. For the processor, a higher working frequency often brings better performance, but at the same time, it also brings more power consumption. The software functions in the server system directly depend on the underlying hardware capabilities. The Basic Input / Output System (BIOS) firmware is the bridge connecting the hardware and the operating system. The operating system combines with the BIOS to manage the hardware resources and enable the applications to run efficiently. Therefore, it is necessary to optimize the performance and energy consumption by tuning the configurable parameters on both software and hardware from the overall perspective of the system. For the sake of convenience of description, the configurable parameters can be referred to as configuration items.

[0019] With the popularization of heterogeneous multi-core processors, the types of processors adopted in the server system are becoming more and more diverse, such as the Reduced Instruction Set Computing architecture (ARM), the Complex Instruction Set Computing architecture (X86), the open-source Reduced Instruction Set Computing architecture (RISC-V), etc. The instruction sets and architecture characteristics on different types of processors are different. Therefore, the parameter configuration and tuning schemes on different processor platforms are not universal. On the other hand, for different types of upper-layer applications, such as Central Processing Unit (CPU)-intensive, memory-intensive, or Input / Output (IO)-intensive task loads, the tuning methods are also different.

[0020] Currently, stress testing is carried out using peak workloads. The system status is observed through performance monitoring tools to determine the performance bottlenecks, and the configurable items causing the bottlenecks are tuned. When the hardware platform or business scenario changes, the original tuning scheme may no longer be applicable and needs to be readjusted and optimized. Moreover, the current tuning method only optimizes targeted according to the bottleneck points during the load operation, and cannot obtain the causal relationship between the configurable items that can be adjusted by software and hardware, the processor platform, and the application type. Therefore, a general tuning method covering multiple processor platforms and application types cannot be obtained. In addition, the current tuning method only considers tuning with performance as the goal and cannot adapt to the optimization of multiple dimensions such as performance, power consumption, and resource usage.

[0021] Therefore, the embodiments of the present application provide a method, device, equipment, storage medium, and product for tuning system parameters. According to the configurable items of multiple processors and application types, a first tuning strategy is obtained. By dynamically monitoring the execution of test tasks on a specific processor platform, the tuning strategy is evaluated from three aspects: performance, power consumption, and system resource usage. Based on the relevance between each configurable item in the second tuning strategy and the processor and application type, a tuning knowledge base is obtained. When tuning for a specific scenario, if there is a tuning strategy for this scenario in the tuning knowledge base, the tuning strategy is directly used; otherwise, a general tuning item matching the current system is customized based on the tuning knowledge base, and then the tuning evaluation is performed for the specific configurable items of the current system. Finally, the tuning strategy for this scenario is constituted by the general tuning item and the tuned specific configurable items. Based on the obtained tuning knowledge base, only a small number of specific configurable items in the scenario need to be tuned for different scenarios, which greatly reduces the tuning workload and complexity.

[0022] The embodiments of the present application provide a method for tuning system parameters. Combining the execution process of the method for tuning system parameters, the method is described in detail. Figure 1 The following is a flowchart of a method for tuning system parameters provided by the embodiments of the present application. The method includes: S101: Obtain a first tuning strategy according to the configurable items of multiple processors and application types.

[0023] In the embodiments of the present application, in order to achieve the adaptation to multiple processors and application types, a first tuning strategy that has no dependency relationship with multiple processors and application types can be obtained.

[0024] For ease of description, configuration items that have no dependency on multiple processor and application types can be called general configuration items, and configuration items that have dependencies on multiple processor and application types can be called specific configuration items. After optimizing the configuration items, the optimized configuration items can be called tuned items. The first tuning strategy includes general tuning items that have no dependency on multiple processor and application types.

[0025] In a specific implementation, to obtain the first tuning strategy, the characteristic parameters and adjustable parameters of multiple processor and application types can be obtained first. Then, according to the influence relationship between each adjustable parameter and performance and power consumption, as well as the characteristic parameters of multiple processor and application types, the first tuning strategy covering multiple processor and application types can be obtained.

[0026] Among them, the adjustable parameters can include any one or any combination of adjustable parameters corresponding to the hardware platform, basic input / output system, basic software, and upper-layer applications. The characteristic parameters can include processor characteristic parameters, memory system characteristic parameters, and storage device characteristic parameters, so as to describe any one or any combination in the hardware platform from multiple dimensions.

[0027] The purpose of obtaining the adjustable parameters is to sort out all the freely configurable parameter items, and these adjustable parameters constitute the variables in the tuning strategy. Different parameter configurations will bring different performance and power consumption effects. By continuously optimizing and adjusting these adjustable parameters, a tuning strategy with better performance and power consumption can be obtained.

[0028] The purpose of obtaining the characteristic parameters is to determine the processor types and application types that the tuning strategy can apply to, etc.

[0029] Figure 2 This is a schematic diagram for obtaining characteristic parameters and adjustable parameters provided by an embodiment of the present application, mainly obtaining characteristic parameters and adjustable parameters from four aspects: the hardware platform, basic input / output system, basic software, and upper-layer applications.

[0030] The adjustable parameters of the hardware platform can include the processor operating frequency, the number of memory strips used, etc.

[0031] The adjustable parameters of the basic input / output system (BIOS) depend on the specific processor hardware type. The adjustable parameters of the BIOS cover multiple key aspects, such as processor frequency, memory parameters, cache settings, memory architecture (Non-Uniform Memory Access, NUMA) settings of multi-processor computer systems, and performance modes, etc.

[0032] The adjustable parameters of the basic software are mainly obtained by analyzing the operating system kernel and the compiler, including the kernel version, the basic kernel mechanisms, the kernel configuration parameters, as well as the compiler type, version, compilation parameters, etc. The basic kernel mechanisms include scheduling algorithms and memory management mechanisms, etc.

[0033] The adjustable parameters of the upper-layer applications are mainly analyzed from the perspective of task load characteristics, including three aspects: CPU-intensive, memory-intensive, and I / O-intensive. Different input parameters will also directly affect the operation of the tasks. In this application, the input parameters of the applications are also regarded as configuration items to be considered. In addition, for applications of object-oriented programming languages (JAVA) classes, using different Software Development Kits (JDK) of the Java programming language will also affect the energy efficiency of the applications, and information such as the version and usage parameters of the JDK needs to be analyzed.

[0034] The processor characteristic parameters can include the arithmetic architecture (such as x86 / ARM / RISC-V), the main frequency parameter and its dynamic adjustment mechanism, the multi-level cache structure, and the memory access management strategy (including prefetch algorithms, bus arbitration mechanisms, etc.).

[0035] The memory system characteristic parameters can include the number of installed modules, the type of Dynamic Random Access Memory (DRAM), the capacity per single strip and the total capacity configuration, the operating frequency, the working voltage range, and the topology design. Among them, the DRAM type includes Double Data Rate Synchronous Dynamic Random Access Memory (DDR), such as DDR4 / DDR5.

[0036] The storage device characteristic parameters can include I / O performance metrics, the refresh cycle management mechanism of flash memory particles, garbage collection algorithms, and cache scheduling strategies. Among them, the I / O performance metrics include sequential read / write rates and random access latency. The refresh cycle management mechanism of flash memory particles is for the non-volatile storage (NAND) characteristics of Solid State Disks (SSD). The garbage collection algorithms include dynamic / static wear leveling strategies.

[0037] In the first tuning strategy, these characteristic parameters have a direct corresponding relationship with the tuning of the corresponding configuration items. For example, processors with the ARM architecture have the characteristic of low power consumption, and performance optimization needs to be focused on during tuning, while processors with the X86 architecture have relatively high power consumption in high-performance computing, and how to optimize power consumption needs to be concerned about during tuning.

[0038] S102: Adjust the configuration items in the first tuning strategy to obtain the second tuning strategy.

[0039] By theoretically analyzing the influence relationships of each adjustable parameter on performance and power consumption on the hard platform, BIOS, basic software, and upper-layer applications, a first set of tuning strategies covering multiple processors and multiple application types can be initially obtained.

[0040] However, in the actual execution environment, there may be deviations in the tuning strategies obtained through theoretical analysis. By testing and evaluating the tuning items included in the first set of tuning strategies in the actual system, and then retesting and evaluating after making positive and negative adjustments to the deviated tuning items, tuning calibration on the configuration items is achieved, and finally a verified second set of tuning strategies is obtained.

[0041] To test and evaluate the first set of tuning strategies, the system can be configured according to the first set of tuning strategies, and test tasks can be run after the system configuration is completed; based on the system resource usage, performance metrics, and power consumption data during the running of the test tasks, the configuration items in the first set of tuning strategies are adjusted to obtain the second set of tuning strategies.

[0042] System configuration is to configure a system environment that covers multiple processors and application types. In actual applications, the system environment can be constructed according to the configuration items included in the first set of tuning strategies; and benchmark test programs can be dynamically run in the constructed system environment.

[0043] Regarding the evaluation of performance metrics: During the actual execution of the test tasks, the application performance under the first set of tuning strategies is evaluated through metrics such as response time and the number of transactions completed per unit time. Additionally, for some upper-layer applications, dedicated benchmark test performance evaluation tools can also be adopted, such as the processor performance benchmark tool (SpecCPU), the performance stress test tool (redis-benchmark), etc.

[0044] Regarding the evaluation of power consumption data: During the actual execution of the test tasks, the overall system power consumption under the first set of tuning strategies is evaluated through a power meter or a performance / power ratio benchmark test tool (SpecPower).

[0045] Regarding the evaluation of system resource usage: For usage in different scenarios, the resource usage water level ranges on the CPU, memory, and storage devices can be defined, and the water level range includes the upper limit and the lower limit of the water level. During the actual execution of the test tasks, the system resource usage under the first set of tuning strategies is evaluated through metrics such as the running time ratios exceeding the upper limit and below the lower limit of the water level, and the average system resource usage rate during the entire running process.

[0046] In practical applications, corresponding conditions can be set for system resource usage, performance metrics, and power consumption data. By continuously adjusting the specific settings of the configuration items included in the first tuning strategy, the system resource usage, performance metrics, and power consumption data can meet the corresponding conditions, thereby obtaining the second tuning strategy.

[0047] S103: Obtain a tuning knowledge base based on the relevance between each configuration item in the second tuning strategy and the processor and application types.

[0048] For the obtained second tuning strategy, the general tuning items that do not depend on specific processor platforms and specific application types can be constructed into a general tuning knowledge base. Since this general tuning knowledge base supports multiple processor platforms and application types, in addition to the tuning strategy itself, it also provides the tuning rules between the specific characteristics of different processors and application types and the configuration items, facilitating the deployment of the general tuning strategy on multiple processor platforms and application types.

[0049] For the specific tuning items that depend on specific processors and specific applications, construct a specific tuning strategy library for specific scenarios. It should be noted that for the convenience of direct use, the specific tuning strategy library for specific scenarios includes two parts: general tuning and specific tuning. Here, a mapping is established between the processor platform and application information of each specific scenario and the corresponding tuning strategy.

[0050] In practical applications, the general tuning items that have no dependency relationship with the processor and application types, as well as the specific tuning items that have a dependency relationship with the processor and application types, can be screened out from the second tuning strategy.

[0051] According to the mapping relationship between the general tuning items in the second tuning strategy and the processor and application types, obtain the general tuning knowledge base.

[0052] Extract the processor model and application type identifier associated with the specific tuning items from the second tuning strategy; based on the specific tuning items and their corresponding processor model and application type identifier, obtain the specific tuning strategy library. In the embodiments of the present application, the tuning strategy can be referred to as a tuning solution.

[0053] S104: Use the general configuration items in the tuning knowledge base that match the current system to tune the specific configuration items of the current system.

[0054] Based on the processor platform and application load information, the identification information of the current system can be constructed, and whether there is a tuning strategy that matches the current system is queried from the tuning knowledge base based on the identification information.

[0055] If the match is successful, directly use the corresponding tuning strategy. For new scenarios that do not exist in the tuning strategy library, the tuning strategy needs to be obtained from two aspects: the customization of the general tuning strategy and the tuning of the new scenario-specific configuration items. Among them, the general tuning strategy can directly select the matching tuning rules from the tuning knowledge base according to the characteristics of the processor and application type, and customize the tuning strategy of the general configuration items. For specific configuration items, the system can be configured based on the general configuration items. The application task is run under this system configuration, and based on the system resource usage, performance metrics, and power consumption data of the application task, the tuning of the specific configuration items is achieved.

[0056] S105: Adjust the parameters of the current system according to the general configuration items and the tuned specific configuration items.

[0057] According to the general configuration items and the tuned specific configuration items, the tuning strategy matching the current system can be obtained, and the parameters of the current system can be set according to this tuning strategy.

[0058] It can be seen from the above technical solution that the first tuning strategy is obtained according to the configuration items of multiple processors and application types. Considering that in the actual execution environment, the first tuning strategy may deviate from the actual situation, the configuration items in the first tuning strategy can be adjusted to obtain the second tuning strategy. During the tuning process, optimization goals in multiple dimensions such as resource usage, performance, and power consumption are considered, and the obtained tuning strategy is more practical. According to the relevance between the configuration items in the second tuning strategy and the processor and application type, a tuning knowledge base is obtained. The tuning knowledge base obtained according to the tuning strategy covering multiple processors and application types can support the tuning in scenarios of multiple processors and application types, and the tuning strategy is flexible and has good portability. In actual applications, the general configuration items matching the current system in the tuning knowledge base can be used to tune the specific configuration items of the current system; according to the general configuration items and the tuned specific configuration items, the parameters of the current system are adjusted. When the parameters of the current system are tuned relying on the tuning knowledge base, only a small number of specific configuration items of the current system need to be tuned on the basis of the general configuration items, which greatly reduces the tuning workload and complexity. And as the tuning knowledge base covers more and more specific scenarios, finally, only the tuning strategy in the specific scenario needs to be directly matched in the tuning knowledge base to achieve parameter tuning.

[0059] In the embodiment of the present application, by running a test task in the actual system, according to the performance and power consumption during the running of the test task, and combining the usage of various resources during the execution of the test task, the optimization of the configuration items in the first tuning strategy is realized.

[0060] Figure 3 It is a flowchart of an optimization method for a first tuning strategy provided by an embodiment of the present application. The method includes: S301: According to the set monitoring time window and sampling frequency, count the utilization rates of various resources during the operation of the test task.

[0061] The various resources may include CPU, memory, and storage resources.

[0062] During the operation of the system, utilize the performance monitoring interfaces and tools provided by the operating system, such as the performance monitoring tools (Performance Co–pilots, PCP) in the operating system kernel (Linux), to obtain the utilization rates of CPU, memory, and storage resources in real time.

[0063] During the dynamic operation of the system, the execution time range of the test task to be monitored and the sampling frequency of the system resource usage during monitoring can be set.

[0064] For the setting of the monitoring time window, the execution period or the maximum execution duration of the test task can be determined according to the application scenario and task nature of the test task; based on the execution period or the maximum execution duration of the test task and the set expansion ratio, the monitoring time window corresponding to the test task can be determined.

[0065] In practical applications, for tasks that are executed periodically, such as timed data backup tasks, their execution time range can be accurately located within a fixed time interval of each cycle. For non-periodic tasks, such as sudden image recognition tasks, the possible maximum execution duration can be determined through historical data analysis as the monitoring time range.

[0066] Considering the dynamic change characteristics of system resources, to ensure that the resource usage during task execution can be completely and accurately covered, a certain proportion of time can be appropriately extended outward based on the expected execution time of the task, such as extending by 10% - 20%, as the final monitoring time window.

[0067] For the setting of the sampling frequency, the sampling frequencies corresponding to each execution stage of the test task can be determined based on the dynamic characteristics of the resources to be monitored, the monitoring accuracy requirements, and the execution stages of the test task.

[0068] For different resource types, their respective corresponding sampling frequencies can be set.

[0069] For processor resources, considering that their utilization rate changes rapidly and frequently, especially in multi-threaded high-concurrency application scenarios, such as task scheduling in large game servers, a relatively high sampling frequency can be set, such as sampling 10 to 100 times per second, to accurately capture the instantaneous fluctuations of the processor utilization rate.

[0070] For memory resources, considering that their allocation and release are relatively slow compared to processor resources, the sampling frequency can be appropriately reduced, such as sampling 1 to 10 times per second.

[0071] For storage resources, due to the relatively long response time of their read and write operations and the low change frequency, in general file storage application scenarios, the sampling frequency can be set to 1 to 5 times per second.

[0072] To ensure the representativeness of the sampled data, during the critical stages of task execution, such as the initial stage and the end stage of the task, the sampling frequency can be temporarily increased to more carefully observe the changing trend of resource usage.

[0073] After setting the monitoring time window and sampling frequency, the usage rates of various resources at each sampling point within the monitoring time window can be recorded according to the respective sampling frequencies of different types of resources.

[0074] S302: Record the performance metrics during the running of the test task.

[0075] Since the first tuning strategy obtained from theoretical analysis does not depend on specific application scenarios, in the actual environment, the performance and power consumption under the first tuning strategy can be evaluated by dynamically running benchmark testing tools (such as SpecCPU and SpecPower).

[0076] Among them, the performance metrics can include any one or a combination of the execution time of the task and the number of transactions completed per unit time.

[0077] In each test environment, configure the parameters of the hardware platform, BIOS, basic software, and upper-layer applications according to the first tuning strategy. Run the benchmark test program and record the performance metrics such as the execution time of the test task and the number of transactions completed per unit time.

[0078] For example, when running the SpecCPU test, record the running time (unit: second) of each test case and the computing throughput (unit: MIPS, millions of instructions per second), and evaluate the impact of the tuning scheme on performance by comparing the performance metrics under different tuning schemes.

[0079] S303: Use a power consumption test tool to record the overall system power consumption data during the running of the test task.

[0080] Use a power consumption meter or a power consumption test tool such as SpecPower to monitor and record the overall system power consumption data during the running of the benchmark test program.

[0081] The sampling frequency of the power consumption data can be set according to actual needs, such as sampling 1 to 10 times per second. By statistically analyzing the power consumption data, calculate indicators such as the average power consumption and peak power consumption of the system, and evaluate the impact of the tuning scheme on power consumption.

[0082] S304: When the utilization rates of various resources do not meet the set utilization rate conditions, the performance indicators do not meet the set performance conditions, or the overall machine power consumption data does not meet the set power consumption conditions, iterate and adjust the configuration items in the first tuning strategy according to the utilization rates of various resources and the set parameter adjustment rules, so as to obtain a second tuning strategy in which the utilization rates of various resources meet the set utilization rate conditions, the performance indicators meet the set performance conditions, and the overall machine power consumption data meets the set power consumption conditions.

[0083] The parameter adjustment rules include the adjustable parameter configuration methods corresponding to different performances and power consumptions. In practical applications, managers can pre-construct the value ranges of adjustable parameters corresponding to different performances and power consumptions according to the influence of various adjustable parameters on performance and power consumption.

[0084] To reduce accidental errors during the testing process, each tuning strategy can be repeatedly tested multiple times, such as 3 to 5 times. Then take the average value of the test results as the final evaluation result to ensure the accuracy and reliability of the evaluation data.

[0085] For the utilization rates of various resources, a water level range can be set to evaluate whether the utilization rates of various resources meet the set utilization rate conditions. For example, if the utilization rates of various resources are all within their corresponding water level ranges, it means that the resource utilization rates meet the set utilization rate conditions.

[0086] The performance indicators can include indicators such as the execution time of tasks and the number of transactions completed per unit time. The performance conditions can include evaluating whether the execution time of the task is less than the set time upper limit value and whether the number of transactions completed per unit time is greater than the set quantity lower limit value. When the execution time of the task is less than the set time upper limit value and the number of transactions completed per unit time is greater than the set quantity lower limit value, it means that the performance indicators meet the set performance conditions.

[0087] The power consumption conditions can include evaluating whether the overall machine power consumption data is less than the set power consumption upper limit value. When the overall machine power consumption data is less than the set power consumption upper limit value, it means that the overall machine power consumption data meets the set power consumption conditions.

[0088] If the first tuning strategy evaluated by testing does not meet the utilization rate conditions, performance conditions or power consumption conditions, the relevant tuning items can be calibrated layer by layer from hardware, BIOS to software in combination with the usage of CPU, memory and storage resources during the test run.

[0089] When adjusting configuration items, in addition to relying on performance metrics and power consumption data, by introducing the utilization rates of various resources, it is possible to provide a reference direction for adjusting configuration items. For example, when the resource utilization is lower than the lower limit of the water level, power consumption can be reduced by downclocking, core binding, reducing the scheduling domain, or reducing the number of working devices. When the resource utilization is higher than the upper limit of the water level, performance can be improved by increasing the hardware working frequency, enhancing load balancing, etc., ultimately achieving the satisfaction of performance and power consumption conditions on the basis of ensuring that the system resource utilization rate is within the water level range.

[0090] In the embodiments of the present application, corresponding water level ranges can be set for different types of resources.

[0091] Taking the processor as an example, according to the task type and priority of the test task and the performance information of the processor, the corresponding water level range of the processor can be determined.

[0092] For example, for high-priority tasks with high real-time requirements, such as task scheduling in an aircraft flight control system, the minimum water level of its processor can be set to 30%-40% to ensure that the task has sufficient processor resources to ensure real-time response; the maximum water level is set according to the overall system load and the urgency of the task, generally not exceeding 80%-90%, to prevent system overload and abnormal execution of other tasks due to excessive occupation of processor resources. For low-priority background tasks, such as system log recording tasks, the minimum water level can be set to 5%-10%, and the maximum water level is 30%-40%.

[0093] Taking memory as an example, according to the data storage requirements and memory access patterns of the test task, the corresponding water level range of the memory can be determined.

[0094] For example, for memory-intensive tasks, such as large database query operations, the minimum water level should ensure that the core data set of the task can be accommodated, generally estimated according to the cache policy and data scale of the database, such as set to 30%-40% of the total memory; the maximum water level should consider avoiding memory overflow and frequent paging of the system, usually set to 80%-90% of the total memory. For general application tasks, the minimum water level can be set to 10%-20%, and the maximum water level is 60%-70%.

[0095] Taking storage resources as an example, according to the data read / write volume of the test task and the performance information of the storage device, the corresponding water level range of the storage resources can be determined.

[0096] For example, for video surveillance storage tasks, the lowest water level should ensure continuous writing of video data without data loss, which is generally calculated based on the video bitrate and the writing speed of the storage device, such as being set to 10%-15% of the total capacity of the storage device; the highest water level should reserve enough space to prevent data from not being written due to the storage device being full, usually set to 80%-90% of the total capacity. For file storage tasks, the lowest water level can be set to 5%-10%, and the highest water level to 70%-80%.

[0097] In the embodiments of the present application, by setting the monitoring time window and sampling frequency, effective collection of resource usage can be achieved. According to the set conditions, the utilization rate of resources, performance indicators, and overall machine power consumption data are evaluated. When the set conditions are not met, relying on the parameter adjustment rules and combining the usage of various resources, the parameters in the first tuning strategy are continuously iteratively adjusted, and finally a second tuning strategy that better fits the actual execution environment is obtained.

[0098] The content of the tuning strategy may include detailed information such as the specific configuration of the hardware platform, the configuration item settings of the BIOS, the version and parameter configuration of the basic software, the parameter configuration of the upper-layer application, and the evaluated results of performance and power consumption after tuning.

[0099] Among them, the specific configuration of the hardware platform may include, for example, the processor model, main frequency, memory capacity, storage device type, etc. The configuration item settings of the BIOS may include the number of processor cores, memory frequency, system energy efficiency mode, etc. The version and parameter configuration of the basic software may include the operating system kernel version, memory management parameters, compiler type and version, etc. The parameter configuration of the upper-layer application may include the number of threads, JDK version, etc.

[0100] The tuned strategies that have been tested and calibrated are all strategies that meet the requirements of performance, power consumption, and resource utilization rate in the actual operating environment. This strategy is directly related to the system platform and applications. Therefore, when outputting the second tuning strategy, information such as the hardware environment configuration and application type can also be output together as the constraint conditions for using this tuning strategy.

[0101] For example, a certain tuning strategy may be applicable to a processor platform with an x86 architecture, a memory capacity of more than 64GB, and running big data processing application tasks, etc. Or a certain tuning strategy is applicable to a mobile terminal processor platform with an ARM architecture and running graphics-intensive game applications, etc. Output these constraint conditions together with the tuning strategy so as to select a suitable tuning strategy according to the specific hardware environment and application type in actual applications.

[0102] To facilitate managers' more intuitive understanding of the usage of various resources, after recording the usage rates of various resources at each sampling point within the monitoring time window according to their respective corresponding sampling frequencies, the usage rates of each type of resource at each sampling point can be fitted using data fitting methods with time as the abscissa and resource usage rate as the ordinate to obtain the usage rate curve graphs corresponding to each type of resource.

[0103] There can be various data fitting methods, such as linear regression, polynomial fitting, or spline interpolation, etc.

[0104] The usage rate curve graphs obtained through fitting can intuitively display the changing trend of resource usage rates over time, including the specific positions and durations of the rising edge, falling edge, and stable intervals, thus providing an intuitive graphical basis for subsequent optimization analysis.

[0105] Different application scenarios have different requirements for resource usage rates. For example, for scenarios with low reliability requirements, it is allowed for the resource usage rate to occasionally exceed the water level range. While for scenarios with very high reliability requirements, the resource usage rate must be strictly controlled within its water level range.

[0106] To facilitate managers' more intuitive understanding of the distribution of resource usage rates, after recording the usage rates of various resources at each sampling point within the monitoring time window according to their respective corresponding sampling frequencies, it can be determined whether the usage rates of various resources at each sampling point exceed their corresponding water level ranges; in the case of target resources whose usage rates exceed their corresponding water level ranges, record the usage rates, occurrence times, and durations when the target resources exceed their corresponding water level ranges, and calculate the running time ratio of the target resources exceeding the water level range.

[0107] Exceeding the water level range includes the usage rate being lower than the lowest water level and the usage rate being higher than the highest water level.

[0108] In practical applications, the first cumulative duration can be determined based on the start time point and end time point of the time segment when the usage rate of the target resource is lower than the lowest water level. The second cumulative duration can be determined based on the start time point and end time point of the time segment when the usage rate of the target resource is higher than the highest water level. Divide the sum of the first cumulative duration and the second cumulative duration by the duration of the monitoring time window to obtain the running time ratio of the target resource exceeding the water level range.

[0109] By determining the running time ratios of various resources exceeding the water level range, it is convenient for managers to intuitively understand the proportion of various resources that do not meet the water level requirements. By combining the specific requirements of the application scenario, it is possible to more specifically evaluate whether the resource usage rate meets the requirements.

[0110] In practical applications, the processor model and application type identifier can be used as index information to establish the corresponding relationship between each tuning strategy and the index information, so as to facilitate the subsequent rapid query and matching of tuning strategies. In addition to the processor model and application type identifier, the index information can also include other information such as the memory configuration range.

[0111] By establishing index information, the tuning strategy matching the specific scenario can be quickly located, improving the reusability and application efficiency of the tuning strategy.

[0112] In the embodiment of the present application, the processor identifier and application type identifier of the current system can be compared with the tuning knowledge base to determine the general configuration items and specific configuration items.

[0113] If there is a target tuning strategy in the tuning knowledge base that exactly matches the processor identifier and application type identifier of the current system, the parameters of the current system can be directly adjusted according to the tuning items included in the target tuning strategy.

[0114] If there is no target tuning strategy in the tuning knowledge base that matches the processor identifier and application type identifier of the current system, the general tuning items matching the current system can be determined depending on the tuning knowledge base. The system configuration is performed using the general tuning items, and thus the specific configuration items are tuned by running application tasks under this system configuration.

[0115] Figure 4 The flowchart of a method for tuning specific configuration items of the current system provided by the embodiment of the present application, the method includes: S401: Screen out the general tuning items that have a mapping relationship with the processor and application type of the current system from the tuning knowledge base.

[0116] In practical applications, the processor identifier and application type identifier under the current system can be extracted first.

[0117] Among them, the processor identifier may include hardware characteristic information such as the processor model, main frequency, and memory configuration; the application type identifier may include application characteristic information such as the application name, version number, and task load type.

[0118] In the tuning knowledge base, query and matching are performed according to the extracted processor identifier and application type identifier. The query algorithm should be able to efficiently search a large-scale tuning knowledge base and quickly return the matching results.

[0119] For example, a hash table-based query algorithm can be adopted to combine the processor model and the application type identifier into a unique hash key value, and the corresponding tuning strategy can be quickly located through the hash key value. The current system has its corresponding specific scenario. If the query matches successfully, that is, a tuning strategy that exactly matches the specific scenario is found in the tuning knowledge base, the corresponding tuning strategy is directly output.

[0120] If the query does not match successfully, that is, a tuning strategy that exactly matches the specific scenario is not found in the tuning knowledge base, then the processor and application type in this scenario are analyzed. According to the tuning rules in the tuning knowledge base, combined with the processor and application type in this scenario, the general tuning items applicable to the processor and application type in this scenario are determined.

[0121] For example, for a scenario where a new ARM architecture processor runs memory-intensive applications, according to the tuning strategies for ARM architecture processors and memory-intensive applications in the general tuning rules, corresponding general tuning items such as memory management parameters and cache policies are set.

[0122] S402: Use the general tuning items that have a mapping relationship with the processor and application type of the current system as general configuration items; use the remaining adjustable parameters among all the adjustable parameters included in the current system except the general tuning items as specific configuration items.

[0123] For the sake of easy distinction, the general tuning items that have a mapping relationship with the processor and application type of the current system can be used as general configuration items.

[0124] Except for the general configuration items, the remaining adjustable parameters included in the current system can be used as specific configuration items.

[0125] S403: Configure the system according to the general configuration items, and run the application task after completing the system configuration.

[0126] For the system configuration of specific configuration items, the operating environment and application settings can be constructed according to the configuration information included in the general configuration items; run the application task under the operating environment and application settings.

[0127] S404: Adjust the specific configuration items according to the system resource usage, performance metrics, and power consumption data during the running of the application task to obtain the tuned specific configuration items.

[0128] In practical applications, the actual usage rates of various resources during the running of the application task can be statistically calculated according to the monitoring time window and sampling frequency corresponding to the application task. Record the actual performance metrics during the running of the application task. Use the power consumption test tool to record the actual power consumption data during the running of the application task.

[0129] In the case where the actual utilization rate, actual performance indicators, and actual power consumption data of various resources do not meet the optimization goals of the current system, iterative adjustment of specific configuration items is performed according to the actual utilization rate of various resources and the set parameter adjustment rules, so as to obtain optimized specific configuration items for which the actual utilization rate, actual performance indicators, and actual power consumption data of various resources meet the optimization goals of the current system.

[0130] The acquisition methods of system resource usage, performance indicators, and power consumption data during the operation of application tasks, as well as the optimization methods of configuration items, are similar to those during the operation of test tasks. For details, please refer to the descriptions in S301 to S304, which will not be elaborated here.

[0131] In an actual system environment, configure the system according to general configuration items, then perform positive and negative adjustment tests on specific configuration items, evaluate the performance, power consumption, and resource usage under different configuration item settings, and finally determine the optimal parameters of specific configuration items. Integrating the general optimization items and the optimized specific configuration items can form a complete optimization strategy for the current system.

[0132] In the embodiments of the present application, by constructing a tuning knowledge base covering multiple processors and application types, when performing parameter tuning on the current system depending on the tuning knowledge base, only a small number of specific configuration items under the current system need to be tuned on the basis of general configuration items, effectively reducing the workload and complexity of tuning.

[0133] After adjusting the parameters of the current system according to the general configuration items and the optimized specific configuration items, a tuning strategy matching the current system can be obtained according to the general configuration items and the optimized specific configuration items. Store the index information of the current system and its matching tuning strategy in the tuning knowledge base; wherein, the index information may include any one or a combination of the processor model and the application type identifier.

[0134] By adding new tuning strategies and their index information to the tuning knowledge base, continuous update and improvement of the tuning knowledge base are realized. When the tuning knowledge base can cover enough scenarios, a tuning strategy that perfectly matches the system can be directly obtained by searching the tuning knowledge base.

[0135] In the embodiments of the present application, different functional modules can be divided according to the functions required in the process of system parameter tuning. Figure 5 This is a structural diagram of an overall method framework for system parameter tuning provided by the embodiments of the present application, including a system static analysis module, a system dynamic analysis module, a software and hardware integrated tuning module, a tuning effect evaluation module, a tuning knowledge base construction module, and a tuning module for specific scenarios.

[0136] To cover a variety of processors and application types, the system static analysis module can analyze the characteristics of multiple types of processors and extract hardware platform / application adjustable parameters.

[0137] The system dynamic analysis module is used to monitor the system resource usage during application runtime, where the system resources can include processors, memory, storage, etc.

[0138] The hardware-software integrated tuning module includes hardware tuning, basic input / output system tuning, basic software tuning, and upper-layer application tuning.

[0139] The tuning effect evaluation module is used to perform performance evaluation, power consumption evaluation, and resource usage evaluation during task runtime.

[0140] Through the mutual cooperation of the system dynamic analysis module, the hardware-software integrated tuning module, and the tuning effect evaluation module, continuous iterative optimization of configuration items can be achieved.

[0141] The tuning knowledge base construction module constructs a general tuning knowledge base and a tuning strategy library for specific scenarios. The general tuning knowledge base covers tuning rules related to multiple processor architectures / types and multiple application types.

[0142] The tuning knowledge base construction module distinguishes general tuning items independent of processor / application types and specific tuning items related to processor / application types by analyzing whether all tuning items depend on specific processors and application types. For example, for the adjustment of the processor running frequency, if the adjustment is based on the performance characteristics of a specific processor, it is considered to depend on the specific processor type; for the optimization of the input parameters of the upper-layer application, if the parameter is set according to the functional requirements of a specific application, it is considered to depend on the specific application type. In this way, general tuning items and specific tuning items are distinguished.

[0143] For general tuning items independent of processor / application types, analyze the mapping relationship between these general tuning items and processor / application characteristics, construct tuning rules for configuration items with the same software and hardware characteristics, and form a general tuning knowledge base. For example, for the tuning item of the memory management parameters of the operating system, analyze its relevance to different processor architectures such as x86, ARM, etc. and different application types such as CPU-intensive, memory-intensive, etc., and determine which combinations of processors and application types this general tuning item is applicable to. According to the analysis results of the mapping relationship, formulate tuning rules for configuration items with the same software and hardware characteristics. These tuning rules can describe in detail under what software and hardware characteristic conditions, how to set the corresponding tuning items to achieve the best performance and power consumption balance. For example, for a processor with a multi-level cache structure, how to set the cache management parameters of the operating system when running a memory-intensive application.

[0144] Organize the tuning rules into a general tuning knowledge base, which should have a good organizational structure and retrieval function for quick query and application of the tuning rules. As new tuning strategies emerge, add the new tuning rules to the tuning knowledge base in a timely manner to ensure the timeliness and accuracy of the tuning knowledge base.

[0145] For the specific tuning items related to the processor / application type, the key information in the tuning items can be extracted, including the processor model, application identifiers such as application name, version number, etc., the specific parameter settings of the tuning items, and the tuning effect evaluation data, etc. Organize and summarize this information to form a structured record of the tuning solution. Establish a mapping relationship between the tuning solution and the processor model / application identifier. Realize the associated storage of the tuning solution with the processor model and application identifier by constructing a database table. For example, create a tuning solution table in the database, which contains fields such as processor model, application identifier, tuning item parameters, and tuning effect, and associate each tuning solution with a specific processor model and application identifier through the primary key or unique index.

[0146] In the embodiments of the present application, by constructing the tuning solutions in different scenarios into a knowledge base, the loss of tuning experience and duplicate workload are avoided. When the tuning knowledge base is continuously improved to cover enough scenarios, the tuning solution can be directly obtained by searching in the tuning knowledge base. The tuning knowledge base supports tuning in scenarios of multiple processors and application types. The tuning solution is flexible and has good portability, reducing the tuning workload and complexity.

[0147] In practical applications, each new tuning solution can be added to the tuning strategy library according to the established mapping relationship. Regularly maintain and manage the solution library, including operations such as data backup, redundant data cleaning, and updating of the tuning solution, to ensure the efficient operation and data integrity of the solution library.

[0148] The tuning module for a specific scenario can obtain the general tuning items that match the current specific scenario from the tuning knowledge base, and the remaining configuration items are the specific configuration items of the processor platform and the specific configuration items of the application. Only the specific configuration items need to be tuned. For the small number of specific configuration items in this scenario, these configuration items can be tuned through the software-hardware integrated tuning module, the tuning effect evaluation module, and the system dynamic analysis module. The tuned specific configuration items and the customized general tuning items together form the tuning solution for this scenario.

[0149] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner.

[0150] Figure 6 The figure is a schematic structural diagram of an optimization device for system parameters provided by an embodiment of the present application, including a first obtaining unit 61, a first adjustment unit 62, a second obtaining unit 63, an optimization unit 64, and a second adjustment unit 65; The first obtaining unit 61 is configured to obtain a first optimization strategy according to configuration items of multiple processor and application types; The first adjustment unit 62 is configured to adjust the configuration items in the first optimization strategy to obtain a second optimization strategy; The second obtaining unit 63 is configured to obtain an optimization knowledge base according to the relevance between each configuration item in the second optimization strategy and the processor and application types; The optimization unit 64 is configured to use the general configuration items in the optimization knowledge base that match the current system to optimize the specific configuration items of the current system; The second adjustment unit 65 is configured to adjust the parameters of the current system according to the general configuration items and the optimized specific configuration items.

[0151] In some embodiments, the first obtaining unit is configured to obtain characteristic parameters and adjustable parameters of multiple processor and application types; wherein, the adjustable parameters at least include any one or any combination of adjustable parameters corresponding to the hardware platform, basic input / output system, basic software, and upper-layer applications; the characteristic parameters at least include any one or any combination of processor characteristic parameters, memory system characteristic parameters, and storage device characteristic parameters; and a first optimization strategy covering multiple processor and application types is obtained according to the influence relationship between each adjustable parameter and performance and power consumption and the characteristic parameters of multiple processor and application types.

[0152] In some embodiments, the first adjustment unit is configured to perform system configuration according to the first optimization strategy, and run a test task after completing the system configuration; and adjust the configuration items in the first optimization strategy according to the system resource usage, performance metrics, and power consumption data during the running of the test task to obtain a second optimization strategy.

[0153] In some embodiments, the first adjustment unit is configured to construct a system environment according to the configuration items included in the first optimization strategy; and dynamically run a benchmark test program in the constructed system environment.

[0154] In some embodiments, the first adjustment unit includes a resource statistics subunit, a performance recording subunit, a power consumption recording subunit, and an iterative adjustment subunit; The resource statistics subunit is configured to statistically calculate the usage rate of various resources during the running of the test task according to a set monitoring time window and sampling frequency; A performance recording subunit for recording performance metrics during the running of a test task; wherein the performance metrics include at least any one or combination of the execution time of the task and the number of transactions completed per unit time. A power consumption recording subunit for recording the overall machine power consumption data during the running of a test task by using a power consumption test tool. An iterative adjustment subunit for, when the utilization rate of various resources does not meet the set utilization rate condition, the performance metrics do not meet the set performance condition, or the overall machine power consumption data does not meet the set power consumption condition, iteratively adjusting the configuration items in the first tuning strategy according to the utilization rate of various resources and the set parameter adjustment rules, so as to obtain a second tuning strategy in which the utilization rate of various resources meets the set utilization rate condition, the performance metrics meet the set performance condition, and the overall machine power consumption data meets the set power consumption condition.

[0155] In some embodiments, for the setting of the monitoring time window and the sampling frequency, the device further includes a period determination unit, a time determination unit, and a frequency determination unit. The period determination unit is used to determine the execution period or the maximum execution duration of the test task according to the application scenario and the task nature of the test task. The time determination unit is used to determine the monitoring time window corresponding to the test task according to the execution period or the maximum execution duration of the test task and the set expansion ratio. The frequency determination unit is used to determine the sampling frequency corresponding to each execution stage of the test task based on the dynamic characteristics of the resources to be monitored, the monitoring accuracy requirements, and the execution stage of the test task.

[0156] In some embodiments, the resource statistics subunit is used to record the utilization rate of various resources at each sampling point within the monitoring time window according to the sampling frequency corresponding to each type of resource.

[0157] In some embodiments, a fitting unit is further included. The fitting unit is used to use data fitting to fit the utilization rate of each type of resource at each sampling point with time as the abscissa and the resource utilization rate as the ordinate, so as to obtain the utilization rate curve graph corresponding to each type of resource.

[0158] In some embodiments, a judgment unit and a statistics unit are further included. The judgment unit is used to judge whether the utilization rate of various resources at each sampling point exceeds its corresponding water level line range. The statistics unit is used to, when there are target resources whose utilization rate exceeds their corresponding water level line range, record the utilization rate, occurrence time, and duration of the target resources exceeding their corresponding water level line range, and calculate the running time ratio of the target resources exceeding the water level line range.

[0159] In some embodiments, the statistical unit is configured to determine a first cumulative duration based on the start time point and the end time point of a time segment during which the usage rate of the target resource is lower than the lowest water level line; determine a second cumulative duration based on the start time point and the end time point of a time segment during which the usage rate of the target resource is higher than the highest water level line; and divide the sum of the first cumulative duration and the second cumulative duration by the duration of the monitoring time window to obtain the running time ratio of the target resource outside the water level line range.

[0160] In some embodiments, various types of resources include at least any one or any combination of a processor, a memory, and a storage resource; for setting the water level line range corresponding to various types of resources, the apparatus further includes a water level line determination unit; The water level line determination unit is configured to determine the water level line range corresponding to the processor according to the task type and priority of the test task and the performance information of the processor; determine the water level line range corresponding to the memory according to the data storage requirements and memory access mode of the test task; and determine the water level line range corresponding to the storage resource according to the data read / write volume of the test task and the performance information of the storage device.

[0161] In some embodiments, the tuning knowledge base includes a general tuning knowledge base and a specific tuning strategy library; The second obtaining unit includes a screening subunit, a general obtaining subunit, an extraction subunit, and a specific obtaining subunit; The screening subunit is configured to screen out general tuning items that have no dependency relationship with the processor and the application type, and specific tuning items that have a dependency relationship with the processor and the application type from the second tuning strategy; The general obtaining subunit is configured to obtain a general tuning knowledge base according to the mapping relationship between the general tuning items in the second tuning strategy and the processor and the application type; The extraction subunit is configured to extract the processor model number and the application type identifier associated with the specific tuning item from the second tuning strategy; The specific obtaining subunit is configured to obtain a specific tuning strategy library based on the specific tuning item and its corresponding processor model number and application type identifier.

[0162] In some embodiments, the tuning unit includes a matching subunit, a configuration subunit, and an adjustment subunit; The matching subunit is configured to compare the processor identifier and the application type identifier of the current system with the tuning knowledge base to determine general configuration items and specific configuration items; The configuration subunit is configured to configure the system according to the general configuration items and run the application task after completing the system configuration; An adjustment subunit, configured to adjust specific configuration items according to the system resource usage, performance metrics, and power consumption data during the running of an application task, so as to obtain optimized specific configuration items.

[0163] In some embodiments, the matching subunit is configured to, when there is no target tuning policy in the tuning knowledge base that matches the processor identifier and application type identifier of the current system, screen out general tuning items in the tuning knowledge base that have a mapping relationship with the processor and application type of the current system; use the general tuning items that have a mapping relationship with the processor and application type of the current system as general configuration items; and use the remaining adjustable parameters in all adjustable parameters included in the current system except the general tuning items as specific configuration items.

[0164] In some embodiments, it further includes a parameter adjustment unit; The parameter adjustment unit is configured to, when there is a target tuning policy in the tuning knowledge base that matches the processor identifier and application type identifier of the current system, adjust the parameters of the current system according to the tuning items included in the target tuning policy.

[0165] In some embodiments, the configuration subunit is configured to construct a running environment and application settings according to the configuration information included in the general configuration items; and run the application task under the running environment and application settings.

[0166] In some embodiments, the adjustment subunit is configured to, according to the monitoring time window and sampling frequency corresponding to the application task, statistically calculate the actual usage rates of various resources during the running of the application task; record the actual performance metrics during the running of the application task; use a power consumption test tool to record the actual power consumption data during the running of the application task; and when the actual usage rates of various resources, the actual performance metrics, and the actual power consumption data do not meet the optimization objectives of the current system, iteratively adjust the specific configuration items according to the actual usage rates of various resources and the set parameter adjustment rules, so as to obtain optimized specific configuration items for which the actual usage rates of various resources, the actual performance metrics, and the actual power consumption data meet the optimization objectives of the current system.

[0167] In some embodiments, it further includes a policy obtaining unit and a storage unit; The policy obtaining unit is configured to obtain a tuning policy that matches the current system according to the general configuration items and the optimized specific configuration items; The storage unit is configured to store the index information of the current system and its matching tuning policy into the tuning knowledge base; wherein the index information includes at least any one or combination of the processor model and the application type identifier.

[0168] As can be seen from the above technical solution, a first tuning strategy is obtained according to the configuration items of multiple processors and application types. Considering that in the actual execution environment, the first tuning strategy may deviate from the actual situation, the configuration items in the first tuning strategy can be adjusted to obtain a second tuning strategy. During the tuning process, optimization objectives in multiple dimensions such as resource usage, performance, and power consumption are considered, and the obtained tuning strategy is more practical. According to the relevance between each configuration item in the second tuning strategy and the processor and application type, a tuning knowledge base is obtained. Obtaining a tuning knowledge base based on tuning strategies covering multiple processors and application types can support tuning in scenarios of multiple processors and application types. The tuning strategy is flexible and has good portability. In actual applications, the general configuration items matching the current system in the tuning knowledge base can be used to tune the specific configuration items of the current system; based on the general configuration items and the tuned specific configuration items, the parameters of the current system are adjusted. When the parameters of the current system are tuned relying on the tuning knowledge base, only a small number of specific configuration items of the current system need to be tuned on the basis of the general configuration items, which greatly reduces the workload and complexity of tuning. And as the specific scenarios covered by the tuning knowledge base increase, ultimately, only the tuning strategy in the specific scenario needs to be directly matched in the tuning knowledge base to achieve parameter tuning.

[0169] For the description of the features in the corresponding embodiments of the system parameter tuning device, reference can be made to the relevant descriptions in the corresponding embodiments of the system parameter tuning method, which will not be elaborated here one by one.

[0170] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above embodiments of the system parameter tuning method.

[0171] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the system parameter tuning method when running.

[0172] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs and other media that can store computer programs.

[0173] An embodiment of the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the system parameter tuning method.

[0174] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-described method embodiments for optimizing system parameters are implemented.

[0175] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner 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 to exceed the scope of the present application.

[0176] The above has introduced in detail a method, device, equipment, storage medium, and product for optimizing system parameters provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for optimizing system parameters, characterized in that, Including: Obtaining a first tuning strategy according to configuration items of multiple processor and application types; Adjusting the configuration items in the first tuning strategy to obtain a second tuning strategy; Obtaining a tuning knowledge base based on the relevance between each configuration item in the second tuning strategy and the processor and application types; Tuning specific configuration items of the current system by using general configuration items in the tuning knowledge base that match the current system; Adjusting parameters of the current system according to the general configuration items and the tuned specific configuration items.

2. The method for optimizing system parameters according to claim 1, wherein Obtaining a first tuning strategy according to configuration items of multiple processor and application types includes: Obtaining characteristic parameters and adjustable parameters of multiple processor and application types; wherein, the adjustable parameters at least include any one or any combination of adjustable parameters corresponding to a hardware platform, a basic input / output system, basic software, and upper-layer applications; the characteristic parameters at least include any one or any combination of processor characteristic parameters, memory system characteristic parameters, and storage device characteristic parameters; Obtaining a first tuning strategy covering multiple processor and application types according to the influence relationship between each adjustable parameter and performance and power consumption and the characteristic parameters of multiple processor and application types.

3. The method for optimizing system parameters according to claim 1, characterized in that, Adjusting the configuration items in the first tuning strategy to obtain a second tuning strategy includes: Performing system configuration according to the first tuning strategy and running a test task after completing the system configuration; Adjusting the configuration items in the first tuning strategy according to the system resource usage, performance metrics, and power consumption data during the running of the test task to obtain a second tuning strategy.

4. The method for optimizing system parameters according to claim 3, characterized in that, Performing system configuration according to the first tuning strategy and running a test task after completing the system configuration includes: Constructing a system environment according to the configuration items included in the first tuning strategy; Dynamically running a benchmark test program in the constructed system environment.

5. The method for optimizing system parameters according to claim 3, wherein Adjusting the configuration items in the first tuning strategy according to the system resource usage, performance metrics, and power consumption data during the running of the test task to obtain a second tuning strategy includes: Statistically calculating the usage rate of various resources during the running of the test task according to a set monitoring time window and sampling frequency; Recording performance metrics during the running of the test task; wherein, the performance metrics at least include any one or combination of the execution time of the task and the number of transactions completed per unit time; Using a power consumption test tool to record the overall machine power consumption data during the running of the test task; In the case where the usage rate of various resources does not meet the set usage rate condition, the performance metrics do not meet the set performance condition, or the overall machine power consumption data does not meet the set power consumption condition, iteratively adjusting the configuration items in the first tuning strategy according to the usage rate of various resources and the set parameter adjustment rules to obtain a second tuning strategy in which the usage rate of various resources meets the set usage rate condition, the performance metrics meet the set performance condition, and the overall machine power consumption data meets the set power consumption condition.

6. The method for optimizing system parameters according to claim 5, wherein Regarding the setting of the monitoring time window and the sampling frequency, the method further includes: Determine the execution period or maximum execution duration of the test task according to the application scenario and task nature of the test task; Determine the monitoring time window corresponding to the test task according to the execution period or maximum execution duration of the test task and the set expansion ratio; Determine the sampling frequency corresponding to each execution stage of the test task based on the dynamic characteristics of the monitoring resources required, the monitoring accuracy requirements, and the execution stage of the test task.

7. The method for optimizing system parameters according to claim 5, characterized in that, According to the set monitoring time window and sampling frequency, count the utilization rates of various resources during the operation of the test task, including: According to the sampling frequency corresponding to each type of resource, record the utilization rate of each type of resource at each sampling point within the monitoring time window.

8. The method for optimizing system parameters according to claim 7, wherein After recording the utilization rate of each type of resource at each sampling point within the monitoring time window according to the sampling frequency corresponding to each type of resource, it further includes: Using the time as the abscissa and the resource utilization rate as the ordinate, perform fitting on the utilization rate of each type of resource at each sampling point by means of data fitting to obtain the utilization rate curve corresponding to each type of resource.

9. The method for optimizing system parameters according to claim 7, characterized in that, After recording the utilization rate of each type of resource at each sampling point within the monitoring time window according to the sampling frequency corresponding to each type of resource, it further includes: Judge whether the utilization rate of each type of resource at each sampling point exceeds its corresponding water level range; In the case where there is a target resource whose utilization rate exceeds its corresponding water level range, record the utilization rate, occurrence time, and duration when the target resource exceeds its corresponding water level range, and count the running time ratio of the target resource exceeding the water level range.

10. The method for optimizing system parameters according to claim 9, characterized in that, Counting the running time ratio of the target resource exceeding the water level range includes: Determine the first cumulative duration according to the start time point and end time point of the time segment when the utilization rate of the target resource is lower than the lowest water level; Determine the second cumulative duration according to the start time point and end time point of the time segment when the utilization rate of the target resource is higher than the highest water level; Divide the sum of the first cumulative duration and the second cumulative duration by the duration of the monitoring time window to obtain the running time ratio of the target resource exceeding the water level range.

11. The method for optimizing system parameters according to claim 9, wherein, Each type of resource includes at least any one or any combination of a processor, memory, and storage resources; Regarding the setting of the water level range corresponding to each type of resource, the method further includes: Determine the water level range corresponding to the processor according to the task type and priority of the test task and the performance information of the processor; Determine the water level range corresponding to the memory according to the data storage requirements of the test task and the memory access mode; Determine the water level range corresponding to the storage resources according to the data read / write volume of the test task and the performance information of the storage device.

12. The method for optimizing system parameters according to claim 1, wherein The tuning knowledge base includes a general tuning knowledge base and a specific tuning strategy library; Obtain the tuning knowledge base according to the relevance between each configuration item in the second tuning strategy and the processor and application type, including: Screen out the general tuning items that have no dependency relationship with the processor and application type, and the specific tuning items that have a dependency relationship with the processor and application type from the second tuning strategy; Obtain a general tuning knowledge base according to the mapping relationship between the general tuning items, the processor, and the application type described in the second tuning strategy; Extract the processor model and application type identifier associated with the specific tuning item from the second tuning strategy; Based on the specific tuning item and its corresponding processor model and application type identifier, obtain a specific tuning strategy library.

13. The method for optimizing system parameters according to claim 1, wherein Using the general configuration items in the tuning knowledge base that match the current system to tune the specific configuration items of the current system includes: Compare the processor identifier and application type identifier of the current system with the tuning knowledge base to determine the general configuration items and specific configuration items; Configure the system according to the general configuration items and run the application task after completing the system configuration; Adjust the specific configuration items according to the system resource usage, performance metrics, and power consumption data during the running of the application task to obtain the tuned specific configuration items.

14. The method for optimizing system parameters according to claim 13, wherein Compare the processor identifier and application type identifier of the current system with the tuning knowledge base to determine the general configuration items and specific configuration items includes: In the case where there is no target tuning strategy in the tuning knowledge base that matches the processor identifier and application type identifier of the current system, screen out the general tuning items in the tuning knowledge base that have a mapping relationship with the processor and application type of the current system; Use the general tuning items that have a mapping relationship with the processor and application type of the current system as the general configuration items; Use the remaining adjustable parameters in all adjustable parameters included in the current system except the general tuning items as the specific configuration items.

15. The method for optimizing system parameters according to claim 13, characterized in that, Adjust the specific configuration items according to the system resource usage, performance metrics, and power consumption data during the running of the application task to obtain the tuned specific configuration items includes: According to the monitoring time window and sampling frequency corresponding to the application task, count the actual usage rates of various resources during the running of the application task; Record the actual performance metrics during the running of the application task; Use a power consumption test tool to record the actual power consumption data during the running of the application task; In the case where the actual usage rates of various resources, the actual performance metrics, and the actual power consumption data do not meet the optimization objectives of the current system, iteratively adjust the specific configuration items according to the actual usage rates of various resources and the set parameter adjustment rules to obtain the tuned specific configuration items where the actual usage rates of various resources, the actual performance metrics, and the actual power consumption data meet the optimization objectives of the current system.

16. The method for optimizing system parameters according to any one of claims 1 to 15, characterized in that, After adjusting the parameters of the current system according to the general configuration items and the tuned specific configuration items, it further includes: Obtain a tuning strategy that matches the current system according to the general configuration items and the tuned specific configuration items; Store the index information of the current system and its matching tuning strategy into the tuning knowledge base; wherein, the index information includes at least any one or combination of the processor model and application type identifier.

17. An apparatus for optimizing system parameters, characterized in that, Includes a first obtaining unit, an adjustment unit, a second obtaining unit, a tuning unit, and an adjustment unit; The first obtaining unit is configured to obtain a first tuning policy according to configuration items of multiple processors and application types; The adjustment unit is configured to adjust the configuration items in the first tuning policy to obtain a second tuning policy; The second obtaining unit is configured to obtain a tuning knowledge base according to the relevance between each configuration item in the second tuning policy and the processor and application type; The tuning unit is configured to use the general configuration items in the tuning knowledge base that match the current system to tune the specific configuration items of the current system; The adjustment unit is configured to adjust the parameters of the current system according to the general configuration items and the tuned specific configuration items.

18. An electronic device, characterized in that, Comprising: A memory for storing a computer program; A processor, configured to implement the steps of the method for tuning system parameters according to any one of claims 1 to 16 when executing the computer program.

19. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, wherein the computer program, when executed by a processor, implements the steps of the method for tuning system parameters according to any one of claims 1 to 16.

20. A computer program product comprising a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method for tuning system parameters according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • Resource updating method and device, terminal and storage medium

    CN108536461A

  • Parameter tuning method and related device

    CN110825629A

  • Adjusting and optimizing method and device for MPI parameters, storage medium and electronic equipment

    CN113760766A

  • Performance tuning method and device, electronic equipment and medium

    CN116126546A

  • Performance tuning method and device

    CN116932417A

Cited By

  • Multi-application scene server system performance optimization method

    CN121681154A