Using memory-related metrics of host machine for triggering load balancing that migrate virtual machine
First Claim
1. A method, comprising:
- monitoring, by a host controller machine, metrics collected by the host controller machine, the metrics comprising memory-related metrics of host machines managed by the host controller machine and provided to the host controller machine by hypervisors managing virtual machines (VMs) on each of the host machines;
determining, by the host controller machine, that the collected metrics have triggered a load balancing operation managed by the host controller machine, the triggering of the load balancing operation in view of failure of the collected metrics to satisfy configured conditions maintained by the host controller machine;
selecting, by the host controller machine in view of memory-related metrics of the host machines, one of the host machines to participate in a migration process as part of the load balancing operation;
analyzing, by the host controller machine, memory-related metrics of each of a plurality of VMs hosted by the selected host machine, wherein the memory-related metrics of the host machines and of the VM comprises at least one of an amount of memory utilization, over commit, swap usage, a paging ratio, or memory sharing; and
selecting, by the host controller machine in view of the analyzing, a target VM of the plurality of VMs of the selected host machine to migrate from the selected host machine to a different host machine as part of the migration process of the load balancing operation, the selecting the target VM further comprising;
selecting one of the VMs from the plurality of VMs that has a highest load balancing score;
adjusting the load balancing score for the selected VM in view of at least one of a size of a memory set of the target VM, a paging ratio associated with the target VM as seen by the selected host machine, or a paging ratio experienced by the target VM;
adjusting the load balancing score for the selected VM further in view of an amount of shared memory the VM has with the other VMs of the plurality of VMs hosted by the selected host machine;
when the selected VM maintains the highest load balancing score among the plurality of VMs subsequent to the adjusting, identifying the selected VM as the target VM;
when the selected VM does not have the highest load balancing score among the plurality of VMs subsequent to the adjusting, repeating the selecting the one of the VMs and the adjusting the load balancing score; and
detecting and preventing loops of VM migration between the selected host machine and the different host machine.
1 Assignment
0 Petitions
Accused Products
Abstract
A mechanism for load balancing in a memory-constrained virtualization system is disclosed. A method of embodiments of the invention includes determining that one or more collected metrics have triggered a load balancing operation of a host controller machine, wherein the one or more collected metrics include memory-related metrics of one or more host machines managed by the host controller machine and of an overall system of the host controller machine. The method further includes selecting a host machine of the one or more host machines to migrate a virtual machine (VM) from as part of the load balancing operation and selecting a VM of a plurality of VMs hosted by the selected host machine to load balance migrate from the selected host machine, wherein the selecting the host machine and the selecting of the VM includes consideration of the memory-related metrics of the host machine and the VM.
118 Citations
15 Claims
-
1. A method, comprising:
-
monitoring, by a host controller machine, metrics collected by the host controller machine, the metrics comprising memory-related metrics of host machines managed by the host controller machine and provided to the host controller machine by hypervisors managing virtual machines (VMs) on each of the host machines; determining, by the host controller machine, that the collected metrics have triggered a load balancing operation managed by the host controller machine, the triggering of the load balancing operation in view of failure of the collected metrics to satisfy configured conditions maintained by the host controller machine; selecting, by the host controller machine in view of memory-related metrics of the host machines, one of the host machines to participate in a migration process as part of the load balancing operation; analyzing, by the host controller machine, memory-related metrics of each of a plurality of VMs hosted by the selected host machine, wherein the memory-related metrics of the host machines and of the VM comprises at least one of an amount of memory utilization, over commit, swap usage, a paging ratio, or memory sharing; and selecting, by the host controller machine in view of the analyzing, a target VM of the plurality of VMs of the selected host machine to migrate from the selected host machine to a different host machine as part of the migration process of the load balancing operation, the selecting the target VM further comprising; selecting one of the VMs from the plurality of VMs that has a highest load balancing score; adjusting the load balancing score for the selected VM in view of at least one of a size of a memory set of the target VM, a paging ratio associated with the target VM as seen by the selected host machine, or a paging ratio experienced by the target VM; adjusting the load balancing score for the selected VM further in view of an amount of shared memory the VM has with the other VMs of the plurality of VMs hosted by the selected host machine; when the selected VM maintains the highest load balancing score among the plurality of VMs subsequent to the adjusting, identifying the selected VM as the target VM; when the selected VM does not have the highest load balancing score among the plurality of VMs subsequent to the adjusting, repeating the selecting the one of the VMs and the adjusting the load balancing score; and detecting and preventing loops of VM migration between the selected host machine and the different host machine. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A system, comprising:
-
a memory; a processing device communicably coupled to the memory; and a virtual machine (VM) load balancing agent executable from the memory and the processing device, the VM load balancing agent to; monitor metrics collected by the host controller machine, the metrics comprising memory-related metrics of host machines managed by the host controller machine and provided to the host controller machine by hypervisors managing virtual machines (VMs) on each of the host machines; determine that the collected metrics have triggered a load balancing operation managed by the host controller machine, the triggering of the load balancing operation in view of failure of the collected metrics to satisfy configured conditions maintained by the host controller machine; select, in view of memory-related metrics of the host machines, one of the host machines to participate in a migration process as part of the load balancing operation; analyze memory-related metrics of each of a plurality of VMs hosted by the selected host machine, wherein the memory-related metrics of the host machines and of the VM comprises at least one of an amount of memory utilization, over commit, swap usage, a paging ratio, or memory sharing; and select, in view of the analyzing, a target VM of the plurality of VMs of the selected host machine to migrate from the selected host machine to a different host machine as part of the migration process of the load balancing operation, the selecting the target VM further comprising; select one of the VMs from the plurality of VMs that has a highest load balancing score; adjust the load balancing score for the selected VM in view of at least one of a size of a memory set of the target VM, a paging ratio associated with the target VM as seen by the selected host machine, or a paging ratio experienced by the target VM; adjust the load balancing score for the selected VM further in view of an amount of shared memory the VM has with the other VMs of the plurality of VMs hosted by the selected host machine; when the selected VM maintains the highest load balancing score among the plurality of VMs subsequent to the adjusting, identify the selected VM as the target VM; when the selected VM does not have the highest load balancing score among the plurality of VMs subsequent to the adjusting, repeat the selecting the one of the VMs and the adjusting the load balancing score; and detect and prevent loops of VM migration between the selected host machine and the different host machine. - View Dependent Claims (7, 8, 9, 12)
-
-
10. A non-transitory machine-readable storage medium including instructions that, when accessed by a host controller machine, cause the host controller machine to perform operations comprising:
-
monitoring, by the host controller machine, metrics collected by the host controller machine, the metrics comprising memory-related metrics of host machines managed by the host controller machine and provided to the host controller machine by hypervisors managing virtual machines (VMs) on each of the host machines; determining, by the host controller machine, that the collected metrics have triggered a load balancing operation managed by the host controller machine, the triggering of the load balancing operation in view of failure of the collected metrics to satisfy configured conditions maintained by the host controller machine; selecting, by the host controller machine in view of memory-related metrics of the host machines, one of the host machines to participate in a migration process as part of the load balancing operation; analyzing, by the host controller machine, memory-related metrics of each of a plurality of VMs hosted by the selected host machine, wherein the memory-related metrics of the host machines and of the VM comprises at least one of an amount of memory utilization, over commit, swap usage, a paging ratio, or memory sharing; and selecting, by the host controller machine in view of the analyzing, a target VM of the plurality of VMs of the selected host machine to migrate from the selected host machine to a different host machine as part of the migration process of the load balancing operation, the selecting the target VM further comprising; selecting one of the VMs from the plurality of VMs that has a highest load balancing score; adjusting the load balancing score for the selected VM in view of at least one of a size of a memory set of the target VM, a paging ratio associated with the target VM as seen by the selected host machine, or a paging ratio experienced by the target VM; adjusting the load balancing score for the selected VM further in view of an amount of shared memory the VM has with the other VMs of the plurality of VMs hosted by the selected host machine; when the selected VM maintains the highest load balancing score among the plurality of VMs subsequent to the adjusting, identifying the selected VM as the target VM; when the selected VM does not have the highest load balancing score among the plurality of VMs subsequent to the adjusting, repeating the selecting the one of the VMs and the adjusting the load balancing score; and detecting and preventing loops of VM migration between the selected host machine and the different host machine. - View Dependent Claims (11, 13, 14, 15)
-
Specification