A method and device for allocating processing cores of an example
By allocating processing cores to virtual machines and containers in NUMA nodes, hybrid deployment is achieved, which solves the resource waste problem caused by independent deployment of virtual machines and containers and improves resource utilization and allocation efficiency.
Patent Information
- Application Number
- CN202010599059.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2040-06-28
AI Technical Summary
Independent deployment of virtual machine instances and container instances results in waste of physical machine resources and inability to fully utilize resources.
The resource allocation device is used to deploy virtual machines and containers in a mixed manner, and processing cores are allocated in NUMA nodes respectively. The virtual machines are NUMA-aware and the containers are NUMA-unaware, thus achieving co-deployment.
It improves the utilization of resources in physical machines, effectively simplifies the resource allocation process, and improves resource allocation efficiency.
Smart Images

Figure CN113849260B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for allocating processing cores in an example. Background Art
[0002] Currently, virtual machine instances and container instances are deployed independently. This means that a physical machine can only host a virtual machine instance or a container instance. Deploying virtual machine instances and container instances independently wastes physical machine resources.
[0003] In summary, there is an urgent need for a hybrid deployment method of virtual machines and containers to reduce resource waste on physical machines so that the resources in the physical machines can be fully utilized. Summary of the Invention
[0004] The present application provides an example processing core allocation method and apparatus for implementing the allocation of processing cores when virtual machines and containers are mixed deployed.
[0005] In a first aspect, embodiments of the present application provide a method for allocating processing cores to an instance. The method is performed by a resource allocation device. In this method, the resource allocation device first receives a virtual machine creation request. Upon receiving the virtual machine creation request, the resource allocation device may allocate resources to the virtual machine instance. Specifically, the resource allocation device may allocate a first portion of processing cores in a NUMA node of a physical machine to the virtual machine instance based on the virtual machine creation request. The processing cores required by the virtual machine instance specifications match the first portion of processing cores, and the virtual machine instance is a NUMA-aware instance. Subsequently, the resource allocation device may also receive a container creation request. Upon receiving the container creation request, the resource allocation device may allocate resources to the container instance. Specifically, the resource allocation device may allocate a second portion of processing cores in a NUMA node to the container instance based on the container creation request. The first portion of processing cores and the second portion of processing cores are different. The second portion of processing cores may be the remaining processing cores of the NUMA node excluding the first portion of processing cores, or may be a portion of the remaining processing cores. The processing cores required by the container instance specifications match the second portion of processing cores, and the container instance is a NUMA-unaware instance.
[0006] Through the above method, the resource allocation device can allocate processing cores in the same NUMA node to containers and virtual machines, thereby realizing the co-deployment of containers and virtual machines and improving the utilization of resources in the physical machine.
[0007] In one possible implementation, a virtual machine creation request includes a virtual machine instance specification. When allocating a first portion of processing cores in a physical machine's NUMA node to the virtual machine instance based on the virtual machine creation request, the resource allocation device may first obtain a first resource view. The first resource view may indicate idle resources of the physical machine and the first portion of processing cores occupied by a first reference instance, where the first reference instance is a predicted virtual machine instance or container instance to be created. Based on the first resource view, the scheduling and allocation device may determine that the processing cores required by the virtual machine instance specification match the first portion of processing cores occupied by the first reference instance, and then allocate the first portion of processing cores to the virtual machine instance.
[0008] Through the above method, when allocating processing cores to virtual machine instances, the resource allocation device can use the processing cores occupied by the first reference instance as a reference, which can effectively simplify the process of allocating processing cores to virtual machine instances and improve resource allocation efficiency.
[0009] In one possible implementation, a container creation request includes a container instance specification. When allocating the second portion of processing cores in a NUMA node of a physical machine to the container instance based on the container creation request, the resource allocation device may first obtain a first resource view. The first resource view may indicate idle resources of the physical machine and the second portion of processing cores occupied by a second reference instance, where the second reference instance is a predicted virtual machine instance or container instance to be created. Based on the first resource view, the resource allocation device may determine that the processing cores required by the container instance specification match the second portion of processing cores occupied by the second reference instance, and then allocate the second portion of processing cores to the container instance.
[0010] Through the above method, when allocating processing cores to container instances, the resource allocation device can use the processing cores occupied by the second reference instance as a reference, which can effectively simplify the process of allocating processing cores to container instances and improve resource allocation efficiency.
[0011] In one possible implementation, the scheduling and allocation device may receive a first simulation instance creation request, which is used to request allocation of resources for a first reference instance; thereafter, based on a second resource view, a first part of processing cores is allocated to the first reference instance, and the second resource view is used to indicate idle resources of the physical machine; the first part of the processing cores is marked as occupied by the first reference instance in the second resource view, and a first resource view is generated.
[0012] Through the above method, the scheduling and allocation device can pre-allocate a first part of processing cores to the first reference instance and generate a first resource view, so as to facilitate the subsequent allocation of resources to the virtual machine instance.
[0013] In one possible implementation, the scheduling and allocation device can also receive a second simulation instance creation request, which is used to request the allocation of resources for the second reference instance; then, based on the second resource view, the second part of processing cores is allocated to the second reference instance, and the second resource view is used to indicate the idle resources of the physical machine; the second part of the processing cores is marked as occupied by the second reference instance in the second resource view, and the first resource view is generated.
[0014] Through the above method, the scheduling and allocation device can pre-allocate the second part of processing cores to the second reference instance and generate a first resource view, which facilitates the subsequent allocation of resources to the container instance.
[0015] In one possible implementation, after allocating a first portion of processing cores to a virtual machine instance, the resource scheduling device may send a first notification message to the physical machine, where the first notification message is used to notify the physical machine to create a virtual machine instance; after allocating a second portion of processing cores to a container instance, the resource scheduling device may send a second notification message to the physical machine, where the second notification message is used to notify the physical machine to create a container instance.
[0016] Through the above method, after allocating resources to virtual machine instances and container instances, the resource scheduling device can send notification information to the physical machine so that the virtual machine instances and container instances can be deployed on the NUMA node on the physical machine.
[0017] In the second aspect, an embodiment of the present application provides a physical machine, which includes a NUMA node, and containers and virtual machine instances are deployed on the physical machine. The first part of the processing cores in the NUMA node of the physical machine is allocated to the virtual machine instance, and the second part of the processing cores in the NUMA node is allocated to the container instance. The second part of the processing cores is different from the first part of the processing cores. The second part of the processing cores can be the remaining processing cores of the NUMA node except the first part of the processing cores, or it can be part of the processing cores of the remaining processing cores. The processor cores required for the virtual machine instance specification match the first part of the processing cores, and the virtual machine instance is a NUMA-aware instance. The processor cores required for the virtual machine instance specification match the second part of the processing cores, and the container instance is a NUMA-unaware instance.
[0018] Through the above physical machine, virtual machines and containers can be co-deployed in the physical machine, which can fully utilize the resources of the NUMA nodes in the physical machine.
[0019] In a third aspect, an embodiment of the present application provides a method for allocating processing cores of an instance, which is executed by a resource allocation device, wherein: the resource allocation device can allocate part of the processing cores in the NUMA node of the physical machine to at least one virtual machine instance, wherein the processor cores required for at least one virtual machine instance specification match the part of the processing cores, and the virtual machine instance is a NUMA-aware instance; and allocate the remaining processing cores in the NUMA node except for the part of the processing cores to at least one container instance, wherein the processor cores required for at least one container instance specification match the remaining processing cores except for the part of the processing cores, and the container instance is a NUMA-unaware instance.
[0020] Through the above method, all processing cores of the NUMA node of the physical machine can be occupied, effectively improving resource utilization.
[0021] In the fourth aspect, an embodiment of the present application further provides a resource allocation device, which has the function of implementing the behavior in the method example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the structure of the device includes a receiving module, an allocation module, and may also include a sending module. These units can perform the corresponding functions in the method example of the first aspect above. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0022] In a fifth aspect, an embodiment of the present application further provides a device having the function of implementing the behavior in the method example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The structure of the communication device includes a processor and a memory, and the processor is configured to support the base station in performing the corresponding functions in the method of the first aspect above. The memory is coupled to the processor and stores the necessary program instructions and data for the communication device. The structure of the communication device also includes a communication interface for communicating with other devices.
[0023] In a sixth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the methods described in the above aspects.
[0024] In a seventh aspect, the present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods described in the above aspects.
[0025] In an eighth aspect, the present application further provides a computer chip, which is connected to a memory, and is used to read and execute a software program stored in the memory to execute the methods described in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1A A schematic diagram of the structure of a physical machine provided in this application;
[0027] Figure 1B A schematic diagram of the system architecture provided for this application;
[0028] Figure 2 A schematic diagram of a processing core allocation method according to an example provided in this application;
[0029] Figure 3 A schematic diagram of the structure of a resource allocation device provided in this application;
[0030] Figure 4 A schematic diagram of the structure of a device provided in this application. DETAILED DESCRIPTION
[0031] After describing a method and apparatus for allocating processing cores according to an example provided in an embodiment of the present application, the concepts involved in the embodiment of the present application will be described first:
[0032] (1) Non-uniform memory access architecture (NUMA), NUMA node.
[0033] NUMA is a multi-processor computer architecture in which each processor has a different latency when accessing memory at different locations.
[0034] A physical machine (PM) with a NUMA architecture can be divided into one or more NUMA nodes. A NUMA node includes some or all of the machine's resources, including but not limited to processing cores, memory, and network bandwidth. The resources included in a NUMA node are referred to as the NUMA node's structure. A processor in a physical machine can include one or more processing cores.
[0035] (2) Instances and instance specifications.
[0036] In the embodiments of the present application, the types of instances include, but are not limited to, virtual machines (VMs) and containers. That is, the instances in the present application can be virtual machine instances or container instances.
[0037] A virtual machine instance is NUMA-aware and is a NUMA-aware instance. NUMA awareness of a virtual machine instance means that during scheduling, the virtual machine instance will clearly identify the structure of the NUMA nodes that the virtual machine instance can occupy. When allocating resources to the virtual machine instance, it is necessary to allocate a NUMA node that conforms to this structure and the resources occupied by the NUMA node.
[0038] Container instances are NUMA-aware and can be deployed on NUMA nodes of any structure.
[0039] The instance specification may indicate the resources required by the instance (which may also be understood as the resources required to be occupied by the instance). The resources required by the instance are related to the type of the instance.
[0040] For virtual machine instances, since virtual machine instances have NUMA awareness, the virtual machine specifications include the required NUMA node structure and the number of processing cores, memory, disk, network bandwidth and other resources required by the virtual machine instance.
[0041] For container instances, since container instances are NUMA-agnostic, container specifications include the number of processing cores, memory, disk, network bandwidth, and other resources required by the container.
[0042] See also Figure 1A , is a schematic diagram of a physical machine structure provided in an embodiment of the present application. The physical machine 100 includes one or more NUMA nodes 110. The NUMA node 110 occupies some or all of the resources of the physical machine, such as processing cores and memory. One or more virtual machine instances can be deployed on each NUMA node 110, and one or more container instances can also be deployed. Virtual machine instances and container instances can be co-deployed, that is, virtual machine instances and container instances can be deployed on the same physical machine, or even on the same NUMA node.
[0043] In an embodiment of the present application, taking the four NUMA nodes 110 in the physical machine 100 as an example, several possible deployment methods of virtual machine instances and container instances on the physical machine 100 are explained. To facilitate the distinction between the four NUMA nodes 110, they are represented by NUMA node 1101, NUMA node 1102, NUMA node 1103, and NUMA node 1104 respectively.
[0044] For NUMA node 1101, only container instances are deployed on NUMA node 1101. There is no limit on the number of container instances deployed on NUMA node 1101. The container instance can occupy some or all resources on the NUMA node 1101. For example, it can occupy some or all processing cores, memory, etc. on the NUMA node 1101. Figure 1A In FIG, black boxes are used to represent processing cores on NUMA node 1101.
[0045] Regarding NUMA node 1102, only virtual machine instances are deployed on NUMA node 1102. There is no limit on the number of virtual machine instances deployed on NUMA node 1102. The virtual machine instances may occupy some or all of the resources on NUMA node 1102, such as some or all of the processing cores and memory on NUMA node 1102.
[0046] Regarding NUMA node 1103, virtual machine instances and container instances are deployed on NUMA node 1103. The number of virtual machine instances and container instances deployed on NUMA node 1103 is not limited. The virtual machine instances and container instances occupy some resources on NUMA node 1103. For example, the virtual machine instances occupy some processing cores on NUMA node 1103, and the container instances occupy another part of the processing cores on NUMA node 1103. The total number of processing cores on NUMA node 1103 occupied by the virtual machine instances and container instances is less than the total number of processing cores on NUMA node 1103.
[0047] Regarding NUMA node 1104, virtual machine instances and container instances are deployed on NUMA node 1104. There is no limit on the number of virtual machine instances and container instances deployed on NUMA node 1104. The virtual machine instances and container instances occupy all resources on NUMA node 1104. For example, if the virtual machine instances occupy a portion of the processing cores on NUMA node 1104 and the container instances occupy the remaining processing cores on NUMA node 1104, the total number of processing cores on NUMA node 1104 occupied by the virtual machine instances and container instances is equal to the total number of processing cores on NUMA node 1104.
[0048] See also Figure 1B , is a schematic diagram of a system architecture applicable to an embodiment of the present application, the system including a resource allocation device 200 and one or more physical machines 100, and optionally, a prediction device 300, wherein a physical machine 100 includes one or more NUMA nodes 110. A NUMA node 110 includes some or all resources on the physical machine 100.
[0049] The resource allocation device 200 is used to schedule instances of one or more physical machines 100 to implement the method for allocating processing cores for instances provided in the embodiments of the present application. In the embodiments of the present application, the resource allocation device 200 can allocate resources (such as processing cores, memory, etc.) to predicted instances that need to be created (such as the first reference instance and the second reference instance), for example, determining the NUMA node 110 to be occupied and the resources occupied in the NUMA node 110. The resource allocation device 200 can also allocate resources to the virtual machine instance or container instance to be created when a virtual machine instance or container instance needs to be created, such as when a virtual machine creation request or a container creation request is received, for example, determining the NUMA node 110 to be occupied and the resources in the NUMA node 110 to be occupied.
[0050] When allocating resources for a virtual machine instance or container instance to be created, the resource allocation device 200 may use the resources allocated to the predicted reference instance to be created as a reference to determine the resources required to be occupied by the virtual machine instance or container instance to be created.
[0051] In an embodiment of the present application, the resource allocation device 200 can also maintain two different resource views, which are respectively referred to as the first resource view and the second resource view for the convenience of explanation, wherein the first resource view and the second resource view can both indicate the idle resources and occupied resources on one or more physical machines 100. The difference is that the first resource view can indicate the resources occupied by the predicted reference instances that need to be created. And these resources are marked as occupied by the predicted reference instances that need to be created. In other words, the first resource view is a resource view generated by taking into account the resources occupied by the predicted reference instances that need to be created. The second resource view indicates one or more physically idle resources and occupied resources, without taking into account the resources occupied by the predicted reference instances that need to be created. In other words, the second resource view is a real resource view that can truly reflect the distribution of one or more physically idle resources and occupied resources.
[0052] After allocating resources to the predicted reference instance to be created, the resource allocation device 200 can timely update the first resource view. After allocating resources to the instance to be created, the resource allocation device 200 can simultaneously update the first resource view and the second resource view.
[0053] It should be noted that the present application does not limit the manner in which the resource allocation device 200 receives a virtual machine creation request or a container creation request. For example, the virtual machine creation request or the container creation request may be sent to the resource allocation device 200 by other devices. For example, the other device may be a client. The client generates a virtual machine creation request or a container creation request under the triggering of the user (the user determines the number of virtual machines or containers to be created, as well as the specifications of the virtual machines or containers in the creation interface), and sends the virtual machine creation request or the container creation request to the resource allocation device 200. For another example, the virtual machine creation request or the container creation request may be generated by the resource allocation device 200 itself under the triggering of the user. The above two methods are merely examples. Any method that enables the resource allocation device 200 to receive a virtual machine creation request or a container creation request is applicable to the embodiments of the present application.
[0054] The prediction device 300 can predict the instance that needs to be created and send a simulation instance creation request (such as a first simulation instance creation request or a first simulation instance creation request) to the resource allocation device 200 to request allocation of resources for the predicted reference instance that needs to be created.
[0055] The embodiment of the present application does not limit the way in which the prediction device 300 predicts the need to create a reference instance. For example, the prediction device 300 can perform data analysis on the simulation instance creation request received by the resource allocation device 200, and then predict the reference instance that needs to be created within a period of time in the future.
[0056] The following combination Figure 2 , the processing core allocation method of the example provided in the embodiment of the present application is described, Figure 2 In the method shown, steps 201 to 202 are ways in which the resource allocation device 200 allocates resources to a virtual machine instance to be created, and steps 203 to 204 are ways in which the resource allocation device 200 allocates resources to a container instance to be created.
[0057] Step 201: The resource allocation apparatus 200 receives a virtual machine creation request, where the virtual machine creation request is used to request allocation of resources for a virtual machine instance. The virtual machine creation request may include virtual machine instance specifications.
[0058] Step 202: The resource allocation device 200 allocates the first portion of processing cores in the NUMA node 110 to the virtual machine instance according to the virtual machine creation request. The processing cores required by the virtual machine instance specification match the first portion of processing cores.
[0059] Step 203: The resource allocation apparatus 200 receives a container creation request, where the container creation request is used to request allocation of resources for a container instance. The container creation request includes container instance specifications.
[0060] Step 204: The resource allocation device 200 allocates the second portion of processing cores in the NUMA node 110 to the container instance according to the container creation request. The processing cores required by the container instance specification match the second portion of processing cores.
[0061] The first portion of processing cores is different from the second portion of processing cores. The second portion of processing cores may be the remaining processing cores of the NUMA node 110 except the first portion of processing cores, or may be some of the remaining processing cores.
[0062] (1) Allocate resources to virtual machine instances.
[0063] After receiving a virtual machine creation request, the resource allocation device 200 can allocate resources (such as processing cores and memory) to the virtual machine. The embodiment of the present application does not limit the way in which the resource allocation device 200 allocates resources to the virtual machine instance. For example, the resource allocation device 200 can allocate resources to the virtual machine instance based on the idle resources on the current physical machine 100 (that is, the second resource view) and according to the virtual machine specifications, or other methods can be used.
[0064] An embodiment of the present application provides a method for allocating resources to a virtual machine instance. In the embodiment of the present application, the resource allocation device 200 can first allocate occupied resources to a predicted first reference instance that needs to be created. Thereafter, when a virtual machine creation request is received and it is determined that resources need to be allocated to the virtual machine instance, the resources occupied by the first reference instance can be used as a reference to determine whether the resources occupied by the first reference instance can be allocated to the virtual machine instance; if so, the resources occupied by the first reference instance are allocated to the virtual machine instance; otherwise, resources can be allocated to the virtual machine instance based on the idle resources on the current physical machine 100 (i.e., the second resource view) according to the virtual machine specifications.
[0065] 1) Allocate resources for the predicted first reference instance that needs to be created.
[0066] After predicting the first reference instance that needs to be created, the prediction device 300 may generate a first simulation instance creation request and send the first simulation instance creation request to the resource allocation device 200 .
[0067] The first simulation instance creation request includes a first reference instance specification. If the first reference instance is a virtual machine, the first reference instance specification needs to indicate the structure of the NUMA node 110 that the first reference instance needs to occupy, as well as the number of resources required by the first reference instance. If the first reference instance is a container, the first reference instance specification needs to indicate the number of resources required by the first reference instance.
[0068] Since the first reference instance is not an instance that actually needs to be created, that is, the first simulation instance creation request is a simulation instance creation request, the first simulation instance creation request can also indicate that the first reference instance is an instance that needs to be created for prediction or indicate that the first simulation instance creation request is a simulation instance creation request. The embodiment of the present application does not limit the way in which the first simulation instance creation request indicates that the first reference instance is an instance that needs to be created for prediction or indicates that the first simulation instance creation request is a simulation instance creation request. For example, the first simulation instance creation request can carry indication information, and the indication information is used to indicate that the first reference instance is an instance that needs to be created for prediction, or indicates that there is no need to create the first reference instance. For another example, the first simulation instance creation request can carry a simulation request identifier, and the simulation request identifier is used to identify the first simulation instance creation request as a simulation instance creation request. Any method that can indicate that the first reference instance is an instance that needs to be created for prediction or indicate that the first simulation instance creation request is a simulation instance creation request is applicable to the embodiment of the present application.
[0069] After receiving the first simulation instance creation request, the resource allocation apparatus 200 may allocate resources to the first reference instance according to the first simulation instance creation request.
[0070] When the resource allocation device 200 allocates resources to the first reference instance, it can first obtain the second resource view, determine the idle resources on the current one or more physical machines 100 based on the second resource view, allocate resources to the first reference instance, and determine the NUMA node 110 that the first reference instance needs to occupy and the resources of the NUMA node 110 occupied by the first reference instance. For example, the resources of the NUMA node 110 occupied by the first reference instance include but are not limited to: the first part of the processing cores of the NUMA node 110 occupied by the first reference instance, the memory of the NUMA node 110 occupied by the first reference instance, etc.
[0071] If the first reference instance is a virtual machine, the resource allocation apparatus 200 needs to determine a NUMA node 110 that meets the specifications of the first reference instance from the idle resources on one or more physical machines 100, and may also determine the resources occupied by the first reference instance on the NUMA node 110. Because virtual machine instances can be deployed across NUMA nodes 110, that is, a virtual machine instance can be distributed across multiple NUMA nodes 110, the embodiment of the present application does not limit the number of NUMA nodes 110 determined by the resource allocation apparatus 200. The number of NUMA nodes 110 determined by the resource allocation apparatus 200 that can deploy the first reference instance can be one or more.
[0072] It should be noted that, in the embodiment of the present application, the resources occupied by the first reference instance in the NUMA node 110 refer to the number of idle resources required to be occupied by the first reference instance in the NUMA node 110 (such as the number of the first part of the processing cores of the NUMA node 110 occupied by the first reference instance or the size of the memory of the NUMA node 110 occupied by the first reference instance).
[0073] If the type of the first reference instance is a container, the resource allocation device 200 needs to determine the NUMA node 110 on which the first reference instance can be deployed from the idle resources on one or more physical machines 100, and can also determine the resources of the NUMA node 110 occupied by the first reference instance. For a description of the resources of the NUMA node 110 occupied by the first reference instance, please refer to the above content and will not be repeated here. Since container instances can be deployed across NUMA nodes 110, that is, a container instance can be deployed in a distributed manner on multiple NUMA nodes 110, the number of NUMA nodes 110 on which the first reference instance can be deployed determined by the resource allocation device 200 can be one or more.
[0074] After determining the NUMA node 110 occupied by the first reference instance and the resources of the NUMA node 110 occupied by the first reference instance, the resource allocation device 200 can mark the resources occupied by the first reference instance in the second resource view, that is, mark the NUMA node 110 occupied by the first reference instance and the resources occupied by the first reference instance in the NUMA node 110 (such as the first part of the processing core or memory). The second resource view marked with the resources occupied by the first reference instance is the first resource view.
[0075] Since the first reference instance is a predicted instance that needs to be created, the resource allocation device 200 does not need to instruct to create the first reference instance. In other words, the resources occupied by the first reference instance are still idle resources.
[0076] So far, the resource allocation apparatus 200 has allocated resources to the first reference instance.
[0077] 2) Allocate resources to the virtual machine instance based on the resources occupied by the first reference instance.
[0078] After allocating resources to the first reference instance, resource allocation apparatus 200, upon receiving a virtual machine creation request, may allocate resources to the virtual machine instance based on the virtual machine creation request, which includes the virtual machine instance specifications. When allocating resources to the virtual machine instance, resource allocation apparatus 200 may first obtain a first resource view and, based on the first resource view, determine whether the resources occupied by the first reference instance match the virtual machine instance specifications.
[0079] The resource allocation device 200 can determine the structure of the NUMA node 110 occupied by the first reference instance and the resources of the NUMA node 110 occupied by the first reference instance based on the first resource view. If the structure of the NUMA node 110 required by the virtual machine instance specification is consistent with the structure of the NUMA node 110 occupied by the first reference instance, the resources required by the virtual machine instance specification match the resources occupied by the first reference instance, such as the processing cores required by the virtual machine instance specification match the first part of the processing cores of the NUMA node 110 occupied by the first reference instance (that is, the number of processing cores required by the virtual machine instance specification is the same as the number of the first part of the processing cores of the NUMA node 110 occupied by the first reference instance), and the memory required by the virtual machine instance specification matches the memory of the NUMA node 110 occupied by the first reference instance (that is, the size of the memory required by the virtual machine instance specification is the same as the memory size of the NUMA node 110 occupied by the first reference instance). This indicates that the resource allocation device 200 has determined that the resources occupied by the first reference instance can be used to create a virtual machine instance.
[0080] It should be noted that if the first reference instance occupies one NUMA node 110, matching the resources required by the virtual machine instance specification with the resources of the NUMA node 110 occupied by the first reference instance means that, for any type of resource, the quantity of resources required by the virtual machine instance specification is the same as the quantity of resources of the NUMA node 110 occupied by the second reference instance. If the first reference instance occupies multiple NUMA nodes 110, matching the resources required by the virtual machine instance specification with the resources of the NUMA node 110 occupied by the first reference instance means that, for any type of resource, the quantity of resources required by the virtual machine instance specification is the same as the total quantity of such resources across the multiple NUMA nodes 110 occupied by the second reference instance.
[0081] The resource allocation device 200 can allocate the resources occupied by the first reference instance to the virtual machine instance, such as allocating the first part of the processing cores of the NUMA node 110 to the virtual machine instance, and allocating the memory of the NUMA node 110 occupied by the first reference instance to the virtual machine instance, indicating that the virtual machine instance is created using the resources occupied by the first reference instance.
[0082] The manner in which the resource allocation device 200 instructs the creation of a virtual machine instance using the resources occupied by the first reference instance is not limited here. For example, the resource allocation device 200 can send a first notification message to the physical machine 100 where the NUMA node 110 is located, informing the physical machine 100 to create a virtual machine instance. The first notification message indicates the NUMA node 110 that the virtual machine instance needs to occupy and the resources occupied on the NUMA node 110, such as the virtual machine instance occupying the first part of the processing cores on the NUMA node 110, or the virtual machine instance occupying the memory on the NUMA node 110. The physical machine 100 (or the virtual machine creation module deployed on the physical machine 100) completes the virtual machine instance creation operation.
[0083] After receiving the first notification information, the physical machine 100 can create a virtual machine instance according to the first notification information, allocate the first part of the processing cores on the NUMA node 110 to the virtual machine instance, and use the first part of the processing cores on the NUMA node 110 to create the virtual machine instance.
[0084] After the resource allocation device 200 determines that the resources occupied by the first reference instance can be used to create a virtual machine instance, it can also update the first resource view and the second resource view. For the first resource view, the resources occupied by the first reference instance (such as the NUMA node 110 occupied by the first reference instance and the first part of the processing cores and / or memory of the occupied NUMA node 110) are marked as resources occupied by the virtual machine instance. For the second resource view, the resources occupied by the virtual machine instance are marked as occupied.
[0085] If the structure of the NUMA node 110 required by the virtual machine instance specification is inconsistent with the structure of the NUMA node 110 occupied by the first reference instance, or the resources of the NUMA node 110 required by the virtual machine instance specification do not match the resources of the NUMA node 110 occupied by the first reference instance, such as the processing cores required by the virtual machine instance specification do not match the first part of the processing cores of the NUMA node 110 occupied by the first reference instance (that is, the number of processing cores required by the virtual machine instance specification is different from the number of the first part of the processing cores of the NUMA node 110 occupied by the first reference instance), or the memory required by the virtual machine instance specification does not match the memory of the NUMA node 110 occupied by the first reference instance (that is, the size of the memory required by the virtual machine instance specification is different from the memory size of the NUMA node 110 occupied by the first reference instance), it means that the resources occupied by the first reference instance cannot be allocated to the virtual machine instance, and the resources occupied by the first reference instance cannot be used to create a virtual machine instance.
[0086] In order to allocate resources to the virtual machine instance, the resource allocation device 200 can obtain a second resource view and allocate resources to the virtual machine instance according to the second resource view. The way in which the resource allocation device 200 allocates resources to the virtual machine instance according to the second resource view is similar to the way in which the resource allocation device 200 allocates resources to the first reference instance according to the second resource view. For details, please refer to the above content and will not be repeated here.
[0087] After determining the NUMA node 110 that the virtual machine instance needs to occupy and the resources of the NUMA node 110 that the virtual machine instance needs to occupy, the resource allocation device 200 can instruct the creation of the virtual machine instance. The way in which the resource allocation device 200 instructs the creation of the virtual machine instance is similar to the way in which the resource allocation device 200 instructs the physical machine 100 to create a virtual machine instance in the aforementioned content. For details, please refer to the aforementioned content and will not be repeated here.
[0088] After allocating resources to the virtual machine instance, the resource allocation apparatus 200 may also update the first resource view and the second resource view to mark the resources occupied by the virtual machine instance as occupied.
[0089] (2) Allocate resources to container instances.
[0090] After allocating resources to a virtual machine instance, if the resource allocation device 200 receives a container creation request, the resource allocation device 200 may allocate resources to the container instance according to the container creation request. The embodiment of the present application does not limit the manner in which the resource allocation device 200 allocates resources to the container instance.
[0091] Taking the example of a virtual machine instance occupying the first portion of processing cores in the NUMA node 110 of the physical machine 100, the resource allocation apparatus 200, upon determining that the second portion of processing cores in the NUMA node 110 of the physical machine 100 are idle resources and that the second portion of processing cores matches the processing cores required by the container instance specification, can directly allocate the second portion of processing cores in the NUMA node 110 of the physical machine 100 to the container instance. The resource allocation apparatus 200 can also allocate resources to the container instance in a manner similar to that used to allocate resources to the virtual machine instance.
[0092] 1. Allocate resources for the predicted second reference instance that needs to be created.
[0093] After predicting the second reference instance that needs to be created, the prediction device 300 may generate a second simulation instance creation request and send the second simulation instance creation request to the resource allocation device 200 .
[0094] The second simulation instance creation request includes a second reference instance specification. The second reference instance is a virtual machine. The second reference instance specification needs to indicate the structure of the NUMA node 110 that the second reference instance needs to occupy, as well as the number of resources that the second reference instance needs to occupy. The second reference instance is a container. The second reference instance specification needs to indicate the number of resources that the second reference instance needs to occupy.
[0095] Since the second reference instance is not an instance that actually needs to be created, that is, the second simulation instance creation request is a simulation instance creation request, the second simulation instance creation request can also indicate that the second reference instance is an instance that needs to be created for prediction or indicate that the second simulation instance creation request is a simulation instance creation request. The way in which the second simulation instance creation request indicates that the second reference instance is an instance that needs to be created for prediction or indicates that the second simulation instance creation request is a simulation instance creation request is similar to the way in which the first simulation instance creation request indicates that the first reference instance is an instance that needs to be created for prediction or indicates that the first simulation instance creation request is a simulation instance creation request. Please refer to the above description for details.
[0096] After receiving the second simulation instance creation request, the resource allocation apparatus 200 may allocate resources to the second reference instance according to the second simulation instance creation request.
[0097] The resource allocation apparatus 200 allocates resources to the second reference instance in a manner similar to that for the first reference instance. For details, please refer to the aforementioned content and will not be repeated here. In the embodiment of the present application, the occupied resources allocated by the resource allocation apparatus 200 to the second reference instance include the second portion of the processing cores and memory of the NUMA node 110 in the physical machine 100.
[0098] When the resource allocation device 200 determines the NUMA node 110 occupied by the second reference instance and the resources of the NUMA node 110 occupied by the second reference instance (such as the second part of the processing core), the resource allocation device 200 can mark the resources occupied by the second reference instance in the second resource view, that is, mark the NUMA node 110 occupied by the second reference instance and the resources occupied by the second reference instance in the NUMA node 110, and generate the first resource view with the resources occupied by the second reference instance marked.
[0099] Since the second reference instance is a predicted instance that needs to be created, the resource allocation device 200 does not need to instruct to create the second reference instance. In other words, the resources occupied by the second reference instance are still idle resources.
[0100] So far, the resource allocation apparatus 200 has allocated occupied resources to the second reference instance.
[0101] 2. Allocate resources to the container instance based on the resources occupied by the second reference instance.
[0102] When allocating resources to a container instance, the resource allocation apparatus 200 may first obtain a first resource view and determine, based on the first resource view, whether the resources occupied by the second reference instance match the resources required by the container instance specification.
[0103] The resource allocation device 200 can determine the NUMA node 110 occupied by the second reference instance and the resources of the NUMA node 110 occupied by the second reference instance based on the first resource view. If the resources required by the container instance specification match the resources of the NUMA node 110 occupied by the second reference instance, such as the processing cores required by the container instance specification match the second part of the processing cores of the NUMA node 110 occupied by the second reference instance (that is, the number of processing cores required by the container instance specification is the same as the number of the second part of the processing cores of the NUMA node 110 occupied by the second reference instance), and the memory required by the container instance specification matches the memory of the NUMA node 110 occupied by the second reference instance (that is, the size of the memory required by the container instance specification is the same as the memory size of the NUMA node 110 occupied by the second reference instance), it means that the resources occupied by the second reference instance can be used to create a virtual machine instance.
[0104] The resource allocation device 200 may allocate the resources occupied by the second reference instance to the container instance, allocate the second part of the processing cores and memory of the NUMA node 110 to the container instance, and instruct to create the container instance using the resources occupied by the second reference instance.
[0105] It should be noted that if the second reference instance occupies one NUMA node 110, matching the resources required by the container instance specification with the resources of the NUMA node 110 occupied by the second reference instance means that, for any resource type, the quantity of resources required by the container instance specification matches the quantity of resources of the NUMA node 110 occupied by the second reference instance. If the second reference instance occupies multiple NUMA nodes 110, matching the resources required by the container instance specification with the resources of the NUMA node 110 occupied by the second reference instance means that, for any resource type, the quantity of resources required by the container instance specification matches the total quantity of such resources across the multiple NUMA nodes 110 occupied by the second reference instance.
[0106] The resource allocation apparatus 200 may instruct to create a container instance using the resources occupied by the second reference instance.
[0107] The manner in which the resource allocation device 200 instructs the creation of a container instance using the resources occupied by the second reference instance is not limited here. For example, the resource allocation device 200 can send a second notification message to the physical machine 100 where the NUMA node 110 is located, informing the physical machine 100 to create a container instance. The second notification message indicates the NUMA node 110 occupied by the container instance and the resources on the NUMA node 110 occupied by the container instance, such as the second part of the processing cores and memory on the NUMA node 110. The physical machine 100 (or the container creation module deployed on the physical machine 100) completes the container instance creation operation.
[0108] After receiving the second notification information, the physical machine 100 can create a virtual machine instance according to the second notification information, allocate the second part of the processing cores on the NUMA node 110 to the container instance, and use the second part of the processing cores on the NUMA node 110 to create the container instance.
[0109] After the resource allocation device 200 determines that the resources occupied by the second reference instance can be used to create a container instance, it can also update the first resource view and the second resource view. The way in which the resource allocation device 200 updates the first resource view and the second resource view can be found in the above description and will not be repeated here.
[0110] If the resources required by the container instance specification do not match the resources of the NUMA node 110 occupied by the second reference instance, such as the processing cores required by the container instance specification do not match the second portion of the processing cores of the NUMA node 110 occupied by the second reference instance (i.e., the number of processing cores required by the container instance specification is different from the number of the second portion of the processing cores of the NUMA node 110 occupied by the second reference instance), or the memory required by the container instance specification does not match the memory of the NUMA node 110 occupied by the second reference instance (i.e., the size of the memory required by the container instance specification is different from the size of the memory of the NUMA node 110 occupied by the second reference instance), the resource allocation device 200 can obtain the second resource view and allocate resources to the container instance according to the second resource view. The manner in which the resource allocation device 200 allocates resources to the container instance according to the second resource view is similar to the manner in which the resource allocation device 200 allocates resources to the virtual machine instance according to the second resource view. For details, please refer to the aforementioned content and will not be repeated here.
[0111] After determining the NUMA node 110 occupied by the container instance and the resources of the NUMA node 110 occupied by the container instance, the resource allocation device 200 can instruct the creation of the container instance. The way in which the resource allocation device 200 instructs the physical machine 100 to create a container instance is similar to the way in which the resource allocation device 200 instructs the physical machine 100 to create a container instance in the aforementioned content. For details, please refer to the aforementioned content and will not be repeated here.
[0112] After allocating resources to the container instance, the resource allocation apparatus 200 may also update the first resource view and the second resource view to mark the resources occupied by the container instance as occupied.
[0113] Based on the same inventive concept as the method embodiment, the embodiment of the present application also provides a resource allocation device for performing the above-mentioned Figure 2 The method implemented by the resource allocation device in the method embodiment shown in the figure, the relevant features can be found in the above method embodiment, which will not be described in detail here. Figure 3 As shown, the resource allocation device 300 includes a receiving module 301 and an allocation module 302 .
[0114] The receiving module 301 is configured to receive a virtual machine creation request.
[0115] The allocation module 302 is used to allocate the first part of the processing cores in the NUMA node of the physical machine to the virtual machine instance according to the virtual machine creation request. The processing cores required by the virtual machine instance specification match the first part of the processing cores. The virtual machine instance is a NUMA-aware instance.
[0116] The receiving module 301 is further configured to receive a container creation request.
[0117] An allocation module 302 is configured to allocate the second portion of processing cores in a NUMA node to a container instance based on a container creation request, wherein the first portion of processing cores is different from the second portion of processing cores. The second portion of processing cores may be the remaining processing cores of the NUMA node excluding the first portion of processing cores, or may be a portion of the remaining processing cores. The processing cores required by the container instance specification match the second portion of processing cores, and the container instance is a NUMA-unaware instance.
[0118] In one possible implementation, a virtual machine creation request includes a virtual machine instance specification. When the allocation module 302 allocates the first part of the processing cores in the NUMA node of the physical machine to the virtual machine instance according to the virtual machine creation request, it can determine, based on the first resource view, that the processing cores required for the virtual machine instance specification match the first part of the processing cores occupied by the first reference instance. The first reference instance is a predicted virtual machine instance or container instance that needs to be created. The first resource view is used to indicate the idle resources of the physical machine and the first part of the processing cores occupied by the first reference instance; thereafter, the first part of the processing cores is allocated to the virtual machine instance.
[0119] In one possible implementation, the container creation request includes a container instance specification. When the allocation module 302 allocates the second part of the processing cores in the NUMA node of the physical machine to the container instance according to the container creation request, it can determine, based on the first resource view, that the processing cores required for the container instance specification match the second part of the processing cores occupied by the second reference instance. The second reference instance is a predicted container instance or container instance that needs to be created. The first resource view is used to indicate the idle resources of the physical machine and the second part of the processing cores occupied by the second reference instance; thereafter, the second part of the processing cores is allocated to the container instance.
[0120] In one possible implementation, the receiving module 301 may receive a first simulation instance creation request, which is used to request allocation of resources for a first reference instance; thereafter, the allocation module 302 may allocate a first part of processing cores to the first reference instance based on a second resource view, which is used to indicate idle resources of a physical machine; and mark in the second resource view that the first reference instance occupies the first part of processing cores to generate a first resource view.
[0121] In one possible implementation, the receiving module 301 may receive a second simulation instance creation request, where the second simulation instance creation request is used to request allocation of resources for the second reference instance; thereafter, the allocation module 302 may allocate a second portion of processing cores to the second reference instance based on a second resource view, where the second resource view is used to indicate idle resources of the physical machine; and the second reference instance is marked in the second resource view as occupying the second portion of processing cores to generate a first resource view.
[0122] In one possible implementation, the device also includes a sending module 303, which can send a first notification message to the physical machine, where the first notification message is used to notify the physical machine to create a virtual machine instance; the sending module 303 can also send a second notification message to the physical machine, where the second notification message is used to notify the physical machine to create a container instance.
[0123] In a simple embodiment, those skilled in the art can think of the following Figure 2 In the embodiment shown, the resource allocation device adopts Figure 4 The form shown.
[0124] like Figure 4 The device 400 shown includes at least one processor 401 , a memory 402 , and optionally, a communication interface 403 .
[0125] The memory 402 may be a volatile memory, such as a random access memory; the memory may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 402 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 402 may be a combination of the above memories.
[0126] Memory 402 may be a volatile memory, such as a random access memory; the memory may also be a non-volatile memory, such as a read-only memory, flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 402 may be a combination of the above memories.
[0127] The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application.
[0128] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, artificial intelligence chips, on-chip chips, etc. A general-purpose processor may be a microprocessor or any conventional processor. It has data transmission and reception functions and can communicate with other devices, such as Figure 3 An independent data transceiver module, such as a communication interface 403, may also be provided in the device for sending and receiving data; when the processor 301 communicates with other devices, it may transmit data through the communication interface 403, such as receiving a virtual machine creation request, a container creation request, a first simulation instance creation request, a second simulation instance creation request, and sending a first notification message and a second notification message.
[0129] When the resource allocation device adopts Figure 4 When the form shown is Figure 4The processor 401 in the system can call the computer-executable instructions stored in the memory 402, so that the resource allocation device can execute the method executed by the detection device in any of the above method embodiments.
[0130] Specifically, Figure 3 The functions / implementation processes of the receiving module, distribution module, and sending module can be achieved through Figure 4 The processor 401 in the embodiment calls the computer execution instruction stored in the memory 402 to implement. Or, Figure 3 The function / implementation process of the allocated module can be achieved through Figure 4 The processor 401 in the embodiment calls the computer execution instruction stored in the memory 402 to implement the above. Figure 3 The functions / implementation process of the receiving module and sending module can be achieved through Figure 4 This is achieved by the communication interface 403 in .
[0131] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can 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 can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0132] 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 present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0133] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0134] 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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0135] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. A processing core allocation method of an example, characterized in that: include: receiving a virtual machine creation request, determining, based on a first resource view, that processing cores required for a virtual machine instance specification match a first portion of processing cores in a non-matching storage access architecture (NUMA) node of a physical machine occupied by a first reference instance, the first reference instance being a predicted virtual machine instance or container instance to be created, the first resource view being used to indicate idle resources of the physical machine and the first portion of processing cores occupied by the first reference instance; and allocating the first portion of processing cores to the virtual machine instance. wherein the processing cores required by the virtual machine instance specification match the first part of processing cores, and the virtual machine instance is a NUMA-aware instance; A container creation request is received, and a second portion of processing cores in the NUMA node is allocated to a container instance according to the container creation request, wherein the first portion of processing cores is different from the second portion of processing cores, the processing cores required by the container instance specification match the second portion of processing cores, and the container instance is a NUMA-unaware instance.
2. The method according to claim 1, wherein The container creation request includes the container instance specification, and allocating the second portion of processing cores in the NUMA node of the physical machine to the container instance according to the container creation request includes: Determining, based on the first resource view, that processing cores required for the container instance specification match the second portion of processing cores occupied by a second reference instance, where the second reference instance is a predicted virtual machine instance or container instance that needs to be created, and the first resource view is used to indicate idle resources of the physical machine and the second portion of processing cores occupied by the second reference instance; Allocate the second portion of processing cores to the container instance.
3. The method according to claim 1, wherein The method further comprises: receiving a first simulation instance creation request, wherein the first simulation instance creation request is used to request allocation of resources for a first reference instance; allocating the first portion of processing cores to the first reference instance based on a second resource view, where the second resource view is used to indicate idle resources of the physical machine; The first reference instance is marked in the second resource view as occupying the first part of the processing cores, thereby generating the first resource view.
4. The method according to claim 1 or 2, wherein: The method further comprises: receiving a second simulation instance creation request, wherein the second simulation instance creation request is used to request allocation of resources for a second reference instance; allocating the second portion of processing cores to the second reference instance based on a second resource view, where the second resource view is used to indicate idle resources of the physical machine; The second reference instance is marked in the second resource view as occupying the second part of the processing cores, and the first resource view is generated.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Sending a first notification message to the physical machine, where the first notification message is used to notify the physical machine to create the virtual machine instance; Sending second notification information to the physical machine, where the second notification information is used to notify the physical machine to create the container instance.
6. A resource allocation device, characterized in that: include: A receiving module, configured to receive a virtual machine creation request; and receiving container creation requests; an allocation module configured to determine, based on a first resource view, a match between processing cores required for the virtual machine instance specification and a first portion of processing cores in a NUMA node of a physical machine occupied by a first reference instance, where the first reference instance is a predicted virtual machine instance or container instance to be created, the first resource view being used to indicate idle resources of the physical machine and the first portion of processing cores occupied by the first reference instance; and allocate the first portion of processing cores to the virtual machine instance; And according to the container creation request, the second part of the processing cores in the NUMA node is allocated to the container instance, wherein the first part of the processing cores is different from the second part of the processing cores, the processing cores required by the virtual machine instance specification match the first part of the processing cores, the processing cores required by the container instance specification match the second part of the processing cores, the virtual machine instance is a NUMA-aware instance, and the container instance is a NUMA-unaware instance.
7. The device according to claim 6, characterized in that The container creation request includes the container instance specification, and the allocation module is specifically configured to: Determining, based on the first resource view, that processing cores required for the container instance specification match the second portion of processing cores occupied by a second reference instance, where the second reference instance is a predicted virtual machine instance or container instance that needs to be created, and the first resource view is used to indicate idle resources of the physical machine and the second portion of processing cores occupied by the second reference instance; Allocate the second portion of processing cores to the container instance.
8. The device according to claim 6, wherein The receiving module is further configured to receive a first simulation instance creation request, where the first simulation instance creation request is used to request allocation of resources for a first reference instance; The allocation module is further configured to allocate the first portion of processing cores to the first reference instance based on a second resource view, where the second resource view is used to indicate idle resources of the physical machine; The first reference instance is marked in the second resource view as occupying the first part of the processing cores, thereby generating the first resource view.
9. The device according to claim 6 or 8, characterized in that The receiving module is further configured to receive a second simulation instance creation request, where the second simulation instance creation request is used to request allocation of resources for a second reference instance; The allocation module is further configured to allocate the second portion of processing cores to the second reference instance based on a second resource view, where the second resource view is used to indicate idle resources of the physical machine; The second reference instance is marked in the second resource view as occupying the second part of the processing cores, and the first resource view is generated.
10. The device according to any one of claims 6 to 9, characterized in that The device further includes a sending module, The sending module is configured to send a first notification message to the physical machine, where the first notification message is used to notify the physical machine to create the virtual machine instance; and to send a second notification message to the physical machine, where the second notification message is used to notify the physical machine to create the container instance.
11. A physical machine, characterized in that: The physical machine includes a NUMA node, and a container and a virtual machine instance are deployed on the physical machine. A first portion of processing cores in the NUMA node of the physical machine is allocated to the virtual machine instance, and a second portion of processing cores in the NUMA node is allocated to the container instance, the second portion of processing cores being different from the first portion of processing cores. The processor cores required for the virtual machine instance specification are determined based on a first resource view and matched with a first portion of processing cores in a non-matching storage access architecture NUMA node of the physical machine occupied by a first reference instance. The first reference instance is a predicted virtual machine instance or container instance that needs to be created. The first resource view is used to indicate idle resources of the physical machine and that the first portion of processing cores is occupied by the first reference instance. The virtual machine instance is a NUMA-aware instance, the processor cores required by the virtual machine instance specification match the second part of processing cores, and the container instance is a NUMA-unaware instance.
12. A processing core allocation method of an example, characterized in that: include: Allocating some processing cores in a NUMA node of a physical machine to at least one virtual machine instance, wherein the processor cores required for the specification of the at least one virtual machine instance are determined based on a first resource view and match the some processing cores in a non-matching memory access architecture NUMA node of a physical machine occupied by a first reference instance, and the virtual machine instance is a NUMA-aware instance; Allocate the remaining processing cores in the NUMA node except for the portion of processing cores to at least one container instance, where the processor cores required by the at least one container instance specification match the remaining processing cores except for the portion of processing cores, and the container instance is a NUMA-unaware instance.
13. A device, characterized in that: The method comprises a memory and a processor; the memory stores program instructions, and the processor runs the program instructions to execute the method according to any one of claims 1 to 5.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Unified resource scheduling coordinator, method for creating virtual machine and / or container thereof and unified resource scheduling system
CN109885377A
Dynamic scheduling of distributed storage management tasks using predicted system characteristics
US10168953B1