Virtual machine resource hierarchical scheduling method and device, equipment and medium
By dividing the cluster physical machine into multiple logical units and adopting a hierarchical scheduling strategy, the problem of inefficient virtual machine resource scheduling in large-scale clusters is solved, resource utilization and scheduling efficiency are improved, and high concurrency, fast and elastic services are met need.
Patent Information
- Application Number
- CN202411192512.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
AI Technical Summary
In large-scale cluster scenarios, using global resource view for virtual machine resource scheduling results in inefficient resource scheduling and cannot meet customers' high concurrency, fast and elastic business needs.
By dividing the physical machines in the cluster into multiple logical units, an in-group tiling strategy and an inter-group stacking strategy are adopted, and physical machine resources are allocated through different logical units when conditions are met and not met respectively to achieve grading of virtual machine resources. Scheduling.
It improves resource utilization and scheduling efficiency, reduces resource fragmentation, reduces single point failure risk, and meets high concurrency, fast and elastic business needs.
Smart Images

Figure CN119088558A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of virtual machine technology, and in particular to a method, device, equipment and medium for hierarchical scheduling of virtual machine resources. Background Art
[0002] When a user needs to create a virtual machine, he needs to select a suitable physical machine to occupy resources and activate them. In the current scheduling scenario, all physical machines in the entire cluster are queried and scheduled as a whole, which is equivalent to obtaining a view of all resources. This is a global view, which ensures that the best resource node is scheduled from the perspective of the overall resource view.
[0003] However, in the case of large-scale clusters, for example, if a certain model has more than 1,000 physical machine nodes in a cluster, if the global resource view is still used for scheduling, the resource scheduling process will be inefficient. At the same time, as the number of resource nodes increases, this efficiency may decrease exponentially, seriously restricting the performance of the host platform. For example, in the elastic scaling scenario, when customers open 100 or 200 virtual machines in batches, the judgment of a large number of physical machine resources will inevitably reduce the overall business efficiency and fail to meet the customer's high concurrency and fast elastic business scenarios. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a method, device, equipment and medium for hierarchical scheduling of virtual machine resources.
[0005] In a first aspect, the present disclosure provides a method for hierarchical scheduling of virtual machine resources, comprising:
[0006] In response to a virtual machine activation request from a user, detecting whether the first logic unit meets a virtual machine activation condition;
[0007] In a case where the first logical unit satisfies the virtual machine activation condition, allocating physical machine resources for the virtual machine activation request through the first logical unit;
[0008] When the first logic unit does not satisfy the virtual machine activation condition, allocating the physical machine resources for the virtual machine activation request through the second logic unit;
[0009] A target virtual machine corresponding to the virtual machine activation request is activated based on the physical machine resources.
[0010] In a second aspect, the present disclosure provides a virtual machine resource hierarchical scheduling device, comprising:
[0011] A unit detection module, used to detect whether the first logical unit meets the virtual machine activation condition in response to the user's virtual machine activation request;
[0012] A first allocation module, configured to allocate physical machine resources to the virtual machine activation request through the first logical unit when the first logical unit satisfies the virtual machine activation condition;
[0013] A second allocation module, configured to allocate the physical machine resources to the virtual machine activation request through the second logical unit when the first logical unit does not meet the virtual machine activation condition;
[0014] The virtual machine activation module is used to activate the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0015] In a third aspect, the present disclosure provides a virtual machine resource hierarchical scheduling device, including:
[0016] processor;
[0017] A memory for storing executable instructions;
[0018] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the virtual machine resource hierarchical scheduling method of the first aspect.
[0019] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor implements the virtual machine resource hierarchical scheduling method of the first aspect.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] The method, apparatus, device and medium for hierarchical scheduling of virtual machine resources of the embodiments of the present disclosure can respond to a user's virtual machine activation request, detect whether a first logical unit meets the virtual machine activation condition, and then allocate physical machine resources to the virtual machine activation request through the first logical unit if the first logical unit meets the virtual machine activation condition; and then allocate the physical machine resources to the virtual machine activation request through the second logical unit if the first logical unit does not meet the virtual machine activation condition; finally, activate the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources, thereby realizing hierarchical scheduling of physical machine resources through multiple logical units, improving resource utilization and enhancing resource scheduling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0023] Figure 1 A schematic diagram of a flow chart of a method for hierarchical scheduling of virtual machine resources provided in an embodiment of the present disclosure;
[0024] Figure 2 A flowchart of another method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure;
[0025] Figure 3 A flowchart of another method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure;
[0026] Figure 4 A flowchart of another method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure;
[0027] Figure 5 A schematic diagram of the structure of a logic unit provided in an embodiment of the present disclosure;
[0028] Figure 6 A schematic diagram of the structure of a device for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure;
[0029] Figure 7 A schematic diagram of the structure of a virtual machine resource hierarchical scheduling device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] In order to solve the above problems, the embodiments of the present disclosure provide a method, device, equipment and medium for hierarchical scheduling of virtual machine resources. Figure 1-Figure 2 The virtual machine resource hierarchical scheduling method provided by the embodiment of the present disclosure is described in detail.
[0037] Figure 1 A flow chart of a method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure is shown.
[0038] In the embodiment of the present disclosure, the virtual machine resource hierarchical scheduling method may be executed by an electronic device, wherein the electronic device may include but is not limited to devices such as computer devices, cloud servers or cloud server clusters.
[0039] like Figure 1 As shown, the virtual machine resource hierarchical scheduling method may include the following steps.
[0040] S110 . In response to a user's virtual machine activation request, detect whether the first logic unit meets a virtual machine activation condition.
[0041] In an embodiment of the present disclosure, the electronic device may detect whether the first logic unit meets the virtual machine activation condition in response to a virtual machine activation request from a user.
[0042] Optionally, the virtual machine provisioning request may be used to request provisioning of a virtual machine.
[0043] Optionally, the first logical unit may be a divided group including a plurality of physical machines.
[0044] Optionally, the virtual machine provisioning condition may be a condition that needs to be met to provision the virtual machine.
[0045] Specifically, when a user wants to create a virtual machine, a virtual machine activation request may be initiated to the electronic device, and the electronic device may detect whether the first logic unit meets the virtual machine activation condition in response to the virtual machine activation request.
[0046] Optionally, before S110, the virtual machine resource hierarchical scheduling method may further include: dividing the physical machines in the cluster into a plurality of logical units, wherein the logical unit includes a plurality of the physical machines, and each of the physical machines includes an initial unit resource.
[0047] In the embodiment of the present disclosure, the electronic device may divide the physical machines in the cluster into multiple logical units.
[0048] Optionally, the cluster may include multiple physical machines.
[0049] Optionally, the initial unit resource may be the resource owned by each physical machine when no resource is allocated. For example, the initial unit resource may be 100.
[0050] Specifically, the electronic device can divide the physical machines in the cluster into multiple logical units. For example, if the cluster includes 100 physical machines, the electronic device can divide the cluster into 4 logical units (groups), each logical unit can include 25 physical machines, and each physical machine can include an initial unit resource (100).
[0051] S120: When the first logical unit satisfies the virtual machine activation condition, allocate physical machine resources to the virtual machine activation request through the first logical unit.
[0052] In an embodiment of the present disclosure, when the first logic unit satisfies the virtual machine provisioning condition, the electronic device may allocate physical machine resources for the virtual machine provisioning request through the first logic unit.
[0053] Optionally, the physical machine resources may be resources used to provision a virtual machine.
[0054] Specifically, after detecting whether the first logical unit satisfies the virtual machine activation conditions, if it is determined that the first logical unit satisfies the virtual machine activation conditions, the electronic device can allocate physical machine resources for the virtual machine activation request through the first logical unit, for example, allocating physical machine resources for the virtual machine activation request through the 25 physical machines included in the first logical unit.
[0055] S130: When the first logical unit does not satisfy the virtual machine activation condition, allocate the physical machine resources to the virtual machine activation request through the second logical unit.
[0056] In an embodiment of the present disclosure, when the first logic unit does not meet the virtual machine provisioning condition, the electronic device may allocate the physical machine resources for the virtual machine provisioning request through the second logic unit.
[0057] Optionally, the second logical unit may be a group including a plurality of physical machines. The second logical unit is similar to the first logical unit.
[0058] Specifically, after the electronic device detects whether the first logical unit meets the virtual machine activation conditions, if it is determined that the first logical unit does not meet the virtual machine activation conditions, the electronic device can allocate the physical machine resources for the virtual machine activation request through the second logical unit, for example, allocate physical machine resources for the virtual machine activation request through the 25 physical machines included in the second logical unit.
[0059] In other embodiments, the electronic device may detect whether the second logical unit meets the virtual machine activation conditions. If the second logical unit also does not meet the virtual machine activation conditions, it may continue to detect whether other logical units meet the virtual machine activation conditions, and repeat the above steps until the resources of all logical units are used.
[0060] S140: Activate a target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0061] In an embodiment of the present disclosure, the electronic device may activate the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0062] Optionally, the target virtual machine may be a virtual machine created by a user request.
[0063] Specifically, after the electronic device allocates the physical machine resources to the virtual machine activation request, it can activate the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0064] Therefore, in the embodiment of the present disclosure, it is possible to respond to the user's virtual machine activation request and detect whether the first logical unit meets the virtual machine activation conditions. Then, if the first logical unit meets the virtual machine activation conditions, physical machine resources are allocated to the virtual machine activation request through the first logical unit. Then, if the first logical unit does not meet the virtual machine activation conditions, the physical machine resources are allocated to the virtual machine activation request through the second logical unit. Finally, the target virtual machine corresponding to the virtual machine activation request is activated based on the physical machine resources. Thus, hierarchical scheduling of physical machine resources is achieved through multiple logical units, thereby improving resource utilization and resource scheduling efficiency.
[0065] Figure 2 A flow chart of another method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure is shown.
[0066] like Figure 2 As shown, the virtual machine resource hierarchical scheduling method may include the following steps.
[0067] S210. In response to a user's request to activate a virtual machine, determine remaining unit resources of each of the physical machines of the first logical unit.
[0068] In an embodiment of the present disclosure, the electronic device may determine the remaining unit resources of each of the physical machines of the first logical unit in response to a virtual machine activation request from a user.
[0069] Optionally, the remaining unit resource may be used to represent the number of unit resources remaining in the physical machine.
[0070] Specifically, the electronic device may determine the remaining unit resources of each of the physical machines of the first logical unit in response to the user's virtual machine activation request. For example, the first logical unit may include 25 physical machines, and the electronic device may detect the remaining unit resources in each physical machine.
[0071] S220: Determine whether there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request.
[0072] Furthermore, the electronic device may determine whether the remaining unit resources exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request.
[0073] Specifically, after determining the remaining unit resources in each physical machine, the electronic device can determine whether there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request. For example, the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request are 50 resources. The electronic device can determine whether there are remaining unit resources greater than 50 resources among the 25 physical machines in the first logical unit.
[0074] Figure 3 A flow chart of another method for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure is shown.
[0075] Optionally, after determining whether there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the virtual machine resource hierarchical scheduling method may further include: S310, if there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, determining that the first logical unit meets the virtual machine activation condition.
[0076] In some embodiments of the present disclosure, if the remaining unit resources exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device may determine that the first logical unit satisfies the virtual machine activation condition.
[0077] Specifically, after the electronic device determines the remaining unit resources, if there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device can determine that the first logical unit meets the virtual machine activation conditions. For example, among the 25 physical machines in the first logical unit, there is a physical machine with remaining unit resources greater than 50 resources. The electronic device can determine that the first logical unit meets the virtual machine activation conditions, that is, the corresponding target virtual machine can be activated through the first logical unit.
[0078] S320: If there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, it is determined that the first logical unit does not meet the virtual machine activation condition.
[0079] In other embodiments of the present disclosure, if the remaining unit resources do not exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device may determine that the first logical unit does not satisfy the virtual machine activation condition.
[0080] Specifically, after the electronic device determines the remaining unit resources, if there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device can determine that the first logical unit does not meet the virtual machine activation conditions. For example, among the 25 physical machines in the first logical unit, 10 physical machines have 20 unit resources remaining and 15 physical machines have 10 unit resources remaining. At this time, the remaining unit resources of each physical machine are not enough to activate the target virtual machine that requires 50 resources, and the corresponding target virtual machine cannot be activated through the first logical unit.
[0081] Figure 4 A flow chart of another method for hierarchical scheduling of virtual machine resources provided in an embodiment of the present disclosure is shown.
[0082] like Figure 4 As shown, the virtual machine resource hierarchical scheduling method may include the following steps.
[0083] S410. If there are remaining unit resources that satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine activation request through the target physical machine with the most remaining unit resources in the first logical unit.
[0084] In the embodiment of the present disclosure, if the remaining unit resources exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device can adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine activation request through the target physical machine with the most remaining unit resources in the first logical unit.
[0085] Optionally, the intra-group tiling strategy is to give priority to physical machines with more remaining unit resources within the group (logical unit), that is, for multiple physical machines included in a logical unit, the remaining unit resources of each physical machine are judged in turn, and the physical machine with more remaining unit resources is selected for virtual machine provisioning. This ensures high availability and dispersion of virtual machines and reduces the risk of single point failures.
[0086] Specifically, if the remaining unit resources exist to satisfy the physical machine resources required to open the target virtual machine corresponding to the virtual machine opening request, that is, the physical machine resources can be allocated to the virtual machine opening request through the first logical unit, and the electronic device can adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine opening request through the target physical machine with the most remaining unit resources in the first logical unit. For example, if there are physical machines with 80 remaining unit resources, 70 remaining unit resources, and 50 remaining unit resources in the first logical unit, the electronic device can adopt an intra-group tiling strategy to preferentially select the target physical machine with more remaining unit resources, that is, the physical machine with 80 remaining unit resources to allocate the physical machine resources to the virtual machine opening request.
[0087] S420: If there are no remaining unit resources that satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, an inter-group stacking strategy is adopted to determine the second logical unit.
[0088] In the embodiment of the present disclosure, if there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the electronic device may adopt an inter-group stacking strategy to determine the second logical unit.
[0089] Optionally, the inter-group accumulation strategy is to use up the resources in one logical unit before using the resources in the next logical unit between each group (each logical unit), that is, for a logical unit, first use up the resources of all physical machines in the logical unit before scheduling the resources of the physical machines. This reduces resource fragmentation and reserves more resources required by large package virtual machines.
[0090] Specifically, if there are no remaining unit resources to meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, that is, the physical machine resources cannot be allocated through the first logical unit, the electronic device can adopt an inter-group stacking strategy to determine the second logical unit.
[0091] S410: Adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine provisioning request through the target physical machine with the most remaining unit resources in the second logical unit.
[0092] In an embodiment of the present disclosure, the electronic device may adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine provisioning request through the target physical machine with the most remaining unit resources in the second logical unit.
[0093] Specifically, after determining the second logical unit, the electronic device can allocate physical machine resources for the virtual machine activation request through the second logical unit, and the electronic device can adopt an intra-group tiling strategy to preferentially allocate the physical machine resources for the virtual machine activation request through the target physical machine with the most remaining unit resources in the second logical unit. For example, in the second logical unit, there are physical machines with 80 remaining unit resources, 70 remaining unit resources, and 50 remaining unit resources. At this time, the electronic device can adopt an intra-group tiling strategy to preferentially select the target physical machine with more remaining unit resources, that is, the physical machine with 80 remaining unit resources to allocate the physical machine resources for the virtual machine activation request.
[0094] Figure 5 A schematic diagram of the structure of a logic unit provided by an embodiment of the present disclosure is shown.
[0095] like Figure 5As shown, the electronic device can divide the physical machines in the cluster into multiple logical units. For example, if the cluster includes 100 physical machines, the electronic device can divide the cluster into 4 logical units (groups), each of which can include 25 physical machines, and each physical machine can include an initial unit resource (100). Then the electronic device first detects whether the first logical unit meets the virtual machine activation condition, that is, determines the remaining unit resources of each of the physical machines in the first logical unit, and determines whether the remaining unit resources meet the physical machine resources (50) required for opening the target virtual machine corresponding to the virtual machine activation request. If there is a target physical machine with a remaining unit resource greater than the physical machine resource (50) in the first logical unit, the electronic device can allocate the physical machine resources to the virtual machine activation request through the target physical machine in the first logical unit; if not, the electronic device can allocate the physical machine resources to the virtual machine activation request through the target physical machine in the second logical unit with a remaining unit resource greater than the physical machine resource (50), and finally activates the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0096] Therefore, the two strategies of intra-group tiling strategy and inter-group stacking strategy are combined. By dividing the physical machines in the cluster into several logical units, the intra-group tiling strategy is adopted within the group, and the inter-group stacking strategy is adopted between groups. While ensuring the high availability of virtual machines, resource fragmentation is reduced and resource utilization is optimized. The single point failure risk caused by simple stacking and the problem of insufficient resources for large package virtual machines caused by simple tiling are solved. At the same time, the problem of inefficient resource scheduling in large-scale situations is solved.
[0097] Figure 6 A schematic diagram of the structure of a device for hierarchical scheduling of virtual machine resources provided by an embodiment of the present disclosure is shown.
[0098] like Figure 6 As shown, the virtual machine resource hierarchical scheduling device 600 may include a unit detection module 610 , a first allocation module 620 , a second allocation module 630 and a virtual machine activation module 640 .
[0099] The unit detection module 610 can be used to detect whether the first logical unit meets the virtual machine activation condition in response to the user's virtual machine activation request.
[0100] The first allocation module 620 may be configured to allocate physical machine resources to the virtual machine activation request through the first logical unit when the first logical unit meets the virtual machine activation condition.
[0101] The second allocation module 630 may be configured to allocate the physical machine resources to the virtual machine activation request through the second logical unit when the first logical unit does not satisfy the virtual machine activation condition.
[0102] The virtual machine activation module 640 may be configured to activate a target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
[0103] Therefore, in the embodiment of the present disclosure, it is possible to respond to the user's virtual machine activation request and detect whether the first logical unit meets the virtual machine activation conditions. Then, if the first logical unit meets the virtual machine activation conditions, physical machine resources are allocated to the virtual machine activation request through the first logical unit. Then, if the first logical unit does not meet the virtual machine activation conditions, the physical machine resources are allocated to the virtual machine activation request through the second logical unit. Finally, the target virtual machine corresponding to the virtual machine activation request is activated based on the physical machine resources. Thus, hierarchical scheduling of physical machine resources is achieved through multiple logical units, thereby improving resource utilization and resource scheduling efficiency.
[0104] In some embodiments of the present disclosure, the virtual machine resource hierarchical scheduling device 600 may further include a unit division module.
[0105] The unit division module can be used to divide the physical machines in the cluster into multiple logical units before detecting whether the first logical unit meets the virtual machine activation conditions in response to the user's virtual machine activation request. The logical unit includes multiple physical machines, and each physical machine includes an initial unit resource.
[0106] In some embodiments of the present disclosure, the unit detection module 610 may specifically include a first determination unit and a resource judgment unit.
[0107] The first determination unit may be configured to determine remaining unit resources of each of the physical machines of the first logical unit in response to a user's virtual machine activation request.
[0108] The resource determination unit may be configured to determine whether the remaining unit resources satisfy the physical machine resources required for activating the target virtual machine corresponding to the virtual machine activation request.
[0109] In some embodiments of the present disclosure, the unit detection module 610 may further specifically include a second determination unit and a third determination unit.
[0110] The second determination unit can be used to determine that the first logical unit meets the virtual machine activation condition after judging whether there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request. If there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, then determine that the first logical unit meets the virtual machine activation condition.
[0111] The third determination unit may be configured to determine that the first logic unit does not meet the virtual machine activation condition if there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request.
[0112] In some embodiments of the present disclosure, the first allocation module 620 may specifically include a first allocation unit.
[0113] The first allocation unit can be used to adopt an intra-group tiling strategy if there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, and preferentially allocate the physical machine resources to the virtual machine activation request through the target physical machine with the most remaining unit resources in the first logical unit.
[0114] In some embodiments of the present disclosure, the second allocation module 630 may specifically include a fourth determining unit.
[0115] The fourth determination unit may be configured to determine the second logical unit by adopting an inter-group stacking strategy if there are no remaining unit resources that satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request.
[0116] In some embodiments of the present disclosure, the second allocation module 630 may specifically include a second allocation unit.
[0117] The second allocation unit may be configured to adopt an intra-group tiling strategy to preferentially allocate the physical machine resources to the virtual machine provisioning request through the target physical machine with the most remaining unit resources in the second logical unit.
[0118] It should be noted that Figure 6 The virtual machine resource hierarchical scheduling device 600 shown can execute Figure 1-Figure 5 The various steps in the method embodiment shown in the figure are implemented Figure 1-Figure 5 The various processes and effects in the method embodiment shown are not described in detail here.
[0119] Figure 7 A schematic diagram of the structure of a virtual machine resource hierarchical scheduling device provided by an embodiment of the present disclosure is shown.
[0120] In some embodiments of the present disclosure, Figure 7 The virtual machine resource hierarchical scheduling device shown may be an electronic device. Specifically, the electronic device may include but is not limited to devices such as computer devices, cloud servers or cloud server clusters.
[0121] like Figure 7 As shown, the virtual machine resource hierarchical scheduling device may include a processor 701 and a memory 702 storing computer program instructions.
[0122] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0123] The memory 702 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 702 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 702 may be inside or outside the integrated gateway device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory. In a specific embodiment, the memory 702 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0124] The processor 701 reads and executes the computer program instructions stored in the memory 702 to perform the steps of the virtual machine resource hierarchical scheduling method provided in the embodiment of the present disclosure.
[0125] In one example, the virtual machine resource hierarchical scheduling device may further include a transceiver 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702 and the transceiver 703 are connected via a bus 704 and communicate with each other.
[0126] The bus 704 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 704 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0127] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the virtual machine resource hierarchical scheduling method provided by the embodiment of the present disclosure.
[0128] The storage medium may include, for example, a memory 702 of computer program instructions, and the instructions may be executed by a processor 701 of a virtual machine resource hierarchical scheduling device to complete the virtual machine resource hierarchical scheduling method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0129] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" is intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device.
[0130] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for hierarchical scheduling of virtual machine resources, characterized in that: include: In response to a virtual machine activation request from a user, detecting whether the first logic unit meets a virtual machine activation condition; In a case where the first logical unit satisfies the virtual machine activation condition, allocating physical machine resources for the virtual machine activation request through the first logical unit; When the first logic unit does not satisfy the virtual machine activation condition, allocating the physical machine resources for the virtual machine activation request through the second logic unit; A target virtual machine corresponding to the virtual machine activation request is activated based on the physical machine resources.
2. The method according to claim 1, characterized in that Before responding to the user's virtual machine activation request and detecting whether the first logic unit meets the virtual machine activation condition, the method further includes: The physical machines in the cluster are divided into a plurality of logical units, wherein the logical unit includes a plurality of the physical machines, and each of the physical machines includes an initial unit resource.
3. The method according to claim 2, characterized in that The step of responding to the user's virtual machine activation request and detecting whether the first logic unit meets the virtual machine activation condition includes: In response to a user's virtual machine activation request, determining remaining unit resources of each of the physical machines of the first logical unit; It is determined whether the remaining unit resources exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request.
4. The method according to claim 3, characterized in that After determining whether the remaining unit resources satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, the method further includes: If the remaining unit resources exist to satisfy the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, determining that the first logical unit satisfies the virtual machine activation condition; If there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, it is determined that the first logical unit does not meet the virtual machine activation condition.
5. The method according to claim 4, characterized in that The allocating physical machine resources to the virtual machine activation request through the first logical unit when the first logical unit satisfies the virtual machine activation condition includes: If there are remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, an intra-group tiling strategy is adopted to preferentially allocate the physical machine resources to the virtual machine activation request through the target physical machine with the most remaining unit resources in the first logical unit.
6. The method according to claim 4, characterized in that The situation where the first logic unit does not meet the virtual machine provisioning condition includes: If there are no remaining unit resources that meet the physical machine resources required to activate the target virtual machine corresponding to the virtual machine activation request, an inter-group stacking strategy is adopted to determine the second logical unit.
7. The method according to claim 6, characterized in that The allocating the physical machine resources for the virtual machine provisioning request by the second logic unit includes: An intra-group tiling strategy is adopted to preferentially allocate the physical machine resources to the virtual machine provisioning request through the target physical machine with the most remaining unit resources in the second logical unit.
8. A virtual machine resource hierarchical scheduling device, characterized in that: include: A unit detection module, used to detect whether the first logical unit meets the virtual machine activation condition in response to the user's virtual machine activation request; A first allocation module, configured to allocate physical machine resources to the virtual machine activation request through the first logical unit when the first logical unit satisfies the virtual machine activation condition; A second allocation module, configured to allocate the physical machine resources to the virtual machine activation request through the second logical unit when the first logical unit does not meet the virtual machine activation condition; The virtual machine activation module is used to activate the target virtual machine corresponding to the virtual machine activation request based on the physical machine resources.
9. A virtual machine resource hierarchical scheduling device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the virtual machine resource hierarchical scheduling method described in any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the virtual machine resource hierarchical scheduling method according to any one of claims 1 to 7.
