A Workload-Aware Hybrid Scheduling Method and System for Containers and Virtual Machines

Through the mixed scheduling method of workload-aware container and virtual machine, containers or virtual machines are dynamically selected to achieve unified resource management and dynamic adjustment, solving the problems of low resource utilization efficiency, mismatch of workload characteristics and insufficient fault recovery capabilities in the existing technology, and improving the flexibility and fault recovery capabilities of the system.

CN119883577BActive Publication Date: 2025-07-01NAT UNIV OF DEFENSE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510372908.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-07-01
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

The existing hybrid scheduling technologies of container and virtual machine have problems such as low resource utilization efficiency, mismatch in workload characteristics and insufficient failure recovery capabilities, resulting in increased operation and maintenance complexity, waste of resources and degradation in multi-tenant and multi-environment.

Method used

The mixed scheduling method of workload-aware container and virtual machine is adopted. By collecting resource pool resource information and application resource request information, analyzing workload characteristics, dynamically selecting containers or virtual machines as publishing types, scheduling generates allocated resource information and publishing node information, and realizing unified management and dynamic adjustment of resources.

Benefits of technology

Improve the flexibility, resource utilization and failure recovery capabilities of the hybrid scheduling system of containers and virtual machines, simplify operation and maintenance work, avoid resource waste and performance degradation, and ensure business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883577B_ABST
    Figure CN119883577B_ABST
Patent Text Reader

Abstract

The present invention discloses a workload-aware hybrid scheduling method and system for containers and virtual machines. The present invention includes collecting resource information of a resource pool, where the resource pool is used to uniformly manage physical resources of multiple nodes; obtaining application resource request information of an application; judging the request type according to the application information included in the application resource request information of the application. If the request type is a request for publishing the application, then analyze the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, dynamically select the publishing type information as a container or a virtual machine according to the workload characteristics of the application, schedule and generate allocation resource information and publishing node information of the application; and publish the application to the node corresponding to the publishing node information. The present invention aims to solve the problems of resource fragmentation and scheduling complexity in the existing solutions, and improve the flexibility, resource utilization rate and fault recovery ability of the container and virtual machine hybrid scheduling system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to virtualization technology in the field of computers, and particularly to a method and system for hybrid scheduling of workload-aware containers and virtual machines. Background Art

[0002] A container is a lightweight virtualization technology that can package an application and its dependent libraries, environment, etc. into an executable unit, thereby enabling cross-platform and cross-environment deployment and operation. Container technology can provide great flexibility for system administrators during the process of building instances on demand and has become a widely recognized way of sharing server resources. A virtual machine is a software technology that allows multiple virtual computers to be simulated on a physical computer. Each virtual machine can run its own operating system and applications, just like on an independent physical computer. Virtual machines achieve this goal by abstracting the hardware resources (such as CPU, memory, hard disk) of the computer through virtualization technology.

[0003] Currently, the hybrid scheduling technology of containers and virtual machines has developed rapidly, but still faces some core challenges and limitations. Hybrid scheduling refers to running containers and virtual machines simultaneously in the same environment and using a scheduling system to effectively manage resources and allocate tasks. Existing hybrid scheduling technologies mainly include the following several types:

[0004] a. Independent but parallel scheduling frameworks. Most current hybrid scheduling implementations rely on multiple independent orchestration and management tools (such as Kubernetes for managing containers, OpenStack or vSphere for managing virtual machines). These tools usually operate independently and do not achieve true joint scheduling, resulting in limited ability to coordinate and share resources between containers and virtual machines. The primary form of hybrid scheduling is usually to deploy containers and virtual machines separately on the same infrastructure, but they still have their own independent management and scheduling systems. This parallel running method will increase the complexity of operation and maintenance. Especially in multi-tenant and multi-environment scenarios, the management workload will increase rapidly.

[0005] b. Resource allocation based on static configuration. Existing scheduling methods mainly rely on static resource allocation. The scheduling system will pre-divide fixed resources for containers and virtual machines and cannot dynamically adjust resource usage according to the actual load. This static configuration may result in resource shortage or waste during a specific period. Although some systems can manually adjust or re-allocate resources through preset rules, this usually requires the intervention of operation and maintenance personnel and lacks automation and flexibility.

[0006] c. Limited dynamic scheduling and auto-scaling. Container management tools (such as Kubernetes) themselves have strong elasticity and dynamic scaling capabilities, and can automatically adjust the number of containers and their allocation according to load requirements. However, the elastic scaling of virtual machines is relatively slow and usually requires more resource management steps, resulting in less flexibility than containers when dealing with dynamically changing workloads. In a hybrid environment, when workloads need to migrate between containers and virtual machines, the limitations of existing scheduling systems become more obvious, making it difficult to achieve real-time response and adaptive resource adjustment.

[0007] In summary, the existing hybrid scheduling technologies for containers and virtual machines are still in their infancy and it is difficult to achieve highly optimized resource scheduling and system performance in large-scale multi-tenant environments. Most current hybrid scheduling implementations rely on multiple independent orchestration and management tools, which usually operate separately without true joint scheduling, resulting in limited ability to coordinate and share resources between containers and virtual machines. The primary form of hybrid scheduling usually involves deploying containers and virtual machines separately on the same infrastructure, but they still have their own independent management and scheduling systems. This parallel operation mode increases the complexity of operation and maintenance. Especially in multi-tenant and multi-environment scenarios, the management workload will increase rapidly. The existing hybrid scheduling technologies for containers and virtual machines mainly have the following defects: 1) Resource utilization efficiency: The independent scheduling of containers and virtual machines makes it difficult for the system to globally optimize resource utilization. Containers are usually more suitable for short-term tasks and lightweight workloads, while virtual machines are suitable for tasks that need to run for a long time and applications with persistent storage. In existing solutions, due to the fragmentation of resource pools, resource waste often occurs. 2) Mismatch of workload characteristics: In a hybrid scheduling system, some workloads may be more suitable to run in virtual machines or containers, but due to the lack of analysis ability of the scheduling system, the workload may be wrongly assigned to containers or virtual machines, resulting in performance degradation. 3) Insufficient fault recovery ability: In a hybrid scheduling environment, containers and virtual machines often lack unified fault recovery capabilities, resulting in limited overall fault recovery ability of the system. Especially when quick handling of emergencies is required, the response time of the system may not be sufficient to meet business requirements. In current systems, the lack of fault recovery ability affects the reliability of the overall system. Summary of the Invention

[0008] The technical problem to be solved by the present invention: In view of the above problems of the prior art, a workload-aware hybrid scheduling method and system for containers and virtual machines are provided. The present invention aims to solve the problems of resource fragmentation and scheduling complexity in existing solutions, and improve the flexibility, resource utilization rate, and fault recovery ability of the container and virtual machine hybrid scheduling system.

[0009] To solve the above technical problems, the technical solutions adopted by the present invention are as follows:

[0010] A workload-aware hybrid scheduling method for containers and virtual machines, comprising the following steps:

[0011] Collect resource information of the resource pool, where the resource pool is used to uniformly manage physical resources of multiple nodes;

[0012] Obtain the application resource request information of the application;

[0013] Judge the request type according to the application information included in the application resource request information of the application. If the request type is a request for publishing the application, jump to the next step;

[0014] Analyze the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, and dynamically select the publishing type information as a container or a virtual machine according to the workload characteristics of the application, and schedule and generate the allocated resource information and publishing node information of the application;

[0015] Publish the application to the node corresponding to the publishing node information according to the application information, its publishing type information, allocated resource information and publishing node information of the application, and complete the publishing operation of the application.

[0016] Optionally, the resource information of the resource pool refers to the current resource information of each node in the resource pool. The resource information includes the idle resource information of the node, container resource usage information and virtual machine resource usage information. The container resource usage information includes CPU container resource value, memory container resource value, disk container resource value and network container resource value; the virtual machine resource usage information includes CPU virtual machine resource value, memory virtual machine resource value, disk virtual machine resource value and network virtual machine resource value; the idle resource information includes CPU idle resource value, memory idle resource value, disk idle resource value and network idle resource value; the application resource request information includes application information, CPU requested resource value, memory requested resource value, disk requested resource value and network requested resource value information.

[0017] Optionally, the analyzing the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, and dynamically selecting the publishing type information as a container or a virtual machine includes:

[0018] Calculate the average value of the CPU container resource value, memory container resource value, disk container resource value and network container resource value in the container resource usage information to obtain the average container usage;

[0019] Calculate the average value of the CPU virtual machine resource value, memory virtual machine resource value, disk virtual machine resource value and network virtual machine resource value in the virtual machine resource usage information to obtain the average virtual machine usage;

[0020] Divide the average value of the container usage by the average value of the virtual machine usage to obtain the resource usage ratio value;

[0021] Judge whether the resource usage ratio value is greater than the preset highest threshold to obtain the sixth judgment result;

[0022] When the sixth judgment result is yes, determine that the virtual machine type is the release type information; when the sixth judgment result is no, judge whether the resource usage ratio value is less than the preset lowest threshold to obtain the seventh judgment result;

[0023] When the seventh judgment result is yes, determine that the container type is the release type information; when the seventh judgment result is no, judge the application load characteristic information: when the application load characteristic information is compute-intensive, determine that the container type is the release type information; when the application load characteristic information is memory-intensive, determine that the virtual machine type is the release type information; when the application load characteristic information is disk I / O-intensive, determine that the virtual machine type is the release type information; when the application load characteristic information is network I / O-intensive, determine that the container type is the release type information.

[0024] Optionally, when the scheduler generates the allocation resource information and the release node information of the application, the allocation resource information generated by the scheduler includes:

[0025] S411, obtain the historical application running resource set, where the historical application running resource set includes N historical application running resource information sets and the historical application IDs corresponding to the historical application running resource information sets; the historical application running resource information set includes several historical application running resource information; N is a positive integer;

[0026] S412, initialize the value of variable s to 1;

[0027] S413, judge whether the historical application ID corresponding to the s-th historical application running resource information set in the historical application running resource set is the same as the application ID of this application to obtain the second judgment result; when the second judgment result is yes, determine that the s-th historical application running resource information set is the to-be-processed historical application running resource information set; when the second judgment result is no, judge whether the variable s is equal to N to obtain the third judgment result: when the third judgment result is yes, execute step S414; when the third judgment result is no, increment the variable s by 1 and execute step S413;

[0028] S414, judge whether the variable s is equal to N to obtain the fourth judgment result: when the fourth judgment result is no, execute S415; when the fourth judgment result is yes, execute step S416;

[0029] S415. Calculate and process the historical application running resource information set to be processed to obtain the resource allocation information of the application, including: S4151. Perform data cleaning on the historical application running resource information set to be processed to obtain a preprocessed historical application running resource information set; S4152. Use a resource prediction model to calculate and process the preprocessed historical application running resource information set to obtain the resource allocation information of the application; the functional expression of the resource prediction model is:

[0030] ,

[0031] ,

[0032] ,

[0033] ,

[0034] ,

[0035] where is the th resource allocation information of the th physical resource of the application, is the th resource allocation information of the th physical resource of the application, , and are the th first smoothing component, second smoothing component and third smoothing component of the th physical resource respectively, , and are the th first smoothing component, second smoothing component and third smoothing component of the th physical resource respectively, is the th second smoothing component of the th physical resource, , and are the preset first smoothing coefficient, second smoothing coefficient and third smoothing coefficient respectively, is the number of historical application running resource information in the preprocessed historical application running resource information set, is the type index of the physical resource. The types of physical resources include CPU, memory, disk and network, and there are:

[0036] , ,

[0037] , ,

[0038] Among them, and are the first and second historical application running resource information in the pre - processed historical application running resource information set, is the first first - order smoothing component of the th physical resource; end;

[0039] S416. Calculate and process the application resource request information to obtain the resource allocation information of the application, including: S4161. Determine whether the application priority information is high - priority to obtain the fifth judgment result; when the fifth judgment result is yes, execute S4162; when the fifth judgment result is no, determine that the CPU request resource value, memory request resource value, disk request resource value, and network request resource value in the application resource request information are the CPU pre - allocation value, memory pre - allocation value, disk pre - allocation value, and network pre - allocation value respectively, and execute S4163; S4162. Use the first scheduling calculation model to calculate and process the CPU request resource value, memory request resource value, disk request resource value, and network request resource value in the application resource request information to obtain the CPU pre - allocation value, memory pre - allocation value, disk pre - allocation value, and network pre - allocation value; where the function expression of the first scheduling calculation model is:

[0040] ,

[0041] ,

[0042] ,

[0043] ,

[0044] Among them, 、 、 and are the CPU pre - allocation value, memory pre - allocation value, disk pre - allocation value, and network pre - allocation value respectively, 、 、 and are the CPU request resource value, memory request resource value, disk request resource value, and network request resource value respectively, 、 、 and are the preset first weight parameter, second weight parameter, third weight parameter, and fourth weight parameter respectively, and All are greater than 1; S4163. Judge the application load characteristic information: When the application load characteristic information is compute-intensive, multiply the CPU pre-allocation value by a preset fifth weight parameter to obtain an updated CPU pre-allocation value, and determine the updated CPU pre-allocation value as the CPU pre-allocation value; When the application load characteristic information is memory-intensive, multiply the memory pre-allocation value by a preset sixth weight parameter to obtain an updated memory pre-allocation value, and determine the updated memory pre-allocation value as the memory pre-allocation value; When the application load characteristic information is disk I / O-intensive, multiply the disk pre-allocation value by a preset seventh weight parameter to obtain an updated disk pre-allocation value, and determine the updated disk pre-allocation value as the disk pre-allocation value; When the application load characteristic information is network I / O-intensive, multiply the network pre-allocation value by a preset eighth weight parameter to obtain an updated network pre-allocation value, and determine the updated network pre-allocation value as the network pre-allocation value; S4164. Perform a merging process on the CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value to obtain the resource allocation information for this application.

[0045] Optionally, when the scheduler generates the allocation resource information and the publishing node information for this application, the scheduler generating the publishing node information for this application includes:

[0046] Screen L idle resource information from the current resource information of the resource pool to obtain a preprocessed idle resource information set; The preprocessed idle resource information set includes several preprocessed idle resource information; The CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value in the preprocessed idle resource information are all greater than the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value in the application resource request information.

[0047] Judge the application load characteristic information: When the application load characteristic information is compute-intensive, determine the CPU idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information; When the application load characteristic information is memory-intensive, determine the memory idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information; When the application load characteristic information is disk I / O-intensive, determine the disk idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information; When the application load characteristic information is network I / O-intensive, determine the network idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information.

[0048] Sort all the preprocessed idle resource information in descending order of the main resource value in the preprocessed idle resource information to obtain a target idle resource information set.

[0049] Determine the node corresponding to the first preprocessed idle resource information in the target idle resource information set as the publishing node information.

[0050] Optionally, determining the request type according to the application information included in the application resource request information of the application includes: judging whether the application identification information in the application information of the application is consistent with the preset application type information to obtain a first judgment result;

[0051] When the first judgment result is yes, it is determined that the request type is a request to publish the application;

[0052] When the first judgment result is no, it is determined that the request type is a request to migrate the application;

[0053] After the request type is a request to migrate the application, it further includes performing a migration operation on the application to implement the self-healing function of the faulty application.

[0054] Optionally, performing the migration operation on the application to implement the self-healing function of the faulty application includes:

[0055] Obtain the migration type information of the application, and the migration type information of the application is a virtual machine or a container;

[0056] Filter out a preprocessed idle resource information set according to the current resource information of the resource pool. The preprocessed idle resource information set includes several preprocessed idle resource information. The CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value in the preprocessed idle resource information are respectively greater than the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value in the application resource request information;

[0057] Perform calculation processing on the preprocessed idle resource information set to obtain migration node information, including: performing calculation processing on the preprocessed idle resource information set by using a second scheduling calculation model to obtain a set of idle resource thresholds ; the set of idle resource thresholds Includes several idle resource thresholds; the function expression of the second scheduling calculation model is:

[0058] ,

[0059] In the above formula, Is the i-th idle resource threshold in the set of idle resource thresholds ; , , And Let \(CPU_i\), \(Memory_i\), \(Disk_i\), and \(Network_i\) be the CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value of the \(i\)-th preprocessed idle resource information in the preprocessed idle resource information set, and \(L\) be the number of elements in the preprocessed idle resource information set;

[0060] Sort all the idle resource thresholds in descending order to obtain a set of target idle resource thresholds;

[0061] Determine the node corresponding to the first target idle resource threshold in the set of target idle resource thresholds as the migration node information;

[0062] Migrate the application to the node corresponding to the migration node information according to the migration type information and application resource request information of the application.

[0063] In addition, the present invention also provides a workload-aware container and virtual machine hybrid scheduling system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method.

[0064] In addition, the present invention also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method through a processor.

[0065] In addition, the present invention also provides a computer program product, including a computer program or instruction, and the computer program or instruction is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method through a processor.

[0066] Compared with the prior art, the present invention mainly has the following advantages:

[0067] 1. The present invention provides a unified scheduling method for containers and virtual machines, supporting the simultaneous scheduling of containers and virtual machines. By abstracting the underlying resources, all physical resources (CPU, memory, disk, network) are uniformly managed and allocated, and the joint management of containers and virtual machines is realized through a unified scheduling system, greatly simplifying the operation and maintenance work.

[0068] 2. The method of the present invention can analyze the characteristics of the workload (such as CPU-intensive, memory-intensive, network IO-intensive, disk IO-intensive), and dynamically select the best running environment (container or virtual machine) according to the requirements of the workload, introduce a resource allocation mechanism, adjust resource utilization according to the real-time load, and avoid the inefficiency problem of static configuration; it can automatically identify the workload characteristics and select the optimal execution environment to improve the overall performance of the system.

[0069] 3. The present invention can further integrate automated fault detection and self-healing functions. When an application fails, the system can automatically select a recovery strategy (such as migrating the workload), strengthen the automatic fault detection and self-healing capabilities, ensure business continuity; support seamless migration across platforms and dynamic load balancing, and achieve efficient scheduling and utilization of resources in the cloud environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Figure 1 It is a schematic diagram of the basic process of the method according to an embodiment of the present invention.

[0071] Figure 2 It is a schematic diagram of the system module structure in an embodiment of the present invention.

[0072] Figure 3 It is a complete schematic diagram of the method for realizing the self-healing function of a failed application by application migration in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0073] In order to enable those skilled in the art of the present technology to better understand the technical solutions of the present invention, the technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings in the embodiments of the present invention.

[0074] As Figure 1 shown, the method for hybrid scheduling of workload-aware containers and virtual machines in this embodiment includes the following steps:

[0075] S1. Collect resource information of the resource pool, where the resource pool is used to uniformly manage the physical resources of multiple nodes;

[0076] S2. Obtain the application resource request information of the application;

[0077] S3. Judge the request type according to the application information included in the application resource request information of the application. If the request type is a request to perform a publishing operation on the application, jump to the next step;

[0078] S4. Analyze the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, and dynamically select the publishing type information as a container or a virtual machine according to the workload characteristics of the application, and schedule to generate the allocation resource information and publishing node information of the application;

[0079] S5. According to the application information, its publishing type information, allocation resource information and publishing node information of the application, publish the application to the node corresponding to the publishing node information to complete the publishing operation of the application.

[0080] The method of this embodiment realizes the efficient hybrid scheduling of containers and virtual machines through mechanisms such as resource analysis, coordinated scheduling, and dynamic resource allocation at the scheduling level. This scheduling method can ensure the efficient utilization of resources and meet the needs of different tasks to the greatest extent. As Figure 2 shown, the scheduling system in this embodiment includes a unified resource pool module, a resource management module, and an execution module. The unified resource pool module is used to pool physical resources uniformly, collect resource information in the unified resource pool, and send the resource information to the resource management module; after obtaining the resource information, the resource management module receives application resource request information, analyzes the resource information and the application resource request information, determines the release type information and release node information required by the application resource request information, and sends the release type information and release node information to the execution module; after receiving the release type information and release node information, the execution module calls the API release interface according to the release type information to publish the application to the corresponding node. In addition, when an application fails, the resource management module receives the application information of the failed application, analyzes the migration type information of the failed application and the required migration node information, and sends the migration type information of the failed application and the required migration node information to the execution module. After receiving the migration type information of the failed application and the required migration node information, the execution module calls the API migration interface according to the migration type information of the failed application to migrate the failed application to the node corresponding to the migration node information, realizing the fault recovery of the application, so as to provide flexible scheduling support in case of failure.

[0081] When collecting the resource information of the resource pool in step S1 of this embodiment, the resource information of the resource pool refers to the current resource information of each (L) node in the resource pool. The resource information includes the idle resource information of the node, the container resource usage information, and the virtual machine resource usage information. The container resource usage information includes the CPU container resource value, the memory container resource value, the disk container resource value, and the network container resource value; the virtual machine resource usage information includes the CPU virtual machine resource value, the memory virtual machine resource value, the disk virtual machine resource value, and the network virtual machine resource value; the idle resource information includes the CPU idle resource value, the memory idle resource value, the disk idle resource value, and the network idle resource value.

[0082] It should be noted that the collection of the resource information in the resource pool can be carried out through tools such as Prometheus and Monasca, or through other collection tools. No specific limitation is made in the present invention.

[0083] It should be noted that the resource pool is a resource collection composed of multiple nodes. Each node in the resource pool can run containers or virtual machines. Nodes include but are not limited to servers, desktops, laptops, embedded devices, tablets, and virtual machines. Pooling operations can be performed on multiple nodes through one of Kubernetes, OpenStack, or other resource management tools to obtain a unified resource pool and uniformly manage the containers and virtual machines in the resource pool. Specifically, the embodiments of the present invention do not make limitations in this regard.

[0084] It should be noted that the container resource usage information is the resource information occupied by the containers running on all nodes in the resource pool; the virtual machine resource usage information is the resource information occupied by the virtual machines running on all nodes in the resource pool.

[0085] It should be noted that the L idle resource information represents the idle resource information of L nodes in the resource pool, and each node corresponds to one idle resource information. L is the total number of nodes in the resource pool.

[0086] When obtaining the application resource request information in step S2 of this embodiment, the application resource request information includes application information, CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value. Among them, the application information includes application identification information, application configuration information, application ID, application priority information, application running environment information, and application load characteristic information (including compute-intensive, memory-intensive, disk I / O-intensive, network I / O-intensive).

[0087] As Figure 3 shown, when judging the request type according to the application information included in the application resource request information of the application in step S3 of this embodiment, it includes: judging whether the application identification information in the application information of the application is consistent with the preset application type information to obtain a first judgment result;

[0088] When the first judgment result is yes, it is determined that the request type is a request to perform a release operation on the application, that is, execute S4;

[0089] When the first judgment result is no, it is determined that the request type is a request to perform a migration operation on the application;

[0090] After the request type is a request to perform a migration operation on the application, it further includes performing a migration operation on the application to implement the self-healing function of the faulty application. It should be noted that when the application identification information is consistent with the preset application type information, it indicates that the application is a new application, and a release operation will be performed on the application subsequently; when the application identification information is inconsistent with the preset application type information, it indicates that the application is a faulty application, and a migration operation will be performed on the application subsequently.

[0091] In this embodiment, step S4 respectively includes:

[0092] S41, perform a first analysis and processing on the resource information and the application resource request information to obtain the allocated resource information;

[0093] S42, perform a second analysis and processing on the resource information and the application resource request information to obtain the release type information;

[0094] S43, perform a third analysis and processing on the resource information and the application resource request information to obtain the preprocessed idle resource information set and the release node information. It should be noted that the execution order of the above first analysis and processing, second analysis and processing, and third analysis and processing can be adjusted according to needs.

[0095] In this embodiment, step S41 is used to perform the first analysis and processing, that is, schedule and generate the allocated resource information of the application. Specifically, the scheduling and generation of the allocated resource information of the application in this embodiment includes:

[0096] S411, obtain the historical application operation resource set, where the historical application operation resource set includes N historical application operation resource information sets and the historical application IDs corresponding to the historical application operation resource information sets; the historical application operation resource information set includes several historical application operation resource information; N is a positive integer;

[0097] S412, initialize and set the value of variable s to 1;

[0098] S413, determine whether the historical application ID corresponding to the s-th historical application operation resource information set in the historical application operation resource set is the same as the application ID of this application, and obtain a second judgment result; when the second judgment result is yes, determine the s-th historical application operation resource information set as the to-be-processed historical application operation resource information set; when the second judgment result is no, determine whether variable s is equal to N, and obtain a third judgment result: when the third judgment result is yes, execute step S414; when the third judgment result is no, increase variable s by 1 and execute step S413;

[0099] S414, determine whether variable s is equal to N, and obtain a fourth judgment result: when the fourth judgment result is no, execute S415; when the fourth judgment result is yes, execute step S416;

[0100] It should be noted that when the fourth judgment result is no, it means that a historical application ID matching the application ID is found in the historical application operation resource set; when the fourth judgment result is yes, it means that no historical application ID matching the application ID is found in the historical application operation resource set;

[0101] S415. Calculate and process the historical application running resource information set to be processed to obtain the resource allocation information of the application, including:

[0102] S4151. Perform data cleaning on the historical application running resource information set to be processed to obtain a preprocessed historical application running resource information set. It should be noted that the above data cleaning is processed using tools such as Talend, Informatica, Apache NiFi, etc., or other tools or algorithms can also be used, which is not limited in the embodiments of the present invention.

[0103] S4152. Use the resource prediction model to calculate and process the preprocessed historical application running resource information set to obtain the resource allocation information of the application. The function expression of the resource prediction model is:

[0104] ,

[0105] ,

[0106] ,

[0107] ,

[0108] ,

[0109] Wherein, is the th resource allocation information of the th physical resource of the application, is the th resource allocation information of the th physical resource of the application, , and are respectively the th first smoothing component, second smoothing component and third smoothing component of the th physical resource, , and are respectively the th first smoothing component, second smoothing component and third smoothing component of the th physical resource, is the th second smoothing component of the th physical resource, , and are respectively the preset first smoothing coefficient, second smoothing coefficient and third smoothing coefficient, is the quantity of historical application running resource information in the preprocessed historical application running resource information set, is the type index of physical resources. The types of physical resources include CPU, memory, disk, and network, and there are:

[0110] , ,

[0111] , ,

[0112] wherein, and are the first and second historical application running resource information in the preprocessed historical application running resource information set, is the first first smooth component of the th physical resource, and the type index of the physical resource is a positive integer, , when taking values of 1, 2, 3, and 4, they are respectively calculating the CPU historical resource value, memory historical resource value, disk historical resource value, and network historical resource value in the historical application running resource information in the preprocessed historical application running resource information set; end; It should be noted that the finally obtained resource allocation information is:

[0113] ( ),

[0114] wherein, are respectively the CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value in the resource allocation information. The above method can effectively predict the trend and periodic fluctuations of resource usage by using a resource prediction model to predict the current application based on historical application running resource information, optimize short-term and long-term resource allocation, which not only improves the performance of the system but also increases the robustness to changes in resource requirements, can significantly improve resource utilization efficiency, and reduce cost waste;

[0115] S416, calculate and process the application resource request information to obtain the resource allocation information of the application, including:

[0116] S4161, determine whether the application priority information is high priority to obtain the fifth judgment result; when the fifth judgment result is yes, execute S4162; when the fifth judgment result is no, determine that the CPU request resource value, memory request resource value, disk request resource value, and network request resource value in the application resource request information are respectively the CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value, and execute S4163; It should be noted that the application priority information is one of high priority or low priority;

[0117] S4162, using the first scheduling calculation model, performs calculation processing on the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value in the application resource request information to obtain the CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value; the function expression of the first scheduling calculation model is:

[0118] ,

[0119] ,

[0120] ,

[0121] ,

[0122] wherein, 、 、 and are the CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value respectively, 、 、 and are the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value respectively, 、 、 and are the preset first weight parameter, second weight parameter, third weight parameter, and fourth weight parameter respectively, and are all greater than 1; it should be noted that the first weight parameter, second weight parameter, third weight parameter, and fourth weight parameter can be set by the user or obtained according to historical data, and this embodiment does not make a limitation. As an optional implementation manner, in this embodiment, the first weight parameter, second weight parameter, third weight parameter, and fourth weight parameter are all 1.2;

[0123] S4163. Determine the application load characteristic information: When the application load characteristic information is compute-intensive, multiply the pre-allocated CPU value by a preset fifth weight parameter to obtain an updated pre-allocated CPU value, and determine the updated pre-allocated CPU value as the pre-allocated CPU value; when the application load characteristic information is memory-intensive, multiply the pre-allocated memory value by a preset sixth weight parameter to obtain an updated pre-allocated memory value, and determine the updated pre-allocated memory value as the pre-allocated memory value; when the application load characteristic information is disk I / O-intensive, multiply the pre-allocated disk value by a preset seventh weight parameter to obtain an updated pre-allocated disk value, and determine the updated pre-allocated disk value as the pre-allocated disk value; when the application load characteristic information is network I / O-intensive, multiply the pre-allocated network value by a preset eighth weight parameter to obtain an updated pre-allocated network value, and determine the updated pre-allocated network value as the pre-allocated network value. It should be noted that the fifth weight parameter, the sixth weight parameter, the seventh weight parameter, and the eighth weight parameter can be set by the user or obtained from historical data. The embodiments of the present invention do not make any limitations. As an optional implementation, in this embodiment, the fifth weight parameter, the sixth weight parameter, the seventh weight parameter, and the eighth weight parameter are all 1.05. It should be noted that the application load characteristic information is one of compute-intensive, memory-intensive, disk I / O-intensive, or network I / O-intensive, and the application load characteristic information is used to characterize what type of intensive application the application is.

[0124] S4164. Combine the pre-allocated CPU value, the pre-allocated memory value, the pre-allocated disk value, and the pre-allocated network value to obtain the resource allocation information for the application. For example, when the pre-allocated CPU value is 1, the pre-allocated memory value is 2, the pre-allocated disk value is 3, and the pre-allocated network value is 4, the combined resource allocation information is (1, 2, 3, 4). Through the above method, it is possible to effectively avoid performance degradation or increased latency caused by resource competition. Especially in a high-concurrency or resource-constrained environment, it can ensure that high-priority tasks and tasks of different intensiveness are always in the best execution state, while avoiding inefficient allocation of resources in the system.

[0125] S42. Perform a second analysis process on the resource information and the application resource request information to obtain the release type information.

[0126] In this embodiment, the second analysis process in step S42 is used to analyze the workload characteristics of the application based on the application resource request information and the current resource information in the resource pool, and dynamically select the release type information as a container or a virtual machine according to the workload characteristics of the application. Specifically, in this embodiment, analyzing the workload characteristics of the application based on the application resource request information and the current resource information in the resource pool, and dynamically selecting the release type information as a container or a virtual machine includes:

[0127] S421. Calculate the average value of the CPU container resource value, memory container resource value, disk container resource value, and network container resource value in the container resource usage information to obtain the average container usage;

[0128] S422. Calculate the average value of the CPU virtual machine resource value, memory virtual machine resource value, disk virtual machine resource value, and network virtual machine resource value in the virtual machine resource usage information to obtain the average virtual machine usage;

[0129] S423. Divide the average container usage by the average virtual machine usage to obtain the resource usage ratio value;

[0130] S424. Determine whether the resource usage ratio value is greater than the preset highest threshold to obtain the sixth judgment result;

[0131] When the sixth judgment result is yes, determine that the virtual machine type is the release type information; when the sixth judgment result is no, determine whether the resource usage ratio value is less than the preset lowest threshold to obtain the seventh judgment result;

[0132] When the seventh judgment result is yes, determine that the container type is the release type information; when the seventh judgment result is no, then jump to step S425;

[0133] As an optional implementation manner, the preset highest threshold in this embodiment is 0.8, and the preset lowest threshold is 0.2;

[0134] S425. Judge the application load characteristic information: when the application load characteristic information is compute-intensive, determine that the container type is the release type information; when the application load characteristic information is memory-intensive, determine that the virtual machine type is the release type information; when the application load characteristic information is disk I / O-intensive, determine that the virtual machine type is the release type information; when the application load characteristic information is network I / O-intensive, determine that the container type is the release type information.

[0135] In this embodiment, the workload characteristics of the application are analyzed based on the application resource request information and the current resource information of the resource pool. The method of dynamically selecting the publishing type information as a container or a virtual machine according to the workload characteristics of the application can effectively improve the resource utilization rate and increase the robustness of the system by selecting different operating environments according to different application workload characteristic information. By publishing compute-intensive and network-intensive applications using containers, the fast startup, low overhead, and elastic scaling characteristics of containers can be fully utilized to achieve efficient computing and network interaction; by publishing memory-intensive and disk I / O-intensive applications using virtual machines, the stable resource allocation and isolation of virtual machines can be utilized to ensure that these tasks obtain the best performance in a stable resource environment. Through the method of dynamically selecting the publishing type information as a container or a virtual machine according to the workload characteristics of the application in this embodiment, the system can reduce costs while maintaining high performance and ensure the reliability and security of critical tasks.

[0136] In this embodiment, the third analysis and processing in step S43 can analyze and schedule to generate the publishing node information of the application, and obtain the preprocessed idle resource information set and the publishing node information. Specifically, when scheduling and generating the allocated resource information and the publishing node information of the application in this embodiment, the generation of the publishing node information of the application includes:

[0137] S431, screening L idle resource information in the current resource information of the resource pool to obtain a preprocessed idle resource information set; the preprocessed idle resource information set includes several preprocessed idle resource information; the CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value in the preprocessed idle resource information are all greater than the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value in the application resource request information;

[0138] S432, judging the application workload characteristic information:

[0139] When the application workload characteristic information is compute-intensive, determining the CPU idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information;

[0140] When the application workload characteristic information is memory-intensive, determining the memory idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information;

[0141] When the application workload characteristic information is disk I / O-intensive, determining the disk idle resource value of the preprocessed idle resource information as the main resource value of the preprocessed idle resource information;

[0142] When the application load characteristic information is network I / O intensive, determine that the network idle resource value of the preprocessing idle resource information is the main resource value of the preprocessing idle resource information;

[0143] S433. Sort all the preprocessing idle resource information in descending order according to the main resource value in the preprocessing idle resource information to obtain a target idle resource information set;

[0144] S434. Determine that the node corresponding to the first preprocessing idle resource information in the target idle resource information set is the publishing node information.

[0145] The method for scheduling and generating the publishing node information of this embodiment can maximize the use of the advantageous resources of the node, avoid resource waste and uneven load distribution, improve the overall resource utilization rate, and reduce the performance bottleneck caused by unreasonable resource allocation.

[0146] Step S5 of this embodiment is used to publish the application to the node corresponding to the publishing node information according to the application information, its publishing type information, allocated resource information and publishing node information of the application, and complete the publishing operation of the application. It should be noted that publishing the application to the node corresponding to the publishing node information according to the allocated resource information, application configuration information and publishing type information is created by calling the API interface for creating the application. For example, when using Kubernetes to uniformly manage containers and virtual machines, if the publishing type information of the application is of container type, then use the allocated resource information and application configuration information to call the API interface for creating a container in Kubernetes to publish the application to the node corresponding to the publishing node information; if the publishing type information of the application is of virtual machine type, then use the allocated resource information and application configuration information to call the API interface for creating a virtual machine in Kubernetes to publish the application to the node corresponding to the publishing node information. Specifically, the embodiments of the present invention do not make specific limitations.

[0147] See Figure 3 , in this embodiment, performing a migration operation on the application to implement the self-healing function of the faulty application includes:

[0148] S6. Obtain the migration type information of the application, where the migration type information of the application is a virtual machine or a container; screen out the preprocessed idle resource information set according to the current resource information of the resource pool. The preprocessed idle resource information set includes several pieces of preprocessed idle resource information. The CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value in the preprocessed idle resource information are respectively greater than the CPU requested resource value, memory requested resource value, disk requested resource value, and network requested resource value in the application resource request information. It should be noted that the migration type information is one of the virtual machine or container types. When the application is a faulty application, the migration type information is obtained according to the information of the application currently running in the resource pool. Exemplarily, it can be monitored and obtained through Prometheus or other tools, and the embodiments of the present invention do not make specific limitations;

[0149] S7. Perform calculation processing on the preprocessed idle resource information set to obtain migration node information, including:

[0150] S71. Use the second scheduling calculation model to perform calculation processing on the preprocessed idle resource information set to obtain a set of idle resource thresholds ; The set of idle resource thresholds includes several idle resource thresholds; the function expression of the second scheduling calculation model is:

[0151] ,

[0152] In the above formula, is the i-th idle resource threshold in the set of idle resource thresholds ; , , and are the CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value of the i-th preprocessed idle resource information in the preprocessed idle resource information set, and L is the number of elements in the preprocessed idle resource information set;

[0153] S72. Sort all the idle resource thresholds in descending order to obtain a set of target idle resource thresholds;

[0154] S73. Determine the node corresponding to the first target idle resource threshold in the set of target idle resource thresholds as the migration node information; through the above method, the overall resource utilization rate of the node can be improved, the node resources can be prevented from being idle, and at the same time, it is ensured that the application has sufficient resources to achieve its maximum performance. At the same time, it can reduce the downtime or performance bottleneck caused by node overload, make the load of each node more uniform, can extend the service life of the hardware, and reduce the "hot spot" nodes in the system;

[0155] S8. Migrate the application to the node corresponding to the migration node information according to the migration type information and application resource request information of the application. It should be noted that migrating the application to the node corresponding to the migration node information according to the migration type information and application resource request information is created by calling the API interface for migrating the application. For example, when using Kubernetes to uniformly manage containers and virtual machines, if the migration type information of the application is of the container type, then utilize the application resource request information to call the API interface for migrating containers in Kubernetes to migrate the application to the node corresponding to the migration node information; if the migration type information of the application is of the virtual machine type, then utilize the application resource request information to call the API interface for migrating virtual machines in Kubernetes to migrate the application to the node corresponding to the migration node information. Specifically, it is not limited in the embodiments of the present invention.

[0156] In summary, the method of this embodiment provides a unified scheduling method that supports scheduling containers and virtual machines simultaneously. By abstracting the underlying resources, all physical resources (CPU, memory, disk, network) are uniformly managed and allocated. The method of this embodiment can analyze the characteristics of the workload (such as CPU-intensive, memory-intensive, network IO-intensive, disk IO-intensive), and dynamically select the best running environment (container or virtual machine) according to the requirements of the workload. The method of this embodiment integrates automated fault detection and self-healing functions. When an application fails, the system can automatically select a recovery strategy (such as migrating the workload). The method of this embodiment can effectively solve problems such as resource waste, scheduling fragmentation, and insufficient performance optimization in the prior art. Its core improvement features include: implementing the joint management of containers and virtual machines using a unified scheduling system, greatly simplifying the operation and maintenance work; introducing a resource allocation mechanism to adjust resource utilization according to the real-time load and avoid the inefficiency of static configuration; being able to automatically identify the characteristics of the workload and select the optimal execution environment to improve the overall performance of the system; strengthening the automatic fault detection and self-healing capabilities to ensure business continuity; supporting seamless migration across platforms and dynamic load balancing to achieve efficient scheduling and utilization of resources in the cloud environment.

[0157] In addition, this embodiment also provides a workload-aware container and virtual machine hybrid scheduling system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method.

[0158] In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method through a processor.

[0159] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method through a processor.

[0160] Those skilled in the art should understand that the technical solutions provided by the embodiments of the present invention can be in the form of a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one or more of the processes and / or blocks Figure 1 These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one or more of the processes and / or blocks Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one or more of the processes and / or blocks Figure 1 one or more of the blocks.

[0161] The above are only the preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A workload-aware container and virtual machine hybrid scheduling method, characterized in that: The steps include: Collecting resource information of a resource pool, where the resource pool is used to uniformly manage physical resources of multiple nodes; Get application resource request information of the application; Determine the request type according to the application information contained in the application resource request information of the application. If the request type is a request to publish the application, jump to the next step. Analyze the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, dynamically select the publishing type information as container or virtual machine according to the workload characteristics of the application, and schedule and generate the allocated resource information and publishing node information of the application; According to the application information and its publishing type information, allocated resource information and publishing node information of the application, the application is published to the node corresponding to the publishing node information to complete the publishing operation of the application; Analyzing the workload characteristics of the application based on the application resource request information and the current resource information of the resource pool, and dynamically selecting the publishing type information as a container or a virtual machine according to the workload characteristics of the application includes: The CPU container resource value, memory container resource value, disk container resource value, and network container resource value in the container resource usage information are averaged to obtain the average container usage; Calculate the average of the CPU virtual machine resource value, the memory virtual machine resource value, the disk virtual machine resource value, and the network virtual machine resource value in the virtual machine resource usage information to obtain the average virtual machine usage; Divide the average container usage by the average virtual machine usage to get the resource usage ratio value; Determine whether the resource usage ratio value is greater than a preset maximum threshold value, and obtain a sixth determination result; When the sixth judgment result is yes, determine that the virtual machine type is publishing type information; when the sixth judgment result is no, determine whether the resource usage ratio value is less than a preset minimum threshold value to obtain a seventh judgment result; When the result of the seventh judgment is yes, the container type is determined to be the publishing type information; when the result of the seventh judgment is no, the application load characteristic information is judged: when the application load characteristic information is compute intensive, the container type is determined to be the publishing type information; when the application load characteristic information is memory intensive, the virtual machine type is determined to be the publishing type information; when the application load characteristic information is disk IO intensive, the virtual machine type is determined to be the publishing type information; when the application load characteristic information is network IO intensive, the container type is determined to be the publishing type information.

2. The workload-aware container and virtual machine hybrid scheduling method according to claim 1, characterized in that: The resource information of the resource pool refers to the current resource information of each node in the resource pool, and the resource information includes the idle resource information of the node, the container resource usage information and the virtual machine resource usage information, and the container resource usage information includes the CPU container resource value, the memory container resource value, the disk container resource value and the network container resource value; the virtual machine resource usage information includes the CPU virtual machine resource value, the memory virtual machine resource value, the disk virtual machine resource value and the network virtual machine resource value; the idle resource information includes the CPU idle resource value, the memory idle resource value, the disk idle resource value and the network idle resource value; the application resource request information includes the application information, the CPU request resource value, the memory request resource value, the disk request resource value and the network request resource value information.

3. The workload-aware container and virtual machine hybrid scheduling method according to claim 2, characterized in that: When the scheduling generates the allocated resource information and the publishing node information of the application, the scheduling generates the allocated resource information of the application including: S411, obtaining a historical application running resource set, wherein the historical application running resource set includes N historical application running resource information sets and historical application IDs corresponding to the historical application running resource information sets; the historical application running resource information set includes a number of historical application running resource information; N is a positive integer; S412, initializing and setting the value of variable s to 1; S413, judging whether the historical application ID corresponding to the sth historical application operation resource information set in the historical application operation resource set is consistent with the application ID of the application, and obtaining a second judgment result; when the second judgment result is yes, determining the sth historical application operation resource information set as the historical application operation resource information set to be processed; when the second judgment result is no, judging whether the variable s is equal to N, and obtaining a third judgment result: when the third judgment result is yes, executing step S414; when the third judgment result is no, increasing the variable s by 1, and executing step S413; S414, determine whether a historical application ID matching the application ID is found in the historical application running resource set, and obtain a fourth determination result: when the fourth determination result is no, it indicates that a historical application ID matching the application ID is found in the historical application running resource set, and step S415 is executed; when the fourth determination result is yes, it indicates that a historical application ID matching the application ID is not found in the historical application running resource set, and step S416 is executed; S415, calculating and processing the historical application operation resource information set to be processed to obtain the resource allocation information of the application, including: S4151, performing data cleaning processing on the historical application operation resource information set to be processed to obtain the pre-processed historical application operation resource information set; S4152, using a resource prediction model, calculating and processing the pre-processed historical application operation resource information set to obtain the resource allocation information of the application; the function expression of the resource prediction model is: , , , , , in, For this application The first physical resource Resource allocation information, For this application The first physical resource Resource allocation information, , and Respectively The first physical resource a first smooth component, a second smooth component and a third smooth component, , and Respectively The first physical resource a first smooth component, a second smooth component and a third smooth component, For the The first physical resource The second smoothing component, , and are respectively the preset first smoothing coefficient, the second smoothing coefficient and the third smoothing coefficient, The number of historical application running resource information in the preprocessing historical application running resource information set, It is the type index of physical resources. The types of physical resources include CPU, memory, disk and network, and there are: , , , , in, and To pre-process the first and second historical application running resource information in the historical application running resource information set, For the The first smooth component of the first physical resource; end; S416, calculating and processing the application resource request information to obtain the resource allocation information of the application, including: S4161, judging whether the application priority information is a high priority, and obtaining a fifth judgment result; when the fifth judgment result is yes, executing S4162; when the fifth judgment result is no, determining that the CPU request resource value, the memory request resource value, the disk request resource value, and the network request resource value in the application resource request information are respectively the CPU pre-allocated value, the memory pre-allocated value, the disk pre-allocated value, and the network pre-allocated value, and executing S4163; S4162, using the first scheduling calculation model, calculating and processing the CPU request resource value, the memory request resource value, the disk request resource value, and the network request resource value in the application resource request information to obtain the CPU pre-allocated value, the memory pre-allocated value, the disk pre-allocated value, and the network pre-allocated value; wherein the function expression of the first scheduling calculation model is: , , , , in, , , and They are CPU pre-allocation value, memory pre-allocation value, disk pre-allocation value, and network pre-allocation value. , , and They are CPU request resource value, memory request resource value, disk request resource value, and network request resource value. , , and are respectively a preset first weight parameter, a second weight parameter, a third weight parameter and a fourth weight parameter, and are all greater than 1; S4163, judging the application load characteristic information: when the application load characteristic information is compute-intensive, multiplying the CPU pre-allocation value by the preset fifth weight parameter to obtain an updated CPU pre-allocation value, and determining the updated CPU pre-allocation value to be the CPU pre-allocation value; when the application load characteristic information is memory-intensive, multiplying the memory pre-allocation value by the preset sixth weight parameter to obtain an updated memory pre-allocation value, and determining the updated memory pre-allocation value to be the memory pre-allocation value; when the application load characteristic information is disk IO intensive, multiplying the disk pre-allocation value by the preset seventh weight parameter to obtain an updated disk pre-allocation value, and determining the updated disk pre-allocation value to be the disk pre-allocation value; when the application load characteristic information is network IO intensive, multiplying the network pre-allocation value by the preset eighth weight parameter to obtain an updated network pre-allocation value, and determining the updated network pre-allocation value to be the network pre-allocation value; S4164, merging the CPU pre-allocation value, the memory pre-allocation value, the disk pre-allocation value, and the network pre-allocation value to obtain the resource allocation information of the application.

4. The workload-aware container and virtual machine hybrid scheduling method according to claim 2, characterized in that: When the scheduling generates the allocation resource information and the publishing node information of the application, the scheduling generates the publishing node information of the application including: Screening L idle resource information in the current resource information of the resource pool to obtain a preprocessing idle resource information set; the preprocessing idle resource information set includes a plurality of preprocessing idle resource information; the CPU idle resource value, the memory idle resource value, the disk idle resource value, and the network idle resource value in the preprocessing idle resource information are all greater than the CPU request resource value, the memory request resource value, the disk request resource value, and the network request resource value in the application resource request information; Judge the application load characteristic information: when the application load characteristic information is computationally intensive, determine the CPU idle resource value of the preprocessing idle resource information as the main resource value of the preprocessing idle resource information; when the application load characteristic information is memory intensive, determine the memory idle resource value of the preprocessing idle resource information as the main resource value of the preprocessing idle resource information; when the application load characteristic information is disk IO intensive, determine the disk idle resource value of the preprocessing idle resource information as the main resource value of the preprocessing idle resource information; when the application load characteristic information is network IO intensive, determine the network idle resource value of the preprocessing idle resource information as the main resource value of the preprocessing idle resource information; Sorting all pre-processed idle resource information in descending order of main resource values ​​in the pre-processed idle resource information to obtain a target idle resource information set; The node corresponding to the first pre-processed idle resource information in the target idle resource information set is determined as the publishing node information.

5. The workload-aware container and virtual machine hybrid scheduling method according to claim 2, characterized in that: The determining the request type according to the application information included in the application resource request information of the application includes: determining whether the application identification information in the application information of the application is consistent with the preset application type information, and obtaining a first determination result; When the first determination result is yes, determining that the request type is a request to publish the application; When the first determination result is no, determining that the request type is a request to perform a migration operation on the application; The request type is a request to perform a migration operation on the application, and further includes performing a migration operation on the application to implement a self-healing function of the failed application.

6. The workload-aware container and virtual machine hybrid scheduling method according to claim 5, characterized in that: The performing of the migration operation on the application to realize the self-healing function of the failed application includes: Obtain migration type information of the application, where the migration type information of the application is a virtual machine or a container; A preprocessing idle resource information set is screened out according to the current resource information of the resource pool, wherein the preprocessing idle resource information set includes a plurality of preprocessing idle resource information, wherein a CPU idle resource value, a memory idle resource value, a disk idle resource value, and a network idle resource value in the preprocessing idle resource information are respectively greater than a CPU request resource value, a memory request resource value, a disk request resource value, and a network request resource value in the application resource request information; The pre-processed idle resource information set is calculated to obtain the migration node information, including: using the second scheduling calculation model to calculate the pre-processed idle resource information set to obtain the idle resource threshold set ; Idle resource threshold set Including several idle resource thresholds; the function expression of the second scheduling calculation model is: , In the above formula, Idle resource threshold set The i-th idle resource threshold in ; , , and is the CPU idle resource value, memory idle resource value, disk idle resource value, and network idle resource value of the i-th preprocessing idle resource information in the preprocessing idle resource information set, and L is the number of elements in the preprocessing idle resource information set; All idle resource thresholds are sorted in descending order to obtain a target idle resource threshold set; Determine the node corresponding to the first target idle resource threshold in the target idle resource threshold set as the migration node information; According to the migration type information and application resource request information of the application, the application is migrated to the node corresponding to the migration node information.

7. A workload-aware container and virtual machine hybrid scheduling system, comprising an interconnected microprocessor and memory, characterized in that: The microprocessor is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method described in any one of claims 1 to 6 through a processor.

9. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the workload-aware container and virtual machine hybrid scheduling method described in any one of claims 1 to 6 through a processor.

Citation Information

Patent Citations

  • Joint scheduling method, device and system

    CN115686732A