Resource management for numa awareness architecture for VM-based container in KUBERNETES environment
A configuration manages resources for NUMA awareness for virtual machine (VM) based containers in a Kubernetes environment. The configuration initializes micro-virtual machines (VMs) within a macro-VM environment and generates a sandbox and a container for each micro-VM of the set of micro-VMs. The configuration assigns a virtual central processing unit (vCPU) to a micro-VM based on an estimated memory required by the micro-VM and an estimated available memory of the vCPU. The configuration pins the vCPU with a physical CPU based on a pod location of the physical CPU and an estimated available memory of the vCPU and an available local memory of the physical CPU. The system updates a mapping of the vCPU and the physical CPU in a resource manager and adjusts vCPU and physical CPU pairs based on the mapping of the vCPU and the physical CPU and the estimated workload for the physical CPU.
1 . A method comprising:
initializing a set of micro-virtual machines (VMs) within a macro-VM environment;
generating a sandbox and a container for each micro-VM of the set of micro-VMs;
assigning a virtual central processing unit (vCPU) to a micro-VM in the set of micro-VMs, the vCPU assigned based on an estimated memory required by the micro-VM and an estimated available memory associated with the vCPU, wherein the vCPU is associated with a tenant;
pinning the vCPU with a physical CPU, the vCPU paired with the physical CPU based on a determination that the physical CPU is located in the plurality of physical CPUs that are associated with the same tenant associated with the vCPU, an estimated available memory associated with the vCPU and an available local memory of the physical CPU;
updating a mapping of the vCPU and the physical CPU in a resource manager continuously, the mapping of the vCPU and the physical CPU including the tenant assigned to the vCPU and the physical CPU and an estimated workload for the physical CPU; and
adjusting vCPU and physical CPU pairs based on the mapping of the vCPU and the physical CPU and the estimated workload for the physical CPU.
2 . The method of claim 1 , further comprising:
displaying a mapping of micro-VMs to nodes in the vCPU on a user interface;
receiving instructions to shift the micro-VM mappings; and
shifting the assigned micro-VMs based on the instructions.
3 . The method of claim 1 , further comprising:
mapping tenant CPU clusters using a hypervisor shim.
4 . The method of claim 1 , further comprising:
maintaining states of a plurality of vCPUs pinned to the plurality of physical CPUs in the resource manager.
5 . The method of claim 1 , further comprising:
shifting the vCPU and physical CPU pairings based on a request to change an amount of available memory for the micro-VM.
6 . The method of claim 1 , further comprising:
monitoring a workload for the physical CPU in the plurality of physical CPUs with the resource manager; and
adjusting pairs of vCPUs and physical CPUs based on the physical CPU having a workload higher than other physical CPUs for a set period of time.
7 . A computer-readable medium storing instructions, the instructions when executed by one or more processor systems cause the one or more processor systems to:
initialize a set of micro-virtual machines (VMs) within a macro-VM environment;
generate a sandbox and a container for each micro-VM of the set of micro-VMs;
assign a virtual central processing unit (vCPU) to a micro-VM in the set of micro-VMs, the vCPU assigned based on an estimated memory required by the micro-VM and an estimated available memory associated with the vCPU, wherein the vCPU is associated with a tenant;
pin the vCPU with a physical CPU, the vCPU paired with the physical CPU based on a determination that the physical CPU is located in the plurality of physical CPUs that are associated with the same tenant associated with the vCPU, an estimated available memory associated with the vCPU and an available local memory of the physical CPU;
update a mapping of the vCPU and the physical CPU in a resource manager continuously, the mapping of the vCPU and the physical CPU including the tenant assigned to the vCPU and the physical CPU and an estimated workload for the physical CPU; and
adjust vCPU and physical CPU pairs based on the mapping of the vCPU and the physical CPU and the estimated workload for the physical CPU.
8 . The computer-readable medium of claim 7 , the instructions when executed further causing the one or more processor systems to:
display a mapping of micro-VMs to nodes in the vCPU on a user interface;
receiving instructions to shift the micro-VM mappings; and
shifting the assigned micro-VMs based on the instructions.
9 . The computer-readable medium of claim 7 , the instructions when executed further causing the one or more processor systems to:
map tenant CPU clusters using a hypervisor shim.
10 . The computer-readable medium of claim 7 , the instructions when executed further causing the one or more processor systems to:
maintain states of a plurality of vCPUs pinned to the plurality of physical CPUs in the resource manager.
11 . The computer-readable medium of claim 7 , the instructions when executed further causing the one or more processor systems to:
shift the vCPU and physical CPU pairings based on a request to change an amount of available memory for the micro-VM.
12 . The computer-readable medium of claim 7 , the instructions when executed further causing the one or more processor systems to:
monitor a workload for the physical CPU in the plurality of physical CPUs with the resource manager; and
adjusting pairs of vCPUs and physical CPUs based on the physical CPU having a workload higher than other physical CPUs for a set period of time.
13 . A computer system, comprising:
one or more processor systems; and
a computer-readable medium storing instructions, the instructions when executed by the one or more processor systems cause the one or more processor systems to:
initialize a set of micro-virtual machines (VMs) within a macro-VM environment;
generate a sandbox and a container for each micro-VM of the set of micro-VMs;
assign a virtual central processing unit (vCPU) to a micro-VM in the set of micro-VMs, the vCPU assigned based on an estimated memory required by the micro-VM and an estimated available memory associated with the vCPU, wherein the vCPU is associated with a tenant;
pin the vCPU with a physical CPU, the vCPU paired with the physical CPU based on a determination that the physical CPU is located in the plurality of physical CPUs that are associated with the same tenant associated with the vCPU, an estimated available memory associated with the vCPU and an available local memory of the physical CPU;
update a mapping of the vCPU and the physical CPU in a resource manager continuously, the mapping of the vCPU and the physical CPU including the tenant assigned to the vCPU and the physical CPU and an estimated workload for the physical CPU; and
adjust vCPU and physical CPU pairs based on the mapping of the vCPU and the physical CPU and the estimated workload for the physical CPU.
14 . The computer system of claim 13 , the instructions when executed further causing the one or more processor systems to:
display a mapping of micro-VMs to nodes in the vCPU on a user interface;
receiving instructions to shift the micro-VM mappings; and
shifting the assigned micro-VMs based on the instructions.
15 . The computer system of claim 13 , the instructions when executed further causing the one or more processor systems to:
map tenant CPU clusters using a hypervisor shim.
16 . The computer system of claim 13 , the instructions when executed further causing the one or more processor systems to:
maintain states of a plurality of vCPUs pinned to the plurality of physical CPUs in the resource manager.
17 . The computer system of claim 13 , the instructions when executed further causing the one or more processor systems to:
shift the vCPU and physical CPU pairings based on a request to change an amount of available memory for the micro-VM.
18 . The computer system of claim 13 , the instructions when executed further causing the one or more processor systems to:
monitor a workload for the physical CPU in the plurality of physical CPUs with the resource manager; and
adjusting pairs of vCPUs and physical CPUs based on the physical CPU having a workload higher than other physical CPUs for a set period of time.