A method, apparatus and device for scheduling a virtual machine

By adjusting the number of NUMA nodes and the capacity of large page memory in virtual machines, and combining this with a comprehensive weighting to select the target host, the problem of low scheduling success rate of large page memory virtual machines was solved, achieving higher resource utilization and scheduling adaptability.

CN115269118BActive Publication Date: 2026-07-31CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2022-07-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies using massive page memory have low virtual machine scheduling success rates, especially when there is a significant difference between the number of host NUMA nodes and massive page memory configuration, resulting in low resource utilization.

Method used

By adjusting the number of NUMA nodes in the virtual machine and the required large page memory capacity of each NUMA node, the adjusted requirements are ensured to match the configuration of the candidate host. The target host is then selected based on a comprehensive weight calculation to improve the scheduling success rate.

Benefits of technology

It improves the success rate of virtual machine scheduling, enhances resource utilization, and adapts to more host environments with different configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269118B_ABST
    Figure CN115269118B_ABST
Patent Text Reader

Abstract

This invention discloses a virtual machine scheduling method, apparatus, and device, comprising: acquiring a virtual machine scheduling request, the virtual machine scheduling request including the required number of non-uniform memory access NUMA nodes and the required large page memory capacity of each NUMA node; if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then adjusting the required number of NUMA nodes and the required large page memory capacity of each NUMA node according to adjustment rules, so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement; determining the target host based on the adjusted virtual machine scheduling request and the memory information of each candidate host, and scheduling the virtual machine to run on the target host. This method can adjust the configuration requirements of virtual machines using large page memory to solve the problem of low virtual machine scheduling success rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer virtualization platform technology, and in particular to a method, apparatus and device for scheduling virtual machines. Background Technology

[0002] Large page memory is widely used to improve the performance of virtual machines running memory-intensive applications. In practice, large page memory resources are configured according to the host's Non-Uniform Memory Access (NUMA) nodes, resulting in more granular scheduling. However, the number of NUMA nodes on the host varies, as does the amount of large page memory configured on each NUMA node, leading to numerous scheduling challenges. For example, in existing cloud platforms, the number of NUMA nodes for virtual machines using large page memory is typically determined before scheduling, along with the allocation of the required large page memory across those nodes. When host configurations differ significantly or resource reservations are inadequate, this approach can easily lead to situations where the number of NUMA nodes on the host or the remaining large page memory resources on a single NUMA node cannot match the virtual machine's needs, increasing the probability of scheduling failures and resulting in low utilization of large page memory resources. Therefore, there is an urgent need to optimize the scheduling methods for virtual machines using large page memory to improve scheduling success rates. Summary of the Invention

[0003] This invention provides a virtual machine scheduling method, apparatus, and device to solve the problem of low scheduling success rate of virtual machines using large page memory in the prior art.

[0004] In a first aspect, embodiments of the present invention provide a virtual machine scheduling method, the method comprising:

[0005] In response to user operation commands, a virtual machine scheduling request is obtained, wherein the virtual machine scheduling request includes the number of non-uniform memory access NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node of the virtual machine.

[0006] If none of the candidate hosts meets the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then based on the adjustment rules corresponding to the user operation instructions, the required number of NUMA nodes and the required large page memory capacity of each NUMA node are adjusted so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the required large page memory capacity of the virtual machine.

[0007] Based on the adjusted virtual machine scheduling request and the memory information of each candidate host, a target host is determined from the candidate hosts, and the virtual machine is scheduled to run on the target host.

[0008] In one possible implementation, adjusting the required number of NUMA nodes and the required large page memory capacity of each NUMA node based on the adjustment rules corresponding to the user operation instructions includes:

[0009] If the adjustment rule is a quantity priority rule, then the required number of NUMA nodes is adjusted to the preset required number set by the user, and the required large page memory capacity of each NUMA node is adjusted according to the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine, and the preset required number, so that the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine.

[0010] In one possible implementation, adjusting the required number of NUMA nodes and the required large page memory capacity of each NUMA node based on the adjustment rules corresponding to the user operation instructions includes:

[0011] If the adjustment rule is arbitrary, then the required number of NUMA nodes for the virtual machine and the required large page memory capacity for each NUMA node will be adjusted.

[0012] In one possible implementation, determining the target host from the candidate hosts based on the adjusted virtual machine scheduling request and the memory information of each candidate host includes:

[0013] Based on the number of NUMA nodes and the large page memory capacity of each candidate host, candidate hosts that meet the adjusted virtual machine scheduling request are determined.

[0014] If there are multiple candidate hosts that meet the adjusted virtual machine scheduling request, then the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request is calculated based on the memory information, and the candidate host with the highest comprehensive weight is determined as the target host.

[0015] In one possible implementation, the memory information includes some or all of the following:

[0016] Remaining general memory, remaining disk memory, host load, number of NUMA nodes, and large page memory capacity of the NUMA nodes.

[0017] Secondly, embodiments of the present invention provide a virtual machine scheduling device, the device comprising:

[0018] The acquisition module is used to respond to user operation commands and acquire virtual machine scheduling requests, wherein the virtual machine scheduling requests include the number of NUMA nodes required for the virtual machine and the large page memory capacity required for each NUMA node of the virtual machine.

[0019] The adjustment module is used to adjust the number of NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node based on the adjustment rules corresponding to the user operation command if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node. This adjustment is made so that the adjusted number of NUMA nodes required is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted large page memory capacities required by each NUMA node is equal to the large page memory requirement of the virtual machine.

[0020] The scheduling module is used to determine the target host from the candidate hosts based on the adjusted virtual machine scheduling request and the memory information of each candidate host, and to schedule the virtual machine to run on the target host.

[0021] In one possible implementation, the adjustment module is specifically used for:

[0022] If the adjustment rule is arbitrary, then the required number of NUMA nodes for the virtual machine and the required large page memory capacity for each NUMA node will be adjusted.

[0023] In one possible implementation, the adjustment module is specifically used for:

[0024] Based on the number of NUMA nodes and the large page memory capacity of each candidate host, candidate hosts that meet the adjusted virtual machine scheduling request are determined.

[0025] If there are multiple candidate hosts that meet the adjusted virtual machine scheduling request, then the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request is calculated based on the memory information, and the candidate host with the highest comprehensive weight is determined as the target host.

[0026] Thirdly, embodiments of the present invention provide a computer device including a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement a virtual machine scheduling method as described in any one of the first aspects.

[0027] Fourthly, embodiments of the present invention provide a computer storage medium that, when instructions in the computer storage medium are executed by a processor, enables the execution of a virtual machine scheduling method as described in any one of the first aspects.

[0028] The beneficial effects of this invention are as follows:

[0029] This invention discloses a virtual machine scheduling method, apparatus, and device. The method includes: responding to a user operation command and obtaining a virtual machine scheduling request, wherein the virtual machine scheduling request includes the number of non-uniform memory access (NUMA) nodes required by the virtual machine and the required large page memory capacity of each NUMA node of the virtual machine; if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then, based on the adjustment rules corresponding to the user operation command, adjusting the required number of NUMA nodes and the required large page memory capacity of each NUMA node, so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine; based on the adjusted virtual machine scheduling request and the memory information of each candidate host, determining a target host from the candidate hosts, and scheduling the virtual machine to run on the target host. Through the above method, virtual machines using large page memory can be adapted to more configured hosts and different cloud computing environments, thereby improving the success rate of virtual machine scheduling and thus improving resource utilization. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 A flowchart illustrating a virtual machine scheduling method provided in an embodiment of the present invention;

[0032] Figure 2 A schematic diagram illustrating the specific process of a virtual machine scheduling method provided in an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of a virtual machine scheduling device provided in an embodiment of the present invention;

[0034] Figure 4 This is a schematic diagram of the structure of a virtual machine scheduling device provided in an embodiment of the present invention. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0036] Normally, memory is used as regular memory. If large page memory is used, additional configuration is required on the host machine. In cloud computing resource pools, hosts typically have multiple physical CPUs and use a NUMA architecture with multiple NUMA nodes. Large page memory needs to be configured on a NUMA node basis. From a scheduling perspective, compared to regular memory, large page memory involves NUMA nodes, resulting in more granular scheduling rules and more constraints. For example, if a user needs to configure a virtual machine with two NUMA nodes and each NUMA node has 8GB of large page memory, the remaining available large page memory on all NUMA nodes on all hosts may not be sufficient to meet this requirement, leading to scheduling failure for the virtual machine. Therefore, achieving good scheduling results for virtual machines using large page memory is more difficult than for those using regular memory, and scheduling methods urgently need innovation.

[0037] To address the aforementioned problems, this invention provides a virtual machine scheduling method, apparatus, and device to solve the problem of low scheduling success rate of virtual machines using large page memory in the prior art.

[0038] The virtual machine scheduling method provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0039] like Figure 1 The diagram shown is a flowchart illustrating a virtual machine scheduling method provided in an embodiment of the present invention. The method includes:

[0040] Step 101: Respond to user operation instructions and obtain virtual machine scheduling requests.

[0041] It should be noted that the virtual machine scheduling request includes the number of non-uniform memory access NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node of the virtual machine.

[0042] Step 102: If none of the candidate hosts meets the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then based on the adjustment rules corresponding to the user operation instructions, adjust the required number of NUMA nodes and the required large page memory capacity of each NUMA node for the virtual machine, so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the required large page memory of the virtual machine.

[0043] Step 103: Based on the adjusted virtual machine scheduling request and the memory information of each candidate host, determine the target host from the candidate hosts and schedule the virtual machine to run on the target host.

[0044] This invention discloses a virtual machine scheduling method, which includes: responding to a user operation command to obtain a virtual machine scheduling request, wherein the virtual machine scheduling request includes the number of non-uniform memory access (NUMA) nodes required by the virtual machine and the required large page memory capacity of each NUMA node of the virtual machine; if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then, based on the adjustment rules corresponding to the user operation command, the required number of NUMA nodes and the required large page memory capacity of each NUMA node are adjusted so that the adjusted number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine; based on the adjusted virtual machine scheduling request and the memory information of each candidate host, a target host is determined from the candidate hosts, and the virtual machine is scheduled to run on the target host. Through the above method, the configuration requirements of virtual machines using large page memory can be adjusted so that the virtual machine can adapt to more hosts with different configurations, thereby improving the success rate of virtual machine scheduling and thus improving the utilization rate of storage resources.

[0045] The above method will be described below with reference to specific embodiments:

[0046] like Figure 2 The diagram shown is a schematic flowchart of a virtual machine scheduling method provided in an embodiment of the present invention. The method includes:

[0047] Step 201: Grant permission for adaptive adjustment of virtual machine scheduling requests.

[0048] Specifically, the aforementioned adaptive adjustment to scheduling requests refers to adjustments made for the NUMA architecture, namely, adjustments to the required number of NUMA nodes for virtual machines and the required large page memory capacity for each NUMA node of a virtual machine.

[0049] Step 202: Respond to user operation commands and obtain virtual machine scheduling requests.

[0050] Specifically, there may be a NUMA architecture in the host that satisfies the above virtual machine scheduling request, or there may be no NUMA architecture in the host that satisfies the above virtual machine scheduling request. The scheduling method of this application is mainly applied in the case where the NUMA architecture of the host cannot fully meet the user's virtual machine scheduling request. The user needs to configure the virtual machine to have 2 NUMA nodes and each NUMA node has a large page memory capacity of 8G. At this time, the remaining available large page memory of all NUMA nodes of the host cannot fully meet this requirement.

[0051] Step 203: If none of the candidate hosts meets the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then based on the adjustment rules corresponding to the user operation instructions, the required number of NUMA nodes and the required large page memory capacity of each NUMA node are adjusted so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the required large page memory capacity of the virtual machine.

[0052] In one possible embodiment, if the adjustment rule is a quantity-priority rule, the required number of NUMA nodes is adjusted to the preset required number set by the user. The required large page memory capacity of each NUMA node is adjusted based on the large page memory capacity of each NUMA node on the candidate host, the large page memory requirement of the virtual machine, and the preset required number, so that the sum of the adjusted required large page memory capacities of each NUMA node equals the large page memory requirement of the virtual machine. For example, in the previous example, if the preset required number set by the user is 4, the required number of NUMA nodes is adjusted to 4. While ensuring that the sum of the adjusted required large page memory capacities of each NUMA node equals the large page memory requirement of the virtual machine, the required large page memory capacity of each NUMA node is adjusted. For example, if the required number of NUMA nodes is adjusted to 4, the required large page memory capacity of each NUMA node is adjusted to 4GB. Based on the same concept, it is also possible to adjust the number of NUMA nodes by setting an adjustment preference, such as allowing adjustments to a larger (or smaller) number of NUMA nodes, rather than by presetting a specific required number.

[0053] In one possible implementation, if the adjustment rule is arbitrary, the required number of NUMA nodes for the virtual machine and the required large page memory capacity for each NUMA node are adjusted.

[0054] It should be noted that the allocation of the required large page memory capacity for each NUMA node under any of the above adjustment rules is not necessarily even. Instead, it is adjusted based on the large page memory capacity of the NUMA nodes of the candidate host itself. For example, following the example in step 202, when the number of NUMA nodes required is adjusted to 3, the required large page memory capacity for the first NUMA node is adjusted to 8G, the required large page memory capacity for the second NUMA node is 4G, and the required large page memory capacity for the third NUMA node is 4G.

[0055] Step 204: Based on the number of NUMA nodes and the large page memory capacity of each candidate host, determine the candidate hosts that meet the adjusted virtual machine scheduling request.

[0056] Step 205: Determine whether there are multiple candidate hosts for the adjusted virtual machine scheduling request. If yes, proceed to step 206; otherwise, proceed to step 207.

[0057] Step 206: Calculate the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request based on memory information, determine the candidate host with the highest comprehensive weight as the target host, and proceed to step 207.

[0058] Specifically, weights can be assigned based on information such as the number of NUMA nodes, the large page memory capacity of the NUMA nodes, the remaining general-purpose memory, the remaining disk memory, and the load of the candidate host. For example, the more NUMA nodes, the higher the weight; the larger the large page memory capacity of the NUMA nodes, the higher the weight; the more remaining general-purpose memory, the higher the weight; the more remaining disk memory, the higher the weight; and the lower the load, the higher the weight. The weighted sum of these weights yields a comprehensive weight value, and the candidate host with the highest weight value is selected as the target host. Therefore, resource utilization can be further improved while ensuring successful scheduling.

[0059] Step 207: Schedule the virtual machine to run on the target host.

[0060] Specifically, this invention performs substantive NUMA architecture and big page memory allocation adaptive adjustments for virtual machines that do not meet the preset specifications and configurations, based on the principle of minimum change, records the adjusted virtual machine NUMA topology, and incubates the virtual machine in the host, that is, schedules the virtual machine to run in the target host.

[0061] It should be noted that the above method is used to select a single candidate host that meets the adjusted virtual machine scheduling request from multiple candidate hosts and then determine the virtual machine as the target host, or to select multiple candidate hosts that meet the adjusted virtual machine scheduling request, calculate the appropriate target host by weight, and adjust the virtual machine scheduling request to schedule to the target host. Based on the same inventive concept, it is also possible to adjust the virtual machine scheduling request to adapt the virtual machine to the host for a single host, and then schedule the virtual machine to the host. This will not be elaborated further here.

[0062] Based on the same inventive concept, embodiments of the present invention also provide a virtual machine scheduling device. The design of this device can refer to the virtual machine scheduling method described above, and repeated details will not be elaborated further. Figure 3 The diagram shown is a structural schematic of a virtual machine scheduling device provided in an embodiment of the present invention. The device includes an acquisition module 301, an adjustment module 302, and a scheduling module 303.

[0063] The acquisition module 301 is used to respond to user operation instructions and acquire virtual machine scheduling requests, wherein the virtual machine scheduling requests include the number of NUMA nodes required for the virtual machine and the large page memory capacity required for each NUMA node of the virtual machine.

[0064] The adjustment module 302 is used to adjust the number of NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node based on the adjustment rules corresponding to the user operation instruction if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node. This adjustment is made so that the adjusted number of NUMA nodes required is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted large page memory capacities required by each NUMA node is equal to the large page memory requirement of the virtual machine.

[0065] The scheduling module 303 is used to determine the target host from the candidate hosts based on the adjusted virtual machine scheduling request and the memory information of each candidate host, and to schedule the virtual machine to run on the target host.

[0066] Optionally, the adjustment module 302 is specifically used for:

[0067] If the adjustment rule is a quantity priority rule, then the required number of NUMA nodes is adjusted to the preset required number set by the user, and the required large page memory capacity of each NUMA node is adjusted according to the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine, and the preset required number, so that the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine.

[0068] Optionally, the adjustment module 302 is specifically used for:

[0069] If the adjustment rule is arbitrary, then the required number of NUMA nodes for the virtual machine and the required large page memory capacity for each NUMA node will be adjusted.

[0070] Optionally, the scheduling module 303 is specifically used for:

[0071] Based on the number of NUMA nodes and the large page memory capacity of each candidate host, candidate hosts that meet the adjusted virtual machine scheduling request are determined.

[0072] If there are multiple candidate hosts that meet the adjusted virtual machine scheduling request, then the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request is calculated based on the memory information, and the candidate host with the highest comprehensive weight is determined as the target host.

[0073] The memory information includes some or all of the following:

[0074] Remaining general memory, remaining disk memory, host load, number of NUMA nodes, and large page memory capacity of the NUMA nodes.

[0075] Based on the same inventive concept, embodiments of the present invention also provide a virtual machine scheduling device. The design of this device can refer to the virtual machine scheduling method described above, and repeated details will not be elaborated further. Figure 4 The diagram shown is a schematic representation of a virtual machine scheduling device according to an embodiment of the present invention. The device includes a processor 401 and a memory 402 for storing executable instructions of the processor 401. The processor 401 is configured to execute instructions to implement any virtual machine scheduling method.

[0076] This application also provides a computer-readable storage medium including instructions. The computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0077] In an exemplary embodiment, a computer program product is also provided, including a computer program that, when executed by a processor 401, implements the virtual machine scheduling method provided in this application.

[0078] This invention discloses a virtual machine scheduling method, apparatus, and device. The method includes: granting permission for adaptive adjustment of virtual machine scheduling requests; responding to user operation instructions; and obtaining virtual machine scheduling requests, wherein the virtual machine scheduling requests include the number of non-uniform memory access (NUMA) nodes required by the virtual machine and the required large page memory capacity of each NUMA node of the virtual machine. If there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then, based on the adjustment rules corresponding to the user operation instructions, the required number of NUMA nodes and the required large page memory capacity of each NUMA node are adjusted so that the adjusted number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts. The sum of the large page memory requirements of UMA nodes equals the large page memory requirement of the virtual machine. Based on the adjusted virtual machine scheduling request and the memory information of each candidate host, if there is only one candidate host for the adjusted virtual machine scheduling request, the target host is determined and the virtual machine is scheduled to run on the target host. If there are multiple candidate hosts for the adjusted virtual machine scheduling request, the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request is calculated based on the memory information. The candidate host with the highest comprehensive weight is determined as the target host and the virtual machine is scheduled to run on the target host. Through the above method, the configuration requirements of virtual machines using large page memory can be adjusted so that the virtual machine can adapt to more hosts with different configurations, thereby improving the success rate of virtual machine scheduling and thus improving the utilization of storage resources.

[0079] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0083] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for scheduling virtual machines, characterized in that, The method includes: In response to user operation commands, a virtual machine scheduling request is obtained, wherein the virtual machine scheduling request includes the number of non-uniform memory access NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node of the virtual machine. If none of the candidate hosts meets the required number of NUMA nodes and the required large page memory capacity of each NUMA node, then based on the adjustment rules corresponding to the user operation instructions, the required number of NUMA nodes and the required large page memory capacity of each NUMA node are adjusted so that the adjusted required number of NUMA nodes is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted required large page memory capacities of each NUMA node is equal to the required large page memory capacity of the virtual machine. Based on the number of NUMA nodes and the large page memory capacity of each candidate host, candidate hosts that meet the adjusted virtual machine scheduling request are determined. If there are multiple candidate hosts that meet the adjusted virtual machine scheduling request, the comprehensive weight of each candidate host that meets the adjusted virtual machine scheduling request is calculated based on memory information, and the candidate host with the highest comprehensive weight is determined as the target host. The memory information includes some or all of the following: remaining ordinary memory, remaining disk memory, host load, the number of NUMA nodes, and the large page memory capacity of NUMA nodes. The more NUMA nodes a candidate host has, the higher its weight; the more large page memory capacity a candidate host has, the higher its weight; the more remaining ordinary memory a candidate host has, the higher its weight; the more remaining disk memory a candidate host has, the higher its weight; and the lower the load of a candidate host, the higher its weight. Schedule the virtual machine to run on the target host; The adjustment of the required number of NUMA nodes and the required large page memory capacity of each NUMA node based on the adjustment rules corresponding to the user operation instructions includes: If the adjustment rule is a quantity priority rule, then the required number of NUMA nodes is adjusted to the preset required number set by the user, and the required large page memory capacity of each NUMA node is adjusted according to the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine and the preset required number, so that the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine. Alternatively, the preference can be adjusted based on the number of NUMA nodes set by the user, increasing or decreasing the number of NUMA nodes required. The required large page memory capacity of each NUMA node can be adjusted based on the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine, and the number of NUMA nodes required, so that the sum of the adjusted large page memory capacity of each NUMA node is equal to the large page memory requirement of the virtual machine.

2. A virtual machine scheduling device, characterized in that, The device includes: The acquisition module is used to respond to user operation commands and acquire virtual machine scheduling requests, wherein the virtual machine scheduling requests include the number of NUMA nodes required for the virtual machine and the large page memory capacity required for each NUMA node of the virtual machine. The adjustment module is used to adjust the number of NUMA nodes required by the virtual machine and the large page memory capacity required by each NUMA node based on the adjustment rules corresponding to the user operation command if there are no candidate hosts among the candidate hosts that meet the required number of NUMA nodes and the required large page memory capacity of each NUMA node. This adjustment is made so that the adjusted number of NUMA nodes required is less than or equal to the number of NUMA nodes of the candidate hosts, and the sum of the adjusted large page memory capacities required by each NUMA node is equal to the large page memory requirement of the virtual machine. The scheduling module is used to determine candidate hosts that meet the adjusted virtual machine scheduling request based on the number of NUMA nodes and the large page memory capacity of each candidate host. If there are multiple candidate hosts that meet the adjusted virtual machine scheduling request, the module calculates the comprehensive weight of each candidate host based on memory information, determines the candidate host with the highest comprehensive weight as the target host, and schedules the virtual machine to run on the target host. The memory information includes some or all of the following: remaining ordinary memory, remaining disk memory, host load, number of NUMA nodes, and large page memory capacity of NUMA nodes. The more NUMA nodes a candidate host has, the higher its weight; the more large page memory capacity a candidate host has, the higher its weight; the more remaining ordinary memory a candidate host has, the higher its weight; the more remaining disk memory a candidate host has, the higher its weight; and the lower its load, the higher its weight. The adjustment of the required number of NUMA nodes and the required large page memory capacity of each NUMA node based on the adjustment rules corresponding to the user operation instructions includes: If the adjustment rule is a quantity priority rule, then the required number of NUMA nodes is adjusted to the preset required number set by the user, and the required large page memory capacity of each NUMA node is adjusted according to the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine and the preset required number, so that the sum of the adjusted required large page memory capacities of each NUMA node is equal to the large page memory requirement of the virtual machine. Alternatively, the preference can be adjusted based on the number of NUMA nodes set by the user, increasing or decreasing the number of NUMA nodes required. The required large page memory capacity of each NUMA node can be adjusted based on the large page memory capacity of each NUMA node of the candidate host, the large page memory requirement of the virtual machine, and the number of NUMA nodes required, so that the sum of the adjusted large page memory capacity of each NUMA node is equal to the large page memory requirement of the virtual machine.

3. A computer device, characterized in that, The device includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the virtual machine scheduling method as described in claim 1.

4. A computer storage medium, characterized in that, When the instructions in the computer storage medium are executed by the processor, the virtual machine scheduling method as described in claim 1 is enabled to be performed.