[go: up one dir, main page]

WO2025191367A1 - Virtual machine scheduling method, electronic device, computer storage medium, and computer program product - Google Patents

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

Info

Publication number
WO2025191367A1
WO2025191367A1 PCT/IB2025/051625 IB2025051625W WO2025191367A1 WO 2025191367 A1 WO2025191367 A1 WO 2025191367A1 IB 2025051625 W IB2025051625 W IB 2025051625W WO 2025191367 A1 WO2025191367 A1 WO 2025191367A1
Authority
WO
WIPO (PCT)
Prior art keywords
host
resource
virtual machine
resources
machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/IB2025/051625
Other languages
French (fr)
Chinese (zh)
Inventor
张争宪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloud Intelligence Assets Holding Singapore Private Ltd
Original Assignee
Cloud Intelligence Assets Holding Singapore Private Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloud Intelligence Assets Holding Singapore Private Ltd filed Critical Cloud Intelligence Assets Holding Singapore Private Ltd
Publication of WO2025191367A1 publication Critical patent/WO2025191367A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • cloud service providers provide service resources to tenants through virtual machines.
  • virtual machines e.g., typically servers
  • the virtual machines can use the host machine's underlying resources to run the tenant's business data.
  • host machine resources may include computing resources, memory bandwidth resources, storage resources, and power consumption resources.
  • host machine resources may include computing resources, memory bandwidth resources, storage resources, and power consumption resources.
  • 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.
  • 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 the degree of demand of each virtual machine for a plurality of host resources based on the tenant service characteristics of each virtual machine; scheduling the plurality of virtual machines to be scheduled to at least one host machine so that the degree of demand of any two virtual machines in the same host machine for each host resource is in a demand complementary state, wherein the difference in the degree of demand of the two virtual machines in the demand complementary state exceeds a preset threshold.
  • determining the tenant service characteristics of each virtual machine among a plurality of virtual machines to be scheduled includes: monitoring the tenant service characteristics of at least one scheduled virtual machine providing a plurality of host resources of each virtual machine; Resource usage data of hardware on each host machine for resources; and determining tenant business characteristics of each virtual machine among the multiple virtual machines to be scheduled based on the resource usage data on each host machine hardware.
  • determining the level of demand for multiple host resources by each virtual machine based on the tenant business characteristics of each virtual machine includes: identifying the tenant business characteristics of each virtual machine to obtain a business scenario and business 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 business scenario and business risk of each virtual machine and the multiple host resources.
  • 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 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.
  • 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.
  • 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.
  • 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.
  • the method further includes: determining, among the scheduled virtual machines, a scheduled virtual machine whose rescheduling priority is higher than a second preset priority threshold as a target scheduled virtual machine, wherein the current resource usage ratio of the scheduled virtual machine for the various host machine resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.
  • the method further includes: monitoring, for each host machine resource, the rated resource capacity of the processing unit of the host machine where each scheduled virtual machine resides, and the resource usage of at least one processing core allocated by the processing unit to each scheduled virtual machine; and determining the ratio between the resource usage of the at least one processing core and the rated resource capacity of the processing unit as the current resource usage ratio of each scheduled virtual machine for the host machine resource.
  • a virtual machine scheduling device comprising: a first determination component, configured to determine tenant business characteristics of each virtual machine among a plurality of virtual machines to be scheduled; a second determination component, configured to determine the degree of demand of each virtual machine for a plurality of host resources based on the tenant business characteristics of each virtual machine; and a scheduling component, configured to schedule the plurality of virtual machines to be scheduled to at least one host machine, so that the degree of demand of any two virtual machines in the same host machine for each host resource is in a complementary state, wherein the difference in the degree of demand of the two virtual machines in the complementary state exceeds a preset threshold.
  • 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 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.
  • 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.
  • a computer program product is provided, comprising a computer program/instructions.
  • a computer program product comprising a non-volatile computer-readable storage medium.
  • the non-volatile computer-readable storage medium stores a computer program.
  • the method described in the first aspect is implemented.
  • a computer program is provided.
  • the method described in the first aspect is implemented.
  • the tenant service characteristics of a virtual machine reliably reflect the virtual machine's demand for various host resources.
  • 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.
  • FIG5 is a schematic diagram of the process of selecting a host machine according to resource priority in the embodiment of FIG4.
  • FIG6 is a structural block diagram of a virtual machine scheduling device according to other embodiments of the present disclosure.
  • FIG7 is a structural diagram of an electronic device according to other embodiments of the present disclosure.
  • Figure 1 is a schematic block diagram of some exemplary cloud service systems.
  • 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, and computing node M.
  • 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 different from the cloud service management node.
  • Network connection 130 can be a communication connection between built-in network cards or independent network cards mounted on compute nodes 120, used to implement distributed computing between compute nodes 120.
  • Each compute node 120 can be served by one or more physical machines, each of which can host one or more virtual machines.
  • each virtual machine 121 can be managed by a virtual machine management module 122, such as a hypervisor.
  • Virtual machine management module 122 can act as a local agent for scheduling management node 110, which performs the coordinated scheduling of virtual machines in the cloud service system.
  • virtual machine computing power 123 resources can be sold to tenants using virtual machines as the basic sales unit.
  • 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 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:
  • Tenant business characteristics may include data indicating characteristic indicators of the tenant's business. These characteristic indicators 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's business, 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's business, including but not limited to data flow jitter risk, data flow interruption risk, data congestion risk, and business failure risk.
  • S220 Determine the degree to which each virtual machine requires various host resources based on the tenant service characteristics of each virtual machine.
  • 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.
  • 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.
  • the multiple host machine resources can include at least two of the aforementioned resources.
  • 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.
  • 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.
  • 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.
  • resource contention for computing resources and memory bandwidth resources is minimal, or even nonexistent.
  • the requirement for each host resource reflects the degree of resource contention for that host resource.
  • 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.
  • two hosts within the same host machine may have complementary demands for some host resources and conflicting demands for others.
  • the tenant service characteristics of a virtual machine reliably reflect the virtual machine's demand for multiple host resources.
  • the resource sales rate is maximized.
  • 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.
  • 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 data of scheduled virtual machines of tenant services can be monitored to obtain resource usage data of various host resources by the scheduled virtual machines. 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 of each virtual machine within the same host is considered, resource usage data can be aggregated and counted at a shorter statistical granularity. To reduce frequent rescheduling of virtual machines, resource usage data can be aggregated and counted at a longer statistical granularity.
  • 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, and the total memory usage.
  • the host hardware associated with different host resources varies.
  • host hardware associated with the host's computing resources includes processing units, processing cores, cache, memory, and hard disks; host hardware associated with the host's memory bandwidth resources includes cache and memory buses; host hardware associated with the host's storage resources includes memory and hard disks; and host hardware associated with the host's power consumption resources includes memory and processing units.
  • At least one scheduled virtual machine can be monitored for tenant services of each virtual machine.
  • Resource usage data for each host hardware component that provides multiple host resources can then be collected.
  • tenant service characteristics for each of the multiple virtual machines to be scheduled can be determined.
  • resource usage data and specified demand indicator data for each host hardware can be aggregated. The aggregated data can then be clustered based on the business scenario and business risk dimensions to obtain tenant business 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.
  • X business scenarios and Y business risks can form X*Y combinations, each corresponding to a tenant business characteristic.
  • the demand level of multiple host resources can be pre-characterized and labeled.
  • the demand characterization values of each tenant business can be normalized. For example, when virtual machines for five tenant businesses (A, B, C, D, and E) are scheduled to at least one host, each tenant business can be run using one or more virtual machines, and the host resources can include M, N, and O (i.e., an example of multiple host resources).
  • the demand representation values for host resource M by the virtual machines of tenant services AE are 60%, 10%, 10%, 10%, and 10%. That is, the demand for host resource M by the virtual machines of tenant service A is 60% of the total; the demand for host resource M by the virtual machines of tenant service B is 10% of the total; the demand for host resource M by the virtual machines of tenant service C is 10% of the total; the demand for host resource M by the virtual machines of tenant service D is 10% of the total; and the demand for host resource M by the virtual machines of tenant service E is 10% of the total.
  • the preset threshold for two virtual machines in a complementary demand state is set to 40%, then the demand difference between the virtual machines 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%.
  • the virtual machines of tenant service A are in a complementary demand state with the virtual machines of other tenant services, while the virtual machines of other tenant services are not in a complementary demand state, that is, they are in the aforementioned demand conflict state.
  • the tenant business characteristics of each virtual machine can be identified to obtain the business scenario and business risk of each virtual machine, and then, based on The correlation between each virtual machine's business scenario and business risk and various host resources determines the degree of each virtual machine's demand for various host resources.
  • the business scenario and business risk of each virtual machine can be determined by clustering the aggregated data based on the business scenario and business risk dimensions described above. That is, in the above example, the X*Y combinations corresponding to the virtual machine indicate the business scenario and business risk of the virtual machine.
  • the correlation between the business scenario and business risk of the virtual machine and various host resources can be determined based on expert experience or historical statistical results.
  • the correlation between each combination and various host resources can be pre-determined.
  • dynamic changes in tenant business status and host resources may lead to rescheduling of these virtual machines.
  • some pending virtual machines can be scheduled once, and already scheduled virtual machines can also be rescheduled.
  • the horizontal axis represents the time elapsed after the virtual machine was first scheduled
  • 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.
  • tenant services 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.
  • 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. The selection of at least one host machine 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 machine with a high 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.
  • 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.
  • the resource priority of the at least one host machine is higher than the resource priorities of the other host machines.
  • the at least one host machine can be directly selected from the multiple virtual machines based on the first preset priority threshold.
  • some hosts can be directly selected from the multiple virtual machines based on the first preset priority threshold, and then at least one host machine can be further selected from the some hosts.
  • resource priorities can be determined separately for the multiple hosts. For example, a resource priority can be set for each host machine. Determine a comprehensive allocatable resource index for multiple host resources, such as the total allocatable resource amount. It should be understood that the allocatable resources herein include resources already allocated to a specific virtual machine or remaining resources beyond those reserved for the virtual machine.
  • the total allocatable resource amount for 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 host resources.
  • the allocatable resource amount for each host resource can be determined for each of the multiple host resources.
  • 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 various host resources can be pre-set.
  • weight coefficient for each host resource can be determined based on the fit. Specifically, host resources with a greater impact on the overall allocatable resource index have a greater weight, while host resources with a smaller impact on the overall allocatable resource index have a greater weight. 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 in the host, excluding the allocated or reserved resources.
  • the allocatable resource amount can be represented by the ratio of allocatable resources among the various host resources.
  • the resource sell-off rates of each of the multiple hosts can be averaged to obtain the average resource sell-off rate of the multiple hosts.
  • a first preset priority threshold is determined such that the resource sell-off rate of the at least one host is less than the average resource sell-off rate.
  • the resource sell-off rate of the at least one host is less than the average resource sell-off rate, thereby ensuring balanced resource distribution across the hosts and further avoiding resource contention among virtual machines while maintaining the resource sell-off rate.
  • some already scheduled virtual machines can be migrated to new hosts, i.e., rescheduled.
  • new hosts i.e., rescheduled.
  • different virtual machines scheduled to the same host may experience high concurrency over a period of time. In such cases, it may be necessary to mitigate resource contention within these virtual machines.
  • virtual machines experiencing resource contention can be rescheduled to different host machines.
  • one of two virtual machines experiencing resource contention can be rescheduled to another virtual machine, and it is ensured that after being rescheduled to the other virtual machine, the virtual machine will not compete with the other virtual machine's own virtual machine for resource requirements, thereby reliably resolving the resource contention problem.
  • virtual machines experiencing resource contention occupy a large number of host machine resources
  • migrating such virtual machines results in high migration costs and low migration success rates.
  • the migration fails, data may be lost, further increasing the migration cost.
  • virtual machines other than the virtual machine experiencing resource contention can be re-migrated to other virtual machines on the host machine.
  • 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.
  • the smaller the current resource usage ratio of a scheduled virtual machine for various host machine 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.
  • 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.
  • 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.
  • some scheduled virtual machines can be automatically and continuously dynamically rescheduled.
  • scheduled virtual machines with rescheduling priorities higher than the second preset priority threshold can be continuously identified as target scheduled virtual machines.
  • the current resource usage ratio of a scheduled virtual machine for various host resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.
  • the second preset priority threshold can be adjusted based on the average resource sales rate of multiple hosts. 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 for 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 various host resources, the higher the rescheduling priority of the scheduled virtual machine.
  • the rated resource amount of the processing unit of the host machine where each scheduled virtual machine resides, as well as the resource usage of at least one processing core allocated to each scheduled virtual machine by the processing unit can be monitored. Then, the ratio between the resource usage of the at least one processing core and the rated resource amount of the processing unit is determined as the current resource usage ratio of each scheduled virtual machine for that host resource.
  • a processing core can be a physical processing core or a virtual processing core
  • a processing unit can be a central processing unit.
  • the current resource usage ratio of the 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 provided in the processing unit, such as a performance monitoring unit (PMU).
  • PMU performance monitoring unit
  • the memory bandwidth BW of the scheduled virtual machine is calculated as follows: PMU (core 1) + PMU (core 2) + PMU (core n).
  • the power consumption P of the scheduled virtual machine is calculated as follows: PMU (core 1) + PMU (core 2) + PMU (core n).
  • S410 Determine the total amount of resources that can be allocated to multiple host resources by multiple host machines.
  • S420 Sort the total amount of allocatable resources of multiple host machines and determine the resource priorities of the multiple host machines.
  • 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.
  • 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.
  • the resource sales rate is maximized. Furthermore, after the scheduling of the multiple virtual machines to be scheduled, since the difference in demand levels between the two virtual machines in the complementary demand state exceeds the preset threshold, resource contention between different virtual machines to be scheduled on the same host machine is reduced.
  • the first determination component is configured to determine tenant service characteristics of each of the plurality of virtual machines to be scheduled by performing the following steps: monitoring resource usage data of at least one scheduled virtual machine for each virtual machine's tenant service on respective host hardware providing various host resources; and determining the tenant service characteristics of each of the plurality of virtual machines to be scheduled based on the resource usage data of the respective host hardware.
  • the first determination component is configured to determine the virtual machine's demand for various host resources based on the tenant service characteristics of each virtual machine by performing the following steps: identifying the tenant service characteristics of each virtual machine to obtain a service scenario and service risk for each virtual machine; and determining the demand for various host resources for each virtual machine based on the correlation between the service scenario and service risk of each virtual machine and the various host resources.
  • the virtual machine scheduling apparatus further includes: a third determination component configured to: determine the total amount of resources that can be allocated to multiple host resources by multiple host machines; sort the total amount of resources that can be allocated to the multiple host machines to determine resource priorities for the multiple host machines; and select at least one host machine from the multiple host machines such that the resource priority of the at least one host machine is greater than a first preset priority threshold.
  • the virtual machine scheduling apparatus is further configured to: average the resource selling rates of the multiple host machines to obtain an average resource selling rate for the multiple host machines; and determine a first preset priority threshold such that the resource selling rate of the at least one host machine is less than the average resource selling rate.
  • the third determination component is configured to determine the total amount of resources that can be allocated to the multiple host resources by the 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 weight coefficients for the multiple host resources to determine the total amount of resources that can be allocated to the multiple host machines.
  • the scheduling component is further configured to reschedule a target scheduled virtual machine in each of the multiple scheduled virtual machines so that the target scheduled virtual machine is The resource priority of the host machine where the target scheduled virtual machine resides is greater than the resource priority of the host machine where the target scheduled virtual machine resides after rescheduling.
  • the scheduling component is further configured to: determine 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 for multiple host resources is negatively correlated with the rescheduling priority of the scheduled virtual machine.
  • the virtual machine scheduling apparatus further comprises: a monitoring component configured to: monitor, 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 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.
  • a monitoring component configured to: monitor, 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 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 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, specifically, to perform the relevant steps in the above-mentioned method embodiment.
  • the program may include program code, which includes computer operation 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 one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
  • the memory is used to store the program.
  • the memory may include high-speed RAM memory, or may also include non-volatile memory, such as at least one disk storage.
  • the program may include multiple computer instructions, Specifically, the program can cause the processor to execute the operations corresponding to the various virtual machine scheduling methods described in any of the aforementioned method embodiments through multiple computer instructions.
  • the specific implementation of each step in the program can refer to the corresponding description of the corresponding steps, components or units in the aforementioned method embodiments, and has corresponding beneficial effects, which will not be repeated here.
  • Those skilled in the art will clearly understand It is understood that for ease and brevity of description, the specific operating processes of the above-described apparatuses, devices, or components can be referred to the corresponding process descriptions in the aforementioned method embodiments and will not be repeated here.
  • the present disclosure also provides a computer storage medium having a computer program stored thereon.
  • the present disclosure When executed by a processor, the program 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.
  • CD-ROM compact disc read-only memory
  • RAM random access memory
  • floppy disk a hard disk
  • magneto-optical disk a magneto-optical disk.
  • the present disclosure also provides a computer program product comprising computer instructions that instruct a computing device to perform operations corresponding to the aforementioned virtual machine scheduling method.
  • the present disclosure also provides a computer program product comprising a non-volatile computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the virtual machine scheduling method of the present disclosure.
  • the present disclosure also provides a computer program that, when executed by a processor, implements the virtual machine scheduling method of the present disclosure.
  • 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.
  • user-related information including but not limited to user device information, user personal information, etc.
  • data including but not limited to sample data used for model training, data used for analysis, stored data, and displayed data, etc.
  • user-related information including but not limited to user device information, user personal information, etc.
  • data including but not limited to sample data used for model training, data used for analysis, stored data, and displayed data, etc.
  • 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.
  • the various components/steps described in the embodiments of the present 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 the present disclosure.
  • the methods according to the embodiments of the present disclosure described above may be implemented in hardware or firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored in a remote recording medium or non-transitory machine-readable medium downloaded via a network and then stored in a local recording medium.
  • a recording medium such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk
  • 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)).
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a computer, a processor, or a microprocessor may be used to store the software on the recording medium.
  • the processor 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.
  • RAM random access memory
  • ROM read-only memory
  • flash memory etc.
  • the software or computer code is accessed and executed by a computer, processor, or hardware, the methods described herein are implemented.
  • a general-purpose computer accesses the code for implementing the methods described herein, the execution of the code transforms the general-purpose computer into a specialized computer for performing the methods described herein.
  • 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.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

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.

Description

虚拟机调 度方法、 电子设备、 计算机存储介质和计算机程序产品 交叉援引 本公开要求于 2024年 03月 14 日提交中国专利局、 申请号为 202410292020.4、 发 明名称为 "虚拟机调度方法、 电子设备、 计算机存储介质和计算机程序产品 ”的中国专 利申请的优 先权, 其全部内容通过引用结合在本公开中。 技术领域 本公开实施例涉及计 算机技术领域, 尤其涉及一种虚拟机调度方 法、 电子设备、 计算机存储介 质和计算机程序产品。 背景技术 诸如公有云、 私有云、 混合云等云服务提供商能够为大量租户提供服务资源, 使 租户能够专 注于业务数据的配置、 管理和维护, 无需搭建服务资源所需的硬件。 一般而言, 云服务提供商通过虚拟机的方式向租户提供服 务资源, 通过将虚拟机 调度到云服 务系统中的宿主机 (例如, 通常为服务器) , 虚拟机能够使用来自宿主机 的底层资 源运行租户的业务数据 , 例如, 宿主机的资源可以包括宿主机的计算资源、 内存带宽 资源、 存储资源和功耗资源等。 随着租户的不断增多,更多的宿主机资 源会经由虚拟机售卖给租户 ,售卖率越高, 宿主机资 源留给虚拟机的业务变动的弹性 空间越小。 一方面, 当来自不同租户的业务 量并发时 , 会导致宿主机资源争抢。 另一方面, 如果提前为不同的租户业务预留出足 够的宿主机 资源, 则会导致了资源售卖率较低。 因此, 需要一种虚拟机调度方案, 既能保证租户业务的性能稳定性, 又能保证宿 主机的资 源售卖率, 降低云服务提供商的运营成本。 发明内容 有鉴于此, 本公开实施例提供一种虚拟机调度方法 、 电子设备、 计算机存储介质 和计算机程 序产品, 以解决上述问题。 根据本公开实施例的 第一方面, 提供了一种虚拟机调度方法、 电子设备、 计算机 存储介质和 计算机程序产品。 该虚拟机调度方法包括: 确定多个待调度虚拟机中的每 个虚拟机 的租户业务特征; 基于每个虚拟机的租户业务特征, 确定每个虚拟机对多种 宿主机资 源的需求程度; 将多个待调度虚拟机调度到至少一个宿主机 中, 使得同一宿 主机中 的任意两个虚拟机针对每种 宿主机资源的需求程 度处于需求互补状态 , 其中, 处于所述 需求互补状态中的两个虚拟机 的需求程度差异超过预设 阈值。 在本公开的另一实现方 式中, 确定多个待调度虚拟机中的每个虚拟机的租户业务 特征, 包括: 监控每个虚拟机的租户业务的至少一个已调度虚拟机对提供 多种宿主机 资源的各个 宿主机硬件的资源使用数据 ; 基于各个宿主机硬件的资源使用数据, 确定 多个待调度虚 拟机中的每个虚拟机的租 户业务特征。 在本公开的另一实现方式 中, 基于每个虚拟机的租户业务特征, 确定每个虚拟机 对多种宿主机 资源的需求程度, 包括: 识别每个虚拟机的租户业务特征, 得到每个虚 拟机的业 务场景和业务风险; 分别基于每个虚拟机的业务场景和业务风 险与所述多种 宿主机资 源之间的相关度, 确定每个虚拟机对所述多种宿主机资源 的需求程度。 在本公开的另一实现方式 中, 所述方法还包括: 确定多个宿主机对所述多种宿主 机资源的可 分配资源总量; 对多个宿主机的可分配资源总量进行排序 , 确定多个宿主 机的资源优 先级; 从多个宿主机中选择所述至少一个宿主机, 使至少一个宿主机中的 资源优先级 大于第一预设优先级阈值 。 在本公开的另一实现方式 中, 该方法还包括: 对多个宿主机各自的资源售卖率进 行均值处理 , 得到多个宿主机的平均资源售卖率; 确定第一预设优先级阈值, 使至少 一个宿主机 的资源售卖率小于平均资源售 卖率。 在本公开的另一实现方式 中, 确定多个宿主机对所述多种宿主机资源的可分配资 源总量, 包括: 确定所述多个宿主机中的每个宿主机针对每种宿主机资 源的可分配资 源量; 采用所述多种宿主机资源各 自的权重系数, 对每个宿主机对所述多种宿主机资 源的多个可 分配资源量进行加权, 确定多个宿主机的可分配资源总量 。 在本公开的另一实现方式 中, 所述方法还包括: 对多个已调度虚拟机中各个已调 度虚拟机 中的目标已调度虚拟机进行重 新调度, 使目标已调度虚拟机在重新调度前所 在的宿主机 的资源优先级, 大于目标已调度虚拟机在重新调度后所在的宿 主机的资源 优先级。 在本公开的另一实现方式 中, 所述方法还包括: 将各个已调度虚拟机中重新调度 优先级 高于第二预设优先级阈值 的已调度虚拟机, 确定为目标已调度虚拟机 , 其中, 已调度虚 拟机对多种宿主机 资源的当前资源 占用比例与已调度 虚拟机的重新调度 优 先级呈 负相关。 在本公开的另一实现方式 中, 所述方法还包括: 针对每种宿主机资源, 监控各个 已调度虚拟机 所在宿主机的处理单元 的额定资源量、 以及处理单元分配到各个已调度 虚拟机的至 少一个处理核心的资源 占用量; 将至少一个处理核心的资源占用量与处理 单元的额定 资源量之间的比例, 确定为各个已调度虚拟机针对宿主机资 源的当前资源 占用比例 。 根据本公开实施例的第二 方面,提供了一种虚拟机调度装置包括 :第一确定组件, 被设置为确定 多个待调度虚拟机中的每个虚 拟机的租户业务特征 ; 第二确定组件, 被 设置为基于每 个虚拟机的租户业务特征 , 确定每个虚拟机对多种宿主机资源的需求程 度; 调度组件, 被设置为将多个待调度虚拟机调度到至少一个宿主机 中, 使得同一宿 主机中的任 意两个虚拟机针对每种 宿主机资源的需求程度 处于需求互补状态 , 其中, 处于需求互 补状态中的两个虚拟机的需求程 度差异超过预设阈值。 根据本公开实施例 的第三方面, 提供了一种电子设备, 包括: 处理器、 存储器、 通信接 口和通信总线, 所述处理器、 所述存储器和所述通信接口通过所述通信总线完 成相互 间的通信; 所述存储器用于存放至少一个可执行指令, 所述可执行指令使所述 处理器执行如 第一方面所述方法对应 的操作。 根据本公开实施例的 第四方面, 提供了一种计算机存储介质, 其上存储有计算机 程序, 该程序被处理器执行时实现如 第一方面所述的方法。 根据本公开实施例 的第五方面, 提供了一种计算机程序产 品, 包括计算机程序 / 指令, 该计算机程序 /指令被处理器执行时实现第一方面所述的方法。 根据本公开实施例的 第六方面, 提供了一种计算机程序产品, 包括非易失性计算 机可读存储介 质, 该非易失性计算机可读存储介质存储计算机程序 , 该计算机程序被 处理器执行 时实现第一方面所述的方 法。 根据本公开实施例的 第七方面, 提供了一种计算机程序, 该计算机程序被处理器 执行时实现 第一方面所述的方法。 在本公开实施例的方案 中, 虚拟机的租户业务特征可靠地反映虚拟机的对多种宿 主机资源 的需求程度, 当将多个待调度虚拟机调度到至少一个宿主机 中时, 能够尽可 能地保证 了资源售卖率, 另外, 在多个待调度虚拟机的调度之后, 由于处于需求互补 状态中的 两个虚拟机的需求程度差异超过 预设阈值, 因而减小了同一宿主机中的不同 待调度虚拟 机的资源争抢。 附图说明 为了更清楚地说明本公开 实施例或现有技术中的技术 方案, 下面将对实施例或现 有技术描述 中所需要使用的附图作简单地 介绍, 显而易见地, 下面描述中的附图仅仅 是本公开 实施例中记载的一些实施例 , 对于本领域普通技术人员来讲, 还可以根据这 些附图获得其 他的附图。 图 1为一些示例的云服务系统的示 意性框图。 图 2为本公开的一些实施例的虚拟机 调度方法的步骤流程 图。 图 3A为图 2的实施例的一个示例的租 户业务的资源需求的计算 过程的示意图。 图 3B为图 2的实施例的一个示例的调度原 理的示意图。 图 4为本公开的另一些实施例的虚拟 机调度方法的步骤流程 图。 图 5为图 4的实施例的根据资源优先级对宿 主机的选择过程的示意 图。 图 6为根据本公开的另一些实施例 的虚拟机调度装置的结构框 图。 图 7为根据本公开的另一些实施例 的电子设备的结构示意图。 具体实施方式 为了使本领域的人员更好 地理解本公开实施例中的技 术方案, 下面将结合本公开 实施例 中的附图, 对本公开实施例中的技术方案进行清楚、 完整地描述, 显然, 所描 述的实施例仅 是本公开实施例一部分 实施例, 而不是全部的实施例。 基于本公开实施 例中的实施 例, 本领域普通技术人员所获得的所有其他实施例, 都应当属于本公开实 施例保护 的范围。 下面结合本公开实施例 附图进一步说明本公开实施例 具体实现。 图 1为一些示例的云服务系统的 示意性框图。 如图 1所示, 云服务系统包括调度 管理节点 110和各个计算节点 120, 图 1所示的 M个计算节点 120包括计算节点 A、 计算节点 B、 计算节点 M等。 调度管理节点 110和各个计算节点 120之间通过网络连 接 130互连。 调度管理节点 110可以由诸如云管理系统 ( Cloud Management System, 简称为 CMS)的云服务管理节点充当, 也可以是与云服务管理节点不同的节点 。 网络 连接 130可以是经由挂载到计算节点 120的内置网卡或独立网卡之间的通信连接 , 用 于实现各个 计算节点 120之间的分布式计算。 每个计算节点 120可以由一个或多个物 理机充 当, 每个物理机可以作为一个或多个虚拟机的宿主机。 在用作宿主机的计算节 点 120中, 各个虚拟机 121可以通过诸如 hypervisor的虚 拟机管理模 块 122进行管理, 虚拟机管理模块 122能够实现调度管理节点 110的本地 代理, 由调度管理节点 110执行云服务系统中的各个虚拟机 的统筹调度。 具体地, 可 以以虚拟机 为基本售卖单位将虚拟机算 力 123 的资源售卖给租户。 例如, 虚拟机 #1、 虚拟机 #2、 虚拟机# N需要占用虚拟机算力 123 的各种宿主机资源。 虚拟机 121可以 包括但不 限于 JAVA虚拟机、 诸如 POD的容器对象。 诸如网络控制器的配置节 点通过虚拟机管理模块 122执行了各个虚拟机之间的通 信, 控制节点可以通过创建、 销魂或编排虚拟机等方式进行虚拟机的 管理, 以便实现 弹性计算或 者应用程序的灵活部署。 随着虚拟机租户的不断增 多, 更多的虚拟机 121 资源会经由虚拟机售卖给租户, 售卖率越 高, 虚拟机算力 123留给虚拟机的业务变动的弹性空间越小。 一方面, 当来 自不同租户 的业务量并发时, 会导致宿主机资源争抢。 另一方面, 如果提前为不同的 租户业务预 留出足够的宿主机资源 , 则会导致了资源售卖率较低。 为此, 本公开的各 个实施例提供 了一系列方案, 既能保证租户业务的性能稳定性, 又能保证宿主机的资 源售卖率 , 降低云服务提供商的运营成本。 下面将结合图 2详细描述本公开的一些实施例的虚拟机调度 方法。 图 2的虚拟机 调度方法可 以由图 1的调度管理节点执行, 虚拟机调度方法包括: 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 the degree of demand of each virtual machine for a plurality of host resources based on the tenant service characteristics of each virtual machine; scheduling the plurality of virtual machines to be scheduled to at least one host machine so that the degree of demand of any two virtual machines in the same host machine for each host resource is in a demand complementary state, wherein the difference in the degree of demand of the two virtual machines in the demand complementary state exceeds a preset threshold. In another implementation of the present disclosure, determining the tenant service characteristics of each virtual machine among a plurality of virtual machines to be scheduled includes: monitoring the tenant service characteristics of at least one scheduled virtual machine providing a plurality of host resources of each virtual machine; Resource usage data of hardware on each host machine for resources; and determining tenant business characteristics of each virtual machine among the multiple virtual machines to be scheduled based on the resource usage data on each host machine 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 business characteristics of each virtual machine includes: identifying the tenant business characteristics of each virtual machine to obtain a business scenario and business 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 business scenario and business 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 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, among the scheduled virtual machines, a scheduled virtual machine whose rescheduling priority is higher than a second preset priority threshold as a target scheduled virtual machine, wherein the current resource usage ratio of the scheduled virtual machine for the various 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 machine resource, the rated resource capacity of the processing unit of the host machine where each scheduled virtual machine resides, and the resource usage of at least one processing core allocated by the processing unit to each scheduled virtual machine; and determining the ratio between the resource usage of the at least one processing core and the rated resource capacity of the processing unit as the current resource usage ratio of each scheduled virtual machine for the host machine resource. According to a second aspect of an embodiment of the present disclosure, a virtual machine scheduling device is provided, comprising: a first determination component, configured to determine tenant business characteristics of each virtual machine among a plurality of virtual machines to be scheduled; a second determination component, configured to determine the degree of demand of each virtual machine for a plurality of host resources based on the tenant business characteristics of each virtual machine; and a scheduling component, configured to schedule the plurality of virtual machines to be scheduled to at least one host machine, so that the degree of demand of any two virtual machines in the same host machine for each host resource is in a complementary state, wherein the difference in the degree 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. FIG5 is a schematic diagram of the process of selecting a host machine according to resource priority in the embodiment of FIG4. FIG6 is a structural block diagram of a virtual machine scheduling device according to other embodiments of the present disclosure. FIG7 is a structural diagram of an electronic device according to other embodiments of the present disclosure. The accompanying drawings clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only a portion of the embodiments of the present disclosure, and are not exhaustive. 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 following further illustrates the specific implementations of the embodiments of the present disclosure, 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, and computing node M. 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 different from the cloud service management node. Network connection 130 can be a communication connection between built-in network cards or independent network cards mounted on compute nodes 120, used to implement distributed computing between compute nodes 120. Each compute node 120 can be served by 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. Virtual machine management module 122 can act as a local agent for scheduling management node 110, which performs the coordinated scheduling of 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 traffic from different tenants can lead to competition 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, 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:

S210: 确定多个待调度虚拟机中的每个虚拟机的租 户业务特征。 应理解, 不同的租户的虚拟机可以运行相同业务, 也可以运行不同业务。 也就是 说, 不同租户的业务属于不同的租户业务 , 相同租户的不同业务也属于不同的租户业 务。 租户业务特征可以包括指示租户业务 的特征指标的数据, 租户业务的特征指标可 以至少 包括业务场景维度和业务风险 维度。 业务场景维度的数据指示租户业务的业务 场景,可以包括但不限于: 网页访问场景、游戏场景、人工智能( Artificial Intelligence, 简称为 AI)推理场景、 AI训练场景、 大数据分析场景、 流媒体场景和数据处理场景 等; 业务风险维度的数据指示租户业务 的业务风险, 可以包括但不限于: 数据流抖动 风险、 数据流中断风险、 数据拥堵风险和业务故障风险等。 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. In other words, services of different tenants belong to different tenant services, and different services of the same tenant also belong to different tenant services. Tenant business characteristics may include data indicating characteristic indicators of the tenant's business. These characteristic indicators 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's business, 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's business, including but not limited to data flow jitter risk, data flow interruption risk, data congestion risk, and business failure risk.

S220: 基于每个虚拟机的租户业务特征, 确定每个虚拟机对多种宿主机资源的需 求程度。 应理解, 多种宿主机资源与宿主机硬件相 关, 包括但不限于宿主机的计算资源、 内存带宽 资源、 存储资源和功耗资源。 具体地, 上述宿主机的计算资源是指可用于执行各种计 算任务和处理工作负载的 能力。它通常包括处理单元 (例如,中央处理器(Central Processing Unit,简称为 CPU) 的处理核 心数量、 主频、 处理能力和并行性等特征。 上述计算资源的强大能力可以用 于决定宿主机 的计算性能和处理能力 。 较强的计算资源允许宿主机运行更复杂的应用 程序、 处理更大规模的数据和执行更 多的并行计算任务。 上述宿主机的 内存带宽资源可以 用于表示系统内存 与处理单元之间 的数据传输 速率,其它影响着程序和操作 系统对内存的访问、数据的读写速度和应 用程序的性能。 较高的 内存带宽资源可提供更快的数据传 输速度, 从而使宿主机能够更高效地处理大 量数据流和执 行内存密集型操作。 上述宿主机的存储资源是 指可用于存储和管理数据 的容量和性能, 包括但不限于 硬盘或 固态硬盘 (Solid State Disk, 简称为 SSD) 等存储设备。 存储资源影响着宿主 机对数据 的存储和检索速度, 以及可用的存储容量。 高性能和大容量的存储资源可支 持更高速 的数据读写操作和更大规模 的存储需求。 上述宿主机的功耗资源指 的是电力资源, 上述宿主机的功耗资源可以用于供电和 支持宿主机 的运行, 节省宿主机的功耗资源能够提升能效和运行成本管 理。 另外, 多 种宿主机 资源可以为上述的各种资源 中的至少两者。 具体地, 与宿主机的计算资源相 关的宿主机硬 件包括处理单元、 处理核心、 缓存、 内存和硬盘等; 与宿主机的内存带 宽资源相 关的宿主机硬件包括缓存和 内存总线等; 与宿主机的存储资源相关的宿主机 硬件包括 内存和硬盘等; 与宿主机的功耗资源相关的宿主机硬件包括 内存和处理单元 等。 还应理解, 一些租户业务对某种宿主机资源的需求程度 高可以被认为这些租户业 务对该宿主机 资源的需求敏感, 例如, 计算资源敏感型业务、 内存带宽资源敏感型业 务、 存储资源敏感型业务或功耗资源敏 感型业务等。 S230: 将多个待调度虚拟机调度到至少一个宿主机 中, 使得同一宿主机中的任意 两个虚拟机针对 每种宿主机资源的需求程度 处于需求互补状态, 其中, 处于需求互补 状态中的 两个虚拟机的需求程度差异超过预 设阈值。 应理解, 一般而言, 特定的业务场景对每种宿主机资源具有特定的需求程度, 例 如, AI推理场景对计算资源和 内存带宽资源的需求, 通常小于 AI训练场景对计算资 源和内存 带宽资源的需求。 也就是说, 当 AI推理场景和 AI训练场景并发时 , 由于 AI推理 场景和 AI训练场景对计算资源和 内存带宽资源的需求差异较 大 (即, 两者处 于需求互补状 态) , 对计算资源和内存带宽资源出现资源争抢的程度较小, 甚至不会 出现资源争抢 的情况。 一般地, 对每种宿主机资源的需求程度反映了对该宿主机资源 出现资源争抢 的程度。 还应理解, 与需求互补状态相反的状态为资源冲突状 态, 处于资源冲突状态的两 个虚拟机对 宿主机资源的需求程度相似 ,例如,需求程度差异不超过预设阈值。另外, 在多种宿主机 资源的情况下, 同一宿主机中的两个宿主机可能对于一些宿 主机资源处 于需求互补状 态, 对于另一些宿主机资源处于需求冲突状态, 在本实施例中的调度各 个虚拟机 的情况下, 需要确保同一宿主机中的任意两个虚拟机针对每种宿主机 资源的 需求程度处 于需求互补状态。 在一些示例中, 处于需求冲突状态的两个虚拟机被调度 到不同宿主机 中。 在本公开实施例的方案 中, 虚拟机的租户业务特征可靠地反映虚拟机的对多种宿 主机资源 的需求程度, 当将多个待调度虚拟机调度到至少一个宿主机 中时, 能够尽可 能地保证 了资源售卖率, 另外, 在多个待调度虚拟机的调度之后, 由于处于需求互补 状态中的 两个虚拟机的需求程度差异超过预 设阈值, 因而减小了同一宿主机中的不同 待调度虚拟机 的资源争抢。 在一些示例中, 在确定每个虚拟机的租户业务特征, 可以该虚拟机的租户业务的 资源使用数据 和 /或指定的需求指标, 确定该虚拟机的租户业务特征。 例如, 可以从租 户业务的 已调度虚拟机的资源使用情 况进行监控, 得到已调度虚拟机对多种宿主机资 源的资源使 用数据。 具体地, 可以针对每种宿主机资源监控同一租户业务的资源使用 数据。 应理解, 如果考虑同一宿主机内的各个虚拟机的实时 资源争抢程度, 则可以以该 资源使用数据 在较短时间内的统计颗粒度 对资源使用数据进行汇总 统计。 如果为了减 少虚拟机 的频繁二次调度, 可以以该资源使用数据在较长时间内的统计颗 粒度对资源 使用数据进行 汇总统计。 具体地, 为了获取每种宿主机资源的资源使用数据 , 可以对与该宿主机资源相关 的至少一个 宿主机硬件的使用数据, 其中, 宿主机硬件包括但不限于处理单元的占用 率、 处理单元中的各个处理核心 (虚拟处理核心或物理处理核心) 的占用率、 内存总 线的访 问带宽的占用率、 处理单元中的缓存的占用率和处理单元 的功耗指标等。 不同的宿主机资源相关 的宿主机硬件不同。 例如, 与宿主机的计算资源相关的宿 主机硬件 包括处理单元、 处理核心、 缓存、 内存和硬盘等; 与宿主机的内存带宽资源 相关的宿主机 硬件包括缓存和内存总线 等; 与宿主机的存储资源相关的宿主机硬件包 括内存和硬盘 等; 与宿主机的功耗资源相关的宿主机硬件包括 内存和处理单元等。 不失一般性地, 作为确定多个待调度虚拟机中的每个虚拟机 的租户业务特征的示 例, 可以监控每个虚拟机的租户业务的至 少一个已调度虚拟机, 对提供多种宿主机资 源的各个宿 主机硬件的资源使用数据 , 然后, 基于各个宿主机硬件的资源使用数据和 /或指定的需求指标数据 , 确定多个待调度虚拟机中的每个虚拟机的租户业务特征。在 一些示例 中, 如图 3A所示, 可以汇总各个宿主机硬件的资源使用数据和指定的需求 指标数据 , 然后, 对汇总数据基于业务场景维度和业务风险维度进行聚类, 得到租户 业务特征 。 应理解, 如图 3A所示的业务场景维度包括 多种业务场景, 业务风险维度包括多 种业务风 险。 进一步, 通过将多种业务场景和多种业务风险进行组合, 可以得到多个 组合。 例如, 在 X种业务场景和 Y种业务风险可以形成 X*Y个组合, 每个组合对应于 租户业务 的业务特征。 可以预先针对 X*Y 个组合中的每个组合对多个宿主机资源进 行需求程度 进行表征标记。 例如, 进一步地, 当比较各个租户业务的需求程度是否需求互补状态时, 可以将 各个租户 业务的需求表征值进行归一化 。 例如, 在将租户业务 A、 B、 C、 D、 E五个 租户业务 的虚拟机调度到至少一个宿主机 中的情况下, 每个租户业务可以采用一个或 多个虚拟机运 行, 宿主机资源包括 M、 N、 O三种 (即, 多种宿主机资源的示例) 。 租户业务 A-E的虚拟机对宿主机资源 M 的需求表征值为 60%、 10%、 10%、 10%、 10%。 即, 租户业务 A的虚拟机对宿主机 资源 M的需求程度 为整体的 60%; 租户业务 B的 虚拟机对宿 主机资源 M 的需求程度为整体的 10%; 租户业务 C的虚拟机对宿主机资 源 M的需求程度为整体的 10%; 租户业务 D的虚拟机对宿主机资源 M的需求 程度为 整体的 10%; 租户业务 E的虚拟机对宿主机资源 M的需 求程度为整体的 10%。 如果需求互补状态的 两个虚拟机的预设阈值设定为 40%,则租户业务 A的虚拟机 与其他租户 业务的虚拟机之间的需求差 异为 50%>40%, 租户业务 B-E的虚拟机之 间 的需求差异 为 0%<40%。 也就是说, 租户业务 A的虚拟机与其他租户业务的虚拟机处 于需求互补 状态, 其他租户业务的虚拟机未处于需求互补状态, 即, 处于上述的需求 冲突状态 。 一般性地, 作为确定该虚拟机对多种宿主机资源的需求程 度的示例, 可以识别每 个虚拟机 的租户业务特征, 得到每个虚拟机的业务场景和业务风险 , 然后, 分别基于 每个虚拟机 的业务场景和业务风险与 多种宿主机资源之间的相关度 , 确定每个虚拟机 对多种宿主机 资源的需求程度。 应理解, 可以通过上述的业务场景维度和业务风险维度 , 对汇总数据基于业务场 景维度和 业务风险维度进行聚类, 得到该虚拟机的业务场景和业务风 险, 即, 在上述 示例中 , X*Y个组合中与该虚拟机对应的组合 指示该虚拟机的业务场 景和业务风险。 还应理解, 该虚拟机的业务场景和业务风险与多种宿主机 资源之间的相关度可以 通过专家 经验或者历史统计结果指定 , 即, 每个组合与多种宿主机资源之间的相关度 可以预先指 定。 在一些情况下, 在一些虚拟机经由调度之后, 租户业务的状态和宿主机资源的动 态变化 , 会对这些虚拟机进行重新调度。 也就是说, 可以对一些待调度虚拟机进行一 次调度 , 还可以对这些已调度虚拟机进行重新调度。 如图 3B所示的坐标系中, 横坐 标可以用 于表示虚拟机在一次调度之后 所经历的时间, 纵坐标可以用于表示虚拟机通 过第一次调度 被调度到宿主机后的资 源争抢程度, 即, 宿主机的资源冲突程度。 宿主 机的资 源售卖率越高, 资源冲突程度越高。 因此, 为了尽可能提升宿主机的售卖率, 宿主机的 资源冲突程度会增大, 当资源冲突程度不超过资源冲突阈值 时, 租户业务不 会受到显著 影响。 当资源冲突程度超过资源冲突阈值 时, 租户业务会受到显著影响, 在这种情 况下, 可以将一次调度后的虚拟机进行二次调度, 自动化地持续动态重新调 度部分 已调度虚拟机, 以缓解宿主机的资源冲突程度。 关于虚拟机的一次调度 : 在将多个待调度虚拟机调度 到至少一个宿主机中之前 , 需要从多个虚拟机中选择 至少一个宿 主机, 即, 当前的多个待调度虚拟机不会调度到其余宿主机中。 从多个虚 拟机中选择 至少一个宿主机, 可以根据多个宿主机的资源优先级执行 , 宿主机的资源 优先级表征 了宿主机的资源分配 能力, 资源优先级越高, 宿主机的可分配资源越多。 因而, 从多个虚拟机中选择资源优先级靠前 的至少一个宿主机, 进而将多个待调度虚 拟机调度到 至少一个宿主机中, 减小了各个虚拟机发送资源争抢 的程度。 作为从多个虚拟机中选择 资源优先级靠前的至少一个 宿主机的示例, 可以至少一 个宿主机 的资源优先级至少大于至少部 分其他的宿主机的资源优先 级。 优选地, 至少 一个宿主机 的资源优先级大于其他的宿 主机的资源优先级。 例如, 至少一个宿主机的资源优先级大于第一预设优先 级阈值, 根据第一预设优 先级阈值直接 从多个虚拟机中选择至 少一个宿主机, 或者, 可以根据第一预设优先级 阈值直接从 多个虚拟机中选择部分宿主机 , 再从部分宿主机中进一步筛选出至少一个 宿主机。 进一步地, 可以分别针对多个宿主机确定资源优先级 , 例如, 可以为每个宿主机 确定多种宿主机 资源的综合可分配资源指标 , 例如, 可分配资源总量。 应理解, 文中 的可分 配资源包括已经分 配给特定虚拟机的 资源或者为虚拟机 预留的资源之外 的剩 余资源。 为了确定多种宿主机资源 的综合可分配资源指标, 可以确定多个宿主机对多种宿 主机资源 的可分配资源总量, 然后, 对多个宿主机的可分配资源总量进行排序, 确定 多个宿主机 的资源优先级。 进一步地, 作为确定多个宿主机对多种宿主机资源的可分 配资源总量的示例, 可 以确定多个宿 主机中的每个宿主机针对每种 宿主机资源的可分配资 源量, 然后, 采用 多种宿主机 资源各自的权重系数, 对每个宿主机对多种宿主机资源的多个 可分配资源 量进行加权 , 确定多个宿主机的可分配资源总量。 应理解, 多种宿主机资源各自的权重系数可以预先设定 , 例如, 可以采集多种宿 主机资源 的历史使用数据, 然后, 对历史使用数据与资源需求程度或资源争抢程度之 间进行拟合 , 基于拟合关系确定每种宿主机资源的权重系数。 也就是说, 对综合可分 配资源指标影 响越大的宿主机资源的权重越 大, 对综合可分配资源指标影响越小的宿 主机资源 的权重越大, 例如, 一般而言, 宿主机中的处理核心的数量和内存带宽的权 重系数大于 宿主机的功耗资源的权重 系数。 还应理解, 宿主机针对每种宿主机资源的可分配资源量表 示宿主机的该宿主机资 源中除去 已经分配的资源量或预留的 资源量之外的剩余量。 可以通过多种宿主机资源 的可分配 资源比例来表征可分配资源量 。 在另一些示例中, 为了实现从多个宿主机中选择至少一 个宿主机, 可以对多个宿 主机各 自的资源售卖率进行均值处理 , 得到多个宿主机的平均资源售卖率, 然后, 确 定第一预设优 先级阈值, 使至少一个宿主机的资源售卖率小于平均资 源售卖率。 也就 是说, 至少一个宿主机的资源售卖率小于平 均资源售卖率, 尽可能保证了各个宿主机 的资源能够 均衡地分配, 在保持资源售卖率的情况下进一步避免了各个虚 拟机的资源 争抢的情 况。 关于虚拟机的二次调度 : 对于已经调度的部分虚拟机 , 在一些情形中, 可以对部分虚拟机迁移到新的宿主 机中, 即, 重新调度到新的宿主机中。 例如, 尽管在一次调度的情况下考虑可能出现 的资源需求和 资源争抢的各种因素, 但由于各个宿主机的需要保证一 定的售卖率, 在 调度到同一 宿主机的不同虚拟机在一段 时间内也有可能出现并发性较 高的情况, 这时 需要缓解该虚 拟机中的资源争抢程度 。 在一些示例中, 可以出现资源争抢的虚拟机重 新调度到 不同的宿主机中, 例如, 将出现资源争抢的两个虚拟机中的一者重新调度到 其他虚拟机 中, 并且确保该虚拟机重新调度到其他虚拟机中之后不会与其他 虚拟机自 身的虚拟机 出现资源需求争抢, 从而可靠地解决了资源争抢的问题 。 在另一些示例中, 由于出现资源争抢的虚拟机占用的宿 主机资源较多, 对这样的 虚拟机进行 迁移, 会导致迁移成本较高且迁移成功率较低, 另外, 如果迁移失败, 数 据会出现丢 失, 也会带来迁移成本的进一步增加。 在这种情况下, 可以宿主机中出现 资源争抢 的虚拟机之外的虚拟机重新 迁移到其他虚拟机。 由此, 考虑到虚拟机迁移成 本或迁移成功 率等因素, 针对已经调度虚拟机设置重新调度优先级 , 然后, 基于各个 已调度虚拟机 的重新调度优先级对部分 已调度虚拟机执行重新调度 。 优选地, 已调度 虚拟机对 多种宿主机资源的当前资源 占用比例越小, 该已调度虚拟机的重新调度优先 级越高。 例如, 当对多个已调度虚拟机中各个已调度虚拟机中 的目标已调度虚拟机进行重 新调度时 , 可以使目标已调度虚拟机在重新调度前所在的宿主机的 资源优先级, 大于 目标 已调度虚拟机在重新调度后所在 的宿主机的资源优先级, 在这种情况下, 既减小 了虚拟机重新 调度(既, 虚拟机迁移) 的成本, 同时也避免了增加目标已调度虚拟机 在重新调度之 后与其他虚拟机的资源争抢 的可能性。 在一些示例中, 可以从各个已调度虚拟机中指定 目标已调度虚拟机, 从而针对性 地解决 了目标已调度虚拟机的资源争抢 情形。 可替代地, 也可以通过设置第二预设优 先级阈值 , 从已经基于重新调度优先级重新排序的各个已调度虚拟机 中选择目标已调 度虚拟机 。 可替代地, 通过设置第二预设优先级阈值, 也可以自动化地持续动态重新调度部 分已调度虚 拟机, 例如, 可以持续将各个已调度虚拟机中重新调度优先级高于第二预 设优先级 阈值的已调度虚拟机, 确定为目标已调度虚拟机, 其中, 已调度虚拟机对多 种宿主机 资源的当前资源占用比例与 已调度虚拟机的重新调度优先 级呈负相关。 另夕卜, 第二预设优 先级阈值可以针对多个宿主机 的平均资源售卖率调整 , 平均资源售卖率越 高, 第二预设优先级阈值可以设置越小 , 从而可以选择更多的目标已调度虚拟机进行 重新调度 , 为分配了更多资源的虚拟机提供可用资源, 预先避免这些虚拟机出现资源 争抢情形 。 通过上文的描述, 可以知晓, 已调度虚拟机对多种宿主机资源的当前资源占用比 例越小 , 该已调度虚拟机的重新调度优先级越高。 也就是说, 已调度虚拟机对多种宿 主机资 源的当前资源占用比例越 大, 该已调度虚拟机的重新调度优先级越低 , 因此, 需要可靠地确 定已调度虚拟机对每种宿主机 资源的当前资源占用比例 。 作为确定已调度虚拟机对每 种宿主机资源的当前资 源占用比例的一些示例, 可以 针对每种 宿主机资源, 监控各个已调度虚拟机所在宿主 机的处理单元的额定 资源量、 以及所述处 理单元分配到各个已调度虚 拟机的至少一个处理核心 的资源占用量, 然后, 将所述至 少一个处理核心的资源 占用量与所述处理单元的额定资 源量之间的比例, 确 定为各个 已调度虚拟机针对该宿主机 资源的当前资源占用比例。 应理解, 处理核心可以是物理处理核心 ( core ) 、 也可以为虚拟处理核心 ( virtual core ) , 处理单元可以为中央处理器。 例如, 当宿主机资源为内存带宽资源时, 已调 度虚拟机 的当前资源 占用比例为已调度虚拟 机的各个处理核 心的资源占用量与 处理 单元的额 定资源量之间的比例。 其中, 各个处理核心的资源占用量 (即, core 粒度) 和处理单元 的额定资源量 (即, packet粒度) 可以从处理单元中设置的诸如性能监控 单元 ( Performance Monitoring Unit, 简称为 PMU ) 的寄存器中读取出。 在已调度虚拟机被分配 n个处理核心的情 况下, 已调度虚拟机的内存带宽 BW= PMU ( corel ) +PMU ( core2 ) + PMU ( core n ) „ 类似地,在已调度虚拟机被分配 n个处理核心的情况下, 已调度虚拟机的功耗 P= PMU ( corel ) +PMU ( core2 ) + PMU ( core n ) „ 下面将结合图 4详细描述本公开的另一些实施例的虚拟机调度 方法。 图 4的虚拟 机调度方 法包括: 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 data of scheduled virtual machines of tenant services can be monitored to obtain resource usage data of various host resources by the scheduled virtual machines. 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 of each virtual machine within the same host is considered, resource usage data can be aggregated and counted at a shorter statistical granularity. To reduce frequent rescheduling of virtual machines, resource usage data can be aggregated and counted at a longer statistical granularity. Specifically, to obtain resource usage data for each host resource, usage data of at least one host hardware associated with the host resource can be collected. 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, and the total memory usage. The host hardware associated with different host resources varies. For example, host hardware associated with the host's computing resources includes processing units, processing cores, cache, memory, and hard disks; host hardware associated with the host's memory bandwidth resources includes cache and memory buses; host hardware associated with the host's storage resources includes memory and hard disks; and host hardware associated with the 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 the multiple virtual machines to be scheduled, at least one scheduled virtual machine can be monitored for tenant services of each virtual machine. Resource usage data for each host hardware component that provides multiple host resources can then be collected. 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 , resource usage data and specified demand indicator data for each host hardware can be aggregated. The aggregated data can then be clustered based on the business scenario and business risk dimensions to obtain tenant business 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 tenant business characteristic. For each of the X*Y combinations, the demand level of multiple host resources can be pre-characterized and labeled. For example, when comparing the demand levels of each tenant business to determine whether they are complementary, the demand characterization values of each tenant business can be normalized. For example, when virtual machines for five tenant businesses (A, B, C, D, and E) are scheduled to at least one host, each tenant business can be run using one or more virtual machines, and the host resources can include M, N, and O (i.e., an example of multiple host resources). The demand representation values for host resource M by the virtual machines of tenant services AE are 60%, 10%, 10%, 10%, and 10%. That is, the demand for host resource M by the virtual machines of tenant service A is 60% of the total; the demand for host resource M by the virtual machines of tenant service B is 10% of the total; the demand for host resource M by the virtual machines of tenant service C is 10% of the total; the demand for host resource M by the virtual machines of tenant service D is 10% of the total; and the demand for host resource M by the virtual machines of tenant service E is 10% of the total. If the preset threshold for two virtual machines in a complementary demand state is set to 40%, then the demand difference between the virtual machines 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 machines of tenant service A are in a complementary demand state with the virtual machines of other tenant services, while the virtual machines of other tenant services are not in a complementary demand state, that is, they are in the aforementioned demand conflict state. Generally, as an example of determining the degree of demand for multiple host resources by the virtual machine, the tenant business characteristics of each virtual machine can be identified to obtain the business scenario and business risk of each virtual machine, and then, based on The correlation between each virtual machine's business scenario and business risk and various host resources determines the degree of each virtual machine's demand for various host resources. It should be understood that the business scenario and business risk of each virtual machine can be determined by clustering the aggregated data based on the business scenario and business risk dimensions described above. That is, in the above example, the X*Y combinations corresponding to the virtual machine indicate the business scenario and business risk of the virtual machine. It should also be understood that the correlation between the business scenario and business risk of the virtual machine 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-determined. In some cases, after some virtual machines are 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. The selection of at least one host machine 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 machine with a high 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 machine with a high 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 at least one host machine can be further selected from the some hosts. Furthermore, resource priorities can be determined separately for the multiple hosts. For example, a resource priority can be set for each host machine. Determine a comprehensive allocatable resource index for multiple host resources, such as the total allocatable resource amount. It should be understood that the allocatable resources herein include resources already allocated to a specific virtual machine or remaining resources beyond those reserved for the virtual machine. To determine the comprehensive allocatable resource index for multiple host resources, the total allocatable resource amount for 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 host resources. Furthermore, as an example of determining the total allocatable resource amount for multiple host resources, the allocatable resource amount for each host resource can be determined for each of the multiple host resources. 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 various host resources can be pre-set. For example, historical usage data for various host resources can be collected, and then a fit can be performed between the historical usage data and the resource demand or resource contention level. The weight coefficient for each host resource can be determined based on the fit. Specifically, host resources with a greater impact on the overall allocatable resource index have a greater weight, while host resources with a smaller impact on the overall allocatable resource index have a greater weight. 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 in the host, excluding the allocated or reserved resources. The allocatable resource amount can be represented by the ratio of allocatable resources among the various host resources. In other examples, to select at least one host from multiple hosts, the resource sell-off rates of each of the multiple hosts can be averaged to obtain the average resource sell-off rate of the multiple hosts. Then, a first preset priority threshold is determined such that the resource sell-off rate of the at least one host is less than the average resource sell-off rate. In other words, the resource sell-off rate of the at least one host is less than the average resource sell-off rate, thereby ensuring balanced resource distribution across the hosts and further avoiding resource contention among virtual machines while maintaining the resource sell-off 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 various factors of potential resource demand and resource contention are considered in primary scheduling, due to the need to maintain a certain sell-off rate for each host, different virtual machines scheduled to the same host may experience high concurrency over a period of time. In such cases, it may be necessary to mitigate resource contention within these virtual machines. In some examples, virtual machines experiencing resource contention can be rescheduled to different host machines. For example, one of two virtual machines experiencing resource contention can be rescheduled to another virtual machine, and it is ensured that after being rescheduled to the other virtual machine, the virtual machine will not compete with the other virtual machine's own virtual machine for resource requirements, thereby reliably resolving the resource contention problem. In other examples, because virtual machines experiencing resource contention occupy a large number of host machine resources, migrating such virtual machines results in high migration costs and low migration success rates. Furthermore, if the migration fails, data may be lost, further increasing the migration cost. In this case, virtual machines other than the virtual machine experiencing resource contention can be re-migrated to other virtual machines on the host machine. Therefore, taking into account factors such as virtual machine migration cost and 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 ratio of a scheduled virtual machine for various host machine 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, scheduled virtual machines with rescheduling priorities higher than the second preset priority threshold can be continuously identified as target scheduled virtual machines. The current resource usage ratio of a scheduled virtual machine for various host 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 hosts. 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 for 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 various host resources, the higher the rescheduling priority of the scheduled virtual machine. In other words, the greater the current resource usage ratio of a scheduled virtual machine for various 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 each host resource by a scheduled virtual machine, for each host resource, the rated resource amount of the processing unit of the host machine where each scheduled virtual machine resides, as well as the resource usage of at least one processing core allocated to each scheduled virtual machine by the processing unit, can be monitored. Then, the ratio between the resource usage of the at least one processing core and the rated resource amount of the processing unit is 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 machine resource is memory bandwidth, the current resource usage ratio of the 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 provided in the processing unit, such as a performance monitoring unit (PMU). When n processing cores are allocated to a scheduled virtual machine, the memory bandwidth BW of the scheduled virtual machine is calculated as follows: PMU (core 1) + PMU (core 2) + PMU (core n). Similarly, when n processing cores are allocated to a scheduled virtual machine, the power consumption P of the scheduled virtual machine is calculated as follows: PMU (core 1) + PMU (core 2) + PMU (core n). Other virtual machine scheduling methods according to embodiments of the present disclosure will be described in detail below with reference to FIG. The virtual machine scheduling method of FIG. 4 includes:

S410: 确定多个宿主机对多种宿主机资源的可分 配资源总量。 S410: Determine the total amount of resources that can be allocated to multiple host resources by multiple host machines.

S420:对多个宿主机的可分配资源 总量进行排序,确定多个宿主机的资源优先级 。S420: Sort the total amount of allocatable resources of multiple host machines and determine the resource priorities of the multiple host machines.

S430: 从多个宿主机中选择至少一个宿主机, 使至少一个宿主机中的资源优先级 大于第一预设 优先级阈值。 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.

S440: 将多个待调度虚拟机调度到至少一个宿主机 中, 使得同一宿主机中的任意 两个虚拟机针 对每种宿主机资源的需求程度 均处于需求互补状态 。 应理解, 作为从多个宿主机中选择至少一个宿主机的 示例, 根据第一预设优先级 阈值直接从 多个虚拟机中选择至少一个 宿主机, 或者, 可以根据第一预设优先级阈值 直接从多个虚 拟机中选择部分宿主机 , 再从部分宿主机中进一步筛选出至少一个宿主 机。 例如, 如图 5所示, 对宿主机 1-8的可分配资源总量进行排序, 得到宿主机 1-8 的资源优先 级。从宿主机 1-8中通过第一预设优先级阈值初步筛选部分虚拟机,其中, 宿主机 1、 宿主机 3、 宿主机 4、 宿主机 7和宿主机 8的资源优先级大于第一预设优先 级阈值。 然后, 可以进一步从宿主机 1、 宿主机 3、 宿主机 4、 宿主机 7和宿主机 8筛 选出宿主机 1、 宿主机 3和宿主机 4作为上述的至少一个虚拟机。 应理解, 进一步筛 选的标准可 以是宿主机 7或宿主机 8需要为后续的业务开销 大或者作为指定重保租户 的虚拟机预 留较多的宿主机资源, 从而将宿主机 7或宿主机 8的资源优先级判定较低 资源优先级 。 还应理解, 其他步骤和方案的相关解释和说明可以参 考上文, 此处不再赘述。 下面将结合图 6来描述根据本公开的另一些实施例的虚拟机调度 装置。 图 6的虚 拟机调度装 置对应于图 2的虚拟机调度方法 , 包括: 第一确定组件 610, 被设置为确定多个待调度虚拟机中的每个虚拟机的租户业务 特征; 第二确定组件 620, 被设置为基于每个虚拟机的租户业务特征, 确定每个虚拟机 对多种宿主机 资源的需求程度; 调度组件 630, 被设置为将所述多个待调度虚拟机调度到至少一个宿主机中, 使 得同一宿 主机中的任意两个 虚拟机针对每种 宿主机资源的需求程 度处于需求互补 状 态, 其中, 处于所述需求互补状态中的两个虚拟机的需求程度差异超 过预设阈值。 在本公开实施例的方案 中, 虚拟机的租户业务特征可靠地反映虚拟机的对多种宿 主机资源 的需求程度, 当将多个待调度虚拟机调度到至少一个宿主机 中时, 能够尽可 能地保证 了资源售卖率, 另外, 在多个待调度虚拟机的调度之后, 由于处于需求互补 状态中的 两个虚拟机的需求程度差异超过预 设阈值, 因而减小了同一宿主机中的不同 待调度虚拟机 的资源争抢。 在另一些实施例中, 第一确定组件, 被设置为通过执行以下步骤, 来确定多个待 调度虚拟机 中的每个虚拟机的租户业 务特征: 监控每个虚拟机的租户业务的至少一个 已调度虚拟机 , 对提供多种宿主机资源的各个宿主机硬件的资源使用数 据; 基于各个 宿主机硬件 的资源使用数据, 确定多个待调度虚拟机中的每个虚拟机的租 户业务特征。 在另一些实施例中, 第一确定组件, 被设置为通过执行以下步骤, 来基于每个虚 拟机的租 户业务特征, 确定虚拟机对多种宿主机资源的需求程度: 识别每个虚拟机的 租户业务特征 , 得到每个虚拟机的业务场景和业务风险; 分别基于每个虚拟机的业务 场景和业务风 险与多种宿主机资源之 间的相关度, 确定每个虚拟机对多种宿主机资源 的需求程度 。 在另一些实施例中, 虚拟机调度装置还包括: 第三确定组件, 被设置为: 确定多 个宿主机对 多种宿主机资源的可分配 资源总量; 对多个宿主机的可分配资源总量进行 排序, 确定多个宿主机的资源优先级; 从多个宿主机中选择至少一个宿 主机, 使至少 一个宿主机 中的资源优先级大于第一预设 优先级阈值。 在另一些实施例中, 虚拟机调度装置, 还被设置为: 对多个宿主机各自的资源售 卖率进行 均值处理, 得到多个宿主机的平均资源售卖率 ; 确定第一预设优先级阈值, 使至少一个 宿主机的资源售卖率小于所述 平均资源售卖率。 在另一些实施例中, 第三确定组件, 被设置为通过执行以下步骤, 来确定多个宿 主机对多种 宿主机资源的可分配资源 总量: 确定多个宿主机中的每个宿主机针对每种 宿主机资 源的可分配资源量; 采用多种宿主机资源各自的权重系数 , 对每个宿主机对 多种宿主机 资源的多个可分配资 源量进行加权, 确定多个宿主机的可分配资源 总量。 在另一些实施例中, 调度组件还被设置为: 对多个已调度虚拟机中各个已调度虚 拟机中的 目标已调度虚拟机进行重新调度 , 使所述目标已调度虚拟机在重新调度前所 在的宿主机 的资源优先级, 大于所述目标已调度虚拟机在重新调度后所在 的宿主机的 资源优先级 。 在另一些实施例中, 调度组件还被设置为: 将各个已调度虚拟机中重新调度优先 级高于第二预 设优先级阈值的已调度虚 拟机, 确定为目标已调度虚拟机, 其中, 已调 度虚拟 机对多种宿主机资 源的当前资源 占用比例与已调度虚拟 机的重新调度优 先级 呈负相关 。 在另一些实施例中, 虚拟机调度装置还包括: 监控组件, 被设置为: 针对每种宿 主机资源 , 监控各个已调度虚拟机所在宿主机的处理单元的额定资 源量、 以及处理单 元分配到各 个已调度虚拟机的至少一个 处理核心的资源占用量; 将至少一个处理核心 的资源 占用量与处理单元的额定资源量之 间的比例, 确定为各个已调度虚拟机针对该 宿主机资 源的当前资源占用比例。 虚拟机调度装置 中各组件的具体 实现可以参见上述 方法实施例中的相 应步骤对 应的描述 , 并具有相应的有益效果, 在此不赘述。 所属领域的技术人员可以清楚地了 解到, 为描述的方便和简洁, 上述描述的装置和组件的具体工作过程 , 可以参考前述 方法实施例 中的对应过程描述, 在此不再赘述。 参照图 7, 示出了根据本公开的另一实施例的一种电子设备的结构示意图 , 本公 开具体实施 例并不对电子设备的具体 实现做限定。 如图 7所示,该电子设备可以包括:用于执行程序 710的处理器( processor )702、 通信接 口 ( Communications Interface ) 704、存储器 ( memory ) 706、以及通信总线 708„ 处理器、 通信接口、 以及存储器通过通信总线完成相互间的通信。 通信接口, 用于与其它电子设备或服务器进行通信 。 处理器, 用于执行程序, 具体可以执行上述方法实施例中的相关步骤。 具体地, 程序可以包括程序代码, 该程序代码包括计算机操作指令。 处理器可能是 CPU,或者是特定集成电路 ( Application Specific Integrated Circuit, 简称为 ASIC ) , 或者是被配置成实施本公开实施例的一个或多个集成电路。 智能设 备包括的一 个或多个处理器, 可以是同一类型的处理器, 如一个或多个 CPU; 也可以 是不同类型 的处理器, 如一个或多个 CPU以及一个或多个 ASIC。 存储器, 用于存放程序。 存储器可能包含高速 RAM存储 器, 也可能还包括非易 失性存储 器 ( non-volatile memory ) , 例如至少一个磁盘存储器。 程序可包括多条计算机指 令, 程序具体可以通过多条计算机指令使得处理器执行 前述多个 方法实施例中任一实施例所描 述的各个虚拟机调度方法对应 的操作。 程序中各步骤的具体 实现可以参见上述方法实施例 中的相应步骤、 组件或单元中 对应的描述 , 并具有相应的有益效果, 在此不赘述。 所属领域的技术人员可以清楚地 了解到 , 为描述的方便和简洁, 上述描述的装置、 设备或组件的具体工作过程, 可以 参考前述 方法实施例中的对应过程描述 , 在此不再赘述。 本公开实施例还提供 了一种计算机存储介质, 其上存储有计算机程序, 该程序被 处理器执行 时实现前述多个方法实施例 中任一实施例所描述的方法 。 该计算机存储介 质包括但 不限于: 只读光盘 ( Compact Disc Read-Only Memory, 简称为 CD-ROM) 、 随机存储 器 ( Random Access Memory , 简称为 RAM) 、 软盘、 硬盘或磁光盘等。 本公开实施例还提供 了一种计算机程序产品, 包括计算机指令, 该计算机指令指 示计算设备执 行上述虚拟机调度方法对应 的操作。 本公开实施例还提供 了一种计算机程序产品, 包括非易失性计算机可读存储介质 , 该非易失性 计算机可读存储介质存储计 算机程序, 该计算机程序被处理器执行时实现 本公开 中的虚拟机调度方法。 本公开实施例还提供 了一种计算机程序, 所述计算机程序被处理器执行时实现本 公开中的虚 拟机调度方法。 可选地, 上述计算机程序被处理器执行时实现如下步骤 的程序代码: 确定多个待 调度虚拟机 中的每个虚拟机的租户业务 特征; 基于每个虚拟机的租户业务特征, 确定 每个虚拟机对 多种宿主机资源的需求程度 ; 将多个待调度虚拟机调度到至少一个宿主 机中, 使得同一宿主机中的任意两个虚拟机针对 每种宿主机资源的需求程度 处于需求 互补状 态, 其中, 处于需求互补状态中的两个虚拟机的需求程度差异超过预设 阈值。 此外, 需要说明的是, 本公开实施例所涉及到的与用户有关的信息 (包括但不限 于用户设备信 息、 用户个人信息等)和数据 (包括但不限于用于对模型进行训练的样 本数据、 用于分析的数据、 存储的数据、 展示的数据等) , 均为经用户授权或者经过 各方充分授权 的信息和数据, 并且相关数据的收集、 使用和处理需要遵守相关规定和 标准, 并提供有相应的操作入口, 供用户选择授权或者拒绝。 需要指出,根据实施的需要, 可将本公开实施例中描述的各个部件 /步骤拆分为更 多部件 /步骤,也可将两个或多个部件 /步骤或者部件 /步骤的部分操作组合成新的部件 / 步骤, 以实现本公开实施例的 目的。 上述根据本公开实施例 的方法可在硬件、 固件中实现, 或者被实现为可存储在记 录介质 (诸如 CD-ROM、 RAM、 软盘、 硬盘或磁光盘) 中的软件或计算机代码, 或 者被 实现通过网络下载的原 始存储在远程记 录介质或非暂时机 器可读介质中并将 被 存储在本地 记录介质中的计算机代码 , 从而在此描述的方法可被存储在使用通用计算 机、 专用处理器或者可编程或专用 硬件 (诸如专用集成电路 (Application Specific Integrated Circuit,简称为 ASIC)或现场可编辑门阵列( Field Programmable Gate Array , 简称为 FPGA) ) 的记录介质上的这样的软件处理。 可以理解, 计算机、 处理器、 微 处理器控 制器或可编程硬件包括可 存储或接收软件或计 算机代码的存储组件 (例如, 随机存储 器( Random Access Memory,简称为 RAM)、只读存储器( Read-Only Memory , 简称为 ROM ) 、 闪存等) , 当所述软件或计算机代码被计算机、 处理器或硬件访问 且执行时 , 实现在此描述的方法。 此外, 当通用计算机访问用于实现在此示出的方法 的代码时 , 代码的执行将通用计算机转换为用于执行在此 示出的方法的专用计 算机。 本领域普通技术人员可 以意识到, 结合本文中所公开的实施例描述的各示例的单 元及方法步骤 , 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现。 这些功 能究竟以硬件还 是软件方式来执行, 取决于技术方案的特定应用和设计 约束条件。 专 业技术人 员可以对每个特定的应用来使 用不同方法来实现所描述的 功能, 但是这种实 现不应认为超 出本公开实施例的范 围。 以上实施方式仅用于说 明本公开实施例, 而并非对本公开实施例的限制, 有关技 术领域的普通 技术人员, 在不脱离本公开实施例的精神和范围的情况 下, 还可以做出 各种变化和 变型, 因此所有等同的技术方案也属于本公开实施例的范畴 , 本公开实施 例的专利保 护范围应由权利要求限定 。 工业实用性 本公开实施例提供的方 案可以应用于虚拟机的调度过 程中, 确定多个待调度虚拟 机中的每个 虚拟机的租户业务特征 ; 基于每个虚拟机的租户业务特征, 确定每个虚拟 机对多种宿 主机资源的需求程度; 将多个待调度虚拟机调度到至少一 个宿主机中, 使 得同一 宿主机中的任意两个 虚拟机针对每种 宿主机资源的需求 程度处于需求互补 状 态, 进而解决了宿主机的资源售卖率低 的技术问题。 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 the criteria for further screening may be that the host machine 7 or the host machine 8 needs to reserve more host machine resources for subsequent business expenses or as a virtual machine of a designated important tenant, thereby determining the resource priority of the host machine 7 or the host machine 8 to be a lower resource priority. It should also be understood that the relevant explanations and descriptions of other steps and solutions can be referred to above and will not be repeated here. The virtual machine scheduling device according to other embodiments of the present disclosure will be described below in conjunction with Figure 6. The virtual machine scheduling device of Figure 6 corresponds to the virtual machine scheduling method of Figure 2, and includes: a first determination component 610, which is configured to determine the tenant business of each virtual machine in a plurality of virtual machines to be scheduled Features: A second determination component 620 is configured to determine each virtual machine's demand for various host resources based on each virtual machine's tenant service characteristics. A scheduling component 630 is configured to 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, wherein the difference in demand levels between the two virtual machines in the complementary demand state exceeds a preset threshold. In the embodiment of the present disclosure, the tenant service characteristics of the virtual machines reliably reflect the virtual machines' demand levels for various host resources. When scheduling the multiple virtual machines to be 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, since the difference in demand levels between the two virtual machines in the complementary demand state exceeds the preset threshold, resource contention between different virtual machines to be scheduled on the same host machine is reduced. In other embodiments, the first determination component is configured to determine tenant service characteristics of each of the plurality of virtual machines to be scheduled by performing the following steps: monitoring resource usage data of at least one scheduled virtual machine for each virtual machine's tenant service on respective host hardware providing various host resources; and determining the tenant service characteristics of each of the plurality of virtual machines to be scheduled based on the resource usage data of the respective host hardware. In other embodiments, the first determination component is configured to determine the virtual machine's demand for various host resources based on the tenant service characteristics of each virtual machine by performing the following steps: identifying the tenant service characteristics of each virtual machine to obtain a service scenario and service risk for each virtual machine; and determining the demand for various host resources for each virtual machine based on the correlation between the service scenario and service risk of each virtual machine and the various host resources. In other embodiments, the virtual machine scheduling apparatus further includes: a third determination component configured to: determine the total amount of resources that can be allocated to multiple host resources by multiple host machines; sort the total amount of resources that can be allocated to the multiple host machines to determine resource priorities for the multiple host machines; and select at least one host machine from the multiple host machines such that the resource priority of the at least one host machine is greater than a first preset priority threshold. In other embodiments, the virtual machine scheduling apparatus is further configured to: average the resource selling rates of the multiple host machines to obtain an average resource selling rate for the multiple host machines; and determine a first preset priority threshold such that the resource selling rate of the at least one host machine 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 the multiple host resources by the 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 weight coefficients for the multiple host resources to determine the total amount of resources that can be allocated to the multiple host machines. In some other embodiments, the scheduling component is further configured to reschedule a target scheduled virtual machine in each of the multiple scheduled virtual machines so that the target scheduled virtual machine is The resource priority of the host machine where the target scheduled virtual machine resides is greater than the resource priority of the host machine where 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 higher than a second preset priority threshold as the target scheduled virtual machine, wherein the current resource occupancy ratio of the scheduled virtual machine for multiple host resources is negatively correlated with the rescheduling priority of the scheduled virtual machine. In other embodiments, the virtual machine scheduling apparatus further comprises: a monitoring component configured to: monitor, 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 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 apparatus can be found in the description of the corresponding steps in the above-mentioned method embodiments, and has corresponding beneficial effects, and is not further described here. Those skilled in the art will readily appreciate that, for ease and brevity of description, the specific operating processes of the apparatus and components described above can be referenced to the corresponding process descriptions in the aforementioned method embodiments and will not be further elaborated upon here. Referring to FIG7 , a schematic structural diagram of an electronic device according to another embodiment of the present disclosure is shown. The present disclosure does not limit the specific implementation of the electronic device in this embodiment. 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, specifically, to perform the relevant steps in the above-mentioned method embodiment. Specifically, the program may include program code, which includes computer operation 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 one or more processors included in the smart device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs. The memory is used to store the program. The memory may include high-speed RAM memory, or may also include non-volatile memory, such as at least one disk storage. The program may include multiple computer instructions, Specifically, the program can cause the processor to execute the operations corresponding to the various virtual machine scheduling methods described in any of the aforementioned method embodiments through multiple computer instructions. The specific implementation of each step in the program can refer to the corresponding description of the corresponding steps, components or units in the aforementioned method embodiments, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art will clearly understand It is understood that for ease and brevity of description, the specific operating processes of the above-described apparatuses, devices, or components can be referred to the corresponding process descriptions in the aforementioned method embodiments and will not be repeated here. The present disclosure also provides a computer storage medium having a computer program stored thereon. When executed by a processor, the program 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. The present disclosure also provides a computer program product comprising computer instructions that instruct a computing device to perform operations corresponding to the aforementioned virtual machine scheduling method. The present disclosure also provides a computer program product comprising a non-volatile computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the virtual machine scheduling method of the present disclosure. The present disclosure also provides 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 the present 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 the present disclosure. The methods according to the embodiments of the present disclosure described above may be implemented in hardware or firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code originally stored in a remote recording medium or non-transitory machine-readable medium downloaded via a network and then stored in 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 is understood that a computer, a processor, or a microprocessor may be used to store the software on the recording medium. The processor 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 a computer, processor, or hardware, the methods described herein are implemented. Furthermore, when a general-purpose computer accesses the code for implementing the methods described herein, the execution of the code transforms the general-purpose computer into a specialized computer for performing the methods described 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、 一种虚拟机调度方法, 包括: 确定多个待调度虚拟机 中的每个虚拟机的租户业务特征 ; 基于所述每个虚拟机的租 户业务特征, 确定所述每个虚拟机对多种宿主机资源的 需求程度 ; 将所述多个待调度虚拟机调 度到至少一个宿主机中, 使得同一所述宿主机中的任 意两个虚拟机针 对每种宿主机资源的需求程 度处于需求互补状态, 其中, 处于所述需 求互补状态 中的两个虚拟机的需求程度差 异超过预设阈值。 1. A virtual machine scheduling method, comprising: 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 degree of demand of each virtual machine for multiple host machine resources; and scheduling the plurality of virtual machines to be scheduled to at least one host machine such that the demand levels of any two virtual machines in the same host machine for each host machine resource are in a complementary state, wherein a difference in the demand levels of the two virtual machines in the complementary state exceeds a preset threshold. 2 、 根据权利要求 1 所述的方法, 其中, 确定多个待调度虚拟机中的每个虚拟机 的租户业务特 征, 包括: 监控所述每个虚拟机的租 户业务的至少一个已调度虚拟 机, 对提供所述多种宿主 机资源的各个 宿主机硬件的资源使用数据 ; 基于所述各个宿主机硬件 的资源使用数据, 确定所述多个待调度虚拟机中的每个 虚拟机的租 户业务特征。 2. The method according to claim 1, wherein determining the tenant service characteristics of each virtual machine in the multiple virtual machines to be scheduled comprises: monitoring at least one scheduled virtual machine for the tenant service of each virtual machine, and collecting resource usage data of each host hardware component that provides the multiple host resources; and determining the tenant service characteristics of each virtual machine in the multiple virtual machines to be scheduled based on the resource usage data of each host hardware component. 3、 根据权利要求 2 所述的方法, 其中, 基于每个虚拟机的租户业务特征, 确定 所述每个虚拟 机对多种宿主机资源的需 求程度, 包括: 识别所述每个虚拟机的租 户业务特征, 得到所述每个虚拟机的业务场景和业务风 险; 分别基于所述每个 虚拟机的业务场 景和业务风险与所 述多种宿主机资 源之间的 相关度, 确定所述每个虚拟机对所述多种宿 主机资源的需求程度。 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 comprises: 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 、 根据权利要求 1所述的方法, 其中, 所述方法还包括: 确定多个宿主机对所述多种 宿主机资源的可分配资源 总量; 对所述多个宿主机的可分 配资源总量进行排序, 确定所述多个宿主机的资源优先 级; 从所述多个宿主机中选择 所述至少一个宿主机, 使所述至少一个宿主机中的资源 优先级大于 第一预设优先级阈值。 4. The method according to claim 1, further comprising: determining a 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 resource priorities of the multiple host machines; and selecting the at least one host machine from the multiple host machines such that the resource priority of the at least one host machine is greater than a first preset priority threshold. 5、 根据权利要求 4所述的方法, 其中, 所述方法还包括: 对所述多个宿主机各 自的资源售卖率进行均值处理, 得到所述多个宿主机的平均 资源售卖率 ; 确定所述第一预设优先级 阈值, 使所述至少一个宿主机的资源售卖率小于所述平 均资源售卖率 。 5. The method according to claim 4, further comprising: 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、 根据权利要求 4 所述的方法, 其中, 确定多个宿主机对所述多种宿主机资源 的可分配资 源总量, 包括: 确定所述多个宿主机中的每 个宿主机针对每种宿主机 资源的可分配资源量; 采用所述多种宿主机资 源各自的权重系数, 对每个宿主机对所述多种宿主机资源 的多个可分 配资源量进行加权, 确定所述多个宿主机的可分配资源 总量。 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 comprises: 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 various host machine resources are used to weight the multiple allocatable resource amounts of the various host machine resources for each host machine to determine the total allocatable resource amount of the multiple host machines. 7、 根据权利要求 4所述的方法, 其中, 所述方法还包括: 对多个已调度虚 拟机中各个所述 已调度虚拟机中的 目标已调度虚拟机 进行重新 调度, 使所述目标已调度虚拟机在重新调度 前所在的宿主机的资源优 先级, 大于所述 目标已调度虚 拟机在重新调度后所在 的宿主机的资源优先级。 7. The method according to claim 4, further comprising: 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、 根据权利要求 7所述的方法, 其中, 所述方法还包括: 将所述各个已调 度虚拟机中重新调 度优先级高于第 二预设优先级阈值 的已调度 虚拟机, 确定为所述目标已调度虚拟机, 其中, 所述已调度虚拟机对所述多种宿主机 资源的 当前资源占用比例与所述已调度虚 拟机的重新调度优先级呈 负相关。 8. The method according to claim 7, further comprising: 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 a current resource occupancy ratio of the multiple host machine resources by the scheduled virtual machine is negatively correlated with the rescheduling priority of the scheduled virtual machine. 9、 根据权利要求 8所述的方法, 其中, 所述方法还包括: 针对每种宿主机资源, 监控所述各个已调度虚拟机所在宿 主机的处理单元的额定 资源量、 以及所述处理单元分配到所述各个 已调度虚拟机的至少一个处理 核心的资源 占用量 ; 将所述至少一个 处理核心的资源 占用量与所述处理 单元的额定资源量 之间的比 例, 确定为所述各个已调度虚拟机针对所 述宿主机资源的当前资源 占用比例。 9. The method according to claim 8, further comprising: monitoring, for each host resource, the rated resource amount of a processing unit of the host computer 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 resource. 10、 根据权利要求 5所述的方法, 其中, 所述第二预设优先级阈值与所述平均资 源售卖率呈 负相关。 10. The method according to claim 5, wherein the second preset priority threshold is negatively correlated with the average resource selling rate. 11、 根据权利要求 1所述的方法, 其中, 所述每个虚拟机的租户业务特征包括指 示所述每个虚 拟机的租户业务的特征指标 的数据。 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、 根据权利要求 1所述的方法, 其中, 所述多种宿主机资源包括所述宿主机的 计算资源 、 内存带宽资源、 存储资源和功耗资源。 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、 根据权利要求 1所述的方法, 其中, 所述方法还包括: 响应于所述多个待 调度虚拟机针对 所述每种宿主机 资源中至少一宿主机 资源的 需求程度处 于需求冲突状态, 将所述多个待调度虚拟机调度到不 同所述宿主机中。 13. The method according to claim 1, further comprising: scheduling the multiple virtual machines to be scheduled to different hosts in response to a conflicting demand state for at least one host resource of each host resource by the multiple virtual machines to be scheduled. 14、 根据权利要求 1所述的方法, 其中, 提供所述多种宿主机资源的各个宿主机 硬件包括处理 单元的占用率、 所述处理单元中各个处理核心的占用率 、 内存总线的访 问带宽的 占用率、 所述处理单元中缓存的占用率和处理单元的功耗指 标。 14. The method according to claim 1, wherein the host machine hardware providing the multiple host machine resources includes an occupancy rate of a processing unit, an occupancy rate of each processing core in the processing unit, an occupancy rate of an access bandwidth of a memory bus, an occupancy rate of a cache in the processing unit, and a power consumption index of the processing unit. 15、 一种电子设备, 包括: 处理器、 存储器、 通信接口和通信总线, 所述处理器、 所述存储器和 所述通信接口通过所述通信 总线完成相互间的通信 ; 所述存储器用于存放至 少一个可执行指令, 所述可执行指令使所述处理器执行根 据权利要求 1-14中任一项所述的方法对应的操作。 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; and the memory is configured to store at least one executable instruction, wherein the executable instruction causes the processor to perform an operation corresponding to the method according to any one of claims 1-14. 16、 一种计算机存储介质, 其上存储有计算机程序, 该程序被处理器执行时实现 根据权利要 求 1-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、 一种计算机程序产品, 包括计算机程序 /指令, 该计算机程序 /指令被处理器 执行时实现权 利要求 1-14中任一项所述的方法。 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、 一种计算机程序产品, 其中, 包括非易失性计算机可读存储介质, 所述非易 失性计算机 可读存储介质存储计算机程序 , 所述计算机程序被处理器执行时实现权利 要求 1至 14中任一项所述的方法。 18. A computer program product, comprising a non-volatile computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 14 when executed by a processor. 19、 一种计算机程序, 其中, 所述计算机程序被处理器执行时实现权利要求 1至 14中任一项 所述的方法。 19. A computer program, wherein when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 14. 18 18
PCT/IB2025/051625 2024-03-14 2025-02-14 Virtual machine scheduling method, electronic device, computer storage medium, and computer program product Pending WO2025191367A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410292020.4A CN120653412A (en) 2024-03-14 2024-03-14 Virtual machine scheduling method, electronic device, computer storage medium, and computer program product
CN202410292020.4 2024-03-14

Publications (1)

Publication Number Publication Date
WO2025191367A1 true WO2025191367A1 (en) 2025-09-18

Family

ID=96998506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2025/051625 Pending WO2025191367A1 (en) 2024-03-14 2025-02-14 Virtual machine scheduling method, electronic device, computer storage medium, and computer program product

Country Status (2)

Country Link
CN (1) CN120653412A (en)
WO (1) WO2025191367A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701934A (en) * 2014-01-13 2014-04-02 浪潮(北京)电子信息产业有限公司 Resource optimal scheduling method and virtual machine host machine optimal selection method
US20160070602A1 (en) * 2014-09-10 2016-03-10 Fujitsu Limited Workload distribution management apparatus and control method
US20180329735A1 (en) * 2017-05-12 2018-11-15 At&T Intellectual Property I, L.P. Systems and methods for management of virtual machine resources in a network environment
US20200012526A1 (en) * 2017-02-03 2020-01-09 Microsoft Technology Licensing, Llc Method for deploying virtual machines in cloud computing systems based on predicted lifetime

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701934A (en) * 2014-01-13 2014-04-02 浪潮(北京)电子信息产业有限公司 Resource optimal scheduling method and virtual machine host machine optimal selection method
US20160070602A1 (en) * 2014-09-10 2016-03-10 Fujitsu Limited Workload distribution management apparatus and control method
US20200012526A1 (en) * 2017-02-03 2020-01-09 Microsoft Technology Licensing, Llc Method for deploying virtual machines in cloud computing systems based on predicted lifetime
US20180329735A1 (en) * 2017-05-12 2018-11-15 At&T Intellectual Property I, L.P. Systems and methods for management of virtual machine resources in a network environment

Also Published As

Publication number Publication date
CN120653412A (en) 2025-09-16

Similar Documents

Publication Publication Date Title
CN106452818B (en) Resource scheduling method and system
US9442763B2 (en) Resource allocation method and resource management platform
CN102567072B (en) Resource allocation method, resource allocation device and resource allocation system
US9104498B2 (en) Maximizing server utilization within a datacenter
US10623481B2 (en) Balancing resources in distributed computing environments
US20170017524A1 (en) Quality of service implementation in a networked storage system with hierarchical schedulers
CN102426542B (en) Data center resource management system and job scheduling method
Yu et al. Dynamic scaling of virtual clusters with bandwidth guarantee in cloud datacenters
US12395553B2 (en) Utilizing network analytics for service provisioning
CN106020941A (en) Selecting Resource Allocation Policies and Resolving Resource Conflicts
US10394606B2 (en) Dynamic weight accumulation for fair allocation of resources in a scheduler hierarchy
US20120221730A1 (en) Resource control system and resource control method
JP2013515991A (en) Method, information processing system, and computer program for dynamically managing accelerator resources
WO2017010922A1 (en) Allocation of cloud computing resources
JP2015532992A (en) Automatic profiling of resource usage
CN102082692A (en) Method and equipment for migrating virtual machines based on network data flow direction, and cluster system
CN108376103A (en) A kind of the equilibrium of stock control method and server of cloud platform
CN107665143A (en) Method for managing resource, apparatus and system
CN111930493A (en) NodeManager state management method, device and computing device in cluster
WO2022042724A1 (en) Container creation method and apparatus, electronic device, and storage medium
WO2025176140A1 (en) In-process resource control method and apparatus, and device and storage medium
CN118897730A (en) Load balancing method, device, equipment and storage medium based on computing cluster
JP5961402B2 (en) Computer system
WO2025191367A1 (en) Virtual machine scheduling method, electronic device, computer storage medium, and computer program product
CN118484262A (en) Resource scheduling method and server

Legal Events

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

Ref document number: 25769989

Country of ref document: EP

Kind code of ref document: A1