Virtual machine scheduling method, electronic device, computer storage medium, and computer program product

By identifying the tenant business characteristics of virtual machines and demand-complementary scheduling, the problems of resource contention and low sales rate in virtual machine scheduling are solved, and the stability of tenant business performance and resource utilization efficiency are improved.

WO2025191367A1PCT designated stage Publication Date: 2025-09-18CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/IB2025/051625
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-14
Filing Date
2025-02-14
Publication Date
2025-09-18

AI Technical Summary

Technical Problem

Cloud service providers face the problem of resource contention and low resource sales rate caused by tenant business concurrency in virtual machine scheduling, making it difficult to simultaneously ensure the stability of tenant business performance and the host machine resource sales rate.

Method used

By determining the tenant business characteristics of the virtual machine, identifying its demand for multiple host resources, and scheduling the virtual machine to the host, the demand for virtual machines in the same host is in a demand complementary state, optimizing the host resource allocation and sales rate.

Benefits of technology

It effectively reduces resource competition between virtual machines, improves the sales rate of host resources, and reduces the operating costs of cloud service providers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure IB2025051625_18092025_PF_FP_ABST
    Figure IB2025051625_18092025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a virtual machine scheduling method, an electronic device, a computer storage medium, and a computer program product. The virtual machine scheduling method comprises: determining tenant service characteristics of each virtual machine among a plurality of virtual machines to be scheduled; on the basis of the tenant service characteristics of each virtual machine, determining a demand level of each virtual machine for various host machine resources; and scheduling the plurality of virtual machines onto at least one host machine, so that any two virtual machines in the same host machine are in a demand complementary state with respect to the demand level for each host machine resource, wherein the difference in demand levels between the two virtual machines in a demand complementary state exceeds a preset threshold.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Virtual Machine Scheduling Method, Electronic Device, Computer Storage Medium, and Computer Program Product Cross-Reference This disclosure claims priority to Chinese patent application number 202410292020.4, filed with the China Patent Office on March 14, 2024, entitled "Virtual Machine Scheduling Method, Electronic Device, Computer Storage Medium, and Computer Program Product," the entire contents of which are incorporated herein by reference. Technical Field Embodiments of the present disclosure relate to the field of computer technology, and more particularly to a virtual machine scheduling method, electronic device, computer storage medium, and computer program product. Background Cloud service providers, such as public clouds, private clouds, and hybrid clouds, can provide service resources to a large number of tenants, allowing tenants to focus on configuring, managing, and maintaining their business data without having to build the hardware required for the service resources. Generally speaking, cloud service providers provide service resources to tenants through virtual machines. By scheduling virtual machines onto host machines (e.g., typically servers) within the cloud service system, the virtual machines can use the host machine's underlying resources to run the tenant's business data. For example, host machine resources may include computing resources, memory bandwidth resources, storage resources, and power consumption resources. As the number of tenants increases, more host machine resources are sold to tenants via virtual machines. The higher the sell-through rate, the less flexibility the host machine resources provide for virtual machine business changes. On the one hand, when business volumes from different tenants run concurrently, host machine resource contention occurs. On the other hand, reserving sufficient host machine resources in advance for different tenant businesses results in a low resource sell-through rate. Therefore, a virtual machine scheduling solution is needed that can both ensure stable performance of tenant businesses and maintain a high sell-through rate for host machine resources, thereby reducing the operating costs of the cloud service provider. SUMMARY OF THE INVENTION In view of this, embodiments of the present disclosure provide a virtual machine scheduling method, electronic device, computer storage medium, and computer program product to address the aforementioned issues. According to a first aspect of an embodiment of the present disclosure, a virtual machine scheduling method, an electronic device, a computer storage medium, and a computer program product are provided. The virtual machine scheduling method includes: determining tenant service characteristics of each virtual machine among a plurality of virtual machines to be scheduled; determining, based on the tenant service characteristics of each virtual machine, the level of demand of each virtual machine for multiple host resources; and scheduling the plurality of virtual machines to be scheduled to at least one host machine such that the level of demand of any two virtual machines on the same host machine for each host resource is in a complementary state, wherein the difference in the level of demand of the two virtual machines in the complementary state exceeds a preset threshold.In another implementation of the present disclosure, determining tenant service characteristics of each of a plurality of virtual machines to be scheduled includes: monitoring resource usage data of at least one scheduled virtual machine for each virtual machine's tenant service on each host hardware providing multiple host resources; and determining the tenant service characteristics of each of the multiple virtual machines to be scheduled based on the resource usage data of each host hardware. In another implementation of the present disclosure, determining the level of demand for multiple host resources by each virtual machine based on the tenant service characteristics of each virtual machine includes: identifying the tenant service characteristics of each virtual machine to obtain a service scenario and service risk for each virtual machine; and determining the level of demand for the multiple host resources by each virtual machine based on the correlation between the service scenario and service risk of each virtual machine and the multiple host resources. In another implementation of the present disclosure, the method further includes: determining the total amount of resources that can be allocated to the multiple host resources by the multiple hosts; ranking the total amount of resources that can be allocated to the multiple hosts to determine resource priorities for the multiple hosts; and selecting the at least one host machine from the multiple hosts such that the resource priority of the at least one host machine is greater than a first preset priority threshold. In another implementation of the present disclosure, the method further includes: averaging the resource selling rates of each of the multiple host machines to obtain an average resource selling rate for the multiple host machines; and determining a first preset priority threshold such that the resource selling rate of at least one host machine is less than the average resource selling rate. In another implementation of the present disclosure, determining the total amount of resources allocatable to the multiple host machines for the multiple host resources includes: determining the amount of resources allocatable to each of the multiple host machines for each host resource; and weighting the multiple allocatable resource amounts for each host machine for the multiple host resources using weight coefficients for the multiple host resources to determine the total amount of resources allocatable to the multiple host machines. In another implementation of the present disclosure, the method further includes: rescheduling a target scheduled virtual machine from each of the multiple scheduled virtual machines such that the resource priority of the host machine on which the target scheduled virtual machine resides before the rescheduling is greater than the resource priority of the host machine on which the target scheduled virtual machine resides after the rescheduling. In another implementation of the present disclosure, the method further includes: determining a scheduled virtual machine among the scheduled virtual machines whose rescheduling priority is higher than a second preset priority threshold as a target scheduled virtual machine, wherein the current resource occupancy ratio of the scheduled virtual machine to multiple host machine resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.In another implementation of the present disclosure, the method further includes: monitoring, for each host resource, the rated resource capacity of the processing unit of the host machine where each scheduled virtual machine resides, and the resource occupancy of at least one processing core allocated by the processing unit to each scheduled virtual machine; and determining the ratio between the resource occupancy of the at least one processing core and the rated resource capacity of the processing unit as the current resource occupancy ratio of each scheduled virtual machine for the host resource. According to a second aspect of an embodiment of the present disclosure, a virtual machine scheduling apparatus is provided, comprising: a first determination component configured to determine tenant service characteristics of each virtual machine among a plurality of virtual machines to be scheduled; a second determination component configured to determine, based on the tenant service characteristics of each virtual machine, the level of demand of each virtual machine for multiple host resources; and a scheduling component configured to schedule the plurality of virtual machines to be scheduled to at least one host machine such that the level of demand of any two virtual machines on the same host machine for each host resource is in a complementary state, wherein the difference in the level of demand of the two virtual machines in the complementary state exceeds a preset threshold. According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is configured to store at least one executable instruction, wherein the executable instruction causes the processor to perform operations corresponding to the method described in the first aspect. According to a fourth aspect of an embodiment of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the program is executed by the processor, the method described in the first aspect is implemented. According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program / instructions. When the computer program / instructions are executed by the processor, the method described in the first aspect is implemented. According to a sixth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the method described in the first aspect is implemented. According to a seventh aspect of an embodiment of the present disclosure, a computer program is provided. When the computer program is executed by the processor, the method described in the first aspect is implemented.In the embodiments of the present disclosure, the tenant service characteristics of a virtual machine reliably reflect the virtual machine's demand for various host resources. When multiple virtual machines to be scheduled are scheduled to at least one host, the resource sales rate can be maximized. Furthermore, after the scheduling of the multiple virtual machines to be scheduled, the difference in demand between two virtual machines in a complementary demand state exceeds a preset threshold, thereby reducing resource contention between different virtual machines to be scheduled on the same host. BRIEF DESCRIPTION OF THE DRAWINGS To more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the figures required for use in the embodiments or prior art descriptions. Obviously, the figures described below are only some of the embodiments described in the embodiments of the present disclosure. Those skilled in the art can also obtain other figures based on these figures. Figure 1 is a schematic block diagram of some example cloud service systems. Figure 2 is a flowchart of the steps of the virtual machine scheduling method in some embodiments of the present disclosure. Figure 3A is a schematic diagram of the process for calculating the resource demand of a tenant service in an example of the embodiment of Figure 2. Figure 3B is a schematic diagram of the scheduling principle in an example of the embodiment of Figure 2. Figure 4 is a flowchart of the steps of the virtual machine scheduling method in some other embodiments of the present disclosure. Figure 5 is a schematic diagram of the host selection process based on resource priority in the embodiment of Figure 4 . Figure 6 is a block diagram of a virtual machine scheduling device according to other embodiments of the present disclosure. Figure 7 is a schematic diagram of an electronic device according to other embodiments of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS To help those skilled in the art better understand the technical solutions in the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a portion of the embodiments of the present disclosure, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure should fall within the scope of protection of the embodiments of the present disclosure. The specific implementation of the embodiments of the present disclosure will be further described below in conjunction with the accompanying drawings. Figure 1 is a schematic block diagram of some exemplary cloud service systems. As shown in Figure 1 , the cloud service system includes a scheduling management node 110 and various computing nodes 120. The M computing nodes 120 shown in Figure 1 include computing node A, computing node B, computing node M, etc. The scheduling management node 110 and the various computing nodes 120 are interconnected via a network connection 130.The scheduling management node 110 can be a cloud service management node, such as a Cloud Management System (CMS), or a node distinct from the cloud service management node. The network connection 130 can be a communication connection between built-in network cards or independent network cards attached to the compute nodes 120, enabling distributed computing between the compute nodes 120. Each compute node 120 can be one or more physical machines, each of which can host one or more virtual machines. Within a compute node 120 serving as a host, each virtual machine 121 can be managed by a virtual machine management module 122, such as a hypervisor. The virtual machine management module 122 acts as a local agent for the scheduling management node 110, enabling the scheduling management node 110 to coordinate and schedule the virtual machines in the cloud service system. Specifically, virtual machine computing power 123 resources can be sold to tenants using virtual machines as the basic sales unit. For example, virtual machines #1, #2, and #N require various host machine resources of virtual machine computing power 123. Virtual machines 121 may include, but are not limited to, Java virtual machines and container objects such as PODs. Configuration nodes, such as network controllers, facilitate communication between virtual machines through the virtual machine management module 122. Control nodes can manage virtual machines by creating, deploying, or orchestrating virtual machines, enabling elastic computing or flexible application deployment. As the number of virtual machine tenants increases, more virtual machine 121 resources are sold to tenants via virtual machines. The higher the sales rate, the less flexibility the virtual machine computing power 123 leaves for virtual machine business changes. On the one hand, concurrent business flows from different tenants can lead to contention for host resources. On the other hand, reserving sufficient host resources in advance for different tenant businesses can result in a low resource sales rate. To this end, various embodiments of the present disclosure provide a series of solutions that ensure both the performance stability of tenant businesses and the host resource sales rate, thereby reducing the operating costs of cloud service providers. The virtual machine scheduling methods of some embodiments of the present disclosure will be described in detail below with reference to FIG2 . The virtual machine scheduling method of FIG2 can be executed by the scheduling management node of FIG1 . The virtual machine scheduling method includes:

[0002] S210: Determine tenant service characteristics for each of the multiple virtual machines to be scheduled. It should be understood that virtual machines of different tenants can run the same service or different services. That is, services of different tenants belong to different tenant services, and different services of the same tenant also belong to different tenant services. Tenant service characteristics may include data indicating characteristic indicators of the tenant services. The characteristic indicators of the tenant services may include at least a business scenario dimension and a business risk dimension. The data in the business scenario dimension indicates the business scenarios of the tenant services, including but not limited to web access scenarios, gaming scenarios, artificial intelligence (AI) reasoning scenarios, AI training scenarios, big data analysis scenarios, streaming media scenarios, and data processing scenarios. The data in the business risk dimension indicates the business risks of the tenant services, including but not limited to data flow jitter risk, data flow interruption risk, data congestion risk, and business failure risk.

[0003] S220: Determine the degree to which each virtual machine requires various host resources based on the tenant service characteristics of each virtual machine. It should be understood that various host resources are related to the host hardware and include, but are not limited to, the host's computing resources, memory bandwidth resources, storage resources, and power consumption resources. Specifically, the host's computing resources refer to the capacity available to execute various computing tasks and process workloads. It typically includes characteristics such as the number of processing cores, main frequency, processing power, and parallelism of a processing unit (e.g., a central processing unit (CPU)). The strength of these computing resources determines the computing performance and processing power of the host machine. Stronger computing resources allow the host machine to run more complex applications, process larger amounts of data, and perform more parallel computing tasks. The host machine's memory bandwidth resource represents the data transfer rate between the system memory and the processing unit, and it affects program and operating system access to memory, data read and write speeds, and application performance. Higher memory bandwidth resources provide faster data transfer speeds, enabling the host machine to more efficiently process large data streams and perform memory-intensive operations. The host machine's storage resources refer to the capacity and performance available for storing and managing data, including but not limited to storage devices such as hard drives or solid-state drives (SSDs). Storage resources affect the host machine's data storage and retrieval speeds, as well as the available storage capacity. High-performance and large-capacity storage resources support faster data read and write operations and larger storage requirements. The aforementioned host machine power consumption resources refer to electrical resources. These power consumption resources can be used to power and support the host machine's operation. Saving the host machine's power consumption resources can improve energy efficiency and operational cost management. Furthermore, the multiple host machine resources can include at least two of the aforementioned resources. Specifically, host machine hardware related to the host machine's computing resources includes processing units, processing cores, cache, memory, and hard disks; host machine hardware related to the host machine's memory bandwidth resources includes cache and memory buses; host machine hardware related to the host machine's storage resources includes memory and hard disks; and host machine hardware related to the host machine's power consumption resources includes memory and processing units. It should also be understood that tenant services with a high degree of demand for a particular host resource can be considered to be sensitive to that host resource. For example, these tenant services may be computing resource-sensitive, memory bandwidth resource-sensitive, storage resource-sensitive, or power resource-sensitive.S230: Scheduling multiple virtual machines to be scheduled to at least one host machine such that any two virtual machines on the same host machine have complementary requirements for each host resource, wherein the difference in the requirements of the two virtual machines in the complementary requirements state exceeds a preset threshold. It should be understood that, generally speaking, specific business scenarios have specific requirements for each host resource. For example, the requirements for computing resources and memory bandwidth resources in an AI inference scenario are generally smaller than those in an AI training scenario. That is, when AI inference and AI training scenarios run concurrently, due to the significant difference in their requirements for computing resources and memory bandwidth resources (i.e., the two scenarios are in a complementary requirements state), resource contention for computing resources and memory bandwidth resources is minimal, or even nonexistent. Generally, the requirement for each host resource reflects the degree of resource contention for that host resource. It should also be understood that the opposite of the complementary requirements state is a resource conflict state. In this resource conflict state, two virtual machines have similar requirements for host resources, for example, the difference in their requirements does not exceed a preset threshold. Furthermore, in the case of multiple host resources, two hosts within the same host machine may have complementary demands for some host resources and conflicting demands for others. In this embodiment, when scheduling individual virtual machines, it is necessary to ensure that any two virtual machines within the same host machine have complementary demands for each host resource. In some examples, two virtual machines with conflicting demands are scheduled to different hosts. In the embodiments of the present disclosure, the tenant service characteristics of a virtual machine reliably reflect the virtual machine's demand for multiple host resources. When multiple virtual machines to be scheduled are scheduled to at least one host machine, the resource sales rate is maximized. Furthermore, after the scheduling of the multiple virtual machines to be scheduled, the difference in demand between the two virtual machines with complementary demands exceeds a preset threshold, thereby reducing resource contention among different virtual machines to be scheduled within the same host machine. In some examples, when determining the tenant service characteristics of each virtual machine, the tenant service characteristics of the virtual machine can be determined based on resource usage data and / or a specified demand indicator of the virtual machine's tenant service. For example, resource usage of scheduled virtual machines of tenant services can be monitored to obtain resource usage data of the scheduled virtual machines for multiple host resources. Specifically, resource usage data of the same tenant service can be monitored for each host resource.It should be understood that if the real-time resource contention level among virtual machines within the same host machine is considered, resource usage data can be aggregated and statistically analyzed at a shorter statistical granularity. To reduce frequent secondary scheduling of virtual machines, resource usage data can be aggregated and statistically analyzed at a longer statistical granularity. Specifically, to obtain resource usage data for each host resource, usage data of at least one host hardware item associated with the host resource can be collected. The host hardware includes, but is not limited to, the occupancy rate of the processing unit, the occupancy rate of each processing core (virtual or physical) within the processing unit, the occupancy rate of the memory bus access bandwidth, the occupancy rate of the cache within the processing unit, and the power consumption indicator of the processing unit. Different host resources are associated with different host hardware items. For example, host hardware related to a host's computing resources includes processing units, processing cores, cache, memory, and hard disks; host hardware related to a host's memory bandwidth resources includes cache and memory buses; host hardware related to a host's storage resources includes memory and hard disks; and host hardware related to a host's power consumption resources includes memory and processing units. Without loss of generality, as an example of determining tenant service characteristics for each of multiple virtual machines to be scheduled, at least one scheduled virtual machine providing tenant services for each virtual machine can be monitored, and resource usage data for each host hardware component providing multiple host resources can be collected. Then, based on the resource usage data for each host hardware component and / or specified demand indicator data, tenant service characteristics for each of the multiple virtual machines to be scheduled can be determined. In some examples, as shown in FIG3A , the resource usage data and specified demand indicator data for each host hardware component can be aggregated, and the aggregated data can then be clustered based on the business scenario and business risk dimensions to obtain tenant service characteristics. It should be understood that the business scenario dimension shown in FIG3A includes multiple business scenarios, and the business risk dimension includes multiple business risks. Furthermore, by combining multiple business scenarios and multiple business risks, multiple combinations can be obtained. For example, X business scenarios and Y business risks can form X*Y combinations, each corresponding to a business characteristic of a tenant's business. The demand level of multiple host resources can be pre-characterized and marked for each of the X*Y combinations. For example, when comparing the demand levels of various tenant services to determine whether they are complementary, the demand characterization values ​​of the various tenant services can be normalized.For example, when virtual machines of five tenant services, A, B, C, D, and E, are scheduled to at least one host, each tenant service can be run using one or more virtual machines, and host resources include M, N, and O (i.e., an example of multiple host resources). The demand representation values ​​of the virtual machines of tenant services A-E for host resource M are 60%, 10%, 10%, 10%, and 10%. That is, the demand level of the virtual machines of tenant service A for host resource M is 60% of the total; the demand level of the virtual machines of tenant service B for host resource M is 10% of the total; the demand level of the virtual machines of tenant service C for host resource M is 10% of the total; the demand level of the virtual machines of tenant service D for host resource M is 10% of the total; and the demand level of the virtual machines of tenant service E for host resource M is 10% of the total. If the preset threshold for two virtual machines in a demand-complementary state is set to 40%, then the demand difference between the virtual machine of tenant service A and the virtual machines of other tenant services is 50%>40%, and the demand difference between the virtual machines of tenant services BE is 0%<40%. In other words, the virtual machine of tenant service A is in a demand-complementary state with the virtual machines of other tenant services, while the virtual machines of other tenant services are not in a demand-complementary state, i.e., they are in the aforementioned demand-conflicting state. Generally, as an example of determining the degree of demand for multiple host resources by a virtual machine, the tenant service characteristics of each virtual machine can be identified to obtain the business scenario and business risk of each virtual machine. Then, based on the correlation between each virtual machine's business scenario and business risk and the multiple host resources, the degree of demand for each virtual machine by the virtual machine is determined. It should be understood that the business scenario and business risk of the virtual machine can be determined by clustering the aggregated data based on the business scenario and business risk dimensions. That is, in the above example, the combination corresponding to the virtual machine among the X*Y combinations indicates the business scenario and business risk of the virtual machine. It should also be understood that the correlation between the business scenarios and business risks of the virtual machines and various host resources can be determined based on expert experience or historical statistical results. That is, the correlation between each combination and various host resources can be pre-specified. In some cases, after some virtual machines have been scheduled, dynamic changes in tenant business status and host resources may lead to rescheduling of these virtual machines. In other words, some pending virtual machines can be scheduled once, and already scheduled virtual machines can also be rescheduled.In the coordinate system shown in Figure 3B, the horizontal axis represents the time elapsed after the virtual machine was first scheduled, and the vertical axis represents the degree of resource contention after the virtual machine was first scheduled to the host machine, that is, the host machine's resource conflict level. The higher the host machine's resource sales rate, the higher the resource conflict level. Therefore, to maximize the host machine's sales rate, the host machine's resource conflict level will increase. When the resource conflict level does not exceed the resource conflict threshold, tenant services will not be significantly impacted. When the resource conflict level exceeds the resource conflict threshold, tenant services will be significantly impacted. In this case, the virtual machines that have been scheduled once can be rescheduled to automatically and dynamically reschedule some of the scheduled virtual machines to alleviate the host machine's resource conflict level. Regarding the first scheduling of virtual machines: Before scheduling multiple virtual machines to be scheduled to at least one host machine, at least one host machine must be selected from the multiple virtual machines. In other words, the current multiple virtual machines to be scheduled will not be scheduled to other hosts. Selecting at least one host from multiple virtual machines can be performed based on the resource priorities of the multiple host machines. The resource priority of a host machine represents the resource allocation capability of the host machine. The higher the resource priority, the more resources the host machine can allocate. Therefore, by selecting at least one host with a higher resource priority from the multiple virtual machines, and then scheduling the multiple virtual machines to be scheduled to the at least one host machine, the degree of resource contention among the virtual machines can be reduced. As an example of selecting at least one host with a higher resource priority from the multiple virtual machines, the resource priority of the at least one host machine can be at least higher than the resource priorities of at least some of the other host machines. Preferably, the resource priority of the at least one host machine is higher than the resource priorities of the other host machines. For example, if the resource priority of the at least one host machine is higher than a first preset priority threshold, the at least one host machine can be directly selected from the multiple virtual machines based on the first preset priority threshold. Alternatively, some hosts can be directly selected from the multiple virtual machines based on the first preset priority threshold, and then the at least one host machine can be further selected from the some hosts. Furthermore, resource priorities can be determined for each of the multiple hosts. For example, a comprehensive allocatable resource indicator of multiple host machine resources, such as the total amount of allocatable resources, can be determined for each host machine. It should be understood that the allocatable resources herein include resources that have been allocated to a specific virtual machine or remaining resources other than resources reserved for the virtual machine.To determine the comprehensive allocatable resource index for multiple host resources, the total allocatable resource amount for the multiple host resources can be determined. The total allocatable resource amounts for the multiple host resources can then be ranked to determine the resource priorities of the multiple hosts. Furthermore, as an example of determining the total allocatable resource amount for the multiple host resources, the allocatable resource amount for each of the multiple host resources can be determined. The total allocatable resource amount for each host resource can then be weighted using the weight coefficients for the multiple host resources to determine the total allocatable resource amount for the multiple host resources. It should be understood that the weight coefficients for the multiple host resources can be pre-set. For example, historical usage data for the multiple host resources can be collected, and then a fit can be performed between the historical usage data and the resource demand level or resource contention level. The weight coefficient for each host resource can then be determined based on the fit. That is, host resources with a greater impact on the overall allocatable resource index are weighted more heavily, while host resources with a smaller impact on the overall allocatable resource index are weighted more heavily. For example, generally, the weight coefficients for the number of processing cores and memory bandwidth in a host are greater than the weight coefficient for the host's power consumption. It should also be understood that the allocatable resource amount for each host resource represents the remaining amount of that host resource, excluding already allocated or reserved resources. The allocatable resource amount can be represented by the allocatable resource ratio of multiple host resources. In other examples, to select at least one host from multiple hosts, the resource selling rates of the multiple hosts can be averaged to obtain the average resource selling rate of the multiple hosts. Then, a first preset priority threshold is determined such that the resource selling rate of the at least one host is less than the average resource selling rate. In other words, the resource selling rate of the at least one host is less than the average resource selling rate, thereby ensuring balanced resource distribution across all hosts and further avoiding resource contention among virtual machines while maintaining the resource selling rate. Regarding secondary scheduling of virtual machines: In some cases, some already scheduled virtual machines can be migrated to new hosts, i.e., rescheduled. For example, while primary scheduling takes into account various factors such as resource demand and resource contention, the need to maintain a certain availability rate for each host may lead to high concurrency among different virtual machines scheduled to the same host for a period of time. In this case, it is necessary to alleviate resource contention within these virtual machines.In some examples, virtual machines experiencing resource contention can be rescheduled to different hosts. For example, one of two virtual machines experiencing resource contention can be rescheduled to another virtual machine, ensuring that the rescheduled virtual machine does not compete with the other virtual machine's own resources after being rescheduled to the other virtual machine, thereby reliably resolving resource contention. In other examples, because the virtual machines experiencing resource contention occupy a large number of host resources, migrating such virtual machines can result in high migration costs and low migration success rates. Furthermore, if the migration fails, data may be lost, further increasing the migration cost. In such cases, virtual machines other than the virtual machine experiencing resource contention can be re-migrated to other virtual machines. Therefore, considering factors such as virtual machine migration cost or migration success rate, rescheduling priorities are set for already scheduled virtual machines. Then, based on the rescheduling priorities of each scheduled virtual machine, some of the already scheduled virtual machines are rescheduled. Preferably, the smaller the current resource usage of a scheduled virtual machine for multiple host resources, the higher the rescheduling priority of the scheduled virtual machine. For example, when rescheduling a target scheduled virtual machine from among multiple scheduled virtual machines, the resource priority of the host machine on which the target scheduled virtual machine resides before rescheduling can be set to be higher than the resource priority of the host machine on which the target scheduled virtual machine resides after rescheduling. In this case, the cost of virtual machine rescheduling (i.e., virtual machine migration) is reduced while also avoiding the possibility of the target scheduled virtual machine competing for resources with other virtual machines after rescheduling. In some examples, a target scheduled virtual machine can be specified from among the scheduled virtual machines, thereby specifically resolving resource contention for the target scheduled virtual machine. Alternatively, a second preset priority threshold can be set to select the target scheduled virtual machine from among the scheduled virtual machines that have been reordered based on the rescheduling priority. Alternatively, by setting a second preset priority threshold, some scheduled virtual machines can be automatically and continuously dynamically rescheduled. For example, a scheduled virtual machine with a rescheduling priority higher than the second preset priority threshold among all scheduled virtual machines can be continuously determined as a target scheduled virtual machine, wherein the current resource occupancy ratio of the scheduled virtual machine to various host machine resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.Furthermore, the second preset priority threshold can be adjusted based on the average resource sales rate of multiple host machines. The higher the average resource sales rate, the lower the second preset priority threshold can be set. This allows more target scheduled virtual machines to be selected for rescheduling, providing available resources to virtual machines allocated more resources and proactively preventing resource contention among these virtual machines. As can be seen from the above description, the smaller the current resource usage ratio of a scheduled virtual machine for multiple host resources, the higher the rescheduling priority of the scheduled virtual machine. In other words, the larger the current resource usage ratio of a scheduled virtual machine for multiple host resources, the lower the rescheduling priority of the scheduled virtual machine. Therefore, it is necessary to reliably determine the current resource usage ratio of a scheduled virtual machine for each host resource. As some examples of determining the current resource usage ratio of a scheduled virtual machine for each host resource, for each host resource, the rated resource capacity of the processing unit of each scheduled virtual machine's host machine and the resource usage of at least one processing core allocated to each scheduled virtual machine by the processing unit can be monitored. The ratio between the resource usage of the at least one processing core and the rated resource capacity of the processing unit is then determined as the current resource usage ratio of each scheduled virtual machine for that host resource. It should be understood that a processing core can be a physical processing core or a virtual processing core, and a processing unit can be a central processing unit. For example, when the host resource is memory bandwidth, the current resource usage ratio of a scheduled virtual machine is the ratio between the resource usage of each processing core of the scheduled virtual machine and the rated resource capacity of the processing unit. The resource usage of each processing core (i.e., core granularity) and the rated resource capacity of the processing unit (i.e., packet granularity) can be read from registers configured in the processing unit, such as a performance monitoring unit (PMU). When a scheduled virtual machine is assigned n processing cores, the memory bandwidth BW of the scheduled virtual machine is calculated as follows: PMU (core1) + PMU (core2) + PMU (core n). Similarly, when a scheduled virtual machine is assigned n processing cores, the power consumption P of the scheduled virtual machine is calculated as follows: PMU (core1) + PMU (core2) + PMU (core n). Other virtual machine scheduling methods according to other embodiments of the present disclosure will be described in detail below with reference to FIG.The virtual machine scheduling method of FIG4 includes:

[0004] S410: Determine the total amount of resources that can be allocated to multiple host resources by multiple host machines.

[0005] S420: Sort the total amount of allocatable resources of the multiple host machines and determine the resource priorities of the multiple host machines.

[0006] S430: Select at least one host machine from the plurality of host machines, so that a resource priority of the at least one host machine is greater than a first preset priority threshold.

[0007] S440: Schedule multiple virtual machines to be scheduled to at least one host machine, such that any two virtual machines on the same host machine have complementary requirements for each host resource. It should be understood that, as an example of selecting at least one host machine from multiple hosts, at least one host machine can be directly selected from the multiple virtual machines based on a first preset priority threshold. Alternatively, a portion of the multiple virtual machines can be directly selected based on the first preset priority threshold, and then at least one host machine can be further selected from the portion of the host machines. For example, as shown in FIG5 , the total allocatable resources of hosts 1-8 are sorted to obtain the resource priorities of hosts 1-8. A portion of virtual machines are initially selected from hosts 1-8 based on the first preset priority threshold. Among these, the resource priorities of hosts 1, 3, 4, 7, and 8 are greater than the first preset priority threshold. Hosts 1, 3, and 4 can then be further selected from hosts 1, 3, 4, 7, and 8 to serve as the at least one virtual machine. It should be understood that further screening criteria may include host machine 7 or host machine 8 needing to reserve more host resources for virtual machines with high subsequent business overhead or for designated tenants with high security, thereby determining the resource priority of host machine 7 or host machine 8 to be lower. It should also be understood that the explanations and descriptions of other steps and solutions can be found above and will not be repeated here. The virtual machine scheduling apparatus according to other embodiments of the present disclosure will be described below in conjunction with FIG6 . The virtual machine scheduling apparatus in FIG6 corresponds to the virtual machine scheduling method in FIG2 , and includes: a first determination component 610 configured to determine tenant business characteristics of each virtual machine among a plurality of virtual machines to be scheduled; a second determination component 620 configured to determine the degree of demand of each virtual machine for multiple host resources based on the tenant business characteristics of each virtual machine; and a scheduling component 630 configured to schedule the plurality of virtual machines to be scheduled to at least one host machine such that the demand levels of any two virtual machines on the same host machine for each host resource are in a complementary state, wherein the difference in demand levels between the two virtual machines in the complementary state exceeds a preset threshold.In the embodiments of the present disclosure, the tenant service characteristics of a virtual machine reliably reflect the virtual machine's demand for various host resources. This ensures the highest possible resource utilization rate when scheduling multiple virtual machines to be scheduled onto at least one host. Furthermore, after scheduling the multiple virtual machines to be scheduled, resource contention between different virtual machines to be scheduled on the same host is reduced because the difference in demand between two virtual machines in a complementary demand state exceeds a preset threshold. In other embodiments, the first determination component is configured to determine the tenant service characteristics of each of the multiple virtual machines to be scheduled by performing the following steps: monitoring resource usage data of each host hardware component that provides various host resources from at least one scheduled virtual machine for each virtual machine's tenant service; and determining the tenant service characteristics of each of the multiple virtual machines to be scheduled based on the resource usage data of each host hardware component. In other embodiments, the first determination component is configured to determine the virtual machine's demand for multiple host resources based on the tenant business characteristics of each virtual machine by performing the following steps: identifying the tenant business characteristics of each virtual machine to obtain the business scenario and business risk of each virtual machine; and determining the demand for the multiple host resources by each virtual machine based on the correlation between the business scenario and business risk of each virtual machine and the multiple host resources. In other embodiments, the virtual machine scheduling device further includes: a third determination component configured to: determine the total amount of resources that can be allocated to the multiple host resources by multiple hosts; sort the total amount of resources that can be allocated to the multiple hosts to determine the resource priorities of the multiple hosts; and select at least one host from the multiple hosts such that the resource priority of the at least one host is greater than a first preset priority threshold. In other embodiments, the virtual machine scheduling device is further configured to: average the resource selling rates of the multiple hosts to obtain an average resource selling rate of the multiple hosts; and determine the first preset priority threshold such that the resource selling rate of the at least one host is less than the average resource selling rate. In other embodiments, the third determination component is configured to determine the total amount of resources that can be allocated to multiple host resources by multiple host machines by performing the following steps: determining the amount of resources that can be allocated to each host resource by each host machine in the multiple host machines; and weighting the multiple amounts of resources that can be allocated to the multiple host resources by each host machine using respective weight coefficients of the multiple host resources to determine the total amount of resources that can be allocated to the multiple host machines.In other embodiments, the scheduling component is further configured to reschedule a target scheduled virtual machine among each of the multiple scheduled virtual machines so that the resource priority of the host machine on which the target scheduled virtual machine resides before rescheduling is greater than the resource priority of the host machine on which the target scheduled virtual machine resides after rescheduling. In other embodiments, the scheduling component is further configured to determine a scheduled virtual machine among the scheduled virtual machines whose rescheduling priority is greater than a second preset priority threshold as a target scheduled virtual machine, wherein the current resource occupancy ratio of the scheduled virtual machine for the multiple host resources is negatively correlated with the rescheduling priority of the scheduled virtual machine. In other embodiments, the virtual machine scheduling apparatus further includes a monitoring component configured to monitor, for each host resource, the rated resource capacity of the processing unit of the host machine on which each scheduled virtual machine resides and the resource occupancy of at least one processing core allocated by the processing unit to each scheduled virtual machine; and determine the ratio between the resource occupancy of the at least one processing core and the rated resource capacity of the processing unit as the current resource occupancy ratio of each scheduled virtual machine for that host resource. The specific implementation of each component in the virtual machine scheduling device can be found in the descriptions of the corresponding steps in the above-mentioned method embodiment, and corresponding beneficial effects are achieved, so a detailed description thereof is omitted here. Those skilled in the art will clearly understand that, for ease and brevity of description, the specific operating processes of the above-described devices and components can be referenced to the corresponding process descriptions in the above-mentioned method embodiment, and a detailed description thereof is omitted here. Referring to FIG. 7 , a schematic structural diagram of an electronic device according to another embodiment of the present disclosure is shown. The specific embodiments of the present disclosure do not limit the specific implementation of the electronic device. As shown in FIG7 , the electronic device may include: a processor 702 for executing a program 710, a communication interface 704, a memory 706, and a communication bus 708. The processor, the communication interface, and the memory communicate with each other via the communication bus. The communication interface is used to communicate with other electronic devices or a server. The processor is used to execute the program, and specifically may perform the relevant steps in the above-mentioned method embodiment. Specifically, the program may include program code, which includes computer operating instructions. The processor may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure.The smart device includes one or more processors, which may be of the same type, such as one or more CPUs, or different types, such as one or more CPUs and one or more ASICs. A memory is used to store programs. The memory may include high-speed RAM memory or non-volatile memory, such as at least one disk drive. The program may include multiple computer instructions. Specifically, the program may cause the processor to perform operations corresponding to the virtual machine scheduling methods described in any of the aforementioned method embodiments. The specific implementation of each step in the program can be found in the corresponding descriptions of the steps, components, or units in the aforementioned method embodiments, and corresponding beneficial effects are achieved, so these descriptions are not repeated here. Those skilled in the art will clearly understand that, for ease and brevity of description, the specific operating processes of the aforementioned devices, equipment, or components can refer to the corresponding process descriptions in the aforementioned method embodiments, and are not repeated here. The presently disclosed embodiments also provide a computer storage medium storing a computer program, which, when executed by a processor, implements the method described in any of the aforementioned method embodiments. The computer storage medium includes, but is not limited to, a compact disc read-only memory (CD-ROM), random access memory (RAM), a floppy disk, a hard disk, or a magneto-optical disk. Embodiments of the present disclosure also provide a computer program product comprising computer instructions that instruct a computing device to perform operations corresponding to the aforementioned virtual machine scheduling method. Embodiments of the present disclosure also provide a computer program product comprising a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the virtual machine scheduling method of the present disclosure. Embodiments of the present disclosure also provide a computer program that, when executed by a processor, implements the virtual machine scheduling method of the present disclosure.Optionally, the computer program, when executed by a processor, implements program code for the following steps: determining tenant service characteristics of each virtual machine among multiple virtual machines to be scheduled; determining the level of demand for multiple host resources by each virtual machine based on the tenant service characteristics of each virtual machine; and scheduling the multiple virtual machines to be scheduled to at least one host machine such that the demand levels of any two virtual machines on the same host machine for each host resource are in a complementary state, wherein the difference in demand levels between the two virtual machines in the complementary state exceeds a preset threshold. Furthermore, it should be noted that user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for model training, data used for analysis, stored data, and displayed data, etc.) involved in the embodiments of the present disclosure are all authorized by the user or fully authorized by all parties. The collection, use, and processing of the relevant data must comply with relevant regulations and standards, and corresponding operation portals are provided for the user to select authorization or rejection. It should be noted that, depending on implementation needs, the various components / steps described in the embodiments of this disclosure may be split into more components / steps, or two or more components / steps or partial operations of components / steps may be combined into new components / steps to achieve the objectives of the embodiments of this disclosure. The methods according to the embodiments of this disclosure described above may be implemented in hardware or firmware, or as software or computer code that can be stored on a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored on a remote recording medium or non-transitory machine-readable medium downloaded via a network and then stored on a local recording medium. Thus, the methods described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA)).It will be understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component (e.g., random access memory (RAM), read-only memory (ROM), flash memory, etc.) that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods described herein are implemented. Furthermore, when a general-purpose computer accesses the code for implementing the methods illustrated herein, the execution of the code transforms the general-purpose computer into a dedicated computer for performing the methods illustrated herein. Those skilled in the art will appreciate that the various exemplary units and method steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments disclosed herein. The above embodiments are intended only to illustrate the embodiments of the present disclosure and are not intended to limit them. Persons skilled in the relevant art may make various changes and modifications without departing from the spirit and scope of the embodiments of the present disclosure. Therefore, all equivalent technical solutions are also within the scope of the embodiments of the present disclosure. The scope of patent protection for the embodiments of the present disclosure shall be defined by the claims. Industrial Applicability: The solutions provided by the embodiments of the present disclosure can be applied to the virtual machine scheduling process to determine the tenant service characteristics of each of multiple virtual machines to be scheduled; based on the tenant service characteristics of each virtual machine, determine the level of demand for multiple host resources by each virtual machine; and schedule the multiple virtual machines to be scheduled to at least one host machine so that any two virtual machines on the same host machine have complementary demand levels for each host resource, thereby resolving the technical problem of low host resource sales rates.

Claims

Claims 1. A virtual machine scheduling method, comprising: Determining tenant service characteristics of each virtual machine among the plurality of virtual machines to be scheduled; Based on the tenant business characteristics of each virtual machine, determine the demand level of each virtual machine for multiple host machine resources; and schedule the multiple virtual machines to be scheduled to at least one host machine so that the demand levels of any two virtual machines in the same host machine for each host machine resource are in a complementary demand state, wherein a difference in the demand levels of the two virtual machines in the complementary demand state exceeds a preset threshold.

2. The method according to claim 1, wherein: Determining tenant business characteristics of each virtual machine in a plurality of virtual machines to be scheduled includes: monitoring at least one scheduled virtual machine of the tenant business of each virtual machine, and resource usage data of each host hardware that provides the plurality of host resources; and determining the tenant business characteristics of each virtual machine in the plurality of virtual machines to be scheduled based on the resource usage data of each host hardware.

3. The method according to claim 2, wherein: Determining the degree of demand of each virtual machine for multiple host resources based on the tenant business characteristics of each virtual machine includes: identifying the tenant business characteristics of each virtual machine to obtain the business scenario and business risk of each virtual machine; and determining the degree of demand of each virtual machine for the multiple host resources based on the correlation between the business scenario and business risk of each virtual machine and the multiple host resources.

4. The method according to claim 1, wherein: The method further includes: determining the total amount of resources that can be allocated to the multiple host machine resources by multiple host machines; sorting the total amount of resources that can be allocated to the multiple host machines to determine the resource priorities of the multiple host machines; and selecting at least one host machine from the multiple host machines so that the resource priority of the at least one host machine is greater than a first preset priority threshold.

5. The method according to claim 4, wherein: The method further includes: performing averaging processing on the resource selling rates of each of the multiple host machines to obtain an average resource selling rate of the multiple host machines; and determining the first preset priority threshold so that the resource selling rate of the at least one host machine is less than the average resource selling rate.

6. The method according to claim 4, wherein: Determining the total amount of resources that can be allocated to the multiple host resources by the multiple host machines includes: determining the amount of resources that can be allocated to each host resource by each host machine in the multiple host machines; The weight coefficients of the respective host machine resources are used to weight the multiple allocatable resource amounts of the multiple host machine resources for each host machine to determine the total allocatable resource amount of the multiple host machines.

7. The method according to claim 4, wherein: The method further includes: rescheduling a target scheduled virtual machine among each of the multiple scheduled virtual machines so that a resource priority of a host machine where the target scheduled virtual machine is located before the rescheduling is greater than a resource priority of a host machine where the target scheduled virtual machine is located after the rescheduling.

8. The method according to claim 7, wherein: The method further includes: determining a scheduled virtual machine among the scheduled virtual machines whose rescheduling priority is higher than a second preset priority threshold as the target scheduled virtual machine, wherein the current resource occupancy ratio of the scheduled virtual machine to the multiple host machine resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.

9. The method according to claim 8, wherein: The method also includes: for each host machine resource, monitoring the rated resource amount of the processing unit of the host machine where each scheduled virtual machine is located, and the resource occupancy of at least one processing core allocated by the processing unit to each scheduled virtual machine; and determining the ratio between the resource occupancy of the at least one processing core and the rated resource amount of the processing unit as the current resource occupancy ratio of each scheduled virtual machine for the host machine resource.

10. The method according to claim 5, wherein: The second preset priority threshold is negatively correlated with the average resource selling rate.

11. The method according to claim 1, wherein: The tenant service characteristics of each virtual machine include data indicating characteristic indicators of the tenant service of each virtual machine.

12. The method according to claim 1, wherein: The multiple host machine resources include computing resources, memory bandwidth resources, storage resources, and power consumption resources of the host machine.

13. The method according to claim 1, wherein: The method further includes: in response to the plurality of virtual machines to be scheduled having demand conflicting demands for at least one host resource in each host resource, scheduling the plurality of virtual machines to be scheduled to different hosts.

14. The method according to claim 1, wherein: The host hardware that provides the multiple host resources includes the occupancy rate of the processing unit, the occupancy rate of each processing core in the processing unit, the occupancy rate of the access bandwidth of the memory bus, the occupancy rate of the cache in the processing unit, and the power consumption index of the processing unit.

15. An electronic device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, where the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 14.

16. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

17. A computer program product, comprising a computer program / instruction, which implements the method according to any one of claims 1 to 14 when executed by a processor.

18. A computer program product, wherein: The invention comprises a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

19. A computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented. 18

Citation Information

Patent Citations

  • Resource optimal scheduling method and virtual machine host machine optimal selection method

    CN103701934A

  • Workload distribution management apparatus and control method

    US20160070602A1

  • Systems and methods for management of virtual machine resources in a network environment

    US20180329735A1

  • Method for deploying virtual machines in cloud computing systems based on predicted lifetime

    US20200012526A1