[go: up one dir, main page]

CN120371532A - System parameter tuning method, device, equipment, storage medium and product - Google Patents

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

Info

Publication number
CN120371532A
CN120371532A CN202510847288.4A CN202510847288A CN120371532A CN 120371532 A CN120371532 A CN 120371532A CN 202510847288 A CN202510847288 A CN 202510847288A CN 120371532 A CN120371532 A CN 120371532A
Authority
CN
China
Prior art keywords
tuning
application
strategy
processor
power consumption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202510847288.4A
Other languages
Chinese (zh)
Other versions
CN120371532B (en
Inventor
许荣飞
苏志远
麻付强
吴保锡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
IEIT Systems Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202510847288.4A priority Critical patent/CN120371532B/en
Publication of CN120371532A publication Critical patent/CN120371532A/en
Application granted granted Critical
Publication of CN120371532B publication Critical patent/CN120371532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a system parameter tuning method, a device, equipment, a storage medium and a product, relates to the technical field of operating systems, and obtains a first tuning strategy according to configuration items of various processors and application types. And adjusting the configuration items in the first tuning strategy to obtain a second tuning strategy. And obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type. Tuning a specific configuration item of the current system by using a universal configuration item matched with the current system in a tuning knowledge base; and adjusting the parameters of the current system according to the general configuration items and the optimized specific configuration items. The parameter tuning is performed on the current system by relying on the tuning knowledge base, and only a small number of specific configuration items are required to be tuned, so that tuning workload and complexity are greatly reduced.

Description

System parameter tuning method, device, equipment, storage medium and product
Technical Field
The present application relates to the field of operating systems, and in particular, to a method, an apparatus, a device, a storage medium, and a product for optimizing system parameters.
Background
The server is a complex system composed of software and hardware, and comprises a processor, a memory, a storage device, firmware, an operating system, a compiler, an upper layer application and the like, each component is a complex small system, and the configuration of the components can directly influence the overall performance and power consumption of the system.
With the popularity of heterogeneous processors, the types of processors employed in server systems are also becoming increasingly diverse. Instruction sets and architectural features are also different on different types of processors, and thus parameter configuration and tuning schemes on different processor platforms are also not common. And the tuning method is different for different types of upper layer applications.
At present, peak work load is used for pressure test, a performance monitoring tool is used for observing the state of a system, determining the bottleneck of performance, and optimizing a configurable item causing the bottleneck. When the hardware platform or the service scene changes, the original optimization scheme may not be applicable any more and needs to be readjusted and optimized. If the tuning is performed again in each scene, the problems of large workload and repeated part of work exist.
It can be seen how to reduce the workload of system parameter tuning under multiprocessor and application types is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application provides a system parameter tuning method, a device, equipment, a storage medium and a product, which at least solve the problem of large workload of system parameter tuning under the multiprocessor and application types in the related technology.
The application provides a system parameter tuning method, which comprises the following steps:
Obtaining a first tuning strategy according to configuration items of various processors and application types;
Adjusting configuration items in the first tuning strategy to obtain a second tuning strategy;
Obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type;
tuning a specific configuration item of the current system by using a universal configuration item matched with the current system in a tuning knowledge base;
and adjusting the parameters of the current system according to the general configuration items and the optimized specific configuration items.
The application provides a system parameter tuning device, which comprises a first obtaining unit, an adjusting unit, a second obtaining unit, a tuning unit and an adjusting unit;
the first obtaining unit is used for obtaining a first tuning strategy according to configuration items of various processors and application types;
the adjusting unit is used for adjusting the configuration items in the first tuning strategy to obtain a second tuning strategy;
The second obtaining unit is used for obtaining a tuning knowledge base according to the relevance between each configuration item in the second tuning strategy and the processor and the application type;
The tuning unit is used for tuning the specific configuration items of the current system by utilizing the universal configuration items matched with the current system in the tuning knowledge base;
and the adjusting unit is used for adjusting the parameters of the current system according to the general configuration items and the optimized specific configuration items.
The application provides an electronic device, comprising:
a memory for storing a computer program;
And the processor is used for realizing the step of the tuning method of any system parameter when executing the computer program.
The present application provides a computer readable storage medium having a computer program stored therein, wherein the computer program when executed by a processor implements the steps of the tuning method for any one of the above system parameters.
The present application provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the tuning method for any one of the system parameters described above.
According to the configuration items of various processors and application types, the first tuning strategy is obtained. Considering that in an actual execution environment, the first tuning strategy may deviate from the actual situation, so that configuration items in the first tuning strategy can be adjusted to obtain the second tuning strategy. In the tuning process, the optimization targets of multiple dimensions such as resource use condition, performance, power consumption and the like are considered, and the obtained tuning strategy has practicability. And obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type. The tuning knowledge base is obtained according to tuning strategies covering various processors and application types, tuning under various processor and application type scenes can be supported, and the tuning strategies are flexible and have good portability. In practical application, the general configuration items matched with the current system in the tuning knowledge base can be utilized to tune the specific configuration items of the current system, and the parameters of the current system are adjusted according to the general configuration items and the specific configuration items after tuning. When parameter tuning is performed on the current system by relying on a tuning knowledge base, only a specific small number of configuration items under the current system are required to be tuned on the basis of general configuration items, so that tuning workload and complexity are greatly reduced. And as the specific scenes covered by the tuning knowledge base are more and more, parameter tuning can be realized only by directly matching tuning strategies under the specific scenes in the tuning knowledge base.
Drawings
For a clearer description of embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a system parameter tuning method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of obtaining characteristic parameters and adjustable parameters according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for optimizing a first tuning strategy according to an embodiment of the present application;
FIG. 4 is a flow chart of a method for tuning a particular configuration item of a current system according to an embodiment of the present application;
FIG. 5 is a block diagram of an overall method framework for system parameter tuning according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a system parameter tuning device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present application.
It should be noted that in the description of the present application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "first," "second," and the like in this specification are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The present application will be further described in detail below with reference to the drawings and detailed description for the purpose of enabling those skilled in the art to better understand the aspects of the present application.
The server serves as a core for providing services, and its performance and power consumption are directly related to user experience, business continuity and cost. The server includes a processor, memory, storage devices, firmware, an operating system, a compiler, upper layer applications, and the like. Higher operating frequencies tend to result in better performance for the processor, but at the same time more power consumption. The software function in the server System directly depends on the hardware capability of the bottom layer, the Basic Input/Output System (BIOS) firmware is a bridge connecting the hardware and the operating System, and the operating System combines with the BIOS to realize the management of hardware resources, so that the application can run efficiently. Therefore, it is necessary to achieve the performance and energy consumption optimization goals from the overall system perspective by tuning parameters configurable on the hardware and software. For ease of description, the configurable parameters may be referred to as configuration items.
With the popularity of heterogeneous processors, the types of processors employed in server systems are becoming increasingly diverse, such as reduced instruction set computing Architecture (ARM), complex instruction set computing architecture (X86), open-source reduced instruction set computing architecture (RISC-V), and the like. Instruction sets and architectural features are different on different types of processors, and thus parameter configuration and tuning schemes on different processor platforms are also not common. On the other hand, tuning methods are also different for different types of upper layer applications, such as central processing unit (Central Processing Unit, CPU) intensive, memory intensive, or Input/Output (IO) intensive task loads.
At present, peak work load is used for pressure test, a performance monitoring tool is used for observing the state of a system, determining the bottleneck of performance, and optimizing a configurable item causing the bottleneck. When the hardware platform or the service scene changes, the original optimization scheme may not be applicable any more and needs to be readjusted and optimized. And the current tuning mode only carries out targeted optimization according to bottleneck points in the load operation process, and can not obtain causal relations between software and hardware adjustable configuration items and processor platforms and application types, so that a general tuning method covering various processor platforms and application types can not be obtained. In addition, the current tuning method only considers tuning with the aim of performance, and cannot be suitable for optimizing a plurality of dimensions such as performance, power consumption, resource use and the like.
Therefore, the embodiment of the application provides a system parameter tuning method, a device, equipment, a storage medium and a product, wherein a first tuning strategy is obtained according to configuration items of various processors and application types, the tuning strategy is evaluated from three aspects of performance, power consumption and system resource use by dynamically executing monitoring on a test task in a specific processor platform, and a tuning knowledge base is obtained according to the relevance of each configuration item in a second tuning strategy to the processor and the application types. When tuning for a specific scene, if a tuning strategy under the scene exists in a tuning knowledge base, directly using the tuning strategy, otherwise, customizing a general tuning item matched with a current system based on the tuning knowledge base, then performing tuning evaluation on a specific configuration item of the current system, and finally forming the tuning strategy under the scene through the general tuning item and the specific configuration item after tuning. On the basis of obtaining a good tuning knowledge base, tuning is only needed to be performed on a specific small number of configuration items in different scenes, and tuning workload and complexity are greatly reduced.
The embodiment of the application provides a system parameter tuning method, which is described in detail by combining an execution flow of the system parameter tuning method. Fig. 1 is a flowchart of a method for optimizing system parameters according to an embodiment of the present application, where the method includes:
S101, obtaining a first tuning strategy according to configuration items of various processors and application types.
In the embodiment of the application, in order to realize the adaptation to various processors and application types, a first tuning strategy which does not have a dependency relationship with the various processors and application types can be obtained.
For ease of description, a configuration item that does not have a dependency on multiple processor and application types may be referred to as a general-purpose configuration item, and a configuration item that has a dependency on multiple processor and application types may be referred to as a specific configuration item. After tuning the configuration item, the tuned configuration item may be referred to as a tuning item. The first tuning strategy comprises universal tuning items which do not have dependency relationship with various processors and application types.
In a specific implementation, in order to obtain the first tuning strategy, the characteristic parameters and the tunable parameters of various processors and application types may be acquired first. And obtaining a first tuning strategy covering the various processors and the application types according to the influence relation of the adjustable parameters, the performance and the power consumption and the characteristic parameters of the various processors and the application types.
The adjustable parameters can comprise any one or any combination of the hardware platform, the basic input and output system, basic software and adjustable parameters corresponding to upper-layer applications. The feature parameters may include processor feature parameters, memory system feature parameters, and storage device feature parameters to facilitate characterizing any one or any combination of hardware platforms from multiple dimensions.
The purpose of obtaining the adjustable parameters is to comb out all freely configurable parameter items, which constitute the variables in the tuning strategy. Different parameter configurations bring different performance and power consumption effects, and the adjustable parameters are continuously optimized and adjusted to obtain an optimization strategy with better performance and power consumption.
The purpose of obtaining the characteristic parameters is to determine the processor type, application type and the like to which the tuning strategy can be applied.
Fig. 2 is a schematic diagram of obtaining feature parameters and adjustable parameters according to an embodiment of the present application, where the feature parameters and the adjustable parameters are mainly obtained from four aspects of a hardware platform, a basic input/output system, basic software, and an upper layer application.
The adjustable parameters of the hardware platform may include processor operating frequency, number of memory bank uses, etc.
The tunable parameters of a Basic Input Output System (BIOS) are dependent upon the particular processor hardware type, and the BIOS tunable parameters cover a number of key aspects, such as processor frequency, memory parameters, cache set-up, memory architecture (Non-Uniform Memory Access, NUMA) set-up, and performance modes of a multiprocessor computer system.
The adjustable parameters of the basic software are mainly obtained by analyzing the kernel of the operating system and the compiler, and comprise kernel version, kernel basic mechanism, kernel configuration parameters, compiler type, version, compiling parameters and the like. The kernel basic mechanism comprises a scheduling algorithm, a memory management mechanism and the like.
The adjustable parameters of the upper-layer application are mainly analyzed from the aspect of task load characteristics, and the adjustable parameters comprise three aspects of CPU (Central processing Unit) intensive, memory intensive and I/O intensive. Different input parameters can also directly influence the operation of the task, and the input parameters of the application are also taken as configuration items to be considered in the application. In addition, for applications of the object oriented programming language (JAVA) class, software development kits (Java Development Kit, JDK) using different JAVA programming languages also affect the energy efficiency of the application, and it is necessary to analyze information such as version and use parameters of JDK.
Processor feature parameters may include an operation architecture (e.g., x 86/ARM/RISC-V), a master frequency parameter and its dynamic adjustment mechanism, a multi-level cache structure, and a memory access management policy (including prefetch algorithms, bus arbitration mechanisms, etc.).
The memory system characteristics may include the number of installed modules, the dynamic random access memory (Dynamic Random Access Memory, DRAM) type, single and total capacity configuration, operating frequency, operating voltage range, and topology design. Among these, DRAM types include Double data rate synchronous dynamic random access memory (Double DATA RATE SDRAM, DDR), such as DDR4/DDR5.
The storage device characteristic parameters may include I/O performance metrics, refresh cycle management mechanisms for flash memory particles, garbage collection algorithms, and cache scheduling policies. The I/O performance index comprises a sequential read-write rate and a random access delay. The refresh cycle management mechanism of flash memory granules is directed to the non-volatile storage (NAND) characteristics of Solid state disks (Solid STATE DISK, SSD). Garbage collection algorithms include dynamic/static wear leveling strategies.
In the first tuning strategy, the characteristic parameters and the corresponding configuration item tuning have a direct corresponding relation, for example, a processor of an ARM architecture has the characteristic of low power consumption, the optimization of performance is required to be focused during tuning, the power consumption of a processor of an X86 architecture is relatively higher in high-performance calculation, and the optimization of the power consumption is required to be focused during tuning.
S102, adjusting configuration items in the first tuning strategy to obtain a second tuning strategy.
Through theoretical analysis of the influence relationship of each adjustable parameter on the hard platform, the BIOS, the basic software and the upper application on the performance and the power consumption, a group of first tuning strategies covering multiple processors and multiple application types can be preliminarily obtained.
However, in the actual execution environment, deviation may exist in the tuning strategy of theoretical analysis, the tuning item contained in the first tuning strategy is tested and evaluated in the actual system, the tuning item with deviation is tested and evaluated after positive and negative direction adjustment, tuning calibration on the configuration item is achieved, and finally the verified second tuning strategy is obtained.
In order to realize the test evaluation of the first tuning strategy, the system configuration can be carried out according to the first tuning strategy, the test task is operated after the system configuration is completed, and the configuration items in the first tuning strategy are adjusted according to the use condition of system resources, performance indexes and power consumption data in the operation process of the test task so as to obtain the second tuning strategy.
The system is configured to provide a system environment that covers a variety of processors and application types. In practical application, the system environment can be constructed according to the configuration items contained in the first tuning strategy, and the benchmark test program is dynamically operated in the constructed system environment.
And evaluating performance indexes, namely evaluating the application performance under the first tuning strategy through indexes such as response time, the number of completed transactions per unit time and the like in the actual execution process of the test task. In addition, for some upper layer applications, specialized benchmarking tools may also be employed, such as processor performance benchmarking tools (SpecCPU), performance pressure testing tools (redis-benchmark), and the like.
And (3) evaluating the power consumption data, namely evaluating the power consumption of the whole machine under the first tuning strategy through a power consumption instrument or a performance/power consumption ratio reference test tool (SpecPower) in the actual execution process of the test task.
And (3) evaluating the use condition of the system resources, namely defining the water level line range of the use of the resources on the CPU, the memory and the storage equipment for use under different scenes, wherein the water level line range comprises an upper water level line limit and a lower water level line limit. In the actual execution process of the test task, the use condition of the system resources under the first optimization strategy is evaluated through indexes such as the proportion of the running time exceeding the upper limit of the water level and being lower than the lower limit of the water level, the average use rate of the system resources in the whole running process and the like.
In practical application, corresponding conditions can be set for the use condition, performance index and power consumption data of the system resources, and the specific setting of the configuration items contained in the first tuning strategy is continuously adjusted, so that the use condition, the performance index and the power consumption data of the system resources can meet the corresponding conditions, and the second tuning strategy is obtained.
And S103, obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type.
For the second tuning strategy obtained, a general tuning item independent of a specific processor platform and a specific application type can be constructed into a general tuning knowledge base. Because the universal tuning knowledge base supports multiple processor platforms and application types, besides the tuning strategy, tuning rules between specific features and configuration items of different processors and application types are provided, so that the universal tuning strategy is conveniently deployed on the multiple processor platforms and application types.
For a specific tuning item depending on a specific processor and a specific application, the specific tuning item is constructed into a specific tuning policy base oriented to a specific scene. It should be noted that, for convenience of direct use, the specific tuning policy library of a specific scene includes two parts, namely general tuning and specific tuning. The processor platform and application information of each specific scene are constructed, and a mapping is established between the processor platform and the application information and the corresponding tuning strategy.
In practical application, the general tuning items which do not have a dependency relationship with the processor and the application type and the specific tuning items which have a dependency relationship with the processor and the application type can be screened from the second tuning strategy.
And obtaining a general tuning knowledge base according to the mapping relation between the general tuning items and the processor and the application types in the second tuning strategy.
And obtaining a specific tuning strategy library based on the specific tuning item and the corresponding processor model and application type identifier thereof. In the embodiment of the application, the tuning strategy can be called a tuning scheme.
S104, tuning the specific configuration items of the current system by using the universal configuration items matched with the current system in the tuning knowledge base.
The identification information of the current system can be constructed based on the processor platform and the application load information, and whether a tuning strategy matched with the current system exists or not is inquired from a tuning knowledge base based on the identification information.
If the matching is successful, the corresponding tuning strategy is directly used. For new scenes not existing in the tuning policy library, the tuning policy needs to be obtained from both the customization of the general tuning policy and the tuning of the specific configuration items of the new scenes. The general tuning strategy can directly select matching tuning rules from the tuning knowledge base according to the processor and the application type characteristics, and the tuning strategy of the general configuration item is customized. For a specific configuration item, system configuration can be performed based on the general configuration item, an application task is operated under the system configuration, and tuning of the specific configuration item is realized based on the system resource use condition, performance index and power consumption data of the application task.
S105, adjusting parameters of the current system according to the general configuration items and the optimized specific configuration items.
According to the general configuration item and the specific configuration item after tuning, a tuning strategy matched with the current system can be obtained, and parameters of the current system can be set according to the tuning strategy.
According to the technical scheme, the first tuning strategy is obtained according to configuration items of various processors and application types. Considering that in an actual execution environment, the first tuning strategy may deviate from the actual situation, so that configuration items in the first tuning strategy can be adjusted to obtain the second tuning strategy. In the tuning process, the optimization targets of multiple dimensions such as resource use condition, performance, power consumption and the like are considered, and the obtained tuning strategy has practicability. And obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type. The tuning knowledge base is obtained according to tuning strategies covering various processors and application types, tuning under various processor and application type scenes can be supported, and the tuning strategies are flexible and have good portability. In practical application, the general configuration items matched with the current system in the tuning knowledge base can be utilized to tune the specific configuration items of the current system, and the parameters of the current system are adjusted according to the general configuration items and the specific configuration items after tuning. When parameter tuning is performed on the current system by relying on a tuning knowledge base, only a specific small number of configuration items under the current system are required to be tuned on the basis of general configuration items, so that tuning workload and complexity are greatly reduced. And as the specific scenes covered by the tuning knowledge base are more and more, parameter tuning can be realized only by directly matching tuning strategies under the specific scenes in the tuning knowledge base.
In the embodiment of the application, the configuration items in the first optimization strategy are optimized by running the test task in the actual system according to the performance and the power consumption in the running process of the test task and combining the use conditions of various resources in the executing process of the test task.
Fig. 3 is a flowchart of a method for optimizing a first tuning policy according to an embodiment of the present application, where the method includes:
S301, counting the utilization rate of various resources in the running process of the test task according to the set monitoring time window and the sampling frequency.
The various resources may include CPU, memory, and storage resources.
During the running process of the system, the utilization rate of the CPU, the memory and the storage resources is obtained in real time by utilizing a Performance monitoring interface and a tool provided by an operating system, such as a Performance monitoring tool (PCP) in an operating system kernel (Linux).
In the dynamic running process of the system, the execution time range of the test task to be monitored and the sampling frequency of the use condition of the system resource during monitoring can be set.
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 scene and the task property of the test task, and the monitoring time window corresponding to the test task is determined according to the execution period or the maximum execution duration of the test task and the set expansion proportion.
In practical applications, for tasks that are periodically executed, such as a timed data backup task, the execution time range can be precisely located within a fixed time interval of each cycle. For non-periodic tasks, such as bursty image recognition tasks, the maximum execution duration possible can be determined through historical data analysis as the monitored time range.
In order to ensure that the dynamic change characteristics of the system resources can completely and accurately cover the resource use condition in the task execution process, a certain proportion of time, such as 10% -20%, can be properly extended on the basis of the task predicted execution time to serve as a final monitoring time window.
For setting the sampling frequency, the sampling frequency corresponding to each execution stage of the test task can be determined based on the dynamic characteristics of the required monitoring resources, the monitoring precision requirement and the execution stage of the test task.
For different resource types, respective sampling frequencies may be set.
For processor resources, in view of rapid and frequent changes in usage, especially in applications where multiple threads are highly concurrent, such as task scheduling in a large game server, a higher sampling frequency may be set, such as 10 to 100 samples per second, to accurately capture transient fluctuations in processor usage.
For memory resources, the sampling frequency may be suitably reduced, such as 1 to 10 samples per second, given that the allocation and release is slow relative to the processor resources.
For the storage resource, the response time of the read-write operation is relatively long, the change frequency is low, and the sampling frequency can be set to be 1 to 5 times per second in a general file storage application scene.
To ensure the representativeness of the sampled data, the sampling frequency may be temporarily increased during critical stages of task execution, such as the initial and final stages of task start, so as to more carefully observe the trend of the resource usage.
After the monitoring time window and the sampling frequency are set, the utilization rate of various resources at each sampling point in the monitoring time window can be recorded according to the respective corresponding sampling frequency of various resources.
S302, recording performance indexes in the running process of the test task.
Since the first tuning strategy obtained by theoretical analysis does not depend on a specific application scene, performance and power consumption under the first tuning strategy can be evaluated in an actual environment by dynamically running a benchmark test tool (such as SpecCPU and SpecPower).
The performance index may include any one or a combination of execution time of the task and the number of completed transactions per unit time.
Under each test environment, parameters of the hardware platform, the BIOS, the base software and the upper layer application are configured according to a first tuning strategy. And running a benchmark test program, and recording performance indexes such as execution time of a test task, the number of completed transactions in unit time and the like.
For example, during running SpecCPU tests, the run time (in seconds) and computational throughput (in MIPS, millions of instructions per second) of each test case are recorded, and the impact of the tuning scheme on performance is evaluated by comparing performance metrics under different tuning schemes.
S303, recording the power consumption data of the whole machine in the running process of the test task by using a power consumption test tool.
And monitoring and recording the power consumption data of the whole machine in the process of running the reference test program by using a power consumption meter or SpecPower and other power consumption test tools.
The sampling frequency of the power consumption data may be set according to actual requirements, such as 1 to 10 times per second. And calculating indexes such as average power consumption, peak power consumption and the like of the system by statistically analyzing the power consumption data, and evaluating the influence of the tuning scheme on the power consumption.
And S304, under the condition that the utilization rate of various resources does not meet the set utilization rate condition, the performance index does not meet the set performance condition or the power consumption data of the whole machine does not meet the set power consumption condition, carrying out iterative adjustment on configuration items in the first optimization strategy according to the utilization rate of various resources and the set parameter adjustment rule so as to obtain a second optimization strategy that the utilization rate of various resources meets the set utilization rate condition, the performance index meets the set performance condition and the power consumption data of the whole machine meets the set power consumption condition.
The parameter adjustment rule comprises adjustable parameter configuration modes corresponding to different performances and power consumption. In practical application, the administrator can construct adjustable parameter value ranges corresponding to different performances and power consumption in advance according to the influence of various adjustable parameters on performances and power consumption.
To reduce occasional errors during the test, multiple repeated tests, such as 3 to 5 tests, may be performed for each tuning strategy. And taking the average value of the test results as a final evaluation result to ensure the accuracy and reliability of the evaluation data.
The water line range can be set for the utilization rate of various resources to evaluate whether the utilization rate of various resources meets the set utilization rate condition. For example, the utilization rate of various resources is in the range of the corresponding water line, which indicates that the utilization rate of the resources meets the set utilization rate condition.
The performance index may include an index of execution time of a task, number of transactions completed per unit time, and the like. The performance condition may include evaluating whether the execution time of the task is less than a set time upper limit and whether the number of transactions completed per unit time is greater than a set number lower limit. When the execution time of the task is smaller than the set time upper limit value and the number of completed transactions in unit time is larger than the set number lower limit value, the performance index is stated to meet the set performance condition.
The power consumption condition may include evaluating whether the overall power consumption data is smaller than a set power consumption upper limit value. And under the condition that the power consumption data of the whole machine is smaller than the set power consumption upper limit value, the power consumption data of the whole machine is proved to meet the set power consumption condition.
If the first tuning strategy evaluated by the test does not meet the utilization rate condition, the performance condition or the power consumption condition, related tuning items can be calibrated layer by layer from hardware, BIOS to software by combining the utilization conditions of CPU, memory and storage resources in the test operation.
When the configuration item is adjusted, the reference direction can be provided for the adjustment of the configuration item by introducing the utilization rate of various resources besides depending on the performance index and the power consumption data. Such as reducing power consumption by down-converting, binding cores, shrinking scheduling fields, or reducing the number of devices operating when resource usage is below the lower pipeline limit. When the resource usage is higher than the upper limit of the water line, the performance is improved by means of improving the hardware working frequency, improving the load balance and the like, and finally, the performance and power consumption conditions are met on the basis of ensuring the system resource usage within the range of the water line.
In the embodiment of the application, the respective corresponding water line ranges can be set for different types of resources.
Taking a processor as an example, the water line range corresponding to the processor can be determined according to the task type and the priority to which the test task belongs and the performance information of the processor.
For example, for a high priority task with high real-time requirements, such as task scheduling in an aviation flight control system, the lowest water line of the processor can be set to 30% -40% to ensure that the task has enough processor resources to ensure real-time response, and the highest water line is set according to the overall load of the system and the emergency degree of the task, generally not more than 80% -90%, so that the overload of the system and the incapacity of normally executing other tasks caused by the excessive occupation of the processor resources are prevented. For low priority background tasks, such as system logging tasks, the lowest water line may be set to 5% -10% and the highest water line 30% -40%.
Taking a memory as an example, the water line range corresponding to the memory can be determined according to the data storage requirement of the test task and the memory access mode.
For example, for a memory intensive task, such as a large database query operation, the lowest water line should ensure that the core data set of the task can be accommodated, and is generally estimated according to the cache policy and data size of the database, for example, 30% -40% of the total memory, and the highest water line should be considered to avoid memory overflow and frequent paging of the system, and is generally set to 80% -90% of the total memory. For general application tasks, the lowest water line may be set to 10% -20% and the highest water line 60% -70%.
Taking the storage resource as an example, the water line range corresponding to the storage resource can be determined according to the data read-write quantity of the test task and the performance information of the storage device.
For example, for video monitoring storage tasks, the lowest water line is generally calculated according to the video code rate and the writing speed of the storage device, for example, the video code rate is set to be 10% -15% of the total capacity of the storage device, and the highest water line is set to reserve enough space to prevent the storage device from being fully written to cause that the data cannot be written, and is generally set to be 80% -90% of the total capacity. For file storage tasks, the lowest water line may be set to 5% -10% and the highest water line 70% -80%.
In the embodiment of the application, the effective collection of the resource use condition can be realized by setting the monitoring time window and the sampling frequency. And evaluating the utilization rate, performance index and overall power consumption data of the resources according to the set conditions, and when the set conditions are not met, depending on parameter adjustment rules and combining the use conditions of various resources, performing continuous iterative adjustment on the parameters in the first tuning strategy to finally obtain a second tuning strategy which is more fit with the actual execution environment.
The tuning policy content may include detailed information such as specific configuration of the hardware platform, configuration item setting of the BIOS, version and parameter configuration of the base software, parameter configuration of the upper layer application, performance and power consumption evaluation result after tuning, and the like.
The specific configuration of the hardware platform may include, for example, a processor model, a main frequency, a memory capacity, a storage device type, and the like. Configuration item settings of the BIOS may include processor core number, memory frequency, system energy efficiency mode, etc. The version and parameter configuration of the base software may include operating system kernel version, memory management parameters, compiler type and version, and the like. The parameter configuration of the upper layer application may include the number of threads, JDK version, etc.
The tuning strategies after test and calibration are strategies meeting the requirements of performance, power consumption and resource utilization rate in the actual running environment, and the strategies are directly related to a system platform and application, so that when the second tuning strategy is output, information such as hardware environment configuration, application type and the like can be simultaneously output together to serve as constraint conditions for the use of the tuning strategies.
For example, a tuning policy may be suitable for an x86 architecture processor platform, with a memory capacity of 64GB or more, running big data processing class application tasks, and so on. Or a certain tuning strategy is suitable for a mobile terminal processor platform of ARM architecture, running graphics intensive game application and the like. These constraints are output along with tuning strategies to select the appropriate tuning strategy in the actual application according to the specific hardware environment and application type.
In order to facilitate management personnel to more intuitively understand the use condition of various resources, after the use rate of various resources at each sampling point in a monitoring time window is recorded according to the sampling frequency corresponding to each type of resources, the use rate of each type of resources at each sampling point can be fitted in a data fitting mode by taking time as an abscissa and the use rate of the resources as an ordinate, so as to obtain a use rate graph corresponding to each type of resources.
The data fitting mode can be various, such as linear regression, polynomial fitting or spline interpolation.
The utilization rate curve graph is obtained through fitting, so that the change trend of the utilization rate of the resource along with time can be intuitively displayed, wherein the change trend comprises a rising edge, a falling edge and the specific position and duration of a stable section, and an intuitive graphical basis is provided for subsequent tuning analysis.
Different application scenarios may have different resource usage requirements, such as for scenarios with low reliability requirements, which may allow the resource usage to occasionally exceed the water line range. For very high reliability scenarios, however, the utilization of resources must be tightly controlled within its water line range.
In order to facilitate management personnel to more intuitively understand the distribution condition of the resource utilization rate, after the utilization rate of various resources in each sampling point in a monitoring time window is recorded according to the sampling frequency corresponding to each various resource, whether the utilization rate of various resources in each sampling point exceeds the corresponding water line range or not can be judged, and under the condition that target resources exceeding the corresponding water line range exist, the utilization rate, the occurrence time and the duration of the target resources exceeding the corresponding water line range are recorded, and the operation time proportion of the target resources exceeding the water line range is counted.
Exceeding the water line range includes utilization below the lowest water line and utilization above the highest water line.
In practical application, the first accumulation duration may be determined according to a start time point and an end time point of a time segment in which the usage rate of the target resource is lower than the minimum water line. And determining a second accumulation duration according to the starting time point and the ending time point of the time segment of which the utilization rate of the target resource is higher than the highest water line. Dividing the sum of the first accumulated time length and the second accumulated time length by the time length of the monitoring time window to obtain the operation time proportion of the target resource exceeding the range of the water line.
The method and the system have the advantages that the proportion of the running time exceeding the range of the water line in various resources is determined, so that management staff can intuitively know the ratio of various resources which do not meet the requirement of the water line, and whether the utilization rate of the resources meets the requirement can be evaluated more pertinently by combining the specific requirements of application scenes.
In practical application, the processor model and the application type identifier can be used as index information, and the corresponding relation between each tuning strategy and the index information can be established, so that the subsequent quick query and the matching of the tuning strategy are facilitated. The index information may include other information such as a memory configuration range, etc., in addition to the processor model number and application type identification.
The tuning strategy matched with the specific scene can be rapidly positioned by establishing the index information, so that the reusability and the application efficiency of the tuning strategy are improved.
In the embodiment of the application, the processor identifier and the application type identifier of the current system can be compared with the tuning knowledge base to determine the general configuration item and the specific configuration item.
Under the condition that a target tuning strategy which is completely matched with the processor identifier and the application type identifier of the current system exists in the tuning knowledge base, parameters of the current system can be directly adjusted according to tuning items contained in the target tuning strategy.
Under the condition that the target tuning strategy matched with the processor identifier and the application type identifier of the current system does not exist in the tuning knowledge base, the universal tuning item matched with the current system can be determined depending on the tuning knowledge base. And carrying out system configuration by utilizing the universal tuning items, so that an application task is operated under the system configuration to realize tuning of the specific configuration items.
Fig. 4 is a flowchart of a method for tuning a specific configuration item of a current system according to an embodiment of the present application, where the method includes:
S401, general tuning items with mapping relation with the processor and application type of the current system are screened out from the tuning knowledge base.
In practical application, the processor identifier and the application type identifier under the current system can be extracted first.
The processor identifier can comprise hardware characteristic information such as a processor model, a main frequency, memory configuration and the like, and the application type identifier can comprise application characteristic information such as an application name, a version number, a task load type and the like.
And in the tuning knowledge base, carrying out query matching according to the extracted processor identifier and the application type identifier. The query algorithm should be able to efficiently search a large scale tuning knowledge base and quickly return matching results.
For example, a hash table-based query algorithm may be used to combine the processor model and application type identifier into a unique hash key value, and the corresponding tuning policy may be quickly located through the hash key value. The current system has a specific scene corresponding to the current system, and if the query matching is successful, namely, a tuning strategy which is completely matched with the specific scene is found in a tuning knowledge base, the corresponding tuning strategy is directly output.
If the query matching is unsuccessful, i.e. a tuning strategy that is completely matched with the specific scene is not found in the tuning knowledge base, the processor and the application type in the scene are analyzed. And determining universal tuning items suitable for the processor and the application type under the scene according to tuning rules in the tuning knowledge base and combining the processor and the application type of the scene.
For example, for a scenario in which a new ARM architecture processor runs a memory intensive application, corresponding general tuning items such as a memory management parameter, a cache policy, and the like are set according to tuning policies related to the ARM architecture processor and the memory intensive application in the general tuning rules.
And S402, taking the general tuning items with mapping relation with the processor and the application type of the current system as general configuration items, and taking the rest tunable parameters except the general tuning items in all the tunable parameters contained in the current system as specific configuration items.
For convenience of distinction, a general tuning item having a mapping relation with a processor and an application type of the current system may be used as a general configuration item.
In addition to the general configuration items, the remaining adjustable parameters contained by the current system may be taken as specific configuration items.
S403, carrying out system configuration according to the general configuration items, and running application tasks after completing the system configuration.
For the system configuration of the specific configuration item, the running environment and the application setting can be constructed according to the configuration information contained in the general configuration item, and the application task is run under the running environment and the application setting.
S404, according to the use condition of system resources, performance indexes and power consumption data in the running process of the application task, the specific configuration items are adjusted to obtain the adjusted specific configuration items.
In practical application, the actual utilization rate of various resources in the running process of the application task can be counted according to the monitoring time window and the sampling frequency corresponding to the application task. And recording the actual performance index in the running process of the application task. And recording actual power consumption data in the running process of the application task by using a power consumption testing tool.
Under the condition that the actual utilization rate, the actual performance index and the actual power consumption data of various resources do not meet the optimization target of the current system, performing iterative adjustment on the specific configuration items according to the actual utilization rate of various resources and the set parameter adjustment rule so as to obtain the adjusted specific configuration items of the actual utilization rate, the actual performance index and the actual power consumption data of various resources, wherein the actual utilization rate, the actual performance index and the actual power consumption data of various resources meet the optimization target of the current system.
The system resource usage, the performance index, the power consumption data acquisition mode and the configuration item tuning mode in the application task operation process are similar to the system resource usage, the performance index, the power consumption data acquisition mode and the configuration item tuning mode in the test task operation process, and the description of S301 to S304 can be referred to, and will not be repeated here.
In an actual system environment, configuring a system according to a general configuration item, then performing positive and negative adjustment test on a specific configuration item, evaluating performance, power consumption and resource use conditions under different configuration item settings, and finally determining optimal specific configuration item parameters. And integrating the general tuning items and the specific configuration items after tuning, so that a complete tuning strategy under the current system can be formed.
In the embodiment of the application, the tuning workload and complexity are effectively reduced by constructing the tuning knowledge base covering multiple processors and application types, and only tuning a specific small number of configuration items under the current system on the basis of the general configuration items when parameter tuning is performed on the current system by depending on the tuning knowledge base.
After the parameters of the current system are adjusted according to the general configuration items and the adjusted specific configuration items, the adjustment strategy matched with the current system can be obtained according to the general configuration items and the adjusted specific configuration items. And storing index information of the current system and a matching tuning strategy thereof into a tuning knowledge base, wherein the index information can comprise any one or combination of a processor model and an application type identifier.
By adding the new tuning strategy and the index information thereof into the tuning knowledge base, the continuous updating and perfecting of the tuning knowledge base are realized. After the tuning knowledge base can cover enough scenes, the tuning strategy completely matched with the system can be directly obtained by searching the tuning knowledge base.
In the embodiment of the application, different functional modules can be divided according to the functions required to be realized in the system parameter tuning process. Fig. 5 is a block diagram of an overall method framework for tuning system parameters, which is provided by the embodiment of the application, and includes a system static analysis module, a system dynamic analysis module, a soft and hard integrated tuning module, a tuning effect evaluation module, a tuning knowledge base construction module and a tuning module facing specific scenes.
To cover a variety of processor and application types, the system static analysis module may analyze the various processor features and extract hardware platform/application tunable parameters.
The system dynamic analysis module is used for monitoring the use condition of system resources when the application runs, wherein the system resources can comprise a processor, a memory, a storage and the like.
The soft and hard integrated tuning module comprises hardware tuning, basic input and output system tuning, basic software tuning and upper layer application tuning.
The tuning effect evaluation module is used for performing performance evaluation, power consumption evaluation and resource use evaluation when the task runs.
Continuous iterative optimization of configuration items can be realized through the mutual coordination of the system dynamic analysis module, the soft and hard integrated tuning module and the tuning effect evaluation module.
The tuning knowledge base construction module constructs a general tuning knowledge base and a tuning strategy base oriented to specific scenes. The universal tuning knowledge base contains tuning rules related to various processor architectures/types and tuning rules related to various application types.
The tuning knowledge base construction module distinguishes the general tuning items irrelevant to the processor/application type and the specific tuning items relevant to the processor/application type by analyzing whether all the tuning items depend on the specific processor and application type. For example, for an adjustment of the operating frequency of a processor, it is deemed to be dependent on a particular processor type if the adjustment is based on the performance characteristics of the particular processor, and for an input parameter optimization for an upper layer application, it is deemed to be dependent on a particular application type if the parameter is set for the functional requirements of the particular application. In this way, the generic tuning items are distinguished from the specific tuning items.
And analyzing the mapping relation between the general tuning items and the processor/application characteristics for the general tuning items irrelevant to the processor/application types, constructing and guiding the tuning rules of the configuration items with the same software and hardware characteristics, and forming a general tuning knowledge base. For example, for a memory management parameter tuning item of an operating system, its association with different processor architectures such as x86, ARM, etc. and different application types such as CPU intensive, memory intensive, etc. is analyzed to determine which processor and application type combinations the generic tuning item is applicable to. And according to the analysis result of the mapping relation, formulating and guiding a configuration item tuning rule with the same software and hardware characteristics. These tuning rules can describe in detail how to set the corresponding tuning terms under what hardware and software characteristic conditions to achieve the best performance and power consumption balance. For example, for a processor with a multi-level cache structure, when running a memory-intensive application, the cache management parameters of the operating system should be set.
The tuning rules are organized into a universal tuning knowledge base which should have good organization and retrieval functions for quick query and application of the tuning rules. Along with the continuous generation of new tuning strategies, new tuning rules are added into a tuning knowledge base in time, so that timeliness and accuracy of the tuning knowledge base are ensured.
For the special tuning item related to the processor/application type, key information in the tuning item can be extracted, including a processor model, an application identifier such as an application name, a version number and the like, specific parameter settings of the tuning item, tuning effect evaluation data and the like. And (5) sorting and summarizing the information to form a structured tuning scheme record. And establishing a mapping relation between the tuning scheme and the processor model/application identifier. And realizing the associated storage of the tuning scheme, the processor model and the application identifier by constructing a database table. For example, a tuning scheme table is created in the database, which contains fields such as a processor model, an application identifier, tuning item parameters, and tuning effects, and each tuning scheme is associated with a specific processor model and application identifier by a primary key or unique index.
According to the embodiment of the application, the tuning schemes under different scenes are constructed into the knowledge base, so that the loss of tuning experience and the repeated workload are avoided. After the tuning knowledge base is continuously perfected and can cover enough scenes, the tuning scheme can be directly obtained through searching the tuning knowledge base. The tuning knowledge base supports tuning in various processor and application type scenes, the tuning scheme is flexible, has good portability, and reduces tuning workload and complexity.
In practical application, each new tuning scheme can be added into a tuning strategy library according to the established mapping relation. And carrying out regular maintenance and management on the scheme library, including data backup, redundant data cleaning, updating of the tuning scheme and the like, so as to ensure efficient operation and data integrity of the scheme library.
The tuning module facing to the specific scene can acquire the universal tuning item matched with the current specific scene from the tuning knowledge base acquisition module, and the remaining configuration items are the special configuration items of the processor platform and the special configuration items of the application. Only the special configuration items are optimized. For a small number of special configuration items in the scene, the configuration items can be tuned by a soft and hard integrated tuning module, a tuning effect evaluation module and a system dynamic analysis module, and the tuned special configuration items and the customized universal tuning items together form a tuning scheme in the scene.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment.
Fig. 6 is a schematic structural diagram of a system parameter tuning device according to an embodiment of the present application, which includes a first obtaining unit 61, a first adjusting unit 62, a second obtaining unit 63, a tuning unit 64, and a second adjusting unit 65;
A first obtaining unit 61, configured to obtain a first tuning policy according to configuration items of multiple processors and application types;
The first adjusting unit 62 is configured to adjust the configuration item in the first tuning policy to obtain a second tuning policy;
A second obtaining unit 63, configured to obtain a tuning knowledge base according to the relevance between each configuration item and the processor and the application type in the second tuning policy;
the tuning unit 64 is configured to tune a specific configuration item of the current system by using a general configuration item matched with the current system in a tuning knowledge base;
The second adjusting unit 65 is configured to adjust parameters of the current system according to the general configuration item and the optimized specific configuration item.
In some embodiments, the first obtaining unit is configured to obtain feature parameters and adjustable parameters of multiple processors and application types, where the adjustable parameters at least include any one or any combination of the hardware platform, the basic input/output system, the basic software, and the adjustable parameters corresponding to the upper layer application, the feature parameters at least include any one or any combination of the feature parameters of the processor, the feature parameters of the memory system, and the feature parameters of the storage device, and obtain a first tuning policy covering multiple processors and application types according to the influence relationship between each adjustable parameter and performance and power consumption, and the feature parameters of the multiple processors and application types.
In some embodiments, the first adjusting unit is configured to perform system configuration according to the first tuning strategy, and run the test task after completing the system configuration, and adjust configuration items in the first tuning strategy according to the use condition of system resources, performance indexes and power consumption data in the running process of the test task, so as to obtain the second tuning strategy.
In some embodiments, the first adjusting unit is configured to construct a system environment according to the configuration items included in the first tuning policy, and dynamically run the benchmark test program under the constructed system environment.
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 used for counting the utilization rate of various resources in the running process of the test task according to the set monitoring time window and the sampling frequency;
the performance recording subunit is used for recording performance indexes in the running process of the test task, wherein the performance indexes at least comprise any one or combination of execution time of the task and the number of completed transactions in unit time;
the power consumption recording subunit is used for recording the power consumption data of the whole machine in the running process of the test task by using the power consumption testing tool;
And the iteration adjustment subunit is used for carrying out iteration adjustment on the configuration items in the first adjustment strategy according to the utilization rate of various resources and the set parameter adjustment rule under the condition that the utilization rate of various resources does not meet the set utilization rate condition, the performance index does not meet the set performance condition or the power consumption data of the whole machine does not meet the set power consumption condition, so as to obtain a second adjustment strategy that the utilization rate of various resources meets the set utilization rate condition, the performance index meets the set performance condition and the power consumption data of the whole machine meets the set power consumption condition.
In some embodiments, for the monitoring time window and the setting of the sampling frequency, the apparatus further comprises a period determining unit, a time determining unit and a frequency determining unit;
The period determining unit is used for determining the execution period or the maximum execution duration of the test task according to the application scene and the task property of the test task;
the time determining unit is used for determining a 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 proportion;
The frequency determining unit is used for determining the sampling frequency corresponding to each execution stage of the test task based on the dynamic characteristics of the required monitoring resources, the monitoring precision requirement and the execution stage of the test task.
In some embodiments, the resource statistics subunit is configured to record, according to sampling frequencies corresponding to each of the various resources, a usage rate of each of the various resources at each sampling point in the monitoring time window.
In some embodiments, a fitting unit is also included;
And the fitting unit is used for fitting the utilization rate of each type of resource at each sampling point by using a data fitting mode by taking time as an abscissa and the utilization rate of the resource as an ordinate so as to obtain a utilization rate curve graph corresponding to each type of resource.
In some embodiments, the system further comprises a judging unit and a counting unit;
the judging unit is used for judging whether the utilization rate of various resources at each sampling point exceeds the corresponding water line range;
And the statistics unit is used for recording the utilization rate, the occurrence time and the duration time of the target resource exceeding the corresponding water line range under the condition that the target resource exceeding the corresponding water line range exists, and counting the operation time proportion of the target resource exceeding the water line range.
In some embodiments, the statistics unit is configured to determine a first accumulation duration according to a start time point and an end time point of a time segment of the target resource with a usage rate lower than a lowest water line, determine a second accumulation duration according to a start time point and an end time point of a time segment of the target resource with a usage rate higher than a highest water line, and divide a sum of the first accumulation duration and the second accumulation duration by a duration of the monitoring time window to obtain an operation time proportion of the target resource exceeding a range of the water line.
In some embodiments, each type of resource at least comprises any one or any combination of a processor, a memory and a storage resource, and the device further comprises a water line determining unit aiming at setting the water line range corresponding to each type of resource;
The water level line determining unit is used for determining a water level line range corresponding to the processor according to the task type and the priority of the test task and the performance information of the processor, determining the water level line range corresponding to the memory according to the data storage requirement and the memory access mode of the test task, and determining the water level line range corresponding to the storage resource according to the data read-write quantity of the test task and the performance information of the storage device.
In some embodiments, the tuning knowledge base includes a generic tuning knowledge base and a specific tuning policy base;
The second obtaining unit comprises a screening subunit, a general obtaining subunit, an extracting subunit and a specific obtaining subunit;
the screening subunit is used for screening general tuning items which have no dependency relationship with the processor and the application type and specific tuning items which have dependency relationship with the processor and the application type from the second tuning strategy;
The general obtaining subunit is used for obtaining a general tuning knowledge base according to the mapping relation between the general tuning items and the processor and the application types in the second tuning strategy;
The extraction subunit is used for extracting the processor model and the application type identifier associated with the specific tuning item from the second tuning strategy;
the specific obtaining subunit is used for obtaining the specific tuning strategy library based on the specific tuning item and the corresponding processor model and application type identifier.
In some embodiments, the tuning unit includes a matching subunit, a configuration subunit, and a tuning subunit;
the matching subunit is used for comparing the processor identifier and the application type identifier of the current system with the tuning knowledge base to determine a general configuration item and a specific configuration item;
the configuration subunit is used for carrying out system configuration according to the general configuration items and running application tasks after completing the system configuration;
and the adjusting subunit is used for adjusting the specific configuration item according to the use condition of the system resource, the performance index and the power consumption data in the running process of the application task so as to obtain the adjusted specific configuration item.
In some embodiments, the matching subunit is configured to screen, in the case that a target tuning policy matching the processor identifier and the application type identifier of the current system does not exist in the tuning knowledge base, a generic tuning item having a mapping relationship with the processor and the application type of the current system from the tuning knowledge base, take the generic tuning item having a mapping relationship with the processor and the application type of the current system as a generic configuration item, and take the remaining tunable parameters except the generic tuning item out of all the tunable parameters included in the current system as a specific configuration item.
In some embodiments, further comprising a parameter adjustment unit;
And the parameter adjusting unit is used for adjusting the parameters of the current system according to the tuning items contained in the target tuning strategy under the condition that the target tuning strategy matched with the processor identifier and the application type identifier of the current system exists in the tuning knowledge base.
In some embodiments, the configuration subunit is configured to construct a running environment and an application setting according to configuration information contained in the general configuration item, and run an application task under the running environment and the application setting.
In some embodiments, the adjusting subunit is configured to count actual utilization rates of various resources in an application task running process according to a monitoring time window and a sampling frequency corresponding to the application task, record actual performance indexes in the application task running process, record actual power consumption data in the application task running process by using a power consumption testing tool, and iteratively adjust a specific configuration item according to the actual utilization rates of various resources and a set parameter adjustment rule under the condition that the actual utilization rates, the actual performance indexes and the actual power consumption data of various resources do not meet an optimization target of a current system, so as to obtain the actual utilization rates, the actual performance indexes and the actual power consumption data of various resources after the actual utilization rates, the actual performance indexes and the actual power consumption data of various resources meet the optimization target of the current system.
In some embodiments, the method further comprises a policy obtaining unit and a storage unit;
the strategy obtaining unit is used for obtaining the tuning strategy matched with the current system according to the general configuration item and the specific configuration item after tuning;
the storage unit is used for storing index information of the current system and matching tuning strategies thereof into a tuning knowledge base, wherein the index information at least comprises any one or combination of a processor model and an application type identifier.
According to the technical scheme, the first tuning strategy is obtained according to configuration items of various processors and application types. Considering that in an actual execution environment, the first tuning strategy may deviate from the actual situation, so that configuration items in the first tuning strategy can be adjusted to obtain the second tuning strategy. In the tuning process, the optimization targets of multiple dimensions such as resource use condition, performance, power consumption and the like are considered, and the obtained tuning strategy has practicability. And obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy and the processor and the application type. The tuning knowledge base is obtained according to tuning strategies covering various processors and application types, tuning under various processor and application type scenes can be supported, and the tuning strategies are flexible and have good portability. In practical application, the general configuration items matched with the current system in the tuning knowledge base can be utilized to tune the specific configuration items of the current system, and the parameters of the current system are adjusted according to the general configuration items and the specific configuration items after tuning. When parameter tuning is performed on the current system by relying on a tuning knowledge base, only a specific small number of configuration items under the current system are required to be tuned on the basis of general configuration items, so that tuning workload and complexity are greatly reduced. And as the specific scenes covered by the tuning knowledge base are more and more, parameter tuning can be realized only by directly matching tuning strategies under the specific scenes in the tuning knowledge base.
The description of the features in the embodiment corresponding to the tuning device of the system parameter can refer to the related description of the embodiment corresponding to the tuning method of the system parameter, which is not described in detail herein.
An embodiment of the application also provides an electronic device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of the tuning method embodiment of any of the system parameters described above.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of the tuning method embodiments of any of the system parameters described above when run.
In an exemplary embodiment, the computer readable storage medium may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, etc. various media in which a computer program may be stored.
Embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of an embodiment of a method for tuning any of the system parameters described above.
Embodiments of the present application also provide another computer program product comprising a non-volatile computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of an embodiment of a method for tuning any one of the system parameters described above.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method, the device, the equipment, the storage medium and the product for optimizing the system parameters provided by the application are described in detail. The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present application and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.

Claims (20)

1. A method for optimizing system parameters, comprising:
Obtaining a first tuning strategy according to configuration items of various processors and application types;
Adjusting configuration items in the first tuning strategy to obtain a second tuning strategy;
obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy to the processor and the application type;
Tuning a specific configuration item of the current system by utilizing a general configuration item matched with the current system in the tuning knowledge base;
and adjusting the parameters of the current system according to the general configuration items and the optimized specific configuration items.
2. The method of tuning system parameters according to claim 1, wherein obtaining a first tuning strategy according to configuration items of a plurality of processors and application types comprises:
The method comprises the steps of obtaining characteristic parameters and adjustable parameters of various processors and application types, wherein the adjustable parameters at least comprise any one or any combination of the adjustable parameters corresponding to a hardware platform, a basic input and output system, basic software and upper-layer application, and the characteristic parameters at least comprise any one or any combination of the characteristic parameters of the processor, the characteristic parameters of a memory system and the characteristic parameters of storage equipment;
And obtaining a first tuning strategy covering the various processors and the application types according to the influence relation of the adjustable parameters, the performance and the power consumption and the characteristic parameters of the various processors and the application types.
3. The method for tuning system parameters according to claim 1, wherein adjusting the configuration item in the first tuning policy to obtain the second tuning policy includes:
Performing system configuration according to the first tuning strategy, and running a test task after completing the system configuration;
And adjusting configuration items in the first tuning strategy according to the use condition of system resources, performance indexes and power consumption data in the running process of the test task so as to obtain a second tuning strategy.
4. The method for tuning system parameters according to claim 3, wherein performing system configuration according to the first tuning policy, and running test tasks after completing system configuration comprises:
constructing a system environment according to configuration items contained in the first tuning strategy;
The benchmark program is run dynamically in the constructed system environment.
5. The method for tuning system parameters according to claim 3, wherein adjusting the configuration item in the first tuning strategy according to the system resource usage, the performance index and the power consumption data in the running process of the test task to obtain the second tuning strategy comprises:
According to the set monitoring time window and sampling frequency, counting the utilization rate of various resources in the running process of the test task;
Recording performance indexes in the running process of the test task, wherein the performance indexes at least comprise any one or combination of execution time of the task and the number of completed transactions in unit time;
Recording the power consumption data of the whole machine in the running process of the test task by using a power consumption test tool;
And under the condition that the utilization rate of various resources does not meet the set utilization rate condition, the performance index does not meet the set performance condition or the whole power consumption data does not meet the set power consumption condition, carrying out iterative adjustment on the configuration items in the first adjustment strategy according to the utilization rate of various resources and the set parameter adjustment rule so as to obtain a second adjustment strategy that the utilization rate of various resources meets the set utilization rate condition, the performance index meets the set performance condition and the whole power consumption data meets the set power consumption condition.
6. The method for tuning system parameters according to claim 5, wherein for the monitoring time window and the setting of the sampling frequency, the method further comprises:
Determining the execution period or the maximum execution duration of the test task according to the application scene and the task property of the test task;
Determining a 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 proportion;
and determining the sampling frequency corresponding to each execution stage of the test task based on the dynamic characteristics of the required monitoring resources, the monitoring precision requirement and the execution stage of the test task.
7. The method for optimizing system parameters according to claim 5, wherein counting the utilization rate of various resources during the running process of the test task according to the set monitoring time window and the sampling frequency comprises:
and recording the utilization rate of each type of resource at each sampling point in the monitoring time window according to the sampling frequency corresponding to each type of resource.
8. The method for optimizing system parameters according to claim 7, wherein after recording the usage rate of each type of resource at each sampling point in the monitoring time window according to the sampling frequency corresponding to each type of resource, further comprising:
And fitting the utilization rate of each type of resource at each sampling point by using a data fitting mode with time as an abscissa and the utilization rate of the resource as an ordinate so as to obtain a utilization rate curve graph corresponding to each type of resource.
9. The method for optimizing system parameters according to claim 7, wherein after recording the usage rate of each type of resource at each sampling point in the monitoring time window according to the sampling frequency corresponding to each type of resource, further comprising:
judging whether the utilization rate of various resources at each sampling point exceeds the corresponding water line range;
And under the condition that the target resource exceeding the corresponding water line range exists, recording the utilization rate, the occurrence time and the duration time of the target resource exceeding the corresponding water line range, and counting the operation time proportion of the target resource exceeding the water line range.
10. The method of claim 9, wherein counting the proportion of run time of the target resource beyond the water line range comprises:
determining a first accumulation duration according to a starting time point and an ending time point of a time segment of which the utilization rate of the target resource is lower than the lowest water line;
Determining a second accumulation duration according to a starting time point and an ending time point of a time segment of which the utilization rate of the target resource is higher than that of the highest water line;
Dividing the sum of the first accumulation duration and the second accumulation duration by the duration of a monitoring time window to obtain the running time proportion of the target resource exceeding the range of the water line.
11. The method for optimizing system parameters according to claim 9, wherein each type of resource at least comprises any one or any combination of a processor, a memory and a storage resource, and the method further comprises, for each type of resource, setting a corresponding water line range:
Determining a water line range corresponding to the processor according to the task type and the priority to which the test task belongs and the performance information of the processor;
Determining a water line range corresponding to the memory according to the data storage requirement and the memory access mode of the test task;
and determining a water line range corresponding to the storage resource according to the data read-write quantity of the test task and the performance information of the storage device.
12. The tuning method of system parameters according to claim 1, wherein the tuning knowledge base comprises a general tuning knowledge base and a specific tuning strategy base;
Obtaining a tuning knowledge base according to the relevance of each configuration item in the second tuning strategy to the processor and the application type comprises:
screening universal tuning items which do not have a dependency relationship with the processor and the application type from the second tuning strategy, and specific tuning items which have a dependency relationship with the processor and the application type;
Obtaining a general tuning knowledge base according to the mapping relation between the general tuning items and the processor and the application types in the second tuning strategy;
Extracting a processor model and an application type identifier associated with the specific tuning item from the second tuning strategy;
and obtaining a specific tuning strategy library based on the specific tuning item and the corresponding processor model and application type identifier thereof.
13. The method for tuning system parameters according to claim 1, wherein tuning a specific configuration item of a current system using a generic configuration item matched with the current system in the tuning knowledge base comprises:
Comparing the processor identifier and the application type identifier of the current system with the tuning knowledge base to determine a general configuration item and a specific configuration item;
performing system configuration according to the general configuration items, and running application tasks after completing the system configuration;
And adjusting the specific configuration item according to the use condition of system resources, performance indexes and power consumption data in the running process of the application task so as to obtain the adjusted specific configuration item.
14. The method of tuning system parameters according to claim 13, wherein comparing processor identification and application type identification of a current system with the tuning knowledge base to determine general configuration items and specific configuration items comprises:
Under the condition that a target tuning strategy matched with the processor identifier and the application type identifier of the current system does not exist in the tuning knowledge base, universal tuning items with mapping relations with the processor and the application type of the current system are screened out from the tuning knowledge base;
taking a general tuning item with a mapping relation with a processor and an application type of a current system as a general configuration item;
and taking the remaining adjustable parameters except the general adjustment items in all the adjustable parameters contained in the current system as specific configuration items.
15. The method for tuning system parameters according to claim 13, wherein the adjusting the specific configuration item according to the system resource usage, the performance index and the power consumption data in the running process of the application task to obtain the tuned specific configuration item comprises:
according to the monitoring time window and sampling frequency corresponding to the application task, the actual utilization rate of various resources in the running process of the application task is counted;
recording an actual performance index in the running process of the application task;
recording actual power consumption data in the running process of the application task by using a power consumption testing tool;
under the condition that the actual utilization rate, the actual performance index and the actual power consumption data of various resources do not meet the optimization target of the current system, iteratively adjusting the specific configuration item according to the actual utilization rate of various resources and the set parameter adjustment rule to obtain the specific configuration item after the actual utilization rate, the actual performance index and the actual power consumption data of various resources meet the optimization target of the current system.
16. The method for tuning system parameters according to any one of claims 1 to 15, further comprising, after tuning the parameters of the current system according to the generic configuration item and the tuned specific configuration item:
Obtaining a tuning strategy matched with the current system according to the general configuration item and the tuned specific configuration item;
And storing index information of the current system and a matching tuning strategy thereof into a tuning knowledge base, wherein the index information at least comprises any one or combination of a processor model and an application type identifier.
17. The system parameter tuning device is characterized by comprising a first obtaining unit, an adjusting unit, a second obtaining unit, a tuning unit and an adjusting unit;
the first obtaining unit is used for obtaining a first tuning strategy according to configuration items of various processors and application types;
The adjusting unit is used for adjusting 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 policy and the processor and the application type;
The tuning unit is used for tuning the specific configuration items of the current system by utilizing the universal configuration items matched with the current system in the tuning knowledge base;
The adjusting unit is used for adjusting the parameters of the current system according to the general configuration item and the optimized specific configuration item.
18. An electronic device, comprising:
a memory for storing a computer program;
Processor for implementing the steps of a method for tuning system parameters according to any one of claims 1 to 16 when executing said computer program.
19. A computer-readable storage medium, in which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the steps of a 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 a method for tuning system parameters according to any one of claims 1 to 16.
CN202510847288.4A 2025-06-24 2025-06-24 System parameter tuning method, device, equipment, storage medium and product Active CN120371532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510847288.4A CN120371532B (en) 2025-06-24 2025-06-24 System parameter tuning method, device, equipment, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510847288.4A CN120371532B (en) 2025-06-24 2025-06-24 System parameter tuning method, device, equipment, storage medium and product

Publications (2)

Publication Number Publication Date
CN120371532A true CN120371532A (en) 2025-07-25
CN120371532B CN120371532B (en) 2025-09-19

Family

ID=96451888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510847288.4A Active CN120371532B (en) 2025-06-24 2025-06-24 System parameter tuning method, device, equipment, storage medium and product

Country Status (1)

Country Link
CN (1) CN120371532B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536461A (en) * 2018-03-13 2018-09-14 Oppo广东移动通信有限公司 Resource regeneration method, device, terminal and storage medium
CN110825629A (en) * 2019-10-31 2020-02-21 深圳市商汤科技有限公司 Parameter tuning method and related device
CN113760766A (en) * 2021-09-10 2021-12-07 曙光信息产业(北京)有限公司 MPI parameter tuning method and device, storage medium and electronic equipment
CN116126546A (en) * 2023-04-12 2023-05-16 阿里云计算有限公司 Performance optimization method and device, electronic equipment and medium
CN116932417A (en) * 2023-09-18 2023-10-24 新华三信息技术有限公司 Performance tuning method and device
WO2024082853A1 (en) * 2022-10-18 2024-04-25 超聚变数字技术有限公司 Method and system for application performance optimization in high-performance computing
CN119759481A (en) * 2025-03-07 2025-04-04 阿里云计算有限公司 Performance tuning method, device, cloud server, storage medium, and program product

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536461A (en) * 2018-03-13 2018-09-14 Oppo广东移动通信有限公司 Resource regeneration method, device, terminal and storage medium
CN110825629A (en) * 2019-10-31 2020-02-21 深圳市商汤科技有限公司 Parameter tuning method and related device
CN113760766A (en) * 2021-09-10 2021-12-07 曙光信息产业(北京)有限公司 MPI parameter tuning method and device, storage medium and electronic equipment
WO2024082853A1 (en) * 2022-10-18 2024-04-25 超聚变数字技术有限公司 Method and system for application performance optimization in high-performance computing
CN116126546A (en) * 2023-04-12 2023-05-16 阿里云计算有限公司 Performance optimization method and device, electronic equipment and medium
CN116932417A (en) * 2023-09-18 2023-10-24 新华三信息技术有限公司 Performance tuning method and device
CN119759481A (en) * 2025-03-07 2025-04-04 阿里云计算有限公司 Performance tuning method, device, cloud server, storage medium, and program product

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TAO CHEN 等: "Adapting Multi-objectivized Software Configuration Tuning", 《PROCEEDINGS OF THE ACM ON SOFTWARE ENGINEERING》, vol. 1, 12 July 2024 (2024-07-12), pages 539 - 561, XP098165199, DOI: 10.1145/3643751 *
周成龙: "面向性能调优的配置项推荐技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 07, 15 July 2024 (2024-07-15), pages 138 - 63 *
欧阳美旺 等: "ARM架构下数据库迁移的中间件性能优化策略实现", 《智能建筑与智慧城市》, no. 04, 25 April 2021 (2021-04-25), pages 45 - 48 *

Also Published As

Publication number Publication date
CN120371532B (en) 2025-09-19

Similar Documents

Publication Publication Date Title
Jeon et al. Analysis of {Large-Scale}{Multi-Tenant}{GPU} clusters for {DNN} training workloads
EP2956858B1 (en) Periodicity optimization in an automated tracing system
Herodotou et al. Profiling, what-if analysis, and cost-based optimization of mapreduce programs
US9367601B2 (en) Cost-based optimization of configuration parameters and cluster sizing for hadoop
US9767006B2 (en) Deploying trace objectives using cost analyses
US9658936B2 (en) Optimization analysis using similar frequencies
US9720941B2 (en) Fully automated SQL tuning
Rosa et al. Predicting and mitigating jobs failures in big data clusters
US9031826B2 (en) Method and apparatus for simulating operation in a data processing system
US20130283102A1 (en) Deployment of Profile Models with a Monitoring Agent
US20130111267A1 (en) Optimizing regression testing based on code coverage analysis
CN109117164B (en) Microservice update method and system based on difference analysis of key elements
CN103649938B (en) Management work load in multiprocessing computer system
Chen et al. Retail: Opting for learning simplicity to enable qos-aware power management in the cloud
CN105283848A (en) Application Tracing with Distributed Objects
CN113138841B (en) A resource scheduling method and a resource scheduling system
WO2023011236A1 (en) Compilation optimization method for program source code, and related product
CN109992468B (en) Process performance analysis method, device and system and computer storage medium
KR101830936B1 (en) Performance Improving System Based Web for Database and Application
Kiran et al. Execution time prediction of imperative paradigm tasks for grid scheduling optimization
CN119621511A (en) Performance analysis method, system and storage medium for distributed services
Foroni et al. Moira: A goal-oriented incremental machine learning approach to dynamic resource cost estimation in distributed stream processing systems
Rao et al. Online measurement of the capacity of multi-tier websites using hardware performance counters
CN120371532B (en) System parameter tuning method, device, equipment, storage medium and product
Qi et al. Data mining based root-cause analysis of performance bottleneck for big data workload

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant