Training method, resource allocation method, device, system and related equipment
By automatically determining the appropriate configuration strategy based on system resource parameters and accelerated package collection on the computing device, the problem of limited application performance improvement in the existing technology is solved, and efficient performance optimization and security guarantee are achieved.
Patent Information
- Application Number
- CN202311075797.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the performance improvement of applications on computing devices is limited and the performance optimization effect is poor, mainly because the manual determination of the application's resource configuration method is not effective enough.
Provides a training method to determine appropriate configuration strategies to optimize application performance by policy training based on system resource parameters and accelerated package collections. This method does not require access to the application's internal data, ensuring the application's security.
Through the automatic optimization-determined configuration strategy, the performance of the application can be significantly optimized, so that it reaches a higher level, and the efficiency and effect of performance tuning are improved.
Smart Images

Figure CN119512637A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a training method, a resource allocation method, an apparatus, a system and related equipment. Background Art
[0002] Currently, one or more applications are usually deployed on a computer, and the application can provide corresponding business services when running. For example, when a database application such as Hive is deployed on a computing device, business services such as data storage, management, query, and analysis can be provided.
[0003] In actual application scenarios, applications in computing devices often have performance bottlenecks, such as the application's response delay cannot reach the level of hundreds of milliseconds, or the application's throughput is low. At this time, technical experts usually adjust the resources configured for the application in the computing device based on their technical experience, so as to optimize the performance of the application on the computing device based on the adjusted resource configuration. However, based on this method of manually determining the configuration resources of the application, the performance improvement of the application is limited and the performance optimization effect is poor. Summary of the invention
[0004] The present application provides a training method to determine a suitable configuration strategy so that after configuring resources for an application based on the configuration strategy, the performance of the application can reach a higher level. In addition, the present application also provides a corresponding resource configuration device, a data processing system, a computing device, a computer-readable storage medium, and a computer program product.
[0005] In a first aspect, the present application provides a training method, which can be executed by a corresponding training device. Specifically, the training device performs policy training based on system resource parameters and a set of acceleration packages for applications, wherein the system resource parameters can be used to indicate system resources that can be allocated to at least one first application (such as a database application, etc.) included in the first application set. The system resources can be, for example, hardware resources such as processors and memory, or can be resources such as services in an operating system. The set of acceleration packages for applications may include at least one acceleration package, which can be used to accelerate the operation of the application, such as accelerating processing operations such as memory allocation and memory release for the application, and different acceleration packages can accelerate the application in different aspects. After executing the policy training, the training device outputs a first configuration policy, which is used to perform performance tuning on the first application set.
[0006] In this way, since the training device determines the first configuration strategy based on the system resource parameters and the execution strategy training of at least one acceleration package, it can optimize the performance of at least one first application included in the first application set, such as optimizing the performance of the at least one first application to meet the performance standard condition. In this way, after the resources of at least one second application in the second application set with the same identifier or the same type as at least one first application in the first application set are subsequently configured based on the first configuration strategy, the performance of the at least one second application when running based on the allocated resources can also reach a higher level. Moreover, in the process of optimizing the performance of at least one first application, or achieving a higher level of performance of at least one second application, there is no need to access the internal data of the first application and the second application, which can effectively ensure the security of the application.
[0007] In a possible implementation, the acceleration package set for applications is used to accelerate a plurality of application sets of different types or with different identifiers, and the training device can also create a correspondence between the first configuration strategy and the first application set, and specifically can create a correspondence between the first configuration strategy and the identifier / type of the first application set. In this way, the first configuration strategy can be selected to configure resources for applications in other application sets that have the same identifier / type as the identifier / type of the first application set based on the correspondence, and the performance of the applications in the other application sets when running based on the allocated resources can reach a higher level.
[0008] In a possible implementation, the first configuration strategy output by the training device includes at least one of a subset of system resource parameters and a subset of an acceleration package set. That is, the resources used to optimize the performance of at least one first application in the first application set may be all / part of the full system resources or all / part of the full acceleration package.
[0009] In a possible implementation, at least one first application included in the first application set is deployed in a host, that is, the training device can determine a first configuration strategy that can improve performance for an application running on a physical device. Alternatively, at least one first application included in the first application set is deployed in a virtualized instance, which can be, for example, a virtual machine or a container, that is, the training device can determine a first configuration strategy that can improve performance for an application running in a virtualized environment.
[0010] In a possible implementation, when the training device outputs the first configuration policy, it may specifically output the first configuration policy corresponding to the first application set when the result of the performance test on at least one first application indicates that the performance of the at least one first application meets the performance standard condition. The performance test on at least one first application may be, for example, a performance test, such as a stress test. In this way, the training device may determine, by performing a performance test on at least one first application, that the resources allocated as indicated by the first configuration policy can improve the performance of the at least one first application, thereby determining the first configuration policy to be adopted when the performance of the at least one first application reaches a higher level.
[0011] In a possible implementation, when the training device performs strategy training based on system resource parameters and a set of acceleration packages for applications, it may specifically first obtain multiple historical performance test results, each of which is a result generated by a performance test on at least one first application in the first application set within a historical time period (such as the past 24 hours, etc.), each of the multiple historical performance test results does not meet the aforementioned performance compliance conditions, and at least one first application in the first application set generates different historical performance test results based on different configuration strategies; then, the training device obtains the first configuration strategy by automatically optimizing the multiple historical performance test results. In this way, the training device can automatically optimize and determine a first configuration strategy that can enable the performance of the at least one first application in the first application set to reach a higher level based on the configuration strategy adopted by the at least one first application in the first application set in the past time period and the performance it has, thereby improving the efficiency of determining the first configuration strategy.
[0012] In one possible implementation, when the training device performs policy training based on system resource parameters and an acceleration package set for an application, it may specifically first obtain the type or identifier of the first application set, and then perform policy training based on the system resource parameters and the acceleration package set corresponding to the type or identifier of the first application set. For example, each configuration policy determined by the training device for the first application set may include one or more acceleration packages corresponding to the identifier / type of the first application set, thereby determining the necessary acceleration packages that can improve the performance of at least one first application in the first application set, thereby helping to improve the efficiency of determining the first configuration policy.
[0013] In a possible implementation, the training device may also use the first configuration strategy to configure resources for the second applications included in the second application set, where the type of the second application set is the same as that of the first application set, or the identifier of the second application set is the same as that of the first application set. In this way, after configuring resources for at least one second application in the second application set based on the first configuration strategy, the performance of the at least one second application when running based on the allocated resources can also reach a relatively high level.
[0014] In a possible implementation, the deployment method of the first application set is the same as the deployment method of the second application set, that is, how at least one first application in the first application set is deployed on one or more computing devices included in computing device cluster 1, at least one second application in the second application set will also be deployed in the same manner on one or more computing devices included in computing device cluster 2. For example, if at least one first application in the first application set is deployed on a computing device included in computing device cluster 1, then at least one second application in the second application set will also be deployed on a computing device included in computing device cluster 2.
[0015] In a second aspect, the present application provides a resource configuration method, which can be executed by a corresponding resource configuration device. Specifically, the resource configuration device selects a target configuration strategy from multiple configuration strategies based on an identifier or type of an application set, where the application set includes at least one application, such as a database application, etc. The selected target configuration strategy is used to indicate resources allocated to at least one application in the application set, and the allocated resources include system resources and an acceleration package set for at least one application, wherein the system resources may be, for example, hardware resources such as a processor and memory, or may be resources such as services in an operating system, and the acceleration package set for an application may include at least one acceleration package, which may be used to accelerate the running of the application, such as accelerating processing operations such as memory allocation and memory release for the application, and different acceleration packages may accelerate the application in different aspects; then, the resource configuration device configures resources for the at least one application according to the target configuration strategy.
[0016] Since the resources allocated by the resource configuration device to at least one application in the application set include not only system resources but also at least one acceleration package, which can accelerate task processing for the application, after the resource configuration device configures resources for the at least one application, the performance of the at least one application can at least be improved based on the allocated acceleration package, that is, the performance of the at least one application can reach a higher level.
[0017] In a possible implementation, the performance of at least one application when running based on the resources meets the performance standard condition. In this way, the resources allocated by the resource configuration device to the at least one application can enable the performance of the at least one application to reach a higher level.
[0018] In a possible implementation, at least one application in the application set is deployed on one computing device, or at least one application in the application set is deployed on multiple computing devices included in a computing device cluster. In this way, one or more applications in the application set can be flexibly deployed to one or more computing devices according to actual application needs, thereby improving the flexibility of solution implementation.
[0019] In a possible implementation, when the resource configuration device configures resources for at least one application according to the target configuration strategy, it can be specifically configured for at least one application on multiple computing devices included in the deployed computing device cluster according to the target configuration strategy. Among them, the resource configuration device can configure resources on a computing device for each application in the at least one application, such as allocating resources on computing device A to application a, and allocating resources on computing device B to application b, etc. Alternatively, the resource configuration device can allocate resources on multiple computing devices to all resources of the at least one application, so that each application in the at least one application can use the allocated resources, such as allocating the processor on computing device A, the memory on computing device B, and the acceleration package on computing device C to the at least one application, etc. Each application can use the processor resources on computing device A, or use the memory resources on computing device B, or use the acceleration package on computing device C, etc.
[0020] In a possible implementation, the resource configuration device can also perform policy training based on system resource parameters and an acceleration package set for an application. The system resource parameters are used to indicate system resources, such as the name of a CPU, which can indicate a specific CPU on a computing device. After performing policy training, the resource configuration device outputs a first configuration policy, which is used to optimize the performance of at least one application included in the trained application set. The first configuration policy is one of multiple configuration policies. Since the resource configuration device determines the first configuration policy based on the system resource parameters and at least one acceleration package to perform policy training, it can optimize the performance of at least one first application included in the application set for policy training, such as optimizing the performance of the at least one first application to meet the performance standard condition. In this way, after performing resource configuration on at least one application in other application sets with the same identifier or the same type as the application set based on the first configuration policy, the performance of at least one application in the other application set based on the allocated resources when running can also reach a higher level. In actual application, the resource configuration device can train a configuration policy corresponding to the application set for different application sets based on a similar method (the configuration policy makes the performance of at least one application in the application set higher).
[0021] In a possible implementation, when the resource configuration device performs policy training based on system resource parameters and an acceleration package set for an application, specifically, the type or identifier of the trained application set is first obtained, and then the resource configuration device performs policy training based on the system resource parameters and an acceleration package set corresponding to the type or identifier of the trained application set. For example, each configuration policy determined by the resource configuration device for the application set may include one or more acceleration packages corresponding to the identifier / type of the application set, thereby determining the necessary acceleration packages that can improve the performance of at least one first application in the application set, thereby helping to improve the efficiency of determining the first configuration policy.
[0022] In a possible implementation, the acceleration package set used in the process of executing the policy training by the resource configuration device is used to accelerate a plurality of application sets of different types or different identifiers. Then, the resource configuration device may also create a correspondence between the first configuration policy and the trained application set. In this way, the subsequent resource configuration device may select the first configuration policy to configure resources for applications in other application sets with the same identifier / type as the identifier / type of the application set based on the correspondence, which may enable the performance of the applications in the other application sets to reach a higher level when running based on the allocated resources.
[0023] In a possible implementation, the first configuration strategy includes at least one of a subset of system resource parameters and a subset of an acceleration package set. That is, the resources used to optimize the performance of at least one application in the application set for training may be all / part of the full system resources or all / part of the full acceleration package.
[0024] In a possible implementation, when the resource configuration device outputs the first configuration policy, it may specifically output the first configuration policy corresponding to the trained application set when the result obtained by performing a performance test on at least one application included in the trained application set indicates that the performance of at least one application included in the trained application set meets the performance standard condition. The performance test performed on the at least one application may be, for example, a performance test, such as a stress test. In this way, the resource configuration device may determine, by performing a performance test on the at least one application, that the resources allocated as indicated by the first configuration policy can improve the performance of the at least one application, thereby determining the first configuration policy to be adopted when the performance of the at least one application reaches a higher level.
[0025] In a possible implementation, when the resource configuration device performs strategy training based on system resource parameters and a set of acceleration packages for applications, it may specifically first obtain multiple historical performance test results, where the historical performance test results are the results generated by a performance test on at least one application included in the training application set within a historical time period (such as the past 24 hours, etc.), each of the multiple historical performance test results does not meet the performance standard condition, and at least one application included in the training application set generates different historical performance test results based on different configuration strategies; then, the resource configuration device optimizes and obtains the first configuration strategy based on the multiple historical performance test results. In this way, the resource configuration device can automatically optimize and determine the first configuration strategy that can enable the performance of the at least one application to reach a higher level based on the configuration strategy adopted by at least one application in the training application set in the past time period and the performance it has, thereby improving the efficiency of determining the first configuration strategy.
[0026] In a third aspect, the present application provides a training device, which includes various modules for executing the training method in the first aspect or any possible implementation of the first aspect.
[0027] In a fourth aspect, the present application provides a resource configuration device, which includes various modules for executing the resource configuration method in the second aspect or any possible implementation of the second aspect.
[0028] In a fifth aspect, the present application provides a data processing system, which includes a training device and a resource configuration device; wherein the training device is used to execute the training method described in the above-mentioned first aspect or any possible implementation of the first aspect; the resource configuration device is used to execute the resource configuration method described in the above-mentioned second aspect or any possible implementation of the second aspect.
[0029] In a sixth aspect, the present application provides a computing device, comprising a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory so that the computing device executes a training method as in the first aspect or any one of the implementations of the first aspect, or causes the computing device to execute a resource configuration method as in the second aspect or any one of the implementations of the second aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The computing device may also include a bus. The processor is connected to the memory via a bus. The memory may include a readable memory and a random access memory.
[0030] In the seventh aspect, the present application provides a computer-readable storage medium, which stores instructions, which, when executed on a computing device, enable the computing device to execute a training method as in the first aspect or any one of the implementations of the first aspect, or enable the computing device to execute a resource configuration method as in the second aspect or any one of the implementations of the second aspect.
[0031] In an eighth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute a training method as in the first aspect or any one of the implementations of the first aspect, or enables the computing device to execute a resource configuration method as in the second aspect or any one of the implementations of the second aspect.
[0032] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of the structure of an exemplary data processing system provided by the present application;
[0034] Figure 2 A flowchart of a training method and a resource allocation method provided in this application;
[0035] Figure 3 A schematic diagram of a resource configuration method provided for this application;
[0036] Figure 4A schematic diagram of the structure of another exemplary data processing system provided by the present application;
[0037] Figure 5 A flowchart of another training method and resource allocation method provided for this application;
[0038] Figure 6 A schematic diagram of the structure of a training device provided in this application;
[0039] Figure 7 A schematic diagram of the structure of a resource configuration device provided in this application;
[0040] Figure 8 A schematic diagram of the hardware structure of a computing device provided for this application. DETAILED DESCRIPTION
[0041] In order to improve the performance of applications in computing devices, the present application provides a training method, which determines a configuration strategy that can enable the performance of the application to reach a higher level through strategy training, so that after resources are configured for the application in the computing device according to the configuration strategy, the performance of the application can reach a higher level.
[0042] To facilitate understanding of the technical solution of the present application, the relevant technical terms involved in the present application are explained below.
[0043] An application, also known as an application program, usually refers to a program written for a specific application purpose for the user, such as a browser, media player, aviation flight simulator, image editor, etc.
[0044] A virtualized instance refers to an instance created using virtualization technology, such as a virtual machine, a container, etc. Among them, a virtualized instance can also be referred to as a client (guest), and one or more applications can be deployed in the virtualized instance. Correspondingly, the computing device where the virtualized instance is located can be referred to as a host (host). Between the client and the host, virtualization software such as a hypervisor can be deployed to create, schedule, and manage virtualized resources on the computing device. Normally, the client and the host are isolated from each other to ensure the security of the client and the host.
[0045] A virtual machine is a complete computer system that is simulated by software and has complete hardware system functions and runs in a completely isolated environment, that is, a computer system simulated by virtualization. Through virtualization technology, it is possible to simulate multiple virtual computing devices on a physical computing device, and the functions of each virtual computing device are basically the same as those of the physical computing device.
[0046] A container is an instance that uses kernel-supported namespaces and cgroup technologies to isolate applications and their dependent packages in an independent operating environment. Usually, a container does not include an operating system. In this case, the container can run as a process in the host's operating system.
[0047] Virtualization software refers to software that creates, schedules, and manages virtual resources on a computing device, such as a hypervisor. Typically, virtualization software can use underlying hardware resources to create a virtual environment that includes virtual processors, memory, and peripherals. In this environment, the guest operating system (guest OS) is considered to be running on a real computing device and has exclusive ownership of all resources on the computing device. Virtualization software can build multiple virtual machine environments at the same time, allowing multiple guest operating systems to execute concurrently.
[0048] An acceleration package, in this application, refers to a program that can accelerate the processing of application operations, such as an acceleration package for accelerating memory processing operations for applications, an acceleration package for accelerating network communication speed for applications, an acceleration package for accelerating data encryption for applications, an acceleration package for accelerating data compression processes for applications, etc.
[0049] System resource parameters refer to parameters used to indicate resources configured for an application on at least one computing device. The system resource parameters may be, for example, parameters such as the identification of a processor core (computing resources), the size of a cache memory (storage resources), the identification of a network card queue (network resources), etc., thereby indicating the processor core, cache, network card queue and other resources configured for the application.
[0050] A configuration policy refers to a policy for indicating resources configured for an application on at least one computing device, and may include parameters for indicating the configured resources.
[0051] Performance testing refers to simulating the software and hardware environment of actual applications and the load during the application operation, running the application to test the performance (as well as reliability and stability) of the application. In actual application, it can be stress testing the application, or testing the delay of the application in processing data during operation.
[0052] The performance compliance condition refers to the condition when the performance of the application meets the preset requirements (i.e., meets the standard), which can be a threshold that represents the minimum performance. For example, when throughput is used to represent the performance of the application, the performance compliance condition can specifically be a throughput threshold. Then, when the actual throughput of the application is greater than the throughput threshold, it indicates that the performance of the application meets the performance compliance condition; conversely, when the actual throughput of the application is less than the throughput threshold, it indicates that the performance of the application does not meet the performance compliance condition.
[0053] Automatic optimization algorithm refers to a method of automatically finding the optimal solution. It is usually based on mathematical models and algorithmic techniques. Through iterative calculations and optimization strategies, it continuously adjusts the values of parameters to achieve the optimal solution or a solution close to the optimal solution.
[0054] See also Figure 1 , showing a schematic diagram of the structure of a data processing system provided by the present application. Figure 1 As shown, the data processing system 10 may include a computing device 100, a computing device 200, a training device 300, and a resource configuration device 400, and the computing device 100, the computing device 200, the training device 300, and the resource configuration device 400 may communicate with each other.
[0055] Exemplarily, the computing device 100 and the computing device 200 may be devices including at least one processor, such as a server, etc. The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), or any other processor or any combination thereof.
[0056] exist Figure 1In the data processing system 10 shown, the computing device 100 may include a virtual machine application layer and a host resource management layer.
[0057] The virtual machine application layer may include one or more virtual machines. Figure 1 The example includes a virtual machine 1. The virtual machine 1 includes a client operating system 101 installed and running in a virtual environment, and one or more applications may be deployed in the virtual machine. Figure 1 The deployment application 102 is taken as an example for illustrative description.
[0058] The host resource management layer may include virtualization software 103, host operating system (host OS) 104, and hardware 105. The virtualization software 103 may be, for example, software such as a hypervisor, which is used to create, schedule, and manage virtual resources on the computing device 100. In addition, one or more acceleration packages may be run in the virtualization software 103, such as an acceleration package for accelerating memory processing operations, an acceleration package for accelerating network communications, an acceleration package for securely encrypting data, an acceleration package for compressing data, etc.; or, the one or more acceleration packages may also run in the host operating system 104. The host operating system 104 is an operating system installed and running on the computing device 100. Hardware 105 may include multiple hardware on the computing device 100, such as a processor, memory, and a peripheral component interconnect express (PCIe) device. The PCIe device refers to a device that can be inserted into a PCIe slot on the computing device 100, such as a hard disk, a network card, a graphics processing unit (GPU), an offload card, etc.
[0059] The structure of the computing device 200 is similar to that of the computing device 100, and can be referred to Figure 1 And the above description about the computing device 100 is understood.
[0060] The training device 300 is used to perform policy training based on system resource parameters and a set of acceleration packages for the application, and specifically can be used to perform policy training for the application 102. The system resource parameters include at least one of hardware resources (such as processors, memory, etc.) on a computing device or a computing device cluster, and operating system resources (such as services in the operating system, etc.). The acceleration package set includes at least one acceleration package, which can be run in the virtualization software 103 or in the host operating system 104. After the policy training is completed, the training device 300 will also output a first configuration policy obtained by executing the training policy, and the first configuration policy is used to perform performance tuning on the application 102, that is, to achieve a higher performance level for the application 102.
[0061] The resource configuration device 400 is used to configure resources for the application 202 using the first configuration policy obtained by executing the policy training by the training device 300, so that the performance of the application 202 when running based on the allocated resources can reach a higher level, and the performance of the application 202 can be measured, for example, by response delay or throughput. The application 202 matches the application 102, such as the application 202 and the application 102 have the same identifier, and the application 202 and the application 102 have the same type.
[0062] Exemplarily, computing device 100 can be used as a device in a training environment, and computing device 200 can be used as a device in a production environment, so that training device 300 can perform policy training in the training environment and output the obtained first configuration policy, and resource configuration device 400 uses the first configuration policy to perform resource configuration on application 202 on computing device 200, so that the performance of application 202 in the production environment can also reach a high level.
[0063] Since the training device 300 determines the first configuration strategy based on system resource parameters and at least one acceleration package execution strategy training in the training environment, it can optimize the performance of application 102, such as optimizing the performance of application 102 until it meets the performance standard conditions. Therefore, after the resource configuration device 400 performs resource configuration for application 202 with the same identifier or the same type as application 102 based on the first configuration strategy, the performance of application 202 when running on the computing device 200 based on the allocated resources can also reach a higher level.
[0064] Furthermore, in the process of optimizing the performance of application 102 or achieving a higher performance level of application 202, there is no need to access application 102 and internal data of application 202, which can effectively ensure the security of the application in the virtual machine.
[0065] Exemplarily, the training device 300 and the resource configuration device 400 can be implemented by software or hardware.
[0066] In the first example, when implemented by software, the training device 300 and the resource configuration device 400 can be implemented by program code in a computing device, for example. In this case, the training device 300 and the resource configuration device 400 can be deployed independently of the computing device 100 and the computing device 200, respectively, or can be located in the computing device 100 / the computing device 200.
[0067] In the second example, when implemented by hardware, the training device 300 and the resource configuration device 400 can be implemented by a physical device including a processor, such as a server, etc. Among them, the processor can be a CPU, and any processor core or any combination thereof such as ASIC, PLD, CPLD, FPGA, GAL, SoC, SDI chip, AI chip, data processing unit (DPU), etc. In addition, the number of processors included in the training device 300 or the resource configuration device 400 can be one or more, and the type of processors included can be one or more. The number and type of processors can be set according to the business requirements of the actual application, and this embodiment does not limit this.
[0068] There are multiple possible implementations of the deployment of the training device 300 and the resource configuration device 400. For ease of understanding, this application provides the following implementation examples of the deployment methods.
[0069] In the first deployment mode, the training device 300 and the resource configuration device 400 can be deployed in the cloud to provide corresponding cloud services to users (such as developers or operation and maintenance personnel, etc.).
[0070] In the second deployment method, the training device 300 and the resource configuration device 400 can be deployed as PCIe devices on the computing device 100 or the computing device 200.
[0071] In the third deployment method, the training device 300 and the resource configuration device 400 can be implemented by software and can be deployed on the computing device 100 or the computing device 200.
[0072] In the fourth deployment method, the training device 300 and the resource configuration device 400 can be deployed in a computing device cluster where the computing device 100 and the computing device 200 are located. For example, the computing device cluster can also include a computing device 1, which is respectively connected to the computing device 100 and the computing device 200, and the training device 300 and the resource configuration device 400 can be specifically deployed on the computing device 1.
[0073] It is worth noting that the above Figure 1 The data processing system 10 shown is only used as an exemplary description and is not intended to limit the data processing system 10. Other possible data processing systems are exemplarily described below.
[0074] Example 1: In other possible data processing systems, other devices may also be included, such as a database, a client, etc. Among them, the database can be used to store corresponding configuration policies that can enable the performance of various applications or various types of applications in the training environment to reach a higher level. The client can be an application running on a terminal device on the user side, or it can be a web browser provided by the data processing system to the outside, which is used to support users to intervene in the resource configuration of the data processing system for applications based on the client, such as users can indicate through the client which applications to perform performance tuning, etc.
[0075] Example 2: In other possible data processing systems, the training device 300 and the resource configuration device 400 can be combined into one device, that is, the combined device can not only determine the first configuration strategy for the application 102 in the training environment, but also configure resources for the application 202 on the computing device 200 according to the first configuration strategy.
[0076] Example 3: In other possible data processing systems, the computing device in the training environment and the computing device in the production environment may be the same device. Then, after the training device 300 determines the first configuration policy for an application on the computing device, the resource configuration device 400 may configure resources for other applications of the same type on the same computing device based on the first configuration policy. Alternatively, the number of computing devices in the training environment may be multiple, that is, the training device 300 may determine the first configuration policy for the application 102 based on multiple computing devices. Furthermore, the number of computing devices in the production environment may also be multiple, that is, the resource configuration device 400 may configure resources on multiple computing devices to the application 202.
[0077] Example 4: In other possible data processing systems, a plurality of applications may be run on the training environment (including the computing device 100), and the plurality of applications may constitute a first application set (including the application 102), so that the training device 300 may determine a first configuration strategy for the application set in the training environment. Accordingly, the resource configuration device 400 may use the first configuration strategy to configure resources for a second application set (including the application 202) on a plurality of computing devices (including the computing device 200) included in the production environment, and the identifier (or type) of the second application set matches the identifier (or type) of the first application set.
[0078] Example 5: In other possible data processing systems, the virtualized instances created on computing device 100 and computing device 200 may also be containers, and one or more applications may be deployed in the container on each computing device, and the container may not include a client operating system.
[0079] Next, the training method and resource allocation method provided by the present application are described in conjunction with the accompanying drawings.
[0080] See also Figure 2 , Figure 2 A flow chart of a training method and a resource allocation method provided in this application, which can be applied to Figure 1 The data processing system 10 shown in FIG. 1 may be applied to other applicable data processing systems. For ease of explanation, the method is applied to Figure 1 The data processing system 10 shown is taken as an example for illustrative description.
[0081] in, Figure 2 The resource configuration method shown may specifically include:
[0082] S201: The training device 300 performs policy training based on system resource parameters and an acceleration package set for an application, wherein the acceleration package set includes at least one acceleration package.
[0083] In actual application, the user may need to deploy an application set (including one or more applications, such as database applications, big data applications, etc.) on the computing device 200 (and other computing devices) in the production environment, and provide corresponding business services, such as big data services, database services, etc., by running at least one application in the application set. Then, the user can request the training device 300 to determine the configuration strategy for the application set through the client, so that after configuring resources for at least one application in the application set on the computing device 200 (and other computing devices) based on the configuration strategy, the performance of the at least one application reaches a higher level.
[0084] Accordingly, in the data processing system 10, the training device 300 may choose to deploy other application sets that are the same as or of the same type as the application set on the computing device 100 in the test environment, and perform policy training on the other application sets to determine a configuration strategy that can enable the performance of at least one application in the application set to be deployed to reach a higher level. For ease of understanding and explanation, the application set deployed on the computing device 100 is referred to as the first application set, and the application set deployed on the computing device 200 is referred to as the second application set. In this embodiment, at least one first application in the first application set deployed on the computing device 100 may specifically include: Figure 1The application 102 shown in FIG. 10 is a second application in the second application set deployed on the computing device 200. Figure 1 The application 202 is shown. Then, the following takes the application 102 determining the first configuration strategy and configuring resources for the application 202 as an example for description.
[0085] In this embodiment, the training device 300 can first determine a suitable configuration strategy for the application 102 based on the resources on the computing device 100, which is referred to as the first configuration strategy below, and the performance of the application 102 when running based on the resources allocated as indicated by the first configuration strategy can reach a higher level.
[0086] In a specific implementation, the training device 300 may perform corresponding strategy training based on system resource parameters and a set of acceleration packages for the application to determine the first configuration strategy.
[0087] Among them, the resources on the computing device 100 may include system resources and an acceleration package set, and the acceleration package set includes at least one acceleration package.
[0088] In this embodiment, the acceleration package can be an acceleration program in the virtualization software 103 in the host resource management layer, which can be used to accelerate the processing of application tasks so as to improve the speed of processing application tasks. For example, acceleration packages 1 to 4 can be run in the virtualization software 103; wherein, acceleration package 1 is used to accelerate memory processing operations (including operations such as memory allocation and memory release), acceleration package 2 is used to improve the speed of network communication, acceleration package 3 is used to securely encrypt data, and acceleration package 4 is used to compress data. When the resources configured for the application 102 include acceleration package 1 and acceleration package 3, during the operation of the application 102, the virtualization software 103 can provide the application 102 with services for accelerating memory processing operations and accelerating secure encrypted data to accelerate the operation of the application 102. It can be understood that the acceleration package on the computing device 100 can provide acceleration services for different applications or different types of applications. For example, acceleration package 1 can not only provide services for accelerating memory processing operations for big data applications, but also provide services for accelerating memory processing operations for database applications.
[0089] System resources may include services in the host operating system 104, resources in the hardware 105, or may only include services in the host operating system 104 / resources in the hardware 105. The resources in the host operating system 104 may be services in the host operating system 104. For example, the host operating system 104 may configure the priority of tasks for the application 102, wherein the higher the priority of the task, the higher the priority of the host operating system 104 in processing the task of the application 102 among multiple tasks. The resources in the hardware 105 may be related hardware resources that support the operation of the application, such as hardware resources such as processor cores, memory, cache, and network card queues that support the operation of the application. Accordingly, the system resources on the computing device 100 may be indicated by system resource parameters, such as CPU0 in the system resources may be referred to by the character identifier of the CPU.
[0090] In a possible implementation of determining the first configuration strategy, the training device 300 may determine the first configuration strategy for the application 102 by iteratively detecting the performance of the application 102 .
[0091] Specifically, when determining the configuration strategy for the application 102 for the first time, the training device 300 can obtain the system resources and multiple acceleration packages on the computing device 100 that can be used to allocate to the application 102, and select part (or all) of the system resources and multiple acceleration packages as the resources allocated to the application 102 according to the resource requirements of the application 102, such as the number of processor cores, memory size, number of network card queues, etc. required to run the application 102, and generate the configuration strategy 1. Alternatively, when the user places the application 102 on the computing device, the user can provide the relevant configuration for the application 102, so that the training device 300 can generate the configuration strategy 1 according to the provided configuration content. In this embodiment, the specific implementation method for the training device 300 to obtain the configuration strategy 1 is not limited. Among them, the configuration strategy 1 may include a subset of system resource parameters and a subset of the acceleration package set (the subset may specifically include the identifier of one or more acceleration packages), that is, the configuration strategy 1 may indicate that part / all of the system resources and part / all of the acceleration packages on the computing device 100 are allocated to the application 102.
[0092] Then, the training device 300 performs a performance test on the application 102 according to the configuration strategy 1 to obtain a performance test result. Taking the performance test of the application 102 as an example, the training device 300 can configure corresponding resources for the application 102 located in the virtual machine 1 on the computing device 100 according to the system resources and acceleration package indicated by the configuration strategy 1, and start running the application 102 based on the resources. After the application 102 starts running, the training device 300 can obtain a test case (testcase) for the application 102. The test case can be provided to the training device 300 by the user through the client, or the training device 300 can read the test case matching the application 102 from the test case library stored locally. In this way, the training device 300 can use the test case to test the running application 102, specifically, the test data in the test case can be sent to the computing device 100, and the application 102 processes the test data received by the computing device 100, and outputs the corresponding test result, which can be used to indicate the performance of the application 102. In this embodiment, the test result is referred to as a performance test result.
[0093] For example, when performing performance testing on application 102, the stress resistance of application 102 may be tested, such as testing application 102 for a long time and at a high load, so as to determine the data processing capability of application 102 under a high load based on the test results output by application 102; or, the response delay of application 102 may be tested, such as calculating the time interval from when application 102 receives test data to when application 102 outputs the test results for the test data, to obtain the response delay of application 102.
[0094] In actual application, the training device 300 may be integrated with a test tool, so that the training device 300 can use the test tool to perform performance testing on the application 102 in the running state. Or, Figure 1 The data processing system 10 shown may also include a testing tool, so that the training device 300 can instruct the testing tool to perform performance testing on the application 102 and collect performance testing results of the application 102 .
[0095] Next, the training device 300 determines whether the performance test result of the application 102 satisfies the performance compliance condition corresponding to the application 102. Exemplarily, when the performance of the application 102 is measured by a numerical value, the performance compliance condition can be expressed as a specific threshold value, which is used to indicate the minimum performance that the performance of the application 102 needs to meet. For example, the performance of the application 102 can be measured by the delay of the application 102 processing data, and the performance compliance condition can be 100 milliseconds. When the performance test result of the application 102 indicates that the delay of the application 102 processing data is 90 milliseconds, since the delay is less than 100 milliseconds, at this time, the training device 300 can determine that the performance test result satisfies the performance compliance condition corresponding to the application 102, that is, the performance of the application 102 reaches a high level. When the performance test result of the application 102 indicates that the delay of the application 102 processing data is 500 milliseconds, since the delay is greater than 100 milliseconds, at this time, the training device 300 can determine that the performance test result does not meet the performance compliance condition corresponding to the application 102, that is, the performance of the application 102 is low.
[0096] In actual application, the performance of application 102 may also be measured by other methods. Accordingly, the performance compliance condition may also be achieved by using conditions matching the measurement method, and there is no limitation on this.
[0097] If the performance test result of application 102 does not meet the performance compliance condition corresponding to application 102, the training device 300 adjusts configuration strategy 1 for application 102, obtains configuration strategy 2 (ie, the new configuration strategy), and reconfigures resources and performs performance testing on application 102 according to configuration strategy 2.
[0098] It can be understood that when the performance test result does not meet the performance standard conditions, it means that the performance of the characterization application 102 based on the current resource configuration is low. Therefore, the training device 300 can further test whether the performance of the application 102 based on the new resource configuration can reach a higher level by adjusting the configuration strategy for the application 102.
[0099] Exemplarily, the training device 300 can generate configuration strategy 2 according to the performance test results corresponding to configuration strategy 1, and the system resource parameters and acceleration package identifiers that can be adjusted in the computing device 100. The system resource parameters that can be adjusted in the computing device 100 can be used to indicate the resources in the host operating system 104 and the resources in the hardware 105; the identifier of the acceleration package that can be adjusted can be used to indicate the acceleration package in the virtualization software 103. For example, the training device 300 can optimize the system resource parameters that can be adjusted in the computing device 100 and the identifier of at least one acceleration package in the acceleration set according to the performance test results corresponding to configuration strategy 1, such as optimizing according to an automatic optimization algorithm, to obtain a new set of system resource parameters and the identifier of the acceleration package, and generate configuration strategy 2 accordingly. The automatic optimization algorithm can be, for example, a genetic algorithm, a simulated annealing algorithm, a particle swarm algorithm, etc.
[0100] Furthermore, the training device 300 can determine the resources allocated to the application 102 according to the identification / type of the application 102, and generate a corresponding configuration policy accordingly. Specifically, the training device 300 can first obtain the identification / type of the application 102, and determine at least one acceleration package corresponding to the identification / type of the application 102 from the multiple acceleration packages on the computing device 100, so that the training device 300 can generate configuration policy 1 based on the system resources and at least one acceleration package corresponding to the identification / type of the application 102. When the performance of the application 102 when running based on the resources indicated by the configuration policy 1 does not meet the performance compliance condition, the resources allocated indicated by each newly generated configuration policy of the training device 300 (including configuration policy 2 and each subsequent newly generated configuration policy) include the acceleration package corresponding to the identification / type of the application 102.
[0101] For example, when application 102 is a big data application, the resources indicated by the configuration policy generated by the training device 300 for application 102 each time may include an acceleration package 2 for improving the speed of network communication. Alternatively, when application 102 is a global wide area network (WEB) application such as Ngnix, the resources indicated by the configuration policy generated by the training device 300 for application 102 each time may include an acceleration package 3 for securely encrypting data. Generally, the acceleration package corresponding to the identifier / type of application 102 can have a fixed improvement effect on the performance of application 102. Therefore, each time the resources indicated by the newly generated configuration policy for application 102 are used, the necessary acceleration package that can improve its performance is determined for application 102, thereby helping to improve the efficiency of determining the first configuration policy.
[0102] After generating configuration strategy 2, the training device 300 can refer to the above process, configure resources for application 102 according to configuration strategy 2 and detect the performance of application 102 to determine whether the performance of application 102 when running based on the resources indicated by configuration strategy 2 can meet the performance requirements.
[0103] In actual application, if the performance of the application 102 when running based on the resources indicated by the current configuration policy still does not meet the performance standard conditions, then the training device 300 can refer to the above process, iteratively generate multiple configuration policies, and obtain the performance test results corresponding to each configuration policy through performance testing. Each time a new configuration policy is generated, the training device 300 can obtain the performance test results generated by the performance test of the application 102 within a historical time period, which are referred to as historical performance test results for ease of distinction. In this way, the training device 300 can automatically optimize the corresponding system resource parameters of the computing device 100 and the identification of the acceleration package based on multiple historical performance test results. For example, the training device 300 can compare the difference between the latest generated historical performance test results and other historical performance test results, and perform optimization calculations based on the differences between the historical performance test results to obtain a new set of system resource parameters and the identification of the acceleration package.
[0104] Of course, in addition to generating a new configuration strategy by automatic optimization, in other possible implementations, when the current configuration strategy causes the performance of application 102 to fail to meet the performance requirements, the training device 300 can also use a pre-trained AI model to infer the performance test results corresponding to the current configuration strategy and the system resource parameters that can be adjusted in the computing device 100 and the identification of the acceleration package, and output a new set of system resource parameters and the identification of the acceleration package, so that the training device 300 can generate a new configuration strategy based on this set of system resource parameters and the identification of the acceleration package. In this embodiment, the specific implementation process of the training device 300 generating a new configuration strategy is not limited.
[0105] After performing N (N is a positive integer) iterative training for the configuration strategy based on the above process, the training device 300 determines through performance detection that after the resource configuration of the application 102 based on the configuration strategy generated in the Nth iteration is performed, the performance of the application 102 can meet the performance standard conditions. In this case, the training device 300 can determine the configuration generated in the Nth iteration as the above-mentioned first configuration strategy.
[0106] S202 : After executing the strategy training, the training device 300 outputs a first configuration strategy, where the first configuration strategy is used to perform performance tuning on the application 102 .
[0107] For example, the training device 300 determines through performance detection that the performance of the application 102 when running based on the resources indicated by the first configuration policy reaches a high level (i.e., meets the performance standard condition), which indicates that the training device 300 has achieved the performance tuning of the application 102 to a high level after adjusting the resource configuration of the application 102. At this time, the training device 300 can output to the resource configuration device 400, so that the resource configuration device 400 can refer to the resource configuration for the application 102 and make corresponding resource configuration for other applications to improve the performance of other applications when running.
[0108] When the training device 300 outputs the first configuration policy, the first configuration policy may be outputted in correspondence with the identifier / type of the application 102. Alternatively, the first configuration policy outputted by the training device 300 may include the identifier / type of the application 102. In this way, it is convenient for the resource configuration device 400 to determine the identifier / type of the application suitable for resource configuration using the first configuration policy.
[0109] In actual application, the training device 300 can refer to the process described in the above steps S201 to S202 to determine and output configuration strategies corresponding to the applications for multiple different applications or multiple different types of applications. In this way, the resource configuration device 400 can obtain multiple configuration strategies, each of which can make the performance of an application or a type of application reach a higher level.
[0110] S203 : the resource configuration device 400 obtains the identifier or type of the application 202 .
[0111] In this embodiment, the resource configuration apparatus 400 may first determine the identifier or type of the application 202 to be deployed on the computing device 200 .
[0112] Exemplarily, the identifier / type of the application 202 may be automatically sensed by the resource configuration device 400 through self-learning of the application 202 , or may be actively provided to the resource configuration device 400 by the user.
[0113] S204: The resource configuration device 400 selects a target configuration policy from multiple configuration policies according to the identification / type of the application 202, and the target configuration policy is used to indicate the resources allocated to the application 202, and the resources include system resources and an acceleration package set for the application 202, and the acceleration package set includes at least one acceleration package.
[0114] S205: The resource configuration apparatus 400 configures the resources indicated by the target configuration policy for the application 202 on the computing device 200 according to the target configuration policy.
[0115] Exemplarily, the resource configuration device 400 may store multiple configuration policies and multiple application identifiers / types, each configuration policy corresponding to an application identifier or type. The corresponding relationship between the application identifier / type and the configuration policy may be created and saved by the resource configuration device 400 according to the configuration policy output by the training device 300 for the application. The resources indicated by each configuration policy include system resources and acceleration packages, and there may be differences between the system resources or acceleration packages indicated by different configuration policies. In this way, after receiving the identifier / type of the application 202 to be deployed on the computing device 200, the resource configuration device 400 may first search for whether there is an application identifier / type that matches the identifier / type of the application 202 from the identifiers / types of the multiple applications corresponding to the multiple configuration policies. If there is, the resource configuration device 400 may determine the configuration policy corresponding to the found application identifier / type as the target configuration policy in step S204. The resources indicated by the determined target configuration policy are the resources configured for the application 202 on the computing device 200.
[0116] For example, assuming that the multiple configuration policies stored in the resource configuration device 400 include the above-mentioned first configuration policy, and the first configuration policy corresponds to the type (or identifier) of the application 102. Then, the resource configuration device 400 can determine that the type (or identifier) of the application 202 matches the type (or identifier) of the application 102 by matching the types (or identifiers) of different applications, and determine the first configuration policy corresponding to the type (or identifier) of the application 102 as the above-mentioned target configuration policy.
[0117] When the identifier of application 102 matches the identifier of application 202 , application 202 and application 102 may be the same application.
[0118] When the type of application 102 matches the type of application 202 , application 202 and application 102 may be two different applications of the same type.
[0119] Generally, if application 202 is the same application as application 102, or the type of application 202 is the same as the type of application 102, etc., then the load characteristics of application 202 during operation are generally the same or similar to the load characteristics of application 102. At this time, if application 102 has a higher performance when running based on the resources indicated by the first configuration policy, application 202 will generally also have a higher performance when running based on the resource configuration indicated by the first configuration policy. Therefore, the resource configuration device 400 can perform the same resource configuration on application 202 in the virtual machine on the computing device 200 according to the first configuration policy (that is, the target configuration policy), so that the performance of application 202 when running on the computing device 200 can also reach a higher level.
[0120] In specific implementation, the resource configuration device 400 can determine the corresponding system resources and acceleration packages on the computing device 200 according to the system resource parameters and the identifier of the acceleration package included in the first configuration policy, and allocate the determined system resources and acceleration packages to the application 202. For example, the resource configuration device 400 can allocate one or more acceleration packages in the virtual machine software 203 to the application 202, allocate service resources in the host operating system 204 to the application 202, and allocate hardware resources such as processor cores, memory, cache, and network card queues in the hardware 205 to the application 202 according to the first configuration policy.
[0121] Furthermore, when it is necessary to deploy multiple applications of the same type as application 102 on computing device 200 and other computing devices, resource configuration device 400 can adopt the first configuration strategy corresponding to application 102 to perform the same resource configuration for each of the multiple applications. In this way, even if there are differences in hardware or computing power between different computing devices, applications of the same type located on different computing devices can achieve higher performance based on the same resource configuration. Moreover, resource configuration device 400 performs resource configuration for the multiple applications based on the unified first configuration strategy, and there is no need to perform differentiated configuration for the multiple applications based on the differences between computing devices, which can effectively improve the efficiency of resource configuration for the multiple applications.
[0122] As some examples, the identification of the application may be, for example, attribute information such as the name, character identification, version number, etc. of the application, or may be other applicable information.
[0123] The types of applications can be divided according to the load characteristics of the applications. For example, applications can be divided into high-load applications, low-load applications, etc. according to the load size of the applications; or, applications can be divided into compute-intensive applications, memory-intensive applications, etc. according to the load type of the applications. Alternatively, the types of applications can be divided according to the functions of the applications. For example, applications can be divided into big data applications, database applications (such as Spark, Hive, etc.), WEB applications (such as Ngnix applications), etc. In this embodiment, the specific implementation method for dividing application types is not limited.
[0124] Furthermore, the type of application can be manually specified by the user. For example, when the user requests the data processing system 10 to deploy the application 202 in the virtual machine on the computing device 200 through the client, the type of the application 202 can be provided on the client, and the client sends the type of the application 202 to the resource configuration device 400. In this way, the resource configuration device 400 can deploy the same type of application 102 in the virtual machine on the computing device 100 according to the application type specified by the user, and determine the first configuration strategy (i.e., the target configuration strategy) that can make the performance of the application 102 reach a higher level by executing the above process, so as to configure corresponding resources for the application 202 on the computing device 200 based on the determined first configuration strategy.
[0125] Alternatively, the type of application can be obtained by the resource configuration device 400 through self-learning. For example, after the user requests the data processing system 10 to deploy the application 202 in the virtual machine on the computing device 200 through the client, the resource configuration device 400 can preliminarily configure resources for the application 202 on the computing device 200 according to the resource requirements of the application 202. During the operation of the application 202 based on the preliminarily configured resources, the resource configuration device 400 can collect the resource usage data of the application 202 in the computing device 100, such as the performance monitoring unit (PMU) index corresponding to the application 202, which can be used to monitor the performance and execution of the processor core supporting the operation of the application 202; or, the use data of the network resources on the computing device 200 by the application 202 can be collected. Then, the resource configuration device 400 can analyze the load characteristics of the application 202 during the operation according to the data collected on the computing device 100, and determine the type of the application 202 accordingly. In this way, the resource configuration device 400 can deploy the same type of application 102 in the virtual machine on the computing device 100 according to the type of the analyzed application 202, and determine the configuration strategy that can enable the performance of the application 102 to reach a higher level by executing the above steps S301 to S304, thereby adjusting the resources configured for the application 202 on the computing device 200 based on the determined configuration strategy. For example, the resources initially configured for the application 202 include 4 processor cores running on different CPUs, and the resource configuration device 400 can reallocate the 4 processor cores on the same CPU to the application 202 according to the configuration strategy.
[0126] Furthermore, when the resource configuration device 400 automatically senses the type of application 202 based on the load characteristics of application 202, in actual application scenarios, when application 202 is running, the load of application 202 may change significantly within a period of time due to reasons such as the user's use behavior of application 202, that is, the load characteristics of application 202 change. For example, multiple users may frequently use application 202 to provide computing services within a period of time, resulting in a significant increase in the load of application 202 (relative to other time periods). Therefore, during the operation of application 202, resource configuration device 400 can continuously monitor the load of application 202 and determine whether the type of application 202 has changed based on the load. If there is no change, resource configuration device 400 does not need to adjust the resource configuration of application 202. If changes occur, the resource configuration device 400 can redetermine the type of application 202 according to the load characteristics of application 202, and according to the redetermined type of application 202, determine a new configuration policy corresponding to the redetermined type from multiple configuration policies, and configure the resources of application 202 on the computing device 200 according to the newly determined configuration policy, so that application 202 can be allocated appropriate resources to adapt to the load changes of application 202, thereby ensuring that the performance of application 202 continues to remain at a high level.
[0127] In actual application, the user may deploy multiple applications in a virtual machine on the computing device 200. Therefore, for each application to be deployed, the resource configuration device 400 can use the above method to determine a suitable configuration strategy for each application and configure corresponding resources for the application on the computing device 200 based on the configuration strategy.
[0128] Alternatively, the resource configuration device 400 may perform resource configuration by integrating multiple applications.
[0129] Specifically, since the resources on the computing device 200 are limited, the resources requested for configuration by different applications are usually different. At this time, the resource configuration device 400 can treat the multiple applications as an application set, which is referred to as the second application set below for ease of distinction. The second application set may include multiple second applications (which may include application 202) that need to be deployed on the computing device 200. In addition, the resource configuration device 400 can determine the performance compliance conditions corresponding to the application set, and the performance compliance conditions are used to indicate the conditions that the performance of each application in the application set needs to meet. Exemplarily, the user can provide the resource configuration device 400 with the minimum performance required to be met by each second application through the client, so that the resource configuration device 400 can use the minimum performance indicated by the user for multiple applications as the performance compliance conditions corresponding to the application set.
[0130] Then, the resource configuration device 400 can obtain the configuration policy of the second application set, which includes system resource parameters for all applications in the second application set and an acceleration package set, the acceleration package set including at least one acceleration package, and the configuration policy can indicate the resources allocated to multiple applications in the application set.
[0131] Exemplarily, the training apparatus 300 may deploy a first application set on the computing device 100, the first application set including a plurality of first applications, and the identifier / type of the first application set matches the identifier / type of the second application set. Specifically, the first application set and the second application set may include the same applications, or may include applications of the same type.
[0132] Next, the training device 300 can generate a configuration strategy 1, and use the configuration strategy 1 to perform performance testing on multiple first applications in the first application set to obtain performance testing results for the multiple applications. For example, the training device 300 can configure corresponding resources for multiple first applications in the first application set on the computing device 100 according to the resources indicated by the configuration strategy 1. After the multiple first applications in the first application set start running based on the allocated resources, the training device 300 uses the corresponding test cases to perform performance testing on each application and obtain performance testing results for each application. Among them, the specific implementation process of the training device 300 generating the configuration strategy 1 and using the configuration strategy 1 to perform resource configuration and performance testing for each first application in the first application set can be found in the aforementioned description of the resource configuration and performance testing of the application 102, which will not be repeated here.
[0133] In this way, the training device 300 can determine whether the performance of all first applications meets the performance standard conditions based on the performance test results corresponding to each first application in the first application set. If yes, the training device 300 can output the configuration strategy 1 to the resource configuration device 400, so that the resource configuration device 400 deploys each second application in the second application set in the virtual machine on the computing device 200, and configures corresponding resources for each second application in the second application set according to the configuration strategy 1. In this way, the performance of the multiple deployed second applications can reach a high level at runtime.
[0134] If the performance of some first applications in the first application set does not meet the performance standard condition, the training device 300 can generate a new configuration strategy, namely, configuration strategy 2, such as generating a new configuration strategy by automatic optimization or AI model reasoning. Then, the training device 300 reconfigures resources for multiple first applications in the first application set based on the newly generated configuration strategy 2, and performs performance tests on multiple first applications in the first application set again to detect whether the performance of the multiple first applications after resource configuration based on the new configuration strategy (i.e., configuration strategy 2) meets the performance standard condition. If it is still not satisfied, the training device 300 can iteratively perform the above process, and determine the configuration strategy that can make the performance of multiple first applications in the first application set meet the performance standard condition by continuously adjusting the configuration strategy, and output it to the resource configuration device 400. If it can be satisfied, the training device 300 can output the newly generated configuration strategy 2 to the resource configuration device 400, so that the resource configuration device 400 configures the corresponding resources for multiple second applications in the second application set in the virtual machine on the computing device 200 according to the configuration strategy 2, including system resources and acceleration packages on the computing device 200.
[0135] In this way, for the multiple second applications deployed on the computing device 200, the resource configuration device 400 can also configure appropriate resources for the multiple applications so that the performance of all the second applications can reach a higher level.
[0136] Among them, multiple first applications in the first application set and multiple second applications in the second application set can all be deployed on one computing device, such as multiple first applications can be deployed on computing device 100, and multiple second applications can be deployed on computing device 200.
[0137] Alternatively, multiple first applications in the first application set and multiple second applications in the second application set can be deployed on multiple computing devices. In this case, the deployment method of multiple first applications in the first application set on computing devices in the test environment is the same as the deployment method of multiple second applications in the second application set on computing devices in the production environment. For example, application A1 among multiple first applications can be deployed on computing device a1 in the test environment, and application B1 among multiple first applications can be deployed on computing device b1 in the test environment; and application A2 among multiple second applications can be deployed on computing device a2 in the production environment, and application B2 among multiple second applications can be deployed on computing device b2 in the production environment. Furthermore, the resources allocated by the resource configuration device 400 to the multiple second applications in the second application set are resources on multiple computing devices. At this time, each computing device in the multiple computing devices can provide the same amount of resources, such as each computing device provides 2 processors and 4GB of memory to support the operation of multiple second applications; or each computing device in the multiple computing devices can provide different amounts or different types of resources, such as computing device 1 in the multiple computing devices provides 4 processor resources required by multiple second applications in total, computing device 2 provides 16GB of memory resources required by multiple second applications in total, computing device 3 provides 3 acceleration packages required by multiple second applications in total, etc. Each second application can be bound to the allocated acceleration package and other resources, or it can be unbound, and this is not limited.
[0138] Furthermore, the resource configuration device 400 may refer to the above-mentioned method of determining a configuration policy for an application set, determine the configuration policy corresponding to each application set for different application sets, and save the application set and the configuration policy in correspondence, specifically, the identifier / type of the application set and the configuration policy may be saved in correspondence. In this way, when a user requests to deploy multiple applications on the computing device 200 (or other computing devices) at the same time through a client, the resource configuration device 400 may find the identifier / type of the application set that matches the identifier / type of the application set including the multiple applications, and find the configuration policy corresponding to the application set from the saved correspondence, so that the resource configuration device 400 can configure resources for the multiple applications in the application set on the computing device 200 based on the determined configuration policy.
[0139] In this embodiment, the training device 300 can determine the configuration strategy adopted when the performance of at least one first application in the first application set reaches a higher level when running on the computing device 100 in the test environment, and the resource configuration device 400 performs resource configuration for at least one second application in the second application set in the virtual machine that needs to be located on the computing device 200 based on the same configuration strategy. Since the type (or identifier) of the first application set matches the type (or identifier) of the second application set, after performing resource configuration for at least one second application in the second application set based on the configuration strategy, the performance of at least one second application in the second application set when running on the computing device 200 based on the configured resources can also reach a higher level. In addition, in the process of achieving the performance of at least one second application in the second application set reaching a higher level, it is not necessary to access the internal data of at least one first application in the first application set and at least one second application in the second application set, which can effectively ensure the security of the applications in the virtual machine.
[0140] Above Figure 2 In the illustrated embodiment, it is mainly introduced that the training device 300 determines a first configuration strategy that enables the performance of the application 102 to reach a higher level by performing performance detection on the computing device 100, and the resource configuration device 400 performs resource configuration on the application 202 located on the computing device 200 based on the first configuration strategy.
[0141] In other possible embodiments, the training device 300 can continuously adjust the resources configured for the application during the operation of the application according to the performance of the application in actually providing services, so that the resources ultimately configured for the application can enable the performance of the application to reach a higher level.
[0142] Next, combine Figure 3 , taking the adjustment of resources configured for application 102 on computing device 100 as an example, a flow chart of a resource configuration method provided by an embodiment of the present application is introduced. Figure 3 As shown, the method may specifically include:
[0143] S301: The training device 300 generates a configuration policy 1 for the application 102 based on system resource parameters and an acceleration package set for the application. The resources allocated indicated by the configuration policy 1 include system resources and an acceleration package set on the computing device 100, and the acceleration package set includes at least one acceleration package.
[0144] In this embodiment, when a user (such as an administrator, etc.) requests to deploy an application 102 in a virtual machine on a computing device 100 through a client, the training apparatus 300 may obtain a configuration policy for performing resource configuration for the application 102 .
[0145] Exemplarily, the training device 300 may generate the configuration policy 1 according to the resource requirements of the application 102 when it is deployed, as well as the parameters indicating the system resources available on the computing device 100 and the identifier of the acceleration package that can be allocated to the application 102. For example, the training device 300 may collect the currently available system resources on the computing device 100, and determine the resources allocated to the application 102 from the available system resources according to the number of resources required by the application 102, and generate the configuration policy 1 accordingly. Alternatively, the configuration policy 1 may be provided by the user, so that the training device 300 may receive the configuration policy 1 sent by the user through the client.
[0146] S302 : The training apparatus 300 performs resource configuration on the application 102 on the computing device 100 according to the configuration strategy 1 .
[0147] After completing resource configuration for application 102, application 102 can start running based on the allocated resources and start providing corresponding business services. For example, when application 102 is a database application such as Spark or Hive, the application 102 can provide corresponding database services to the outside during operation, including data storage, data access and other services.
[0148] S303: The training device 300 detects whether the performance of the application 103 meets the performance standard condition. If not, the step S304 is continued; if yes, the application 102 keeps running based on the current resource configuration.
[0149] S304: When the performance of application 102 does not meet the performance standard condition, the training device 300 generates a configuration strategy 2 based on the performance of application 102. The allocated resources indicated by the configuration strategy 2 include system resources on the computing device 100 and an acceleration package set, the acceleration package set includes at least one acceleration package, and there are differences between the resources indicated by configuration strategy 2 and configuration strategy 1.
[0150] In this embodiment, during the operation of the application 102, the training device 300 can collect the performance of the application 102 during the operation. Taking the response delay of the application 102 as an example to measure the performance of the application 102, the training device 300 can monitor the moment 1 when the application 102 receives the service request and the moment 2 when the application 102 outputs the service processing result in response to the service request, and calculate the response delay of the application 102 according to the time interval between the moment 1 and the moment 2, so as to obtain the performance of the application 102 during the operation.
[0151] Then, the training device 300 can determine whether the performance of the application 102 during the actual operation meets the performance standard condition. If it does, it indicates that the performance of the application 102 has reached a high level. If it does not, it indicates that the performance of the application 102 is low. At this time, the training device 300 can generate a new configuration strategy so as to use the newly generated configuration strategy to adjust the resources configured for the application 102.
[0152] S305: The training apparatus 300 adjusts the resources configured for the application 102 on the computing device 100 according to the configuration strategy 2, and returns to execute step S303.
[0153] For example, it is assumed that configuration strategy 1 indicates that 4 processor cores are configured for application 102, and the 4 processor cores are located on multiple different CPUs, while configuration strategy 2 indicates that the 4 processor cores configured for application 102 are all located on the same CPU, etc. Therefore, the training device 300 can adjust the 4 processor cores allocated to application 102 to 4 processor cores on the same CPU, etc., according to configuration strategy 2.
[0154] After the resource configuration of the application 102 is adjusted, the application 102 can continue to run and provide business services based on the newly allocated resources.
[0155] In this way, during the operation of the application 102, the training device 300 iteratively adjusts the resources configured for the application 102 according to the actual performance of the application 102 until the performance of the application 102 can meet the performance standard condition, thereby achieving performance tuning of the application 102. In addition, in the process of improving the performance of the application 102, the training device 300 does not need to access the internal data of the application 102, which can effectively ensure the security of the application 102 in the virtual machine.
[0156] Furthermore, when the performance of the application 102 meets the performance standard condition, the training device 300 can record the configuration strategy currently used for resource configuration for the application 102, and save the configuration strategy in correspondence with the type / identification of the application 102. In this way, when the user subsequently requests the data processing system 10 to deploy other applications of the same type in the virtual machine, the training device 300 can determine the configuration strategy corresponding to the type / identification of the application 102 (the types / identifications of the two applications are the same) based on the type / identification of the application, and configure resources for other applications on the computing device 200 (or other computing devices) based on the configuration strategy.
[0157] The above combination Figures 1 to 3In the illustrated embodiment, the resource configuration device 300 is used to improve the performance of an application in a virtual machine (a virtualization instance) as an example for explanation. In other possible embodiments, the computing device may not include a virtualization instance, so that the application can be directly run on the physical environment of the computing device, such as running on the host of the computing device. At this time, after the application is tested for performance to determine a better configuration strategy, when the same application or the same type of application is deployed in the computing device according to the configuration strategy, the performance of the deployed application can also reach a higher level.
[0158] Next, combine Figure 4 as well as Figure 5 , another data processing system and resource configuration method provided in the embodiments of the present application are described in detail.
[0159] join Figure 4 , shows a schematic diagram of the structure of another data processing system provided by the present application. Figure 4 As shown, the data processing system 20 may include a computing device 500, a computing device 600, a training device 300, and a resource configuration device 400, and the computing device 500, the computing device 600, the training device 300, and the resource configuration device 400 may communicate with each other.
[0160] Exemplarily, computing device 500 and computing device 600 may both be devices including at least one processor, such as a server, etc. The processor may be any one of a CPU, an ASIC, a PLD, a CPLD, an FPGA, a GAL, a SoC, an SDI chip, an AI chip, and a DPU, or any combination thereof.
[0161] like Figure 4 As shown, computing device 500 may include application 501 , operating system 502 , and hardware 503 .
[0162] Among them, one or more applications can be deployed on the computing device 500. Figure 4 In the example, a computing device 500 including one application (ie, application 501) is used for exemplary description.
[0163] The operating system 502 is an operating system installed and running on the computing device 500, and may include one or more acceleration packages, such as an acceleration package for accelerating memory processing operations, an acceleration package for accelerating network communications, an acceleration package for securely encrypting data, an acceleration package for compressing data, and the like.
[0164] Hardware 503 may include multiple hardware on the computing device 500, such as a processor, memory, and a PCIe device. The PCIe device may be, for example, a hard disk, a network card, a GPU, an offload card, and the like.
[0165] The structure of the computing device 600 is similar to that of the computing device 500, and can be referred to as Figure 5 And the above description about the computing device 500 can be understood.
[0166] The training device 300 is used to perform policy training based on system resource parameters and a set of acceleration packages for the application, and specifically can be used to perform policy training for the application 501. The system resource parameters include at least one of hardware resources (such as processors, memory, etc.) on a computing device or a computing device cluster, and operating system resources (such as services in the operating system, etc.). The acceleration package set includes at least one acceleration package. After the policy training is completed, the training device 300 will also output a first configuration policy obtained by executing the training policy, and the first configuration policy is used to perform performance tuning on the application 501, that is, to achieve a higher performance level for the application 501.
[0167] The resource configuration device 400 is used to configure resources for the application 601 using the first configuration policy obtained by executing the policy training by the training device 300, so that the performance of the application 601 when running based on the allocated resources can reach a higher level, and the performance of the application 601 can be measured, for example, by response delay or throughput, etc. Among them, the application 601 matches the application 501, such as the application 601 and the application 501 have the same identifier, and the application 601 and the application 501 have the same type.
[0168] For example, Figure 4 The training device 300 and resource configuration device 400 shown in the figure can be implemented by software or hardware. When implemented by software, the training device 300 and resource configuration device 400 can be implemented by program code in a computing device, for example. When implemented by hardware, the training device 300 and resource configuration device 400 can be implemented by a physical device including a processor, such as a server.
[0169] in, Figure 4 For the deployment method of the training device 300 and the resource configuration device 400, please refer to the above Figure 1 The description of the deployment method of the training device 300 and the resource configuration device 400 is not repeated here.
[0170] It is worth noting that Figure 4The data processing system 20 shown is only used as an exemplary description and is not used to limit the data processing system 20. In other possible data processing systems, the data processing system 20 may also include other devices, such as a database, etc.; or, the training device 300 and the resource configuration device 400 may be combined into one device; or, the data processing system 20 may include a larger number of computing devices to support the deployment of applications on a larger number of computing devices; or, multiple applications may be deployed on both the computing device 500 and the computing device 600, etc.
[0171] See also Figure 5 , Figure 5 A training method and a resource allocation method flow chart provided in this application, which can be applied to Figure 4 The data processing system 20 shown in FIG. 1 may be applied to other applicable data processing systems. Figure 4 The data processing system 20 shown is taken as an example for illustrative description.
[0172] in, Figure 5 The resource configuration method shown may specifically include:
[0173] S501: The training device 300 performs policy training based on system resource parameters and an acceleration package set for an application, wherein the acceleration package set includes at least one acceleration package.
[0174] Exemplarily, the training device 300 can complete strategy training by sequentially generating multiple different configuration strategies, and using the multiple different configuration strategies to perform resource configuration and performance testing on the application 501, so as to determine the configuration strategy that can enable the performance of the application 501 to reach a higher level.
[0175] S502: After executing the strategy training, the training device 300 outputs a configuration strategy, which is used to perform performance tuning on the application 501.
[0176] Specifically, the training device 300 may output the configuration strategy to the resource configuration device 400 .
[0177] S503 : the resource configuration device 400 obtains the identifier or type of the application 601 .
[0178] In this embodiment, the resource configuration apparatus 400 may first determine the identifier or type of the application 601 to be deployed on the computing device 600 .
[0179] Exemplarily, the identifier / type of the application 202 may be automatically sensed by the resource configuration device 400 through self-learning of the application 601 , or may be actively provided to the resource configuration device 400 by the user.
[0180] S504: The resource configuration device 400 selects a target configuration policy from multiple configuration policies according to the identification / type of the application 601, and the target configuration policy is used to indicate the resources allocated to the application 601, and the resources include system resources and an acceleration package set for the application 601, and the acceleration package set includes at least one acceleration package.
[0181] The selected target configuration strategy is the configuration strategy output by the training device 300 in step S502.
[0182] Exemplarily, the resource configuration device 400 may store multiple configuration policies and multiple application identifiers / types, each configuration policy corresponding to an application identifier or type. The resources indicated by each configuration policy include system resources and acceleration packages, and there may be differences between the system resources or acceleration packages indicated by different configuration policies.
[0183] The identification of the application may be, for example, attribute information such as the name, character identification, version number, etc. of the application, or may be other applicable information.
[0184] The types of applications can be divided according to the load characteristics of the applications. For example, the applications can be divided into high-load type applications, low-load type applications, etc. according to the load size of the applications; or, the applications can be divided into computing-intensive applications, memory-intensive applications, etc. according to the load type of the applications. Alternatively, the types of applications can be divided according to the functions of the applications. For example, the applications can be divided into big data type applications, database type applications, etc. In this embodiment, the specific implementation method for dividing the application types is not limited.
[0185] Furthermore, the type of application may be manually specified by a user, or may be obtained by the resource configuration device 400 through self-learning. For example, the resource configuration device 400 may determine the type of application by sensing the load characteristics of the application.
[0186] S505: The resource configuration apparatus 400 configures the resources indicated by the target configuration policy for the application 601 on the computing device 200 according to the target configuration policy.
[0187] in, Figure 5 For the specific implementation of the training method and resource allocation method shown and their technical effects, please refer to the aforementioned Figure 2 The description of the relevant parts in the illustrated embodiment will not be repeated here.
[0188] It is worth noting that other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.
[0189] Combination of the above Figures 1 to 5 The training method and resource configuration method provided in the embodiments of the present application are introduced. Next, the functions of the training device and resource configuration device provided in the embodiments of the present application, as well as the computing equipment that implements the training device and resource configuration device are introduced in conjunction with the accompanying drawings.
[0190] See also Figure 6 , shows a schematic diagram of the structure of a training device. Figure 6 As shown, the device 600 includes:
[0191] A training module 601 is used to perform policy training based on system resource parameters and an acceleration package set for an application, where the acceleration package set includes at least one acceleration package;
[0192] The output module 602 is used to output a first configuration strategy after executing strategy training, where the first configuration strategy is used to perform performance tuning on a first application set, where the first application set includes at least one first application.
[0193] In a possible implementation, the acceleration package set is used to accelerate a plurality of application sets of different types or with different identifiers;
[0194] Then, the apparatus 600 may further include:
[0195] The creation module 603 is used to create a correspondence between the first configuration policy and the first application set.
[0196] In a possible implementation, the first configuration strategy includes at least one of a subset of system resource parameters and a subset of the acceleration package set.
[0197] In a possible implementation, at least one first application is deployed in a host, or at least one first application is deployed in a virtualized instance.
[0198] In a possible implementation, the output module 602 is specifically configured to:
[0199] When a result obtained by performing performance detection on at least one first application indicates that the performance of the at least one first application meets a performance standard condition, a first configuration policy corresponding to the first application set is output.
[0200] In a possible implementation, the training module 601 is specifically configured to:
[0201] Acquire multiple historical performance test results, where the historical performance test results are results generated by performing a performance test on at least one first application in the first application set within a historical time period, each of the multiple historical performance test results fails to meet a performance compliance condition, and at least one first application in the first application set generates different historical performance test results based on different configuration strategies;
[0202] Based on multiple historical performance test results, the first configuration strategy is optimized.
[0203] In a possible implementation, the training module 601 is specifically configured to:
[0204] Obtaining a type or identifier of a first application set;
[0205] Policy training is performed based on system resource parameters and a set of acceleration packages corresponding to the type or identifier of the first set of applications.
[0206] In a possible implementation manner, the apparatus 600 further includes:
[0207] The configuration module 604 is used to configure resources for second applications included in the second application set using the first configuration strategy, where the type of the second application set is the same as that of the first application set, or the identifier of the second application set is the same as that of the first application set.
[0208] In a possible implementation, the deployment mode of the first application set is the same as the deployment mode of the second application set.
[0209] because Figure 6 The apparatus 600 for training shown corresponds to Figure 2 The training device 300 in the method embodiment shown, therefore Figure 6 The specific implementation method of the device 600 shown and the technical effects it has can be found in the relevant description of the aforementioned embodiments, and will not be repeated here.
[0210] See also Figure 7 , which shows a schematic diagram of the structure of a resource configuration device. Figure 7 As shown, the apparatus 700 includes:
[0211] A selection module 701 is used to select a target configuration policy from multiple configuration policies according to an identifier or type of an application set, where the application set includes at least one application, and the target configuration policy is used to indicate resources allocated to the at least one application, where the resources include system resources and an acceleration package set for the at least one application, where the acceleration package set includes at least one acceleration package;
[0212] The configuration module 702 is used to configure resources for at least one application according to the target configuration policy.
[0213] In a possible implementation, the performance of at least one application when running based on the resources meets the performance standard condition.
[0214] In a possible implementation, at least one application is deployed on one computing device, or at least one application is deployed on multiple computing devices included in a computing device cluster.
[0215] In a possible implementation, the configuration module 702 is specifically configured to:
[0216] According to the target configuration policy, resources are configured for at least one application on a plurality of computing devices included in the deployed computing device cluster.
[0217] In a possible implementation manner, the apparatus 700 further includes:
[0218] An execution module 703, configured to execute policy training based on a system resource parameter and an acceleration package set for an application, wherein the system resource parameter is used to indicate system resources;
[0219] The output module 704 is used to output a first configuration policy after executing the policy training. The first configuration policy is used to perform performance tuning on at least one application included in the trained application set. The first configuration policy is one of the multiple configuration policies.
[0220] In a possible implementation, the execution module 703 is specifically configured to:
[0221] Get the type or identifier of the training application set;
[0222] Policy training is performed based on system resource parameters and a set of acceleration packages corresponding to the type or identity of the set of trained applications.
[0223] In a possible implementation, the acceleration package set is used to accelerate a plurality of application sets of different types or with different identifiers;
[0224] The device 700 further includes:
[0225] The creation module 705 is used to create a correspondence between the first configuration strategy and the trained application set.
[0226] In a possible implementation, the first configuration strategy includes at least one of a subset of system resource parameters and a subset of the acceleration package set.
[0227] In a possible implementation, the output module 704 is specifically configured to:
[0228] When a result obtained by performing performance detection on at least one application included in the trained application set indicates that the performance of at least one application included in the trained application set meets the performance standard condition, a first configuration policy corresponding to the trained application set is output.
[0229] In a possible implementation, the execution module 703 is specifically configured to:
[0230] Acquire multiple historical performance test results, where the historical performance test results are results generated by performing performance tests on at least one application included in the training application set within a historical time period, each of the multiple historical performance test results fails to meet the performance standard condition, and at least one application included in the training application set generates different historical performance test results based on different configuration strategies;
[0231] Based on multiple historical performance test results, the first configuration strategy is optimized.
[0232] because Figure 7 The device 700 for resource configuration shown corresponds to Figure 2 The resource allocation device 700 in the method embodiment shown in FIG. Figure 7 The specific implementation method of the device 700 shown and the technical effects it has can be found in the relevant description of the aforementioned embodiments, and will not be repeated here.
[0233] Above Figures 1 to 5 In the illustrated embodiment, the training device 300 involved in the strategy training process and the resource configuration device 400 involved in the resource configuration process may be software configured on a computing device, and by running the software on the computing device, the computing device may implement the functions of the training device 300 or the resource configuration device 400. Below, based on the perspective of hardware device implementation, the training device 300 involved in the strategy training process and the resource configuration device 400 involved in the resource configuration process are introduced in detail.
[0234] Figure 8 The schematic diagram of the structure of a computing device is shown. The training device 300 or the resource configuration device 400 can be deployed on the computing device. The computing device can be a computing device in a cloud environment (such as a server), or a computing device in an edge environment, or a terminal device, etc., which can be used to implement the above Figure 2 The functions of the training device 300 or the resource configuration device 400 in the illustrated embodiment.
[0235] Figure 8 The hardware structure diagram of a computing device 800 provided in this application is as follows. The computing device 800 can implement the above Figure 2 , Figure 3 as well as Figure 5 The functions of the training device 300 or the resource configuration device 400 in the illustrated embodiment, etc.
[0236] like Figure 8 As shown, the computing device 800 includes a processor 801, a memory 802, and a communication interface 803. The processor 801, the memory 802, and the communication interface 803 communicate via a bus 804, and may also communicate via other means such as wireless transmission. The memory 802 is used to store instructions, and the processor 801 is used to execute the instructions stored in the memory 802. Furthermore, the computing device 800 may also include a memory unit 805, and the memory unit 805 may be connected to the processor 801, the storage medium 802, and the communication interface 803 via a bus 804. The memory 802 stores program code, and the processor 801 may call the program code stored in the memory 802 to perform the following operations:
[0237] Execute policy training based on system resource parameters and an acceleration package set for an application, wherein the acceleration package set includes at least one acceleration package;
[0238] After executing the policy training, a first configuration policy is output, where the first configuration policy is used to perform performance tuning on a first application set, where the first application set includes at least one first application.
[0239] Alternatively, the processor 801 may call the program code stored in the memory 802 to perform the following operations:
[0240] Selecting a target configuration policy from a plurality of configuration policies according to an identifier or type of an application set, the application set including at least one application, the target configuration policy being used to indicate resources allocated to the at least one application, the resources including system resources and an acceleration package set for the at least one application, the acceleration package set including at least one acceleration package;
[0241] The resource is configured for the at least one application according to the target configuration policy.
[0242] It should be understood that in the embodiment of the present application, the processor 801 may be a CPU, and the processor 801 may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete device components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0243] The memory 802 may include a read-only memory and a random access memory, and provides instructions and data to the processor 801. The memory 802 may also include a nonvolatile random access memory.
[0244] The memory 802 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0245] The communication interface 803 is used to communicate with other devices connected to the computing device 800. The bus 804 may include a power bus, a control bus, a status signal bus, etc. in addition to the data bus. However, for the sake of clarity, various buses are labeled as bus 804 in the figure.
[0246] It should be understood that the computing device 800 according to the embodiment of the present application may correspond to the training device 300 or the resource configuration device 400 in the embodiment of the present application, and may correspond to executing the training device 300 or the resource configuration device 400 in the embodiment of the present application. Figure 2 The method performed by the training device 300 or the resource configuration device 400 in the method shown in the embodiment, and the above and other operations and / or functions implemented by the computing device 800 are respectively to implement Figure 2 For the sake of brevity, the processes of the corresponding methods in the embodiments are not repeated here.
[0247] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned training method and resource configuration method.
[0248] The embodiment of the present application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0249] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0250] The computer program product may be a software installation package. When any of the aforementioned training methods and resource configuration methods is needed, the computer program product may be downloaded and executed on a computing device.
[0251] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0252] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A training method, characterized in that: include: Execute policy training based on system resource parameters and an acceleration package set for an application, wherein the acceleration package set includes at least one acceleration package; After executing the policy training, a first configuration policy is output, where the first configuration policy is used to perform performance tuning on a first application set, where the first application set includes at least one first application.
2. The method according to claim 1, characterized in that The acceleration package set is used to accelerate a plurality of application sets of different types or with different identifiers; The method also includes: creating a correspondence between the first configuration policy and the first application set.
3. The method according to claim 1 or 2, characterized in that: The first configuration strategy includes at least one of a subset of the system resource parameters and a subset of the acceleration package set.
4. The method according to any one of claims 1 to 3, characterized in that: The at least one first application is deployed in a host, or the at least one first application is deployed in a virtualized instance.
5. The method according to any one of claims 1 to 4, characterized in that: The output first configuration strategy specifically includes: When a result obtained by performing performance detection on the at least one first application indicates that the performance of the at least one first application meets a performance standard condition, a first configuration policy corresponding to the first application set is output.
6. The method according to claim 5, characterized in that The execution strategy training based on the system resource parameters and the acceleration package set for the application includes: Acquire multiple historical performance test results, where the historical performance test results are results generated by performing a performance test on at least one first application in the first application set within a historical time period, each of the multiple historical performance test results fails to meet the performance compliance condition, and at least one first application in the first application set generates different historical performance test results based on different configuration strategies; The first configuration strategy is obtained by optimizing the plurality of historical performance test results.
7. The method according to any one of claims 1 to 6, characterized in that: The strategy training is performed based on the system resource parameters and the acceleration package set for the application: Obtaining the type or identifier of the first application set; Policy training is performed based on the system resource parameters and a set of acceleration packages corresponding to the type or identifier of the first set of applications.
8. The method according to any one of claims 1 to 7, characterized in that: Also includes: The first configuration policy is used to configure resources for second applications included in a second application set, where the type of the second application set is the same as that of the first application set, or the identifier of the second application set is the same as that of the first application set.
9. The method according to claim 8, characterized in that The deployment method of the first application set is the same as the deployment method of the second application set.
10. A resource configuration method, characterized in that: include: Selecting a target configuration policy from a plurality of configuration policies according to an identifier or type of an application set, the application set including at least one application, the target configuration policy being used to indicate resources allocated to the at least one application, the resources including system resources and an acceleration package set for the at least one application, the acceleration package set including at least one acceleration package; The resource is configured for the at least one application according to the target configuration policy.
11. The method according to claim 10, characterized in that The performance of the at least one application when running based on the resource meets the performance standard condition.
12. The method according to claim 10 or 11, characterized in that: The at least one application is deployed on one computing device, or the at least one application is deployed on multiple computing devices included in a computing device cluster.
13. The method according to claim 12, characterized in that Configuring the resource for at least one application according to the target configuration policy specifically includes: The resources are configured for the at least one application on a plurality of computing devices included in the deployed computing device cluster according to the target configuration policy.
14. The method according to any one of claims 10 to 13, characterized in that Also includes: Execute policy training based on a system resource parameter and a set of acceleration packages for an application, wherein the system resource parameter is used to indicate the system resource; After executing the policy training, a first configuration policy is output, where the first configuration policy is used to perform performance tuning on at least one application included in the trained application set, and the first configuration policy is one of the multiple configuration policies.
15. The method according to claim 14, characterized in that The execution strategy training based on the system resource parameters and the acceleration package set for the application includes: Obtaining the type or identifier of the training application set; Policy training is performed based on the system resource parameters and a set of acceleration packages corresponding to the type or identifier of the trained application set.
16. The method according to claim 14 or 15, characterized in that The acceleration package set is used to accelerate a plurality of application sets of different types or with different identifications. The method further includes: creating a correspondence between the first configuration strategy and the trained application set.
17. The method according to any one of claims 14 to 16, characterized in that The first configuration strategy includes at least one of a subset of the system resource parameters and a subset of the acceleration package set.
18. The method according to claim 14, characterized in that The output first configuration strategy specifically includes: When a result obtained by performing performance detection on at least one application included in the trained application set indicates that the performance of at least one application included in the trained application set meets the performance standard condition, a first configuration policy corresponding to the trained application set is output.
19. The method according to claim 18, characterized in that The execution strategy training based on the system resource parameters and the acceleration package set for the application includes: Acquire multiple historical performance test results, where the historical performance test results are results generated by performing performance tests on at least one application included in the trained application set within a historical time period, each of the multiple historical performance test results fails to meet the performance standard condition, and at least one application included in the trained application set generates different historical performance test results based on different configuration strategies; The first configuration strategy is obtained by optimizing the plurality of historical performance test results.
20. A training device, characterized in that: The device comprises: A training module, configured to perform policy training based on system resource parameters and an acceleration package set for an application, wherein the acceleration package set includes at least one acceleration package; The output module is used to output a first configuration strategy after executing strategy training, where the first configuration strategy is used to perform performance tuning on a first application set, where the first application set includes at least one first application.
21. The device according to claim 20, characterized in that Also includes: A creation module is used to create a correspondence between the first configuration policy and the first application set, wherein the acceleration package set is used to accelerate application sets of multiple different types or with different identifiers.
22. The device according to claim 20 or 21, characterized in that The first configuration strategy includes at least one of a subset of the system resource parameters and a subset of the acceleration package set.
23. The device according to any one of claims 20 to 22, characterized in that The output module is specifically configured to output a first configuration policy corresponding to the first application set when a result obtained by performing performance detection on the at least one first application indicates that the performance of the at least one first application meets a performance compliance condition.
24. A device for resource allocation, characterized in that: The device comprises: A selection module, configured to select a target configuration policy from a plurality of configuration policies according to an identifier or type of an application set, wherein the application set includes at least one application, and the target configuration policy is used to indicate resources allocated to the at least one application, wherein the resources include system resources and an acceleration package set for the at least one application, and the acceleration package set includes at least one acceleration package; A configuration module is used to configure the resource for the at least one application according to the target configuration policy.
25. The device according to claim 24, characterized in that The performance of the at least one application when running based on the resource meets the performance standard condition.
26. The device according to claim 24 or 25, characterized in that The at least one application is deployed on one computing device, or the at least one application is deployed on multiple computing devices included in a computing device cluster.
27. The device according to claim 26, characterized in that The configuration module is specifically configured to configure the resources for the at least one application on a plurality of computing devices included in the deployed computing device cluster according to the target configuration policy.
28. A computing device, characterized in that Including processor and memory; The processor is configured to execute instructions stored in the memory so as to enable the computing device to perform the steps of the method according to any one of claims 1 to 19.
29. A computer program product comprising instructions, characterized in that When it is executed on at least one computing device, the at least one computing device is enabled to perform the steps of the method according to any one of claims 1 to 19.
30. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computing device, cause the computing device to perform the steps of the method according to any one of claims 1 to 19.
31. A data processing system, characterized in that: The data processing system includes a training device and a resource configuration device, the training device is used to execute the method as described in any one of claims 1-7, and the resource configuration device is used to execute the method as described in any one of claims 10-13.
32. The data processing system according to claim 31, characterized in that Also includes: At least one computing device is used to deploy an application.
Citation Information
Cited By
Training method and apparatus, resource configuration method and apparatus, system and related device
EP4745767A1
Training method and apparatus, resource configuration method and apparatus, system and related device
WO2025039530A1