Resource scheduling method, device and storage medium
By implementing a hybrid deployment mode of exclusive and shared virtual machines on physical machines in cloud computing, the resource fragmentation problem caused by mismatched virtual machine specifications is solved and resource utilization is improved.
Patent Information
- Application Number
- CN202210530246.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-05-16
AI Technical Summary
In cloud computing, the resource fragmentation problem of physical machines due to the mismatch of virtual machine specifications leads to low resource utilization.
By implementing a mixed deployment mode of exclusive virtual machines and shared virtual machines on physical machines, the specifications and quantity of virtual machines are planned in advance to maximize resource utilization, and the target resource specifications and quantities are determined through simulated scheduling and implemented in the physical machine. Deploy hybrid virtual machines.
It reduces the amount of resource fragmentation caused by limited virtual machine specifications and improves the resource utilization of physical machines.
Smart Images

Figure CN114880077B
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a resource scheduling method, device and storage medium. Background Art
[0002] Server virtualization technology is a key technology based on the infrastructure layer in cloud computing. This technology virtualizes physical servers to deploy multiple virtual machines (VMs) on a single physical machine.
[0003] In actual applications, a certain type of physical machine can only produce virtual machines of certain specifications, and the resources required by the virtual machine specifications may not be completely equal to the resources of the physical machine, which leads to resource fragmentation of the physical machine. For example, suppose the resource ratio of memory to CPU in the physical machine is 192GB memory: 104vCPU. Among them, 104vCPU means that the number of cores of the virtual CPU is 104 cores. The resource ratio required for the virtual machine specifications deployed on the physical machine is 4GB memory: 1vCPU, which undoubtedly leads to at least 58 vCPUs of resources remaining. Summary of the invention
[0004] Multiple aspects of the present application provide a resource processing and scheduling method, device and storage medium to reduce resource fragmentation of a physical machine and improve resource utilization of the physical machine.
[0005] The present application provides a resource scheduling method, including:
[0006] Acquire a first resource occupied by a first type of virtual machine deployed separately on a first physical machine; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine;
[0007] When the first resource is less than the total resource of the physical machine, setting the virtual machine deployment mode of the first physical machine to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines;
[0008] Taking the maximization of the total resource utilization as the goal, the total resources of the physical machine are simulated and scheduled according to the resource specifications of the first type virtual machine and the resource specifications of the second type virtual machine, so as to determine the target resource specifications and quantity of the first type virtual machine and the second type virtual machine supported by the physical machine; the second type virtual machine is a type different from the first type virtual machine among the exclusive virtual machine and the shared virtual machine;
[0009] Performing mixed deployment of exclusive virtual machines and shared virtual machines on the physical machine according to target resource specifications and quantities of first-type virtual machines and second-type virtual machines supported by the first physical machine;
[0010] The exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and the shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
[0011] The embodiment of the present application also provides a resource scheduling method, including:
[0012] Obtaining a virtual machine inventory level of a first physical machine on which a first type of virtual machine is deployed separately; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine;
[0013] When the virtual machine inventory water level is less than the set first water level threshold, selecting a second physical machine whose idle resources meet the resource demand of the first type of virtual machine from the physical machines on which the second type of virtual machine is deployed separately; the second type of virtual machine is a type different from the first type of virtual machine among the exclusive virtual machine and the shared virtual machine;
[0014] Switching the virtual machine deployment mode of the second physical machine to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines;
[0015] Deploying the first type of virtual machine in the second physical machine by utilizing idle resources of the second physical machine;
[0016] The exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and the shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
[0017] The embodiment of the present application further provides a computing device, comprising: a memory and a processor; wherein the memory is used to store a computer program;
[0018] The processor is coupled to the memory and is used to execute the computer program to perform the steps in the above resource scheduling methods.
[0019] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned resource scheduling methods.
[0020] In the embodiment of the present application, by pre-planning the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on the physical machine, mixed deployment of exclusive virtual machines and shared virtual machines is achieved, which helps to reduce the amount of natural resource fragmentation caused by limited virtual machine specifications. On the other hand, since the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine are pre-scheduled by simulating the total resources of the physical machine with the goal of maximizing the resource utilization of the physical machine, therefore, deploying the simulated quantity and specifications of exclusive virtual machines and shared virtual machines in the physical machine can reduce the resource fragmentation during the actual resource scheduling of the physical machine, which helps to improve the resource utilization of the physical machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 A schematic diagram of the structure of a computing system provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of a separate deployment mode provided for an embodiment of the present application;
[0024] Figure 3 A schematic diagram of the workflow of a computing system provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of the effects of a single deployment mode and a hybrid deployment mode provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of resource scheduling in a hybrid deployment mode provided in an embodiment of the present application;
[0027] Figure 6 A schematic diagram of a weak mixing mode and a strong mixing mode provided in an embodiment of the present application;
[0028] Figure 7 A schematic diagram of a process for deploying a virtual machine on a computing system provided in an embodiment of the present application;
[0029] Figure 8 and Fig. 9 A schematic diagram of a virtual machine deployment mode switching process provided in an embodiment of the present application;
[0030] Fig.10 and Fig.11 A schematic diagram of a resource scheduling method according to an embodiment of the present invention;
[0031] Fig.12A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0033] In some embodiments of the present application, the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed can be pre-planned for the physical machine, thereby achieving mixed deployment of exclusive virtual machines and shared virtual machines, which helps to reduce the amount of natural resource fragmentation caused by limited virtual machine specifications. On the other hand, since the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine are pre-scheduled by simulating the total resources of the physical machine with the goal of maximizing the resource utilization of the physical machine, therefore, deploying the simulated quantity and specifications of exclusive virtual machines and shared virtual machines in the physical machine can reduce resource fragmentation during actual resource scheduling of the physical machine, which helps to improve the resource utilization of the physical machine.
[0034] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0035] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.
[0036] Figure 1 A schematic diagram of the structure of a computing system provided in an embodiment of the present application. Figure 1 As shown, the computing system includes: a management and control node 10 and a computing cluster 11. The computing cluster 11 includes: one or more physical machines 20. Preferably, the number of physical machines 20 is multiple. In this embodiment, the physical machine 20 refers to a computing device that provides resources. The amount of resources contained in each physical machine 20 may be the same or different. Among them, the same amount of resources contained in the physical machine 20 means that the amount of resources of each resource type of the physical machine is the same; the different amount of resources contained in the physical machine 20 means that different physical machines have different amounts of resources in a certain dimension or dimensions. Among them, the resources of the physical machine include but are not limited to: processor resources (such as CPU, GPU, etc.), storage resources (such as memory, etc.) and network resources (bandwidth, etc.).
[0037] The control node 10 refers to a computing device that performs resource management and resource scheduling on the physical machine 20. The control node 10 can be a single server device, a cloud server array, or a virtual machine (VM) running in a cloud server array. In addition, the control node 10 can also refer to other computing devices with corresponding service capabilities, such as computers and other terminal devices (running service programs), etc.
[0038] The control node 10 and the physical machine 20 may be connected wirelessly or by wire. Optionally, the control node 10 may be connected to the physical machine 20 through a mobile network. Accordingly, the network standard of the mobile network may be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, WiMax, etc. Optionally, the control node 10 and the physical machine 20 may also be connected to each other through Bluetooth, WiFi, infrared, etc.
[0039] In actual applications, cloud vendors can use virtualization technology to deploy exclusive virtual machines 201 or shared virtual machines 202 on physical machines 20 to achieve exclusive or shared processor resources of physical machines 20. The processors of physical machines 20 include but are not limited to: CPU, GPU, etc. The processor resources of physical machines 20 can be represented by the number of physical cores of the processor. In the embodiment of the present application, the cores of the processors possessed by the physical machine are referred to as physical cores, and the cores of the processors used by the virtual machines are referred to as logical cores. When allocating processor resources to virtual machines, a mapping relationship between physical cores and logical cores needs to be established.
[0040] In the embodiment of the present application, the processor of the virtual machine is referred to as a virtual processor; the processor of the physical machine 20 is referred to as a physical processor. Among them, an exclusive virtual machine refers to a virtual machine in which a virtual processor (such as a vCPU) exclusively occupies the physical processor resources of a physical machine. That is, a physical core can only be mapped to one logical core or one virtual machine. At this time, the virtualization of the processor resources of the physical machine is relatively low, and the virtual processors of the virtual machines will not compete for physical processor resources. Therefore, the performance indicators of the service level agreement (Service Level Agreement, SLA) of the exclusive virtual machine are higher. Exclusive virtual machines have higher service performance.
[0041] The virtual ratio of processor resources refers to the ratio of the number of logical cores obtained by virtualizing physical cores to the number of physical cores, which is used to reflect the number of logical cores that can be virtualized from one physical core. For example, if the virtual ratio of processor resources is 4 (number of logical cores): 1 (number of physical cores), it means that one physical core is virtualized into 4 logical cores.
[0042] A shared virtual machine is a virtual machine whose virtual processors share physical processor resources, that is, one physical core can be mapped to multiple logical cores or multiple virtual machines. In this case, one physical core is virtualized into multiple logical cores, and the virtualization ratio of the processor resources of the physical machine is high, and the utilization rate of the processor resources of the physical machine is high. However, since multiple virtual processors in a shared virtual machine share the same physical processor resources, multiple virtual machines will compete for processor resources in the shared virtual machine. Therefore, the performance indicators of the SLA of the shared virtual machine are low. The service performance of the shared virtual machine is low.
[0043] like Figure 1 As shown, in some schemes, the exclusive virtual machine 201 and the shared virtual machine 202 will not be deployed on the same physical machine 20. That is, the exclusive virtual machine 201 and the shared virtual machine 202 do not coexist on the same physical machine 20, are physically isolated, and do not share resources at all. Users can apply for shared virtual machines or exclusive virtual machines according to their own needs. The management and control node 10 can respond to the user's virtual machine deployment request and obtain virtual machine demand information; and according to the virtual machine demand information, perform resource scheduling in the physical machine 20 and deploy virtual machines that are compatible with the virtual machine deployment request. Figure 2 As shown, if the virtual machine deployment request applies for the deployment of a shared virtual machine, the control node 10 can schedule the adapted resources from the physical machine used to deploy the shared virtual machine, and use the scheduled resources to deploy the shared virtual machine in the physical machine. Similarly, if the virtual machine deployment request applies for the deployment of an exclusive virtual machine, the control node 10 can schedule the adapted resources from the physical machine used for the exclusive virtual machine, and use the scheduled resources to deploy the exclusive virtual machine in the physical machine.
[0044] Whether it is a shared virtual machine or an exclusive virtual machine, the specifications of the virtual machines provided by the cloud vendor are certain. Among them, the resource specifications of the virtual machine include: the resource type of the virtual machine and the resource amount of each resource type. For example, the resource specifications of the virtual machine may include: the number of virtual processors, the amount of memory, bandwidth, the number of network cards, and the number of packets per second (PPS), etc., but are not limited to this. Users can select the adapted specifications to apply for virtual machine resources according to resource requirements. Since the specifications of the virtual machines provided by the cloud vendor are certain and limited, the resources required for the virtual machine specifications may not be completely equal to the resources of the physical machine, which leads to resource fragmentation of the physical machine. For example, it is known that the resource specifications of the exclusive virtual machines produced by the cloud vendor are: vCPU and memory ratios are: 1vCPU: 2GB memory, 1vCPU: 4GB memory and 1vCPU: 8GB memory, etc.; but the specifications of the physical machine 20 are: 104vCPU: 192GB memory, 104vCPU: 384GB memory and 104vCPU: 768GB memory, etc. Regardless of the resource specifications of the physical machine, the ratio of its vCPU to memory is not strictly 1vCPU: 2GB memory, 1vCPU: 4GB memory or 1vCPU: 8GB. This results in resource fragmentation in the physical machine regardless of deployment or scheduling, causing these resources to be idle and low resource utilization.
[0045] In the embodiment of the present application, in order to reduce physical machine resource fragmentation and improve resource utilization, a virtual machine colocation solution is proposed. Among them, virtual machine colocation refers to supporting the deployment of dedicated virtual machines and shared virtual machines on the same physical machine. Figure 3 The virtual machine colocation method provided in the embodiment of the present application is exemplified for illustration.
[0046] like Figure 3 As shown, the control node 10 can manage and schedule the resources of the physical machine 20. For the physical machine 20 connected to the computing system, when connected to the computing system, the identification of the physical machine 20 and the resources of the physical machine 20 can be registered to the control node 10. Accordingly, the control node 10 can obtain the total resources of the physical machine. In an embodiment of the present application, in order to improve resource utilization, the control node 10 can schedule and plan the resource usage of the physical machine 20, that is, predetermine the type and specifications of the virtual machine deployed on the physical machine 20, so that the resource utilization of the physical machine 20 can be maximized. In an embodiment of the present application, the virtual machine type is used to indicate whether the virtual machine is a shared virtual machine or an exclusive virtual machine.
[0047] Based on the above-mentioned goal of improving the utilization rate of physical machine resources, in the embodiment of the present application, the control node 10 can obtain the resources required for the physical machine to deploy the first type of virtual machine alone. Among them, the first type of virtual machine is an exclusive virtual machine or a shared virtual machine. In the embodiment of the present application, the specific implementation method of the control node 10 obtaining the resources required for the physical machine to deploy the first type of virtual machine is not limited.
[0048] In some embodiments, the management and control node 10 may perform greedy packing on the total resources of the physical machine 20 based on the preset resource specifications of the first type of virtual machine to determine the resources occupied by the greedily packed first type of virtual machine, and determine the resources occupied by the greedily packed first type of virtual machine, and the resources required to deploy the first type of virtual machine on the physical machine. The preset resource specifications of the first type of virtual machine may be one specification or multiple specifications. Multiple refers to 2 or more. The amount of resources in at least one dimension in different resource specifications is different.
[0049] Optionally, the control node 10 can simulate the deployment of the first type of virtual machine with the target specification based on the preset resource specifications of the first type of virtual machine, in order of resource specifications from large to small, and in sequence according to the target specifications of the first type of virtual machine that can be currently deployed on the physical machine, until the idle resources of the physical machine do not meet the specification requirements of any first type of virtual machine, and obtain the resources occupied by the first type of virtual machine that has been simulated and deployed to the physical machine, that is, the resources occupied by the first type of virtual machine in the greedy packing. Among them, the resource specifications of the first type of virtual machine in the greedy packing may be all the same, or partially the same, or all different.
[0050] For example, if the first type of virtual machine is an exclusive virtual machine, the total resources of the physical machine 20 may be greedily packed based on the preset resource specifications of the exclusive virtual machine to determine the resources occupied by the greedily packed exclusive virtual machine. Figure 4 As shown in the figure, the resource specification of the exclusive virtual machine is 1vCPU: 2GB memory; the total resource ratio of the physical machine is 104vCPU: 192GB memory, then the exclusive virtual machine with this resource specification is greedily packed with the total resources of the physical machine, and it is obtained that the physical machine can deploy a maximum of 96 exclusive virtual machines with a resource specification of 1vCPU: 2GB memory, that is, the resources occupied by the greedily packed exclusive virtual machines are 96 vCPUs and 192GB memory.
[0051] Since the specifications of the virtual machines provided by cloud vendors are fixed and limited, the resources required by the virtual machine specifications may not be completely equal to the resources of the physical machine, which leads to resource fragmentation of the physical machine. Figure 4In the example, after greedy packing, the virtual machine will generate 8 vCPU resource fragments. Based on this, when the resources occupied by the first type of virtual machine deployed alone on the physical machine are determined, it can also be determined whether the first type of virtual machine deployed alone on the physical machine will generate resource fragments. Specifically, it can be compared whether the resources occupied by the first type of virtual machine deployed alone on the physical machine are less than the total resources of the physical machine; if the resources occupied by the first type of virtual machine deployed alone on the physical machine are less than the total resources of the physical machine, it can be determined that the first type of virtual machine deployed alone on the physical machine will generate resource fragments.
[0052] In this embodiment, in order to reduce resource fragmentation of the physical machine, when the resources occupied by the first type of virtual machine deployed alone on the physical machine are less than the total resources of the physical machine, the management and control node 10 can set the virtual machine deployment mode of the physical machine to support a mixed deployment mode of exclusive virtual machines and shared virtual machines. Correspondingly, if the resources occupied by the first type of virtual machine deployed alone on the physical machine are equal to the total resources of the physical machine, the virtual machine deployment mode of the virtual machine can be set to support the deployment of the first type of virtual machine alone.
[0053] Further, the control node 10 can maximize the total resource utilization of the physical machine as the goal, and simulate the scheduling of the total resources of the physical machine according to the resource specifications of the first type of virtual machine and the resource specifications of the second type of virtual machine to determine the target resource type and quantity of the first type of virtual machine and the second type of virtual machine supported by the physical machine. The above-mentioned second type of virtual machine is a type different from the first type of virtual machine in the exclusive type virtual machine and the shared type virtual machine. For example, if the first type of virtual machine is an exclusive type virtual machine, then the second type of virtual machine is a shared type virtual machine. Correspondingly, if the first type of virtual machine is a shared type virtual machine, then the second type of virtual machine is an exclusive type virtual machine.
[0054] Optionally, the management and control node 10 may combine the resource specifications of the first type of virtual machine and the resource specifications of the second type of virtual machine according to the total resource allocation of the physical machine to obtain a plurality of combinations of the first type of virtual machine and the second type of virtual machine; the resource specifications of at least one type of virtual machine in each combination are different, and the amount of resources required for each combination is less than or equal to the total resources of the physical machine. Further, from the plurality of combinations of the first type of virtual machines and the second type of virtual machines, the combination with the smallest difference between the amount of resources required and the total resources of the physical machine may be obtained as the target combination. Further, the resource specifications and quantity of the first type of virtual machine and the second type of virtual machine in the target combination may be determined as the resource specifications and quantity of the first type of virtual machine and the second type of virtual machine in the simulation scheduling result.
[0055] Alternatively, in some embodiments, the control node 10 may perform greedy packing on the total resources of the physical machine based on the preset resource specifications of the first type of virtual machine to determine the resources occupied by the greedily packed first type of virtual machine; and determine the resource fragments of the physical machine based on the total resources of the physical machine and the resources occupied by the greedily packed first type of virtual machine. Afterwards, the control node 10 simulates and schedules the resource fragments according to the resource specifications of the second type of virtual machine with the goal of maximizing the utilization of resource fragments to determine the resource specifications and quantity of the second type of virtual machine deployed in the resource fragment. Of course, the control node 10 can also determine the resource specifications and quantity of the greedily packed first type of virtual machine. Further, the resource specifications and quantity of the second type of virtual machine deployed in the resource fragment are determined, and the resource specifications and quantity of the greedily packed first type of virtual machine are the resource specifications and quantity of the first type of virtual machine and the second type of virtual machine in the simulation scheduling result.
[0056] Preferably, the resources required by the first type of virtual machine and the second type of virtual machine supported by the physical machine 20 are equal to the total resources of the physical machine 20. For example, Figure 4 In the hybrid deployment mode of dedicated virtual machines and shared virtual machines, the resource specifications of dedicated virtual machines are determined to be 1vCPU: 2GB memory, and the number is 88; the resource specifications of shared virtual machines are 2vCPU: 0.5GB memory, and the number is 32. The virtual ratio corresponding to shared virtual machines is 4:1, that is, one physical core virtualizes 4 logical cores. In this way, the resources occupied by the determined dedicated virtual machines and shared virtual machines are equal to the total resources of the physical machine.
[0057] After determining the resource specifications and quantity of the first type virtual machines and the second type virtual machines supported by the physical machine 20, the physical machine 20 can be deployed with a mix of exclusive virtual machines and shared virtual machines based on the resource specifications and quantity of the first type virtual machines and the second type virtual machines.
[0058] In the embodiment of the present application, by pre-planning the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on the physical machine, mixed deployment of exclusive virtual machines and shared virtual machines is achieved, which helps to reduce the amount of natural resource fragmentation caused by limited virtual machine specifications. On the other hand, since the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine are pre-scheduled by simulating the total resources of the physical machine with the goal of maximizing the resource utilization of the physical machine, therefore, deploying the simulated quantity and specifications of exclusive virtual machines and shared virtual machines in the physical machine can reduce the resource fragmentation during the actual resource scheduling of the physical machine, which helps to improve the resource utilization of the physical machine.
[0059] In an embodiment of the present application, after determining the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on a physical machine, the resources occupied by the exclusive virtual machines and the shared virtual machines can also be isolated. Specifically, the management and control node 10 can divide the total resources into a first resource pool and a second resource pool according to the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine. Among them, the first resource pool is used to support the deployment of the first type of virtual machines, and the second resource pool is used to support the deployment of the second type of virtual machines. Among them, the resource pool that supports the deployment of shared virtual machines can be called a shared resource pool; the resource pool that supports the deployment of exclusive virtual machines can be called an exclusive resource pool. Further, the management and control node 10 can isolate the first resource pool and the second resource pool for the subsequent deployment of the first type of virtual machines and the second type of virtual machines in the first resource pool and the second resource pool, respectively. In this way, a weak mix of shared virtual machines and exclusive virtual machines is achieved. That is, if Figure 5 and Figure 6 As shown, dedicated virtual machines and shared virtual machines have separate and independent resource pools, respectively. Each type of virtual machine can only schedule a resource pool that supports the deployment of that type of virtual machine for virtual machine deployment.
[0060] In other embodiments, a strong mix of shared virtual machines and dedicated virtual machines can also be implemented. Figure 6 As shown, in the implementation of the strong hybrid part, the resources of the physical machine 20 are dynamically divided in real time rather than physically isolated, and the SLA requirements of the exclusive virtual machine can be guaranteed by the scheduler.
[0061] For the above-mentioned embodiment of the weak mixing part, for the shared resource pool in the above-mentioned first resource pool and the second resource pool that supports the deployment of shared virtual machines, the physical cores in the shared resource pool can be virtualized to obtain multiple logical cores, so that the shared virtual machines deployed in the subsequent shared resource pool can share the physical cores in the shared resource pool.
[0062] In the embodiments of the present application, the specific implementation method for virtualizing the physical cores in the shared resource pool is not limited. In some embodiments, the number M of logical cores that need to be virtualized can be determined based on the set virtual ratio. M ≥ 2 and is an integer. Optionally, the correspondence between the model of the physical machine and the virtual ratio can be preset. Based on this correspondence, in this embodiment, the management and control node 10 can determine the virtual ratio corresponding to the model of the physical machine 20. Further, the number M of logical cores that need to be virtualized can be determined based on the virtual ratio corresponding to the model. Further, as Figure 6As shown, the control node 10 can use the hyperthreading technology to virtualize each physical core in the second resource into M logical cores. In this way, for the shared virtual machine, the number of logical cores required by the shared virtual machine can be determined according to the resource specifications of the shared virtual machine; and the shared virtual machine can be deployed in the shared resource pool using the corresponding number of logical cores.
[0063] It is worth noting that for a physical machine 20 with a hybrid deployment mode of virtual machines, the number of shared resource pools can be 1 or more. Multiple means 2 or more. The virtual ratios corresponding to multiple shared resource pools are different, that is, the number M of logical cores virtualized from physical cores in different shared resource pools is different. The number of shared resource pools in the same physical machine and the virtual ratio supported by each shared resource pool can be flexibly set according to actual needs. For example, the number of shared resource pools and the virtual ratio corresponding to each shared resource pool can be set according to the specifications of the shared virtual machines actually applied for by the user.
[0064] The above embodiment predetermines the virtual machine deployment method of the physical machine. For a physical machine that supports mixed deployment of shared virtual machines and exclusive virtual machines, the resource specifications and quantity of the shared virtual machines supported by the physical machine, as well as the resource specifications and quantity of the exclusive virtual machines, can also be predetermined. After determining these, the subsequent control node 10 can schedule resources for the physical machine 20 according to the virtual machine deployment request to deploy a virtual machine that meets the virtual machine deployment request in the physical machine 20. The resource scheduling method in the virtual machine deployment process provided in the embodiment of the present application is exemplarily described below.
[0065] like Figure 7 As shown, the user terminal 30 may provide a virtual machine deployment request to the control node 10. The virtual machine deployment request may include the type of virtual machine to be deployed (exclusive virtual machine or shared virtual machine), target resource specifications and quantity, etc. The control node 10 may obtain a virtual machine deployment request. Further, the control node 10 may obtain the target type and target resource specifications of the virtual machine to be deployed from the virtual machine deployment request; thereafter, a physical machine that supports the target type and target resource specifications may be selected from the physical machine 20. Further, the control node 10 may select a target physical machine whose idle resources meet the target resource specification requirements based on the idle resources of the target resource pool in the physical machine that supports the target type and target resource specification; and deploy the virtual machine to be deployed in the target resource pool of the target physical machine. Among them, the target resource pool is a resource pool that supports the deployment of virtual machines of the target type. For example, if the target type is an exclusive virtual machine, the target resource pool is an exclusive resource pool. If the target type is a shared virtual machine, the target resource pool is a shared resource pool.
[0066] In some embodiments, the target type is a shared virtual machine. Accordingly, the target resource pool is a shared resource pool. The resource specifications of the shared virtual machines supported by different physical machines may be the same or different. Of course, the virtual ratios corresponding to the shared resource pools of different physical machines may also be the same or different. In some embodiments, the correspondence between the resource specifications and the virtual ratios of the shared virtual machines can be pre-set. Based on the correspondence, the management and control node 10 can determine the target virtual ratio corresponding to the target resource specifications contained in the virtual machine deployment request, and select a shared resource pool that supports the target virtual ratio from the shared resource pool as the target resource pool.
[0067] Furthermore, a target logical core that meets the processor core count requirement of the target resource specification can be determined from the logical cores of the shared resource pool serving as the target resource pool; and other types of resources that meet other resource requirements of the target resource specification can be obtained from other resources of the shared resource pool; thereafter, the target logical core and the above-mentioned other types of resources can be used to deploy a shared virtual machine in the shared resource pool.
[0068] In another embodiment, the target type is an exclusive virtual machine. Accordingly, the target resource pool is an exclusive resource pool. Accordingly, the management and control node 10 can select a target physical machine whose idle resources meet the target resource specification requirements from the idle resources of the exclusive resource pool in the physical machines that support the target type and target resource specifications; and deploy the virtual machine to be deployed in the exclusive resource pool of the target physical machine.
[0069] Specifically, the management and control node 10 can determine the target physical core that meets the core number requirement of the processor in the target resource specification from the exclusive resource pool; and obtain other types of resources that meet other resource requirements of the target resource specification from other resources in the shared resource pool; thereafter, the target logical core and the above-mentioned other types of resources can be used to deploy an exclusive virtual machine in the exclusive resource pool.
[0070] In the embodiment of the present application, in addition to presetting the virtual machine deployment mode of the physical machine, the control node 10 can also flexibly switch the virtual machine deployment mode of the physical machine according to the online real-time load of the physical machine. The specific implementation method of the control node 10 switching the virtual machine deployment mode of the physical machine is exemplified below.
[0071] like Figure 8As shown, in some embodiments, there are physical machines in the computing cluster 11 whose current virtual machine deployment mode is a hybrid deployment mode of exclusive virtual machines and shared virtual machines. Accordingly, the control node 10 can monitor the inventory water level of exclusive virtual machines and shared virtual machines in the computing cluster 11. Among them, the inventory water level of exclusive virtual machines is used to characterize the idle resources in the computing cluster 11 that can still deploy exclusive virtual machines, and can be expressed by calculating the ratio of the idle resources of the exclusive resource pool in the cluster 11 to the total resources of the exclusive resource pool. Of course, the inventory water level of exclusive virtual machines can also be expressed by calculating the number of exclusive virtual machines that can still be deployed in the exclusive resource pool in the cluster 11 and the ratio of the total number of exclusive virtual machines that can be deployed in the exclusive resource pool. Similarly, the inventory water level of shared virtual machines is used to characterize the idle resources of shared virtual machines that can still be deployed in the computing cluster 11, and can be expressed by calculating the ratio of the idle resources of the shared resource pool in the cluster 11 to the total resources of the shared resource pool. Of course, the inventory level of the shared virtual machines can also be expressed by calculating the ratio between the number of shared virtual machines that can be deployed in the shared resource pool of the cluster 11 and the total number of shared virtual machines that can be deployed in the shared resource pool.
[0072] If there is a target type virtual machine whose inventory water level is less than the set first water level threshold among the exclusive virtual machines and shared virtual machines of the computing cluster 11, and the inventory water level of another type of virtual machine is greater than the set second water level threshold, the control node 10 can select a target physical machine whose current virtual machine deployment mode is a virtual machine hybrid deployment mode from the computing cluster 11. Among them, the number of target physical machines is less than or equal to some or all of the physical machines in the current virtual machine deployment mode in the computing cluster 11. The number of target physical machines can be 1 or more. Multiple refers to 2 or more. The specific number of target physical machines can be determined based on the actual demand of the target type virtual machine and the idle resources of each virtual machine in the computing cluster 11.
[0073] Specifically, the management and control node 10 can obtain a physical machine whose current virtual machine deployment mode is a virtual machine hybrid deployment mode from the computing cluster; and select a physical machine that supports the resource specifications of the target type of virtual machine from the physical machines whose current virtual machine deployment mode is a virtual machine hybrid deployment mode; thereafter, a physical machine with free resources can be selected from the physical machines that support the resource specifications of the target type of virtual machine as the target physical machine, and so on.
[0074] Furthermore, the virtual machine deployment mode of the target physical machine can be switched to a single deployment mode of a target type virtual machine. The first water level threshold is less than the second water level threshold. Generally, the first water level threshold is less than 50%; the second water level threshold is greater than 50%. Another type of virtual machine refers to another type of virtual machine other than the target type virtual machine among exclusive virtual machines and shared virtual machines. For example, if the target type virtual machine is an exclusive virtual machine, then the other type of virtual machine is a shared virtual machine. If the target type virtual machine is a shared virtual machine, then the other type of virtual machine is an exclusive virtual machine.
[0075] After the virtual machine deployment mode of the target physical machine is switched to the target type virtual machine separate deployment mode, the target type virtual machine can be deployed separately on the target physical machine. For another type of virtual machine other than the target type virtual machine that has been deployed on the physical machine, in some embodiments, the management and control node 10 can migrate the other type of virtual machine to a physical machine that supports the deployment of the other type of virtual machine. In the current embodiment, for ease of expression and distinction, the target physical machine from which the above-mentioned virtual machine deployment mode is switched to the target type virtual machine separate deployment mode is defined as the first physical machine; and the physical machine that receives the migration of the other type of virtual machine from the first physical machine is defined as the second physical machine. In the above or following embodiments, the other type refers to another type of virtual machine other than the target type virtual machine in the exclusive virtual machine and the shared virtual machine.
[0076] Optionally, the management and control node 10 may select a physical machine that supports the deployment of another type of virtual machine from other physical machines in the computing cluster 11 according to the resource specifications of another type of virtual machine deployed on the first physical machine; and select a physical machine that supports the resource specifications of another type of virtual machine from the physical machines that support the deployment of another type of virtual machine; and then, from the physical machines that support the resource specifications of another type of virtual machine, select a physical machine whose idle resources can meet the resource requirements of the resource specifications of the above-mentioned support for another type of virtual machine as the second physical machine. Furthermore, the resource specifications of another type of virtual machine deployed on the first physical machine may be migrated from the first physical machine to the second physical machine.
[0077] In other embodiments, the management and control node 10 may not process another type of virtual machine deployed on the first physical machine. Accordingly, after the virtual machine deployment mode of the first physical machine is switched to the target type virtual machine single deployment mode, the management and control node 10 may use the idle resources of the first physical machine to deploy the target type of virtual machine, and not process another type of virtual machine deployed on the first physical machine.
[0078] The virtual machine deployment mode currently supported by the physical machine 20 may be a mixed deployment of the above-mentioned shared virtual machines and exclusive virtual machines, or may be a separate deployment of any type of virtual machine. Fig. 9As shown, for a physical machine 20 in which the current virtual machine deployment mode is a single deployment of a certain type of virtual machine, the control node 10 can obtain the virtual machine inventory level of a third physical machine in which a first type of virtual machine is deployed separately. Among them, the first type of virtual machine is an exclusive virtual machine or a shared virtual machine. Among them, the third physical machine can be: some or all of the physical machines in the computing cluster 11 in which the current virtual machine deployment mode is a single deployment of the first type of virtual machine. The virtual machine inventory level of the third physical machine can be the ratio of the number of first type virtual machines that can be deployed on the third physical machine to the total number of first type virtual machines supported by the third physical machine, etc.
[0079] Furthermore, if the virtual machine inventory water level of the first type of virtual machine is less than the set first water level threshold, a fourth physical machine whose idle resources meet the resource requirements of the first type of virtual machine can be selected from the physical machines where the second type of virtual machine is deployed separately. The second type of virtual machine is a type different from the first type of virtual machine, among exclusive virtual machines and shared virtual machines. In the embodiment of the present application, the specific value of the first water level threshold is not limited. Generally, the first water level threshold is less than 50%.
[0080] Optionally, the management and control node 10 may select a fifth physical machine whose model supports the first type of virtual machine from the physical machines on which the second type of virtual machine is separately deployed; and select a fourth physical machine whose idle resources meet the resource requirements of the first type of virtual machine from the fifth physical machine.
[0081] Furthermore, the control node 10 may switch the virtual machine deployment mode of the fourth physical machine to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines; thereafter, the control node 10 may utilize the idle resources of the fourth physical machine to deploy the first type of virtual machine in the fourth physical machine, thereby realizing the hybrid deployment of exclusive virtual machines and shared virtual machines in the fourth physical machine. Since the inventory level of the first type of virtual machines in the third physical machine is relatively low, and there are idle resources in the fourth physical machine where the second type of virtual machines are deployed alone, therefore, switching the virtual machine deployment mode of the fourth physical machine to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines, thereby realizing the hybrid deployment of exclusive virtual machines and shared virtual machines in the fourth physical machine, helps to reduce the idle resources in the fourth physical machine and improve the resource utilization of the fourth physical machine.
[0082] After the virtual machine deployment mode of the fourth physical machine is switched to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines, the management and control node 10 can, in response to a deployment request for the first type of virtual machine, schedule target resources that meet the resources required for the deployment request from the idle resources of the fourth physical machine; further, the target resources can be used to deploy the first type of virtual machine in the fourth physical machine.
[0083] For the embodiment of the weakly mixed virtual machine part, after the control node 10 switches the virtual machine deployment mode of the fourth physical machine to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines, it can also use the idle resources of the fourth physical machine to build a first resource pool; and use the resources occupied by the second type of virtual machines deployed in the fourth physical machine to build a second resource pool; after that, the first resource pool and the second resource pool can be isolated to allow the first type of virtual machine and the second type of virtual machine to be deployed in the first resource pool and the second resource pool, respectively. Among them, the specific implementation method of respectively deploying the first type of virtual machine and the second type of virtual machine in the first resource pool and the second resource pool can refer to the relevant content of the above embodiment, which will not be repeated here.
[0084] In some embodiments of the present application, for the third physical machine on which the first type of virtual machine is separately deployed, when the inventory water level of the first type of virtual machine corresponding to the third physical machine is less than or equal to the set second water level threshold and the duration is greater than or equal to the set duration threshold, the virtual machine deployment mode of the third physical machine can also be switched to a mixed deployment mode that supports exclusive virtual machines and shared virtual machines. Furthermore, the resource specifications and quantity of the second type of virtual machines supported by the third physical machine can be determined with the goal of maximizing the resource utilization of the third physical machine. Afterwards, the second type of virtual machine can be deployed in the third physical machine in response to a deployment request for the second type of virtual machine, thereby achieving a mixed deployment of exclusive virtual machines and shared virtual machines in the third physical machine, which can reduce idle resources in the third physical machine and help improve the resource utilization of the third physical machine.
[0085] In addition to the above system embodiments, the embodiments of the present application also provide a resource scheduling method. The resource scheduling method provided in the embodiments of the present application is exemplarily described below.
[0086] Fig.10 A schematic diagram of a resource scheduling method provided in an embodiment of the present application. Fig.10 As shown, the method includes:
[0087] S101. Acquire a first resource occupied by a first type of virtual machine deployed separately on a first physical machine; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine.
[0088] S102: When the first resource is less than the total resource of the physical machine, set the virtual machine deployment mode of the first physical machine to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines.
[0089] S103. With the goal of maximizing total resource utilization, simulate the scheduling of the total resources of the physical machine according to the resource specifications of the first type virtual machine and the resource specifications of the second type virtual machine to determine the target resource specifications and quantity of the first type virtual machines and the second type virtual machines supported by the physical machine; the second type virtual machine is a type different from the first type virtual machine among the exclusive virtual machines and the shared virtual machines.
[0090] S104: Perform a mixed deployment of exclusive virtual machines and shared virtual machines on the physical machine according to target resource specifications and quantities of the first type virtual machines and the second type virtual machines supported by the first physical machine.
[0091] In this embodiment, for the description of the shared virtual machine and the exclusive virtual machine, reference may be made to the relevant contents of the above system embodiment, which will not be repeated here.
[0092] In the embodiment of the present application, in order to improve resource utilization, the resource usage of the physical machine can be scheduled and planned, that is, the type and specification of the virtual machine deployed on the physical machine can be determined in advance so that the resource utilization of the physical machine can be maximized. In the embodiment of the present application, the virtual machine type is used to indicate whether the virtual machine is a shared virtual machine or an exclusive virtual machine.
[0093] Based on the above-mentioned goal of improving the utilization rate of physical machine resources, in step S101, the resources required for the physical machine to deploy the first type of virtual machine alone can be obtained. Among them, the first type of virtual machine is an exclusive virtual machine or a shared virtual machine. In the embodiment of the present application, the specific implementation method of obtaining the resources required for the physical machine to deploy the first type of virtual machine is not limited.
[0094] In some embodiments, based on the preset resource specifications of the first type of virtual machine, the total resources of the physical machine can be greedily packed to determine the resources occupied by the greedily packed first type of virtual machine, and the resources occupied by the greedily packed first type of virtual machine are determined, and the resources required to deploy the first type of virtual machine on the physical machine are occupied. The preset resource specifications of the first type of virtual machine can be one specification or multiple specifications. Multiple refers to 2 or more. The amount of resources in at least one dimension in different resource specifications is different.
[0095] Since the specifications of the virtual machines provided by the cloud vendors are certain and limited, the resources required by the virtual machine specifications may not be completely equal to the resources of the physical machine, which leads to resource fragmentation of the physical machine. Based on this, when it is determined that the resources occupied by the physical machine alone deploying the first type of virtual machine will generate resource fragmentation, it can also be determined whether the physical machine alone deploying the first type of virtual machine will generate resource fragmentation. Specifically, it can be compared whether the resources occupied by the physical machine alone deploying the first type of virtual machine are less than the total resources of the physical machine; if the resources occupied by the physical machine alone deploying the first type of virtual machine are less than the total resources of the physical machine, it can be determined that the physical machine alone deploying the first type of virtual machine will generate resource fragmentation.
[0096] In this embodiment, in order to reduce resource fragmentation of the physical machine, in step S102, when the resources occupied by the first type of virtual machine deployed alone on the physical machine are less than the total resources of the physical machine, the virtual machine deployment mode of the physical machine can be set to support a mixed deployment mode of dedicated virtual machines and shared virtual machines. Correspondingly, if the resources occupied by the first type of virtual machine deployed alone on the physical machine are equal to the total resources of the physical machine, the virtual machine deployment mode of the virtual machine can be set to support the deployment of the first type of virtual machine alone.
[0097] Further, in step S103, the total resource utilization of the physical machine can be maximized as the goal, and the total resources of the physical machine can be simulated and scheduled according to the resource specifications of the first type of virtual machine and the resource specifications of the second type of virtual machine to determine the target resource types and quantities of the first type of virtual machines and the second type of virtual machines supported by the physical machine. The above-mentioned second type of virtual machine is a type different from the first type of virtual machine in the exclusive virtual machine and the shared virtual machine. For the specific implementation method of determining the target resource types and quantities of the first type of virtual machines and the second type of virtual machines supported by the physical machine, please refer to the relevant content of the above-mentioned system embodiment, which will not be repeated here.
[0098] After determining the resource specifications and quantity of the first type virtual machines and the second type virtual machines supported by the physical machine, in step S104, the physical machine may be mixedly deployed with exclusive virtual machines and shared virtual machines according to the resource specifications and quantity of the first type virtual machines and the second type virtual machines.
[0099] In the embodiment of the present application, by pre-planning the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on the physical machine, mixed deployment of exclusive virtual machines and shared virtual machines is achieved, which helps to reduce the amount of natural resource fragmentation caused by limited virtual machine specifications. On the other hand, since the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine are pre-scheduled by simulating the total resources of the physical machine with the goal of maximizing the resource utilization of the physical machine, therefore, deploying the simulated quantity and specifications of exclusive virtual machines and shared virtual machines in the physical machine can reduce the resource fragmentation during the actual resource scheduling of the physical machine, which helps to improve the resource utilization of the physical machine.
[0100] In an embodiment of the present application, after determining the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on a physical machine, the resources occupied by the exclusive virtual machines and the shared virtual machines can also be isolated. Specifically, the total resources can be divided into a first resource pool and a second resource pool according to the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine. Among them, the first resource pool is used to support the deployment of the first type of virtual machines, and the second resource pool is used to support the deployment of the second type of virtual machines. Further, the first resource pool and the second resource pool can be isolated for the subsequent deployment of the first type of virtual machines and the second type of virtual machines in the first resource pool and the second resource pool, respectively. In this way, a weak mixing of shared virtual machines and exclusive virtual machines is achieved. That is, exclusive virtual machines and shared virtual machines respectively have separate and independent resource pools, and each type of virtual machine can only schedule a resource pool that supports the deployment of that type of virtual machine for virtual machine deployment.
[0101] In other embodiments, a strong mix of shared virtual machines and dedicated virtual machines can also be implemented. In the implementation of the strong mix, the resources of the physical machine are dynamically divided in real time rather than physically isolated, and the SLA requirements of the dedicated virtual machines can be guaranteed by the scheduler.
[0102] For the above-mentioned embodiment of the weak mixing part, for the shared resource pool in the above-mentioned first resource pool and the second resource pool that supports the deployment of shared virtual machines, the physical cores in the shared resource pool can be virtualized to obtain multiple logical cores, so that the shared virtual machines deployed in the subsequent shared resource pool can share the physical cores in the shared resource pool.
[0103] In the embodiments of the present application, the specific implementation method for virtualizing the physical cores in the shared resource pool is not limited. In some embodiments, the number M of logical cores that need to be virtualized can be determined based on the set virtual ratio. M≥2 and is an integer. Optionally, the correspondence between the model of the physical machine and the virtual ratio can be pre-set. Based on this correspondence, in this embodiment, the virtual ratio corresponding to the model can be determined based on the model of the physical machine. Further, the number M of logical cores that need to be virtualized can be determined based on the virtual ratio corresponding to the model. Further, each physical core in the second resource can be virtualized into M logical cores using hyperthreading technology. In this way, for the shared virtual machine in the future, the number of logical cores required for the shared virtual machine can be determined based on the resource specifications of the shared virtual machine; and the shared virtual machine can be deployed in the shared resource pool using the corresponding number of logical cores.
[0104] It is worth noting that for a physical machine with a virtual machine hybrid deployment mode, the number of shared resource pools can be 1 or more. More than one means 2 or more. Multiple shared resource pools correspond to different virtual ratios, that is, the number M of logical cores virtualized from physical cores in different shared resource pools is different.
[0105] The above embodiment predetermines the virtual machine deployment method of the physical machine. For a physical machine that supports mixed deployment of shared virtual machines and exclusive virtual machines, the resource specifications and quantity of the shared virtual machines supported by the physical machine, as well as the resource specifications and quantity of the exclusive virtual machines, can also be predetermined. After determining these, the physical machine can be subsequently resource-scheduled according to the virtual machine deployment request to deploy a virtual machine that meets the virtual machine deployment request in the physical machine. The following is an exemplary description of the resource scheduling method in the virtual machine deployment process provided in the embodiment of the present application.
[0106] The user end may provide a virtual machine deployment request to the control node. The virtual machine deployment request may include the type of virtual machine to be deployed (exclusive virtual machine or shared virtual machine), target resource specifications and quantity, etc. For the control node, a virtual machine deployment request may be obtained. Further, the target type and target resource specifications of the virtual machine to be deployed may be obtained from the virtual machine deployment request; thereafter, a physical machine that supports the target type and target resource specifications may be selected from the physical machines of the computing system. Further, a target physical machine whose idle resources meet the target resource specification requirements may be selected based on the idle resources of the target resource pool in the physical machine that supports the target type and target resource specifications; and the virtual machine to be deployed may be deployed in the target resource pool of the target physical machine. Among them, the target resource pool is a resource pool that supports the deployment of virtual machines of the target type. For example, if the target type is an exclusive virtual machine, the target resource pool is an exclusive resource pool. If the target type is a shared virtual machine, the target resource pool is a shared resource pool. For the specific implementation of deploying exclusive virtual machines and shared virtual machines in the target resource pool, please refer to the relevant content of the above-mentioned system embodiment, which will not be repeated here.
[0107] In the embodiment of the present application, in addition to presetting the virtual machine deployment mode of the physical machine, the control node can also flexibly switch the virtual machine deployment mode of the physical machine according to the online real-time load of the physical machine. The specific implementation method of the control node switching the virtual machine deployment mode of the physical machine is exemplified below.
[0108] In some embodiments, there are physical machines in the computing cluster whose current virtual machine deployment mode is a hybrid deployment mode of dedicated virtual machines and shared virtual machines. Accordingly, the inventory levels of dedicated virtual machines and shared virtual machines in the computing cluster can be monitored. For the description of the inventory levels, please refer to the relevant content of the above embodiments, which will not be repeated here.
[0109] If there is a target type virtual machine whose inventory water level is less than the set first water level threshold among the exclusive virtual machines and shared virtual machines of the computing cluster, and the inventory water level of another type of virtual machine is greater than the set second water level threshold, the target physical machine whose current virtual machine deployment mode is the virtual machine mixed deployment mode can be selected from the computing cluster; and the virtual machine deployment mode of the target physical machine is switched to the target type virtual machine single deployment mode. Among them, the first water level threshold is less than the second water level threshold. Generally, the first water level threshold is less than 50%; the second water level threshold is greater than 50%. Another type of virtual machine refers to another type of virtual machine in the exclusive virtual machines and shared virtual machines, except the target type virtual machine. For example, if the target type virtual machine is an exclusive virtual machine, then the other type of virtual machine is a shared virtual machine. If the target type virtual machine is a shared virtual machine, then the other type of virtual machine is an exclusive virtual machine.
[0110] After the virtual machine deployment mode of the target physical machine is switched to the target type virtual machine single deployment mode, the target type virtual machine can be deployed separately on the target physical machine. For another type of virtual machine other than the target type virtual machine that has been deployed on the target physical machine (defined as the first physical machine), in some embodiments, the other type of virtual machine can be migrated to another physical machine (defined as the second physical machine) that supports the deployment of the other type of virtual machine. Optionally, according to the resource specifications of the other type of virtual machine deployed on the first physical machine, a physical machine that supports the deployment of another type of virtual machine can be selected from other physical machines in the computing cluster; and a physical machine that supports the resource specifications of the other type of virtual machine can be selected from the physical machines that support the deployment of the other type of virtual machine; then, from the physical machines that support the resource specifications of the other type of virtual machine, a physical machine whose idle resources can meet the resource requirements of the resource specifications of the above-mentioned support for the other type of virtual machine is selected as the second physical machine. Further, the resource specifications of the other type of virtual machine deployed on the first physical machine can be migrated from the first physical machine to the second physical machine.
[0111] In other embodiments, another type of virtual machine deployed on the first physical machine may not be processed. Accordingly, after the virtual machine deployment mode of the first physical machine is switched to the target type virtual machine single deployment mode, the target type virtual machine may be deployed using the idle resources of the first physical machine, and another type of virtual machine deployed on the first physical machine may not be processed.
[0112] The virtual machine deployment mode currently supported by physical machines may be a mixed deployment of the above-mentioned shared virtual machines and dedicated virtual machines, or a single deployment of any type of virtual machine. Fig.11 An exemplary description is given of a resource scheduling method for a physical machine in which a certain type of virtual machine is deployed separately in the current virtual machine deployment mode.
[0113] Fig.11 FIG. 1 is a flow chart of another resource scheduling method provided in an embodiment of the present application. Fig.11 As shown, the method includes:
[0114] S111. Obtaining a virtual machine inventory level of a third physical machine on which a first type of virtual machine is independently deployed from a computing cluster; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine.
[0115] S112. When the virtual machine inventory water level is less than the set first water level threshold, select a fourth physical machine whose idle resources meet the resource requirements of the first type of virtual machine from the physical machines on which the second type of virtual machine is deployed separately; the second type of virtual machine is a type different from the first type of virtual machine, such as an exclusive virtual machine or a shared virtual machine.
[0116] S113: Switch the virtual machine deployment mode of the fourth physical machine to a hybrid deployment mode that supports exclusive virtual machines and shared virtual machines.
[0117] S114: Deploy the first type of virtual machine in the fourth physical machine by utilizing the idle resources of the fourth physical machine.
[0118] In this embodiment, for the description of the shared virtual machine and the exclusive virtual machine, reference may be made to the relevant contents of the above system embodiment, which will not be repeated here.
[0119] In this embodiment, for a physical machine where a certain type of virtual machine is deployed separately in the current virtual machine deployment mode, the virtual machine inventory level of a physical machine (defined as a third physical machine) where a first type of virtual machine is deployed separately can be obtained. The first type of virtual machine is an exclusive virtual machine or a shared virtual machine. The third physical machine is all or part of the physical machines where the first type of virtual machine is deployed separately in the computing cluster.
[0120] Further, if the virtual machine inventory water level of the first type of virtual machine is less than the set first water level threshold, in step S112, a fourth physical machine whose idle resources meet the resource requirements of the first type of virtual machine can be selected from the physical machines where the second type of virtual machine is deployed separately. The second type of virtual machine is a type different from the first type of virtual machine, among exclusive virtual machines and shared virtual machines. In the embodiment of the present application, the specific value of the first water level threshold is not limited. Generally, the first water level threshold is less than 50%.
[0121] Optionally, a fifth physical machine whose model supports the first type of virtual machine can be selected from the physical machines where the second type of virtual machine is deployed separately; and a fourth physical machine whose idle resources meet the resource requirements of the first type of virtual machine can be selected from the fifth physical machine. The fifth physical machine includes: the fourth physical machine.
[0122] Furthermore, in step S113, the virtual machine deployment mode of the fourth physical machine can be switched to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines; thereafter, in step S114, the idle resources of the fourth physical machine can be used to deploy the first type of virtual machine in the fourth physical machine, thereby realizing the hybrid deployment of exclusive virtual machines and shared virtual machines in the fourth physical machine. Since the inventory level of the first type of virtual machines in the third physical machine is relatively low, and there are idle resources in the fourth physical machine where the second type of virtual machines are deployed alone, the virtual machine deployment mode of the fourth physical machine is switched to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines, thereby realizing the hybrid deployment of exclusive virtual machines and shared virtual machines in the fourth physical machine, which helps to reduce the idle resources in the fourth physical machine and improve the resource utilization of the fourth physical machine.
[0123] After the virtual machine deployment mode of the fourth physical machine is switched to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines, in response to a deployment request for a first type of virtual machine, target resources that meet the resources required for the deployment request can be scheduled from the idle resources of the fourth physical machine; further, the target resources can be used to deploy the first type of virtual machine in the fourth physical machine.
[0124] For the implementation of the weakly mixed virtual machine part, after the virtual machine deployment mode of the fourth physical machine is switched to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines, the idle resources of the fourth physical machine can be used to build a first resource pool; and the resources occupied by the second type of virtual machines deployed in the fourth physical machine can be used to build a second resource pool; thereafter, the first resource pool and the second resource pool can be isolated to allow the first type of virtual machine and the second type of virtual machine to be deployed in the first resource pool and the second resource pool, respectively. The specific implementation methods of respectively deploying the first type of virtual machine and the second type of virtual machine in the first resource pool and the second resource pool can refer to the relevant contents of the above-mentioned embodiments, which will not be repeated here.
[0125] In some embodiments of the present application, for the third physical machine on which the first type of virtual machine is separately deployed, when the duration of the inventory water level of the first type of virtual machine in the third physical machine being less than or equal to the set second water level threshold is greater than or equal to the set duration threshold, the virtual machine deployment mode of the third physical machine can also be switched to a mixed deployment mode that supports exclusive virtual machines and shared virtual machines. Furthermore, the resource specifications and quantity of the second type of virtual machines supported by the first physical machine can be determined with the goal of maximizing the resource utilization of the third physical machine. Afterwards, the second type of virtual machine can be deployed in the third physical machine in response to a deployment request for the second type of virtual machine, thereby achieving mixed deployment of exclusive virtual machines and shared virtual machines in the third physical machine, which can reduce idle resources in the third physical machine and help improve the resource utilization of the third physical machine.
[0126] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps S101 and S102 can be device A; for another example, the execution subject of step S101 can be device A, and the execution subject of step S102 can be device B; and so on.
[0127] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as S101, S102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.
[0128] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned resource scheduling methods.
[0129] Fig.12 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Fig.12 As shown, the computing device includes: a memory 12a and a processor 12b; wherein the memory 12a is used to store computer programs.
[0130] The processor 12b is coupled to the memory 12a, and is used to execute a computer program for: obtaining a first resource occupied by a first type of virtual machine deployed separately on a first physical machine; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine; when the first resource is less than the total resources of the physical machine, setting the virtual machine deployment mode of the first physical machine to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines; with the goal of maximizing total resource utilization, the total resources of the physical machine are simulated and scheduled according to the resource specifications of the first type of virtual machine and the resource specifications of the second type of virtual machine to determine the target resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine; the second type of virtual machine is a type different from the first type of virtual machine between the exclusive virtual machine and the shared virtual machine; according to the target resource specifications and quantity of the first type of virtual machine and the second type of virtual machine supported by the first physical machine, the physical machine is mixedly deployed with exclusive virtual machines and shared virtual machines; wherein, an exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and a shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
[0131] Optionally, when obtaining the first resource required to be occupied by deploying the first type of virtual machine on the first physical machine, the processor 12b is specifically used to: based on the preset resource specifications of the first type of virtual machine, greedily pack the total resources of the first physical machine to determine the resources occupied by the greedily packed first type of virtual machine; determine the resources occupied by the greedily packed first type of virtual machine as the first resource.
[0132] Optionally, processor 12b is also used to: divide the total resources into a first resource pool and a second resource pool according to the target resource specifications and quantity of the first type of virtual machines supported by the first physical machine; isolate the first resource pool and the second resource pool to deploy the first type of virtual machines and the second type of virtual machines in the first resource pool and the second resource pool, respectively.
[0133] Furthermore, the physical processor resource is a physical core of a physical processor. The processor 12b is also used to: for the shared resource pool in which the shared virtual machine is deployed in the first resource pool and the second resource pool, perform virtualization processing on the physical cores in the shared resource pool to obtain multiple logical cores, so that the shared virtual machines deployed in the shared resource pool can share the physical cores in the shared resource pool.
[0134] Optionally, when the processor 12b virtualizes the physical cores in the shared resource pool, it is specifically used to: determine the number M of logical cores that need to be virtualized based on a set virtual ratio; the virtual ratio represents the ratio of 1 physical core to the virtualized logical core; use hyper-threading technology to virtualize each physical core in the second resource into M logical cores; M ≥ 2 and is an integer.
[0135] The number of shared resource pools is 1 or more. More than one refers to 2 or more. Multiple shared resource pools have different virtual ratios.
[0136] In some embodiments, the processor 12b is also used to: monitor the inventory levels of exclusive virtual machines and shared virtual machines in the computing cluster; when the inventory level of virtual machines of a first target type among the exclusive virtual machines and shared virtual machines is less than a set first level threshold, and the inventory level of another type of virtual machines is greater than a set second level threshold, select a target physical machine whose current virtual machine deployment mode is a virtual machine hybrid deployment mode from the computing cluster; and switch the virtual machine deployment mode of the target physical machine to a virtual machine single deployment mode of the first target type.
[0137] Optionally, processor 12b is also used to: during the process of switching the virtual machine deployment mode of the target physical machine to a first target type of virtual machine single deployment mode, migrate another type of virtual machine deployed on the target physical machine to a second physical machine that supports another type of virtual machine deployment; or, after switching the virtual machine deployment mode of the target physical machine to any type of virtual machine single deployment mode, deploy a first target type of virtual machine using idle resources of the target physical machine.
[0138] In other embodiments, the processor 12b is also used to: obtain a virtual machine deployment request; obtain a second target type and target resource specification of the virtual machine to be deployed from the virtual machine deployment request; determine from the physical machines in the computing cluster that there is a target resource pool that supports the second target type and a target physical machine that supports the target resource specification; and deploy the virtual machine to be deployed with the second target type in the target resource pool of the target physical machine according to the target resource specification.
[0139] The computing device provided in this embodiment realizes the mixed deployment of exclusive virtual machines and shared virtual machines by pre-planning the specifications and quantity of exclusive virtual machines and shared virtual machines that can be mixed and deployed on the physical machine, which helps to reduce the amount of natural resource fragmentation caused by the limited specifications of virtual machines. On the other hand, since the resource specifications and quantity of the first type of virtual machines and the second type of virtual machines supported by the physical machine are pre-scheduled by simulating the total resources of the physical machine with the goal of maximizing the resource utilization of the physical machine, therefore, deploying the simulated quantity and specifications of exclusive virtual machines and shared virtual machines in the physical machine can reduce the resource fragmentation during the actual resource scheduling of the physical machine, which helps to improve the resource utilization of the physical machine.
[0140] In the following embodiment of the present application, the processor 12b is also used to: obtain the virtual machine inventory level of the first physical machine in the computing cluster where the first type of virtual machine is deployed separately; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine; when the virtual machine inventory level is less than the set first level threshold, select a second physical machine whose idle resources meet the resource requirements of the first type of virtual machine from the physical machines where the second type of virtual machine is deployed separately; the second type of virtual machine is an exclusive virtual machine or a shared virtual machine that is different from the first type of virtual machine; switch the virtual machine deployment mode of the second physical machine to a mixed deployment mode that supports exclusive virtual machines and shared virtual machines; utilize the idle resources of the second physical machine to deploy the first type of virtual machine in the second physical machine; wherein, an exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and a shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
[0141] Optionally, when selecting a second physical machine whose idle resources meet the resource requirements of a first type of virtual machine, the processor 12b is specifically used to: select a third physical machine whose model supports the first type of virtual machine from physical machines on which second type of virtual machines are separately deployed; and select a second physical machine whose idle resources meet the resource requirements of the first type of virtual machine from the third physical machine.
[0142] In some embodiments, when the processor 12b deploys the first type of virtual machine in the second physical machine, it is specifically used to: in response to a deployment request for the first type of virtual machine, schedule target resources that meet the resource requirements of the deployment request from the idle resources of the second physical machine; and deploy the first type of virtual machine in the second physical machine using the target resources.
[0143] Optionally, the processor 12b is further configured to: construct a first resource pool by utilizing idle resources of the second physical machine;
[0144] The second resource pool is constructed by utilizing the resources occupied by the second type virtual machine deployed in the second physical machine; the first resource pool and the second resource pool are isolated so as to respectively deploy the first type virtual machine and the second type virtual machine in the first resource pool and the second resource pool.
[0145] In the computing device provided in this embodiment, since the inventory level of the first type of virtual machines in the first physical machine is low, and there are idle resources in the second physical machine where the second type of virtual machines are deployed separately, the virtual machine deployment mode of the second physical machine is switched to a mixed deployment mode that supports exclusive virtual machines and shared virtual machines, thereby achieving mixed deployment of exclusive virtual machines and shared virtual machines in the second physical machine, which helps to reduce idle resources in the second physical machine and improve resource utilization of the second physical machine.
[0146] In some optional embodiments, such as Fig.12 As shown, the computing device may also include optional components such as a communication component 12c and a power component 12d. Fig.12 The components are shown schematically only and do not necessarily include Fig.12 The components shown do not necessarily mean that the computing device can only include Fig.12 Components shown.
[0147] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0148] In the embodiment of the present application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (System on Chip, SoC), etc., but not limited to this.
[0149] In an embodiment of the present application, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be implemented based on near field communication (NFC) technology, radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology or other technologies.
[0150] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.
[0151] It should be noted that the descriptions such as “first” and “second” in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit “first” and “second” to different types.
[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0153] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0157] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0158] The storage medium of a computer is a readable storage medium, which may also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0159] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0160] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A resource scheduling method, characterized in that: include: Acquire a first resource occupied by a first type of virtual machine deployed separately on a first physical machine; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine; When the first resource is less than the total resource of the physical machine, setting the virtual machine deployment mode of the first physical machine to a mixed deployment mode supporting exclusive virtual machines and shared virtual machines; Taking the maximization of the total resource utilization as the goal, the total resources of the physical machine are simulated and scheduled according to the resource specifications of the first type virtual machine and the resource specifications of the second type virtual machine, so as to determine the target resource specifications and quantity of the first type virtual machine and the second type virtual machine supported by the physical machine; the second type virtual machine is a type different from the first type virtual machine among the exclusive virtual machine and the shared virtual machine; Performing mixed deployment of exclusive virtual machines and shared virtual machines on the physical machine according to target resource specifications and quantities of first-type virtual machines and second-type virtual machines supported by the first physical machine; The exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and the shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
2. The method according to claim 1, characterized in that The obtaining of the first resource required for the first physical machine to deploy the first type of virtual machine includes: Based on the preset resource specifications of the first type of virtual machine, greedily pack the total resources of the first physical machine to determine the resources occupied by the greedily packed first type of virtual machine; Determine the resources occupied by the first type virtual machines of the greedy packing as the first resources.
3. The method according to claim 1, characterized in that Also includes: Dividing the total resources into a first resource pool and a second resource pool according to target resource specifications and quantity of the first type of virtual machines supported by the first physical machine; The first resource pool and the second resource pool are isolated so that the first type virtual machine and the second type virtual machine are deployed in the first resource pool and the second resource pool respectively.
4. The method according to claim 3, characterized in that The physical processor resource is a physical core of a physical processor; for a shared resource pool in which a shared virtual machine is deployed in the first resource pool and the second resource pool, the method further includes: The physical cores in the shared resource pool are virtualized to obtain a plurality of logical cores, so that the shared virtual machines deployed in the shared resource pool can share the physical cores in the shared resource pool.
5. The method according to claim 4, characterized in that The virtualizing the physical cores in the shared resource pool to obtain a plurality of logical cores includes: According to the set virtual ratio, the number M of logical cores to be virtualized is determined; the virtual ratio represents the ratio of one physical core to the virtualized logical core; Each physical core in the second resource is virtualized into M logical cores by using the hyperthreading technology; M≥2 and is an integer.
6. The method according to claim 5, characterized in that There are multiple shared resource pools, and the multiple shared resource pools correspond to different virtual proportions.
7. The method according to claim 1, characterized in that Also includes: Monitor the inventory levels of dedicated virtual machines and shared virtual machines in the computing cluster; When the inventory level of a first target type of virtual machine among the exclusive virtual machines and the shared virtual machines is less than a set first level threshold, and the inventory level of another type of virtual machine is greater than a set second level threshold, selecting a target physical machine whose current virtual machine deployment mode is a virtual machine hybrid deployment mode from the computing cluster; The virtual machine deployment mode of the target physical machine is switched to a single virtual machine deployment mode of the first target type.
8. The method according to claim 7, characterized in that Also includes: In the process of switching the virtual machine deployment mode of the target physical machine to the single deployment mode of the first target type of virtual machine, migrating another type of virtual machine deployed on the target physical machine to a second physical machine supporting the deployment of the another type of virtual machine; or, After the virtual machine deployment mode of the target physical machine is switched to the single virtual machine deployment mode of the first target type, the virtual machine of the first target type is deployed by using the idle resources of the target physical machine.
9. The method according to claim 3, characterized in that: Also includes: Get a virtual machine deployment request; Obtaining a second target type and target resource specification of the virtual machine to be deployed from the virtual machine deployment request; Determine from the physical machines of the computing cluster that there is a target resource pool that supports the second target type and a target physical machine that supports the target resource specification; According to the target resource specification, a to-be-deployed virtual machine of the second target type is deployed in the target resource pool of the target physical machine.
10. A resource scheduling method, characterized in that: include: Obtaining a virtual machine inventory level of a first physical machine in a computing cluster where a first type of virtual machine is deployed separately; the first type of virtual machine is an exclusive virtual machine or a shared virtual machine; When the virtual machine inventory water level is less than the set first water level threshold, selecting a second physical machine whose idle resources meet the resource demand of the first type of virtual machine from the physical machines on which the second type of virtual machine is deployed separately; the second type of virtual machine is a type different from the first type of virtual machine among the exclusive virtual machine and the shared virtual machine; Switching the virtual machine deployment mode of the second physical machine to a hybrid deployment mode supporting exclusive virtual machines and shared virtual machines; Deploying the first type of virtual machine in the second physical machine by utilizing idle resources of the second physical machine; The exclusive virtual machine refers to a virtual machine whose virtual processor exclusively occupies the physical processor resources of the physical machine; and the shared virtual machine refers to a virtual machine whose virtual processor shares the physical processor resources.
11. The method according to claim 10, characterized in that Selecting, from the physical machines on which the second type of virtual machines are separately deployed, a second physical machine whose idle resources meet the resource requirements of the first type of virtual machines, comprising: Selecting, from the physical machines on which the second type of virtual machines are separately deployed, a third physical machine whose model supports the first type of virtual machines; A second physical machine whose idle resources meet the resource requirements of the first type virtual machine is selected from the third physical machine.
12. The method according to claim 10, characterized in that Also includes: Using the idle resources of the second physical machine to build a first resource pool; Building a second resource pool by using the resources occupied by the second type of virtual machine deployed in the second physical machine; The first resource pool and the second resource pool are isolated so as to respectively deploy the first type virtual machine and the second type virtual machine in the first resource pool and the second resource pool.
13. A computing device, characterized in that: include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 12.
14. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Virtual machine migration method and device
CN107870802A
Graphics processing resource allocation method and device, equipment and storage medium
CN113342534A
Cited By
Hybrid graphics processing unit configuration for virtual machines
WO2026085025A1
