WO2019019926A1 - 系统参数的优化方法、装置及设备、可读介质 - Google Patents

系统参数的优化方法、装置及设备、可读介质 Download PDF

Info

Publication number
WO2019019926A1
WO2019019926A1 PCT/CN2018/095557 CN2018095557W WO2019019926A1 WO 2019019926 A1 WO2019019926 A1 WO 2019019926A1 CN 2018095557 W CN2018095557 W CN 2018095557W WO 2019019926 A1 WO2019019926 A1 WO 2019019926A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
parameters
target
model
acquired
Prior art date
Application number
PCT/CN2018/095557
Other languages
English (en)
French (fr)
Inventor
金卓军
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019019926A1 publication Critical patent/WO2019019926A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, an apparatus, and a device, and a readable medium for optimizing system parameters.
  • the terminal runs a system that includes various applications.
  • the system parameters of the system may be fixed to an optimal value when the accessed system is started, and the optimal value is generally system development.
  • the personnel select the parameter values after performance analysis for different combinations of system parameters.
  • the present application provides a method, an apparatus, and a device, and a readable medium for optimizing system parameters.
  • a method for optimizing system parameters including the steps of:
  • the system parameters are optimized based on the acquired health and performance metrics.
  • an electronic device including:
  • a memory that stores processor executable instructions
  • the processor is coupled to the memory for reading program instructions stored in the memory, and in response, performing the following operations:
  • the system parameters are optimized based on the acquired health and performance metrics.
  • an apparatus for optimizing system parameters includes:
  • a system parameter obtaining module configured to acquire system parameters of the target system in a running state
  • a running state obtaining module configured to acquire an operating state of the target system under the system parameter
  • a performance indicator obtaining module configured to obtain performance indicators of the target system under the system parameter
  • a parameter optimization module for optimizing the system parameters based on the acquired operating conditions and performance indicators.
  • one or more machine readable medium having stored thereon instructions that, when executed by one or more processors, cause the terminal device to perform the method described above.
  • the embodiment provided by the present application is implemented to acquire system parameters, operating conditions, and performance indicators of the system when the system is running, and then use the obtained operating conditions and performance indicators as a basis for optimizing current system parameters, and consider the current actual operating conditions of the system.
  • the system parameters can be continuously optimized in time when the operating conditions change, so the optimized system parameters are more in line with the actual operating environment, and further, if the optimized system parameters are updated to the target system, the system can be effectively improved. Operational efficiency and fluency.
  • FIG. 1 is a flowchart of a method for optimizing system parameters shown in an exemplary embodiment of the present application
  • FIG. 2 is a block diagram of an intelligent system for implementing optimization of system parameters, according to an exemplary embodiment of the present application
  • FIG. 3 is a logic block diagram of an apparatus for optimizing parameters of a system according to an exemplary embodiment of the present application
  • FIG. 4 is a hardware structural diagram of an electronic device in which an optimization device for system parameters is shown in an exemplary embodiment of the present application.
  • first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the present application.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or "when” or "in response to determination.”
  • system developers generally configure multiple parameter values for each system parameter in the stage of developing the system. By referring to different parameter values of the configuration, various system parameters are combined to form parameter values. Different sets of system parameters are different, and then the performance analysis of the system is performed for each set of system parameters. Based on the performance analysis results, the parameter values of the best performing system parameters are selected as the optimal values.
  • the system parameters of the system can be fixed to an optimal value when the accessed system is started.
  • the operating status of the system changes with the user's access, and the system status corresponding to the optimal value is not always maintained during the development phase. If the system parameters are fixed at the most selected stage of the development phase. Excellent value, the system is prone to the phenomenon of stuttering. Therefore, it is necessary to adjust the system parameters with the operation of the system to achieve online optimization of system parameters.
  • the solution of the present application taking into account the interaction between different system parameters, the influence of various system parameters on system performance, and the different operating environments of the system, can obtain system parameters, operating conditions and performance indicators of the system when the system is running, and then The obtained running status and performance indicators are used as the basis for optimizing the current system parameters, and then the system parameters are updated based on the optimized system parameters, and the system parameters can be adjusted in time according to changes in the system regardless of the operating state of the system. Therefore, regardless of whether the users of the electronic devices running the system are the same, or the difference between the hardware configuration and the driver implementation, the system parameters that are compatible with the current operating environment of the system can be optimized, thereby effectively improving the operating efficiency and smoothness of the system.
  • FIG. 1 is a flowchart of optimization of system parameters according to an exemplary embodiment of the present application.
  • the embodiment may include the following steps S101-S103:
  • Step S101 Obtain system parameters of the target system in an operating state.
  • Step S102 Obtain an operation status and a performance indicator of the target system under the system parameter.
  • Step S103 Optimize the system parameter based on the acquired operating conditions and performance indicators.
  • the embodiments of the present application can be applied to electronic devices such as smart phones, personal digital assistants, media players, navigation devices, game consoles, tablet computers, wearable devices, digital televisions, desktop computers, etc., for target systems running within these devices.
  • System parameters are optimized.
  • the target system mentioned here may be a system or an operating system involved in the application, or a subsystem included in the operating system, such as a graphics system, a memory management system, a process management system, a power management system, an input/output system, and the like.
  • the target system may also include a robot control system, a financial system, a power control system, and the like.
  • the previously configured system parameters are no longer adapted to the current operational requirements of the target system. It can obtain the running parameters of the target system when it is running, and the running status and performance indicators of the target system when it is running under the control of the operating parameters.
  • the obtained system parameters, health status and performance indicators are also different.
  • the system parameters may include the cache capacity of the required resources, and the redraw callback. At least one of the delay, input event resampling delay, and the resources required for rendering herein include textures, layers, vertices, and framebuffer objects.
  • the acquired system parameters may also include vertical sync signal phase differences applied to the synthesizer, or other parameters that affect the performance of the target system.
  • the specific parameter may be requested from the parameter adjustment module of the target system, or may be stored in the predetermined storage area after the parameter adjustment module completes the parameter adjustment, and then read from the predetermined storage area when the system parameter is optimized. Take system parameters.
  • the performance indicator may include at least one of a screen refresh rate, a frame skip rate, an application drawing frame rate, and an input delay, and the performance indicators may measure the smoothness of the system operation, and the user.
  • the experience is closely related.
  • different performance test tools can be used to test the performance of the target system in operation, and the test results are used as performance indicators.
  • the health status is used to reflect changes in the state of the system, which may include the number of CPUs, CPU frequency, number of GPUs, GPU frequency, number of foreground processes, memory usage, and workload. At least one.
  • memory usage and system power consumption can also be used as performance indicators.
  • the health of the system can be queried through a status query tool such as Task Manager.
  • the operating conditions and performance indicators may be optimized, and the acquired system parameters are adjusted according to a predetermined function between the operating conditions of the target system and its system parameters, and the output is optimized. System parameters.
  • the obtained operating conditions and performance indicators can be substituted into the predetermined function to obtain optimized system parameters.
  • the predetermined function can be obtained by data fitting.
  • the designer of the solution can set a plurality of system parameters for the target system in advance, and obtain operating conditions and performance indicators based on each system parameter set. Try to adjust the system parameters according to the predetermined range, and then obtain the running status and performance indicators according to the adjusted system parameters. If the adjusted operating conditions and performance indicators are better than the operating conditions and performance indicators obtained before the adjustment, continue to increase the predetermined range. If the adjusted running status and performance indicators are inferior to the obtained operating conditions and performance indicators before the adjustment, the predetermined range is decreased, and if there is no change, the predetermined amplitude is determined to correspond to the running status and performance indicators acquired before the adjustment. System parameter adjustment range.
  • the system optimization model can also be used to optimize system parameters.
  • the acquired system parameter may be used as a parameter in the system optimization model that affects the operating condition of the target system, and the operating status is used as the system.
  • the acquired system parameters, operating conditions, and performance indicators may be converted into operations of the target system according to the system optimization model.
  • system parameters may be optimized in other ways, and the implementation of the present application does not limit this.
  • the system optimization model can be an algorithm model that optimizes the nonlinear system, such as a conditional random field model, a decision tree model, and an enhanced learning algorithm.
  • the enhanced learning algorithm involves enhancing learning, and the problem of enhancing learning consideration is the task of interaction between the Agent Agent (object with behavior ability) and the environment, for example: a robotic arm needs to pick up a mobile phone, then the robot arm The object includes the mobile phone as the environment, the robot arm senses the environment through an external camera, and then the robot arm needs an output action to realize the task of picking up the mobile phone.
  • the Agent Agent the object with behavior
  • the enhanced learning algorithm can model it.
  • the interaction task of the robot arm is taken as an example.
  • the action set is mapped to the state set by the information perceived by the camera, and the feedback measuring the quality change of the environment is mapped into a reward function.
  • the designer of the present application refers to the enhanced learning algorithm to model the interactive task, and can preferentially use the enhanced learning algorithm to optimize the system parameters, and prior to optimizing the system parameters, the user's access process to the target system is corresponding to the interaction process in the learning algorithm.
  • the operating state of the system running process (such as the resource occupancy rate) will change, corresponding to the environmental state in the enhanced learning algorithm.
  • the set, and the change of the running state reflects the performance of the system by the performance index of the system, corresponding to the reward function in the enhanced learning algorithm.
  • the designer of the present application can find the enhanced learning by considering the fit of the algorithm and the target system.
  • the algorithm has a high degree of fit with the parameter optimization problem to be solved in the present application.
  • the enhanced learning algorithm can be used to optimize the system parameters of the target system in operation, and the acquired system parameters can be converted into an action set of the enhanced learning algorithm before optimization. Transfer the acquired health status To enhance the state set learning algorithm, the performance indicators were converted to enhance the return function learning algorithm.
  • the Markov decision process model can be used.
  • the model can be expressed as a quintuple (S, A, P, R, ⁇ ), where S refers to the state set, A refers to the action set, and P refers to the state.
  • Transfer model R refers to the return function
  • refers to the discount factor, generally in the range of (0,1), can be set according to the actual optimization needs. The following describes how to convert the system parameters, health and performance indicators of the graphics system into the action set, environment state set and reward function of the Markov decision process model:
  • the operating conditions can be vectorized first.
  • the operating conditions mentioned here may include the number of CPUs, the CPU frequency, the number of GPUs, the GPU frequency, the number of foreground processes, Memory usage, workload, etc., can be represented by vector or matrix when vectorizing, and the dimensions of each operating condition in the vector or matrix can be set as needed.
  • an n-dimensional vector is defined, the first dimension corresponds to the number of CPUs, the second dimension corresponds to the CPU frequency, the third dimension corresponds to the number of GPUs, and so on.
  • the data range of different operating conditions may be quite different.
  • the number of CPUs is generally less than 10
  • the GPU frequency is about 1G
  • the memory usage is generally expressed in decimals, and is less than 1. If the operating conditions with excessive difference in value range are placed in the same vector, affecting the solution process of the model, in order to solve this problem, various operating conditions can be normalized to a fixed range, such as between 0 and 1. And then vectorize.
  • a linear function or a sigmoid function can be used in normalization.
  • a single system parameter can be used to correspond to a single dimension of the action space
  • n system parameters correspond to n-dimensional continuous action spaces.
  • the adjustment problem of n system parameters is converted into the optimal value search problem in the n-dimensional continuous action space.
  • the system parameters mentioned here may include the buffer capacity for rendering the required resources, the redraw callback delay, and the input event resampling delay.
  • the process of converting performance indicators into a reward function Considering that each performance index reflecting the fluency of the system may affect each other, the performance indicators can be weighted into a reward function.
  • the performance mentioned here. Indicators can include screen refresh rate, frame skip rate, application rendering frame rate, and input delay.
  • the designer can first scale the performance indicators to a predetermined range of values, such as 0 to 1, and then set the weighting factor values of the performance indicators based on the importance of each performance indicator to the target system. Or set the weighting factor of each performance indicator to the same value, as long as the sum of the weighting factors of ownership is 1 .
  • ⁇ 1 , ⁇ 2 , ..., ⁇ k are used to represent each performance index
  • ⁇ 1 , ⁇ 2 , ..., ⁇ k are used to represent the weighting factors of each performance index
  • the weighting result may be set to perform a constraint condition, for example, when the target system is stuck under the control of the system parameter, the weighting result is negative; the target When the system does not appear to be stuck when running under the control of the system parameters, the weighting result is 1. If the system parameter is updated every n frames, the time period for measuring whether the target system is stuck or not is the playback time of the n-frame image. In other examples, in addition to the stuck phenomenon, other factors that may affect the user experience may also be considered, such as: when the application loses frame phenomenon, or when the user input to the corresponding graphic output delay is too large, the weighted result is negative, and vice versa. The weighted result is 1.
  • the system's memory usage and power consumption can also be used as a combination factor of the reward function.
  • state sets, action sets, and reward functions can be represented by the following expressions:
  • the present application can use the model-free algorithm when optimizing the system parameters of the target system, regardless of the Markov decision process model state transition model.
  • the converted action set, the environment state set, and the reward function may be converted.
  • Input enhanced learning algorithms for model solving After obtaining the solution result of the model, the solution result is converted into the optimized system parameter, and the parameter is updated to the target system, so that the self-learning and self-evolution of the system parameter can be realized in the running process of the target system.
  • the depth enhancement learning algorithm can be used to solve the parameters to optimize the parameters. Since the system parameter optimization of the present application is the optimal value search problem in the n-dimensional continuous action space, in order to obtain more accurate optimization results, A strategy learning algorithm for solving a continuous action space in a depth enhancement algorithm, such as a Deep Deterministic Policy Gradient (DDPG) algorithm, which enhances the Actor-Critic algorithm in learning, may be employed. Combined with deep learning, it is a strategy learning algorithm suitable for continuous action space.
  • DDPG Deep Deterministic Policy Gradient
  • the DDPG Deep Deterministic Policy Gradient
  • the Actor-Critic algorithm is a product of combining the Actor-Critic algorithm in enhanced learning with deep learning. It is a strategy learning algorithm suitable for continuous action space.
  • DDPG combines deep learning.
  • Both Critic and Actor are represented by deep neural networks. The main functions of these two networks are to approximate the Q function Q(s, a
  • the Q function represents the cumulative return expectation when action a is taken under state s
  • the strategy function represents the action taken under state s.
  • the basic idea of the algorithm is to first define the objective function from an initial state and performs the cumulative discount return policy [mu], denoted by J ( ⁇ ), the cumulative discount reward is defined for each step (performed action a t in state s t) in the The sum of the rewards obtained (ie, the value of the reward function under the current state and the action pair).
  • the parameters of the Q function and the strategy function network can be randomly initialized, and then in each step, a random noise is added through the current strategy function (noise is to make the agent not limited Suboptimal solution, explore better solution) to get the current action, perform the action to get the return value and the next state.
  • the current set of state and action Q function values can be estimated according to the recursive definition of the Q function.
  • the parameter of the Q function corresponding network is corrected by the estimated value, so that the Q function network can be closer to the true value, and then the Q function is compared with the strategy according to the gradient of the Q function relative to the current action and the gradient of the strategy function relative to the function parameter.
  • the gradient of the function parameter which represents the direction in which the Q function is larger, so the gradient is added to the current parameter estimate to correct the current strategy function parameters, which can be executed cyclically.
  • the initial value of the system parameter can be set to the optimal value selected by the developer in the development stage.
  • the system parameters of the target system can be updated to the optimized system parameters, thereby improving the operating efficiency and fluency of the system.
  • FIG. 2 is a block diagram of an intelligent system for implementing system parameter optimization of a target system, which may include an agent 250 and parameters respectively connected to the agent 250, according to an exemplary embodiment of the present application.
  • the adjustment module 220, the status query module 230, and the performance test module 240, the parameter adjustment module 220, the status query module 230, and the performance test module 240 respectively interact with the target system.
  • the graphics system 210 is targeted.
  • the parameter adjustment module 220 is configured to adjust system parameters of the graphics system 210, such as: buffer capacity for rendering required resources, redraw callback delay, input event resampling delay, and the like. If a request from the user to access the graphics system 210 is received, the initial value of the system parameters of the graphics system 210 can be set to the optimal value selected by the system developer during the system development phase and sent to the agent 250.
  • the status query module 230 is configured to query the running status of the graphic system 210, such as the number of CPUs, the CPU frequency, the number of GPUs, the GPU frequency, the number of foreground processes, the memory usage, and the workload.
  • the tool for querying the running status of the system during the running of the graphic system 210, the status querying module 230 can query the running status of the graphic system 210 every predetermined time period, such as 30 minutes, and query the obtained items.
  • the health status is sent to the agent 250.
  • the performance testing module 240 is configured to test performance indicators that can measure the running fluency of the graphics system 210, such as: screen refresh rate, frame skip rate, application drawing frame rate, input delay, etc., and can be integrated with various test systems.
  • the performance indicator module 240 can perform a test on the performance index of the graphics system 210 every predetermined period of time, such as: 30 minutes, and send the performance indicators of the test. Go to the agent 250.
  • the agent 250 can model the system parameter optimization problem of the graphic system 210 by using the Markov decision process model, and convert the system parameters, the running status and the performance index of the graphic system into the action set and the environment state respectively during the modeling. Set and return functions. After the modeling is completed, the agent 250 can solve the built model by using the deep learning engine 251, and then convert the solution result into the optimized system parameters, and send it to the parameter adjustment module 220.
  • the parameter adjustment module 220 After receiving the optimized system parameters, the parameter adjustment module 220 updates it to the graphics system 210 to continue the operation of the graphics system under the control of the optimized system parameters.
  • the present application also provides an embodiment of an optimization device for system parameters.
  • FIG. 3 is a logic block diagram of an apparatus for optimizing parameters of a system according to an exemplary embodiment of the present application.
  • the apparatus may include: a system parameter acquisition module 310, a performance acquisition module 320, a performance indicator acquisition module 330, and parameter optimization. Module 340.
  • the system parameter obtaining module 310 is configured to acquire system parameters of the target system in an operating state.
  • the operation obtaining module 320 is configured to obtain an operating status of the target system under the system parameter.
  • the performance indicator obtaining module 330 is configured to obtain performance indicators of the target system under the system parameters.
  • the parameter optimization module 340 is configured to optimize the system parameters based on the acquired operating conditions and performance indicators.
  • a predetermined system optimization model is employed to optimize the acquired system parameters.
  • the acquired system parameter is used as a parameter in the system optimization model that affects the operating condition of the target system, and the operating condition is used as a degree of influence of the reaction system parameter on the target system in the system optimization model.
  • the parameter is used as a function of the performance of the target system in the system optimization model.
  • the parameter optimization module 340 can also be used to:
  • the optimized system parameters are output.
  • the system optimization model includes an enhanced learning algorithm.
  • the enhanced learning algorithm includes a Markov decision process model, the acquired system parameters are taken as a set of actions of the model, the operational status is taken as a state set of the model, and the performance indicator is used as a reward function of the model.
  • the system optimization model uses a deep enhancement learning algorithm to solve the model.
  • the depth enhancement learning algorithm includes a depth deterministic policy gradient DDPG algorithm.
  • the reward function is a weighted result of various performance metrics.
  • the weighting result is negative; if the target system does not appear to be stuck under the control of the system parameter, then The weighted result is 1.
  • the target system includes at least one of the following:
  • the operating system includes at least one of the following:
  • Graphics system memory management system, process management system, power management system, input and output system.
  • the system parameters include at least one of the following:
  • the performance indicator includes at least one of the following:
  • the operating status includes at least one of the following:
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units or modules described as separate components may or may not be physically separate, and the components displayed as units or modules may or may not be physical units. Or modules, which can be located in one place, or distributed to multiple network units or modules. Some or all of the modules may be selected according to actual needs to achieve the objectives of the present application. The general system developers in the field can understand and implement without any creative work.
  • Embodiments of the optimization device of the system parameters of the present application can be applied to an electronic device.
  • This can be implemented by a computer chip or an entity, or by a product having a certain function.
  • the electronic device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device. , game consoles, tablets, wearables, Internet TVs, smart locomotives, smart home devices, or a combination of any of these devices.
  • the device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software.
  • a processor of the electronic device in which it is located reads a corresponding computer program instruction in a readable medium such as a non-volatile memory into a memory.
  • a hardware level as shown in FIG. 4, a hardware structure diagram of an electronic device in which the optimization device of the system parameter is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG.
  • the electronic device in which the device is located in the embodiment may also include other hardware according to the actual function of the electronic device, and details are not described herein.
  • the memory of the electronic device may store the processor-executable instructions; the processor may couple the memory for reading the program instructions stored by the memory, and in response, perform the operations of: acquiring system parameters of the target system in the running state; The operating conditions and performance indicators of the target system under the system parameters; optimizing the system parameters based on the acquired operating conditions and performance indicators.
  • the operations performed by the processor may be referred to the related description in the foregoing method embodiments, and details are not described herein.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种系统参数的优化方法、装置及设备、可读介质,所述方法包括:获取处于运行状态的目标系统的系统参数(S101);获取所述目标系统在所述系统参数下的运行状况和性能指标(S102);基于所获取的运行状况和性能指标优化所述系统参数(S103)。其可以在系统运行时,根据系统的运行状况和性能指标及时优化出符合实际运行环境的系统参数。

Description

系统参数的优化方法、装置及设备、可读介质
本申请要求2017年07月27日递交的申请号为201710624571.6、发明名称为“系统参数的优化方法、装置及设备、可读介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及系统参数的优化方法、装置及设备、可读介质。
背景技术
随着互联网技术的发展,诸如手机、平板电脑、智能可穿戴设备等终端的使用也日益广泛。终端运行的系统除操作系统外,还包括各种应用程序涉及的系统。用户访问终端中的相应系统时,为了保证当前被访问的系统的使用流畅度,可以在启动该被访问的系统时将该系统的系统参数固定到最优值,该最优值一般是系统开发人员在系统开发阶段,针对系统参数的不同组合进行性能分析后选出的参数值。
但是,在系统运行过程中,系统的运行状况会发生变化,不同参数之间除彼此互相影响外,还会共同对系统性能产生影响,因此,系统开发阶段所选的最优值难以持续满足系统的运行需求。
发明内容
有鉴于此,本申请提供一种系统参数的优化方法、装置及设备、可读介质。
根据本申请实施例的第一方面,提供一种系统参数的优化方法,包括步骤:
获取处于运行状态的目标系统的系统参数;
获取所述目标系统在所述系统参数下的运行状况和性能指标;
基于所获取的运行状况和性能指标优化所述系统参数。
根据本申请实施例的第二方面,提供一种电子设备,包括:
处理器;
存储处理器可执行指令的存储器;
其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:
获取处于运行状态的目标系统的系统参数;
获取所述目标系统在所述系统参数下的运行状况和性能指标;
基于所获取的运行状况和性能指标优化所述系统参数。
根据本申请实施例的第三方面,提供一种系统参数的优化装置,包括:
系统参数获取模块,用于获取处于运行状态的目标系统的系统参数;
运行状况获取模块,用于获取所述目标系统在所述系统参数下的运行状况;
性能指标获取模块,用于获取所述目标系统在所述系统参数下的性能指标;
参数优化模块,用于基于所获取的运行状况和性能指标优化所述系统参数。
根据本申请实施例的第四方面,提供一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得终端设备执行以上所述的方法。
实施本申请提供的实施例,在系统运行时,获取系统的系统参数、运行状况和性能指标,然后将获取的运行状况和性能指标作为优化当前系统参数的依据,考虑了系统目前实际的运行状况,并且可以在运行状况发生变化时不断的对系统参数及时进行优化,因此优化后的系统参数更加符合实际的运行环境,进而,如果将优化后的系统参数更新到目标系统,可以有效提高系统的运行效率和流畅度。
附图说明
图1是本申请一示例性实施例示出的系统参数的优化方法的流程图;
图2是本申请一示例性实施例示出的用于实现系统参数的优化的智能系统的框图;
图3是本申请一示例性实施例示出的系统参数的优化装置的逻辑框图;
图4是本申请一示例性实施例示出的系统参数的优化装置所在电子设备的硬件结构图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施 例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
随着计算机技术的发展,电子设备内运行的系统越来越多,系统提供的功能也越来越多,影响系统性能的系统参数相应变多。考虑到系统参数对系统性能的影响,系统开发人员在开发系统的阶段,一般会为每项系统参数配置多种参数值,参照配置的不同参数值,将各项系统参数进行组合,构成参数值各不相同的多组系统参数,然后针对每组系统参数对系统进行性能分析,基于性能分析结果选出性能最好的一组系统参数的参数值为最优值。这样在用户访问电子设备中的系统时,可以在启动该被访问的系统时将该系统的系统参数固定到最优值。但是,在系统运行过程中,系统的运行状况会随着用户的访问发生变化,不会一直保持在开发阶段选取最优值时所对应的系统状况,如果系统参数固定在开发阶段所选的最优值,系统很容易出现卡顿现象。所以需要随着系统的运行调节系统参数,实现系统参数的在线优化。
目前一般由系统开发人员基于自身的技术储备来手动调节系统参数。但是系统运行时不同系统参数之间除彼此互相影响外,还会共同对系统性能产生影响,在调节系统参数时除考虑系统当前的运行状况外,还需要考虑不同系统参数之间的相互制约。而系统开发人员在手动调节系统参数时难以快速有效的分析出系统参数之间的制约关系,因此,系统开发人员耗时耗力手动调节的系统参数,仍难以有效满足系统的运行需求。
此外,同一系统在不同电子设备上运行时,由于面对的用户、驱动实现和硬件配置(如CPU处理能力、屏幕尺寸、内存容量等)不完全相同,系统开发人员在某一电子设备上调节所得的系统参数,难以适用于其他电子设备上运行的统一系统。若要及时对多个电子设备的系统参数进行调节,满足系统的运行需求,需要多个系统开发人员对不同 电子设备的系统参数进行手动调节,这样调节系统参数将耗费巨大的人工和时间,而且系统开发人员手动调节参数往往趋向于数值取整,调节所得的参数值的精度较低,因此调节所得后系统参数也难以有效满足系统的运行需求。本申请针对如何快速有效的调节系统参数提出解决方案。
本申请的方案,考虑到不同系统参数间的相互影响、各系统参数对系统性能的影响、以及系统运行环境的不同,可以在系统运行时,获取系统的系统参数、运行状况和性能指标,然后将获取的运行状况和性能指标作为优化当前系统参数的依据,再基于优化后的系统参数更新所述系统参数,无论系统的运行状况如何变化,都能跟随其变化不断的对系统参数及时进行调整,因此无论运行系统的电子设备的用户是否相同,还是硬件配置和驱动实现的差异大小,都能优化出与系统目前实际的运行环境相契合的系统参数,有效提高系统的运行效率和流畅度。
请参阅图1,图1是本申请一示例性实施例示出的系统参数的优化的流程图,该实施例可以包括以下步骤S101-S103:
步骤S101、获取处于运行状态的目标系统的系统参数。
步骤S102、获取所述目标系统在所述系统参数下的运行状况和性能指标。
步骤S103、基于所获取的运行状况和性能指标优化所述系统参数。
本申请实施例可以应用于智能电话、个人数字助理、媒体播放器、导航设备、游戏控制台、平板计算机、可穿戴设备、数字电视、台式计算机等电子设备,对这些设备内运行的目标系统的系统参数进行优化。这里提到的目标系统可以是应用程序涉及的系统或操作系统,也可以是操作系统所含的子系统,例如:图形系统,内存管理系统,进程管理系统,电源管理系统,输入输出系统等。在其他场景中,目标系统还可以包括机器人控制系统、金融系统、电力控制系统等。
在优化系统参数时,考虑到用户与运行中的目标系统的交互、以及目标系统运行时面对的运行环境,均会造成在先配置的系统参数不再适应目标系统当前的运行需求。可以获取目标系统处于运行状态时的运行参数、以及该目标系统在该运行参数的控制下运行时的运行状况和性能指标。
对于不同的目标系统,所获取的系统参数、运行状况和性能指标也有所不同,例如:目标系统为操作系统所含的图形系统时,系统参数可以包括渲染所需资源的缓存容量、重绘回调时延、输入事件重采样时延中的至少一项,这里提到的渲染所需的资源包括纹理、层、顶点和帧缓冲区对象等。在其他例子中,获取的系统参数还可以包括应用于合 成器中的垂直同步信号相位差、或者其他影响目标系统性能的参数。具体获取时可以从目标系统的参数调整模块请求这些系统参数,也可以在参数调整模块完成参数调整后,将系统参数存储至预定的存储区域,进行系统参数优化时再从该预定的存储区域读取系统参数。
目标系统为操作系统所含的图形系统时,性能指标可以包括屏幕刷新率、跳帧率、应用绘制帧率和输入延迟中的至少一项,这些性能指标可以衡量系统运行的流畅度,与用户体验密切相关。针对不同的目标系统,可以采用不同的性能测试工具对运行中的目标系统进行性能测试,将测试结果作为性能指标。
目标系统为操作系统所含的图形系统时,运行状况用于反应系统状态的变化,可以包括CPU个数、CPU频率、GPU个数、GPU频率、前台进程数量、内存占用率和工作负载中的至少一项。某些例子中,为了防止系统参数的优化过程过于追求性能而导致内存占用过大、能耗过高,还可以将内存使用率和系统功耗作为性能指标。在某些例子中,可以通过任务管理器等状态查询工具查询系统的运行状况。
在获取到系统参数、运行状况和性能指标后,可以运行状况和性能指标为优化依据,按所述目标系统的运行状况与其系统参数间的预定函数,调整所获取的系统参数后,输出优化后的系统参数。调整时,可以将所获取的运行状况和性能指标代入该预定函数,获得优化后的系统参数。
该预定函数可以通过数据拟合方式获得的,具体获取该预定函数时,本方案设计人员可以预先针对目标系统设定多个系统参数,基于设定的每个系统参数获取运行状况和性能指标,按预定幅度尝试调整系统参数,再按调整后的系统参数获取运行状况和性能指标,如果调整后获取的运行状况和性能指标优于调整前获取的运行状况和性能指标,那么继续增大预定幅度,如果调整后获取的运行状况和性能指标劣于调整前获取的运行状况和性能指标,则降低预定幅度,如果没有变化,则确定该预定幅度是与调整前获取的运行状况和性能指标对应的系统参数调整幅度。这样按不同的预定幅度,经过多次尝试和循环操作,得到多组运行状况、性能指标和调整后的系统参数,然后基于得到的各组数据进行数据拟合,得出所述目标系统的运行状况与其系统参数间的函数为预定函数。
此外,在获取到系统参数、运行状况和性能指标后,还可以采用预定的系统优化模型优化系统参数。某些例子中,采用预定的系统优化模型优化系统参数前,可以将所获取的系统参数作为所述系统优化模型中影响所述目标系统的运行状况的参数,将所述运行状况作为所述系统优化模型中反应系统参数对所述目标系统的影响程度的参数,将所 述性能指标作为所述系统优化模型中衡量所述目标系统的运行状况的好坏的函数。
优化系统参数时,可以在基于所获取的运行状况和性能指标优化所述系统参数时,根据所述系统优化模型,将所获取的系统参数、运行状况和性能指标转换为所述目标系统的运行状况到其系统参数的映射关系;然后根据所述映射关系调整所获取的系统参数后,输出优化后的系统参数,输出的系统参数可以指调整所得的参数。在其他例子中,还可以采取其他方式优化系统参数,本申请实施对此不做限制。
为了提高优化效率,需要考虑模型与目标系统的契合度,目标系统不同时所采用的模型可以有所不同,在某些例子中,目标系统的系统参数优化可以归结为非线性系统的控制优化问题,所以,系统优化模型可以是条件随机场模型、决策树模型、增强学习算法等对非线性系统进行优化的算法模型。
其中,增强学习算法涉及到增强学习,增强学习考虑的问题是智能体Agent(具备行为能力的物体)和环境之间交互的任务,比如:一个机械臂要拿起一个手机,那么机械臂周围的物体包括手机就是环境,机械臂通过外部的摄像头来感知环境,然后机械臂需要输出动作来实现拿起手机这个任务。对于智能体Agent(具备行为能力的物体)和环境之间交互,增强学习算法可以将其模型化,具体模型化时,以机械臂拿手机的交互任务为例,将机械臂需要输出的动作映射成动作集合,将通过摄像头感知的信息映射成状态集,将衡量环境变化的好坏的反馈映射成回报函数。
本申请的设计人员参照增强学习算法对交互任务的模型化过程,可以优先采用增强学习算法来优化系统参数,在优化系统参数前,将用户对目标系统的访问过程对应增强学习算法中的交互过程,用户访问目前系统前,调整系统参数控制目标系统的运行,对应于增强学习算法中的动作,系统运行过程系统的运行状况(如资源占用率)会产生变化,对应增强学习算法中的环境状态集,而运行状况的变化,由系统的性能指标反映运行状况的好坏,对应于增强学习算法中的回报函数,因此,本申请设计人员考虑到算法与目标系统的契合度,可以发现增强学习算法与本申请的所要解决的参数优化问题的契合度较高,可以采用增强学习算法对运行中目标系统的系统参数进行优化,优化前可以将获取的系统参数转换为增强学习算法的动作集合,将获取的运行状况转换为增强学习算法的状态集,将性能指标分别转换为增强学习算法的回报函数。
实际应用中,由于目标系统运行时,面对的用户、驱动实现和硬件配置可能不完全相同,在对各类目标系统的系统参数进行优化时,可以选用不同类型的增强学习算法,如:目标系统为图形系统时,可以采用马尔科夫决策过程模型,该模型可表示为五元组 (S,A,P,R,γ),其中,S指状态集,A指动作集合,P指状态转移模型,R指回报函数,γ指折扣因子,一般在(0,1)范围内,可以根据实际的优化需求设定。以下描述如何将图形系统的系统参数、运行状况和性能指标,分别转换为马尔科夫决策过程模型的动作集合、环境状态集和回报函数:
一、将运行状况转换为环境状态集的过程:可以先对各运行状况进行进行向量化,这里提到的运行状况可以包括CPU个数、CPU频率、GPU个数、GPU频率、前台进程数量、内存占用率和工作负载等,进行向量化时可以将运行状况以向量或矩阵表示,各运行状况在向量或矩阵中的维度可以根据需要设定。例如:定义n维向量,第一维对应CPU个数,第二维对应CPU频率,第三维对应GPU个数,以此类推。在某些场景中,不同的运行状况的数据取值范围可能差别比较大,比如CPU个数一般在10以内,GPU频率在1G左右,而内存使用一般以小数表示,在1以内。如果将这种取值范围差异过大的运行状况放到同一向量中,影响模型的求解过程,为了解决这个问题,可以将各种运行状况归一化到固定的范围,比如0到1之间,然后在进行向量化。在归一化时可以采用线性函数或者逻辑(sigmoid)函数。
二、将系统参数转换为动作集合的过程:可以用单个系统参数对应动作空间的单个维度,将n个系统参数即对应n维的连续动作空间。将n个系统参数的调节问题转换为n维连续动作空间的中的最优值搜索问题。这里提到的系统参数可以包括渲染所需资源的缓存容量、重绘回调时延和输入事件重采样时延等。
三、将性能指标转为为回报函数的过程:考虑到体现系统运行流畅度的各项性能指标间有可能会相互影响制约,可以将各项性能指标加权组合为回报函数,这里提到的性能指标可以包括屏幕刷新率、跳帧率、应用绘制帧率和输入延迟等。加权组合前,设计人员可以先将各项性能指标缩放到预定的数值范围,如0到1之间,然后基于各性能指标对目标系统的重要程度设定各项性能指标的权重因子的数值,或者将各项性能指标的权重因子设定为相同数值,只要满足所有权重因子之和为1即可。例如:分别用η 12,...,η k表示各项性能指标,分别用λ 12,...,λ k表示各性能指标的权重因子,生成的加权结果为r=λ·η=λ 1η 12η 2+...+λ kη k
实际应用中,针对目标系统的运行状况,可以设定加权结果进行约束条件,例如:目标系统在所述系统参数的控制下运行时出现卡顿现象,则所述加权结果为负;所述目标系统在所述系统参数的控制下运行时没有出现卡顿现象,则所述加权结果为1。如果 系统参数每n帧更新一次,衡量目标系统是否出现卡顿现象的时间段即为n帧图像的播放时间。在其他例子中,除卡顿现象外,还可以考虑其他可能影响用户体验的因素,比如:出现应用丢帧现象、或者用户输入到相应图形输出延迟过大时,所述加权结果为负,反之所述加权结果为1。
在某些例子中,为了防止过于追求性能而导致的内存占用过大和能耗过高问题,还可以将系统的内存使用和功耗作为回报函数的组合因子。
综上,状态集、动作集合和回报函数可以分别用以下表达式表示:
Figure PCTCN2018095557-appb-000001
Figure PCTCN2018095557-appb-000002
r=λ·η=λ 1η 12η 2+...+λ kη k.
此外,本申请在对目标系统的系统参数进行优化时,可以采用model-free算法,不考虑马尔科夫决策过程模型状态转移模型。
本申请的实施例,在将获取的系统参数、运行状况和性能指标分别转换为增强学习算法的动作集合、环境状态集和回报函数后,可以将转换所得的动作集合、环境状态集和回报函数输入增强学习算法进行模型求解。在获得模型的求解结果后,将所述求解结果转换为优化后的系统参数,并更新参数到目标系统,即可在目标系统的运行过程中,实现系统参数的自我学习和自我演进。
在进行模型求解时,可以采用深度增强学习算法对其进行求解实现参数优化,由于本申请的系统参数优化为n维连续动作空间的中的最优值搜索问题,为了获得更精确的优化结果,可以采用深度增强算法中求解连续动作空间的策略学习算法,例如:深度确定性策略梯度DDPG(Deep Deterministic Policy Gradient)算法,该DDPG算法将增强学习中的行动者-评论家(Actor-Critic)算法与深度学习结合,是一种适用于连续动作空间的策略学习算法。
其中,DDPG(Deep Deterministic Policy Gradient)算法是将增强学习中的行动者-评论家(Actor-Critic)算法与深度学习结合的产物。是一种适用于连续动作空间的策略学习算法。同时DDPG结合了深度学习,Critic和Actor都用深度神经网络表示,这两个网络的主要作用是分别近似Q函数Q(s,a|θ Q)和策略函数μ(s|θ μ),θ为相应的函数参数。Q函数代表在状态s下采取动作a时的累积回报期望,策略函数代表在状态s下所采取的动作。该算法的基本思想是首先定义目标函数为从初始状态开始并执行策略μ 的累计折扣回报,记为J(μ),累积折扣回报定义为每一步(在状态s t下执行动作a t)中所获得回报(即回报函数在当前状态和动作对下的值)折扣之和。
Figure PCTCN2018095557-appb-000003
由于环境可能有随机性,所以这个值也是概率的。因此优化的目标即为最大化这个累积折扣回报的期望。很多的增强学习算法中会用到动作-值函数Q函数,可以用来表示在状态s t下执行动作a t后并在之后执行某个策略的累积折扣回报的期望,其中,Q函数如下:
Q(s t,a t)=Ε[R t|s t,a t]
Q函数的值越大,表示在该状态下选取该动作可能获得的回报累加越多。
为了获得能使该目标函数最大的策略函数参数,可以先随机初始化Q函数和策略函数网络的参数,然后在每一步中,通过当前策略函数加一个随机噪声(噪声是为了使智能体不局限于次优解,探索更优解)来得到当前动作,执行该动作得到回报值及下一状态,根据这些信息便可以根据Q函数的递归定义估计当前的一组状态和动作下的Q函数值,通过该估计值修正Q函数对应网络的参数,使得Q函数网络能更逼近真值,然后,根据Q函数相对于当前动作的梯度和策略函数相对于函数参数的梯度,求得Q函数相对于策略函数参数的梯度,该梯度即代表使得Q函数更大的方向,因此用该梯度加到当前的参数估计,来修正当前策略函数参数,该过程可以循环执行。
此外,为了进一步提高求解过程的收敛速度,可以将系统参数的初始值设定为开发人员在开发阶段选取的最优值。
通过上述实施例描述的系统参数优化过程,得到优化后的系统参数后,可以将目标系统的系统参数更新成优化后的系统参数,进而提高系统的运行效率和流畅度。
请参阅图2,图2是本申请一示例性实施例示出的用于实现目标系统的系统参数优化的智能系统的框图,该智能系统可以包括智能体250、以及分别与智能体250连接的参数调整模块220、状况查询模块230和性能测试模块240,参数调整模块220、状况查询模块230和性能测试模块240分别与目标系统交互,本实施例中以图形系统210为目标系统。
其中,参数调整模块220,用于调节图形系统210的系统参数,如:渲染所需资源的缓存容量、重绘回调时延、输入事件重采样时延等。如果接收到用户访问图形系统210的请求,可以将图形系统210的系统参数的初始值设定为系统开发人员在系统开发阶段 选取的最优值,并将该最优值发送到智能体250。
状况查询模块230,用于查询图形系统210的运行状况,如:CPU个数、CPU频率、GPU个数、GPU频率、前台进程数量、内存占用率和工作负载等,可以集成有各种用于查询系统的运行状况的工具,在图形系统210的运行过程中,状况查询模块230可以每隔预定时段,如:30分钟,对图形系统210的运行状况进行一次查询,并将查询所得的各项运行状况发送到智能体250。
性能测试模块240,用于测试能衡量图形系统210的运行流畅度的性能指标,如:屏幕刷新率、跳帧率、应用绘制帧率、输入延迟等,可以集成有各种用于测试系统的性能指标的工具,在图形系统210的运行过程中,性能测试模块240可以每隔预定时段,如:30分钟,对图形系统210的性能指标进行一次测试,并将测试所得的各项性能指标发送到智能体250。
智能体250,可以采用马尔科夫决策过程模型对图形系统210的系统参数优化问题进行建模,在建模时将图形系统的系统参数、运行状况和性能指标,分别转换为动作集合、环境状态集和回报函数。完成建模后智能体250可以采用深度学习引擎251对所建模型进行求解,然后将求解结果转换为优化后的系统参数,并发送到参数调整模块220。
参数调整模块220在接收到优化后的系统参数后,将其更新到图形系统210,以使图形系统在该优化后的系统参数的控制下继续运行。
与前述系统参数的优化方法的实施例相对应,本申请还提供了系统参数的优化装置的实施例。
参见图3,图3是本申请一示例性实施例示出的系统参数的优化装置的逻辑框图,该装置可以包括:系统参数获取模块310、运行状况获取模块320、性能指标获取模块330和参数优化模块340。
其中,系统参数获取模块310,用于获取处于运行状态的目标系统的系统参数。
运行状况获取模块320,用于获取所述目标系统在所述系统参数下的运行状况。
性能指标获取模块330,用于获取所述目标系统在所述系统参数下的性能指标。
参数优化模块340,用于基于所获取的运行状况和性能指标优化所述系统参数。
一些例子中,优化所获取的系统参数时采用预定的系统优化模型。
作为例子,所获取的系统参数被作为所述系统优化模型中影响所述目标系统的运行状况的参数,所述运行状况被作为所述系统优化模型中反应系统参数对所述目标系统的影响程度的参数,所述性能指标被作为所述系统优化模型中衡量所述目标系统的运行状 况好坏的函数。
作为例子,参数优化模块340还可以用于:
根据所述系统优化模型,将所获取的系统参数、运行状况和性能指标转换为所述目标系统的运行状况到其系统参数的映射关系;
根据所述映射关系调整所获取的系统参数后,输出优化后的系统参数。
作为例子,所述系统优化模型包括增强学习算法。
作为例子,所述增强学习算法包括马尔科夫决策过程模型,所获取的系统参数被作为模型的动作集合,所述运行状况被作为模型的状态集,所述性能指标被作为模型的回报函数。
作为例子,所述系统优化模型采用深度增强学习算法进行模型求解。
作为例子,所述深度增强学习算法包括深度确定性策略梯度DDPG算法。
一些例子中,所述回报函数为各项性能指标的加权结果。
作为例子,如果所述目标系统在所述系统参数的控制下出现卡顿现象,则所述加权结果为负;如果所述目标系统在所述系统参数的控制下没有出现卡顿现象,则所述加权结果为1。
另一些例子中,所述目标系统包括以下至少任一:
操作系统,应用程序所涉及的系统。
作为例子,所述操作系统包括以下至少任一:
图形系统,内存管理系统,进程管理系统,电源管理系统,输入输出系统。
作为例子,所述目标系统为所述图形系统时,所述系统参数包括以下至少任一:
缓存容量,重绘回调时延,输入事件重采样时延;
所述目标系统为所述图形系统时,所述性能指标包括以下至少任一:
屏幕刷新率,跳帧率,应用绘制帧率,输入延迟,内存使用率系统功耗;
所述目标系统为所述图形系统时,所述运行状况包括以下至少任一:
CPU个数,CPU频率,GPU个数,GPU频率,前台进程数量,内存占用率,工作负载。
上述装置中各个单元(或模块)的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件 说明的单元或模块可以是或者也可以不是物理上分开的,作为单元或模块显示的部件可以是或者也可以不是物理单元或模块,即可以位于一个地方,或者也可以分布到多个网络单元或模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请方案的目的。本领域普通系统开发人员在不付出创造性劳动的情况下,即可以理解并实施。
本申请系统参数的优化装置的实施例可以应用在电子设备上。具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现中,电子设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备、互联网电视、智能机车、智能家居设备或者这些设备中的任意几种设备的组合。
装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器等可读介质中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图4所示,为本申请系统参数的优化装置所在电子设备的一种硬件结构图,除了图4所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。电子设备的存储器可以存储处理器可执行指令;处理器可以耦合存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:获取处于运行状态的目标系统的系统参数;获取所述目标系统在所述系统参数下的运行状况和性能指标;基于所获取的运行状况和性能指标优化所述系统参数。
在其他实施例中,处理器所执行的操作可以参考上文方法实施例中相关的描述,在此不予赘述。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (46)

  1. 一种系统参数的优化方法,其特征在于,包括步骤:
    获取处于运行状态的目标系统的系统参数;
    获取所述目标系统在所述系统参数下的运行状况和性能指标;
    基于所获取的运行状况和性能指标优化所述系统参数。
  2. 根据权利要求1所述的方法,其特征在于,优化所获取的系统参数时采用设定的系统优化模型。
  3. 根据权利要求2所述的方法,其特征在于,所述系统优化模型包括增强学习算法。
  4. 根据权利要求2所述的方法,其特征在于,所获取的系统参数被作为所述系统优化模型中影响所述目标系统的运行状况的参数,所述运行状况被作为所述系统优化模型中反应系统参数对所述目标系统的影响程度的参数,所述性能指标被作为所述系统优化模型中衡量所述目标系统的运行状况的好坏的函数。
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述基于所获取的运行状况和性能指标优化所述系统参数,包括:
    根据所述系统优化模型,将所获取的系统参数、运行状况和性能指标转换为所述目标系统的运行状况到其系统参数的映射关系;
    根据所述映射关系调整所获取的系统参数后,输出优化后的系统参数。
  6. 根据权利要求3所述的方法,其特征在于,所述增强学习算法包括马尔科夫决策过程模型,所获取的系统参数被作为模型的动作集合,所述运行状况被作为模型的状态集,所述性能指标被作为模型的回报函数。
  7. 根据权利要求6所述的方法,其特征在于,所述马尔科夫决策过程模型采用深度增强学习算法进行模型求解。
  8. 根据权利要求7所述的方法,其特征在于,所述深度增强学习算法包括深度确定性策略梯度DDPG算法。
  9. 根据权利要求6所述的方法,其特征在于,所述回报函数为各项性能指标的加权结果。
  10. 根据权利要求9所述的方法,其特征在于,如果所述目标系统在所述系统参数的控制下出现卡顿现象,则所述加权结果为负;如果所述目标系统在所述系统参数的控制下没有出现卡顿现象,则所述加权结果为1。
  11. 根据权利要求1所述的方法,其特征在于,所述目标系统包括以下至少任一:
    操作系统,应用程序所涉及的系统。
  12. 根据权利要求11所述的方法,其特征在于,所述操作系统包括以下至少任一:
    图形系统,内存管理系统,进程管理系统,电源管理系统,输入输出系统。
  13. 根据权利要求12所述的方法,其特征在于,所述目标系统为所述图形系统时,所述系统参数包括以下至少任一:
    渲染所需资源的缓存容量,重绘回调时延,输入事件重采样时延。
  14. 根据权利要求12所述的方法,其特征在于,所述目标系统为所述图形系统时,所述性能指标包括以下至少任一:
    屏幕刷新率,跳帧率,应用绘制帧率,输入延迟。
  15. 根据权利要求14所述的方法,其特征在于,所述性能指标还包括内存使用率系统功耗。
  16. 根据权利要求12所述的方法,其特征在于,所述目标系统为所述图形系统时,所述运行状况包括以下至少任一:
    CPU个数,CPU频率,GPU个数,GPU频率,前台进程数量,内存占用率,工作负载。
  17. 一种电子设备,其特征在于,包括:
    处理器;
    存储处理器可执行指令的存储器;
    其中,所述处理器耦合于所述存储器,用于读取所述存储器存储的程序指令,并作为响应,执行如下操作:
    获取处于运行状态的目标系统的系统参数;
    获取所述目标系统在所述系统参数下的运行状况和性能指标;
    基于所获取的运行状况和性能指标优化所述系统参数。
  18. 根据权利要求17所述的电子设备,其特征在于,优化所获取的系统参数时采用设定的系统优化模型。
  19. 根据权利要求18所述的电子设备,其特征在于,所述系统优化模型包括增强学习算法。
  20. 根据权利要求18所述的电子设备,其特征在于,所获取的系统参数被作为所述系统优化模型中影响所述目标系统的运行状况的参数,所述运行状况被作为所述系统优化模型中反应系统参数对所述目标系统的影响程度的参数,所述性能指标被作为所述系 统优化模型中衡量所述目标系统的运行状况好坏的函数。
  21. 根据权利要求18至20中任一项所述的电子设备,其特征在于,所述处理器还被配置为执行以下操作:
    根据所述系统优化模型,将所获取的系统参数、运行状况和性能指标转换为所述目标系统的运行状况到其系统参数的映射关系;
    根据所述映射关系调整所获取的系统参数后,输出优化后的系统参数。
  22. 根据权利要求19所述的电子设备,其特征在于,所述增强学习算法包括马尔科夫决策过程模型,所获取的系统参数被作为模型的动作集合,所述运行状况被作为模型的状态集,所述性能指标被作为模型的回报函数。
  23. 根据权利要求22所述的电子设备,其特征在于,所述马尔科夫决策过程模型采用深度增强学习算法进行模型求解。
  24. 根据权利要求23所述的电子设备,其特征在于,所述深度增强学习算法包括深度确定性策略梯度DDPG算法。
  25. 根据权利要求22所述的电子设备,其特征在于,所述回报函数为各项性能指标的加权结果。
  26. 根据权利要求25所述的电子设备,其特征在于,如果所述目标系统在所述系统参数的控制下出现卡顿现象,则所述加权结果为负;如果所述目标系统在所述系统参数的控制下没有出现卡顿现象,则所述加权结果为1。
  27. 根据权利要求17所述的电子设备,其特征在于,所述目标系统包括以下至少任一:
    操作系统,应用程序所涉及的系统。
  28. 根据权利要求27所述的电子设备,其特征在于,所述操作系统包括以下至少任一:
    图形系统,内存管理系统,进程管理系统,电源管理系统,输入输出系统。
  29. 根据权利要求28所述的电子设备,其特征在于,所述目标系统为所述图形系统时,所述系统参数包括以下至少任一:
    渲染所需资源的缓存容量,重绘回调时延,输入事件重采样时延。
  30. 根据权利要求28所述的电子设备,其特征在于,所述目标系统为所述图形系统时,所述性能指标包括以下至少任一:
    屏幕刷新率,跳帧率,应用绘制帧率,输入延迟。
  31. 根据权利要求30所述的电子设备,其特征在于,所述性能指标还包括内存使用率系统功耗。
  32. 根据权利要求28所述的电子设备,其特征在于,所述目标系统为所述图形系统时,所述运行状况包括以下至少任一:
    CPU个数,CPU频率,GPU个数,GPU频率,前台进程数量,内存占用率,工作负载。
  33. 一种系统参数的优化装置,其特征在于,包括:
    系统参数获取模块,用于获取处于运行状态的目标系统的系统参数;
    运行状况获取模块,用于获取所述目标系统在所述系统参数下的运行状况;
    性能指标获取模块,用于获取所述目标系统在所述系统参数下的性能指标;
    参数优化模块,用于基于所获取的运行状况和性能指标优化所述系统参数。
  34. 根据权利要求33所述的装置,其特征在于,优化所获取的系统参数时采用设定的系统优化模型。
  35. 根据权利要求33所述的装置,其特征在于,所述系统优化模型包括增强学习算法。
  36. 根据权利要求34所述的装置,其特征在于,所获取的系统参数被作为所述系统优化模型中影响所述目标系统的运行状况的参数,所述运行状况被作为所述系统优化模型中反应系统参数对所述目标系统的影响程度的参数,所述性能指标被作为所述系统优化模型中衡量所述目标系统的运行状况好坏的函数。
  37. 根据权利要求34至36中任一项所述的装置,其特征在于,所述参数优化模块还用于:
    根据所述系统优化模型,将所获取的系统参数、运行状况和性能指标转换为所述目标系统的运行状况到其系统参数的映射关系;
    根据所述映射关系调整所获取的系统参数后,输出优化后的系统参数。
  38. 根据权利要求35所述的装置,其特征在于,所述增强学习算法包括马尔科夫决策过程模型,所获取的系统参数被作为模型的动作集合,所述运行状况被作为模型的状态集,所述性能指标被作为模型的回报函数。
  39. 根据权利要求38所述的装置,其特征在于,所述马尔科夫决策过程模型采用深度增强学习算法进行模型求解。
  40. 根据权利要求39所述的装置,其特征在于,所述深度增强学习算法包括深度确 定性策略梯度DDPG算法。
  41. 根据权利要求38所述的装置,其特征在于,所述回报函数为各项性能指标的加权结果。
  42. 根据权利要求41所述的装置,其特征在于,如果所述目标系统在所述系统参数的控制下出现卡顿现象,则所述加权结果为负;如果所述目标系统在所述系统参数的控制下没有出现卡顿现象,则所述加权结果为1。
  43. 根据权利要求33所述的装置,其特征在于,所述目标系统包括以下至少任一:
    操作系统,应用程序所涉及的系统。
  44. 根据权利要求43所述的装置,其特征在于,所述操作系统包括以下至少任一:
    图形系统,内存管理系统,进程管理系统,电源管理系统,输入输出系统。
  45. 根据权利要求44所述的装置,其特征在于,所述目标系统为所述图形系统时,所述系统参数包括以下至少任一:
    渲染所需资源的缓存容量,重绘回调时延,输入事件重采样时延;
    所述目标系统为所述图形系统时,所述性能指标包括以下至少任一:
    屏幕刷新率,跳帧率,应用绘制帧率,输入延迟,内存使用率系统功耗;
    所述目标系统为所述图形系统时,所述运行状况包括以下至少任一:
    CPU个数,CPU频率,GPU个数,GPU频率,前台进程数量,内存占用率,工作负载。
  46. 一个或多个机器可读介质,其特征在于,其上存储有指令,当由一个或多个处理器执行时,使得终端设备执行如权利要求1-16中任一项所述的方法。
PCT/CN2018/095557 2017-07-27 2018-07-13 系统参数的优化方法、装置及设备、可读介质 WO2019019926A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710624571.6 2017-07-27
CN201710624571.6A CN109308246A (zh) 2017-07-27 2017-07-27 系统参数的优化方法、装置及设备、可读介质

Publications (1)

Publication Number Publication Date
WO2019019926A1 true WO2019019926A1 (zh) 2019-01-31

Family

ID=65039984

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/095557 WO2019019926A1 (zh) 2017-07-27 2018-07-13 系统参数的优化方法、装置及设备、可读介质

Country Status (2)

Country Link
CN (1) CN109308246A (zh)
WO (1) WO2019019926A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020207268A1 (zh) * 2019-04-11 2020-10-15 腾讯科技(深圳)有限公司 数据库性能调整方法、装置、设备、系统及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377187A (zh) * 2020-03-09 2021-09-10 Oppo广东移动通信有限公司 功耗优化参数配置方法、装置、存储介质与电子设备
CN111652379B (zh) * 2020-05-29 2024-04-16 京东城市(北京)数字科技有限公司 模型管理方法、装置、电子设备及存储介质
EP4179479A4 (en) * 2020-08-14 2024-05-01 Siemens Ag PARAMETER OPTIMIZATION METHOD, DEVICE, AND STORAGE MEDIUM
CN112422651A (zh) * 2020-11-06 2021-02-26 电子科技大学 一种基于强化学习的云资源调度性能瓶颈预测方法
CN113032278B (zh) * 2021-04-19 2023-09-26 上海哔哩哔哩科技有限公司 应用程序的运行方式、终端设备的等级确认方法及装置
CN114911537A (zh) * 2022-05-10 2022-08-16 声呐天空资讯顾问有限公司 参数配置方法及系统、存储介质
CN116627433B (zh) * 2023-07-18 2024-01-09 鹏城实验室 Ai处理器实时的参数预测方法、系统、设备及介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103548375A (zh) * 2010-12-03 2014-01-29 华为技术有限公司 通信方法及装置
US8782341B1 (en) * 2012-06-29 2014-07-15 Emc Corporation Embedded advisory framework for storage configuration management
CN106250181A (zh) * 2016-07-27 2016-12-21 浪潮(北京)电子信息产业有限公司 一种Linux操作系统的性能优化方法及框架
CN106649070A (zh) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 一种对Linux系统运行性能的快速优化方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9251027B2 (en) * 2012-03-05 2016-02-02 Dell Productes L.P. Information handling system performance optimization system
US20150370227A1 (en) * 2014-06-19 2015-12-24 Hany F. Bassily Controlling a Target System
CN105045367A (zh) * 2015-01-16 2015-11-11 中国矿业大学 基于游戏负载预测的android系统设备功耗优化方法
CN104834529A (zh) * 2015-05-25 2015-08-12 腾讯科技(深圳)有限公司 一种应用的性能优化的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103548375A (zh) * 2010-12-03 2014-01-29 华为技术有限公司 通信方法及装置
US8782341B1 (en) * 2012-06-29 2014-07-15 Emc Corporation Embedded advisory framework for storage configuration management
CN106250181A (zh) * 2016-07-27 2016-12-21 浪潮(北京)电子信息产业有限公司 一种Linux操作系统的性能优化方法及框架
CN106649070A (zh) * 2016-12-30 2017-05-10 郑州云海信息技术有限公司 一种对Linux系统运行性能的快速优化方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020207268A1 (zh) * 2019-04-11 2020-10-15 腾讯科技(深圳)有限公司 数据库性能调整方法、装置、设备、系统及存储介质

Also Published As

Publication number Publication date
CN109308246A (zh) 2019-02-05

Similar Documents

Publication Publication Date Title
WO2019019926A1 (zh) 系统参数的优化方法、装置及设备、可读介质
US11176448B2 (en) Enhancing processing performance of a DNN module by bandwidth control of fabric interface
US20190095796A1 (en) Methods and arrangements to determine physical resource assignments
US20230297562A1 (en) Concurrent hash map updates
US20230237342A1 (en) Adaptive lookahead for planning and learning
US20160092379A1 (en) Priority framework for a computing device
US20210383241A1 (en) Training neural networks with limited data using invertible augmentation operators
TWI775210B (zh) 用於卷積運算的資料劃分方法及處理器
US11853766B2 (en) Technology to learn and offload common patterns of memory access and computation
US20220391781A1 (en) Architecture-agnostic federated learning system
CN116070557A (zh) 使用强化学习的数据路径电路设计
US11422858B2 (en) Linked workload-processor-resource-schedule/processing-system—operating-parameter workload performance system
CN111753954A (zh) 一种稀疏化损失函数的超参数优化方法
US20200409757A1 (en) Managing workloads of a deep neural network processor
CN114648103A (zh) 用于处理深度学习网络的自动多目标硬件优化
CN117011118A (zh) 模型参数更新方法、装置、计算机设备以及存储介质
US20220398283A1 (en) Method for fast and better tree search for reinforcement learning
US20210200584A1 (en) Multi-processor system, multi-core processing device, and method of operating the same
KR102356704B1 (ko) 컴퓨팅 장치 및 컴퓨팅 장치에서 연산들을 처리하는 방법
US20230229916A1 (en) Scalable tensor network contraction using reinforcement learning
US20230237308A1 (en) Optimally clipped tensors and vectors
US11972188B2 (en) Rail power density aware standard cell placement for integrated circuits
WO2024016894A1 (zh) 一种神经网络的训练方法以及相关设备
WO2024045175A1 (en) Optimization of executable graph for artificial intelligence model inference
US20230419131A1 (en) System and method for reduction of data transmission in dynamic systems through revision of reconstructed data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18838540

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18838540

Country of ref document: EP

Kind code of ref document: A1