12.3.2. Cluster Policy

Load balancing and power saving are key criteria in ensuring optimal performance of a virtualized environment. Red Hat Enterprise Virtualization platform allows you to define cluster policies to specify the usage and distribution of virtual machines between the available hosts. At any given time in a virtualized environment, virtual machines are starting, stopping or resuming.
In its simplest form, it is the rules in the policy engine that determine the selection of the specific host on which a virtual machine runs. The policy engine decides which server will host the next virtual machine based on whether load balancing criteria have been defined. Additionally to maintain load balancing as defined in the cluster policy the Red Hat Enterprise Virtualization Manager will use live migration to move virtual machines around the cluster as required. Defining the load-balancing or power saving modes for hosts in the cluster is highly recommended. You can choose to set the policy as either even distribution or power saving, but not both.
  1. Ensure that you have the Tree tab open to the left of the Administration Portal screen. Expand the objects in the tree, by clicking the + icon next to them, until the cluster that you are modifying is visible.
  2. Select the cluster from the list and click the Edit Policy button. The Edit Policy button is located on the details pane. Note that the current cluster policy, if one is defined, is also visible in the details pane.
  3. Select the policy to use, the available options are:
    Edit Cluster Policy

    Figure 12.1. Edit Cluster Policy


    • None — to have no load or power saving between hosts. This is the default mode. When starting a new virtual machine the host to use is selected based on CPU utilization. The active host in the cluster with the lowest CPU utilization will be chosen. While this is the same mechanism as used to select the initial host for a virtual machine under the Even Distribution policy no automatic live migration is performed once the virtual machine has started to maintain the distribution. Once the virtual machine has started it will continue to run on this host until it is stopped, the host goes into maintenance mode, or the host becomes non-responsive.
    • Even Distribution — evenly distributes the processing load across all hosts in the cluster. The host's CPU load is measured and used to apply the policy. Use the blue slider to specify the Maximum Service Level a host is permitted to have. For example, a host that has reached the maximum service level defined will not have further virtual machines started on it. You must also specify the time interval in minutes that a host is permitted to run at the maximum service level before virtual machines are migrated off it.
      Once the host has run at the maximum service level for the specified amount of time the manager will begin migrating virtual machines to other hosts in the cluster until the host's CPU load returns to a level below the maximum service threshold. When migrating the virtual machines the manager chooses the host in the cluster with the lowest CPU usage as the destination.
    • Power Saving — distributes the load in a way that consolidates virtual machines on a subset of available hosts, allowing surplus hosts not in use to be powered down to save power. Use the green slider to specify the Minimum Service Level a host is permitted to have. You must also specify the time interval in minutes that a host is permitted to run below the minimum service level before remaining virtual machines are migrated to other hosts in the cluster — as long as the maximum service level set also permits this.
      Under-utilized hosts are then able to be turned off either manually or using the REST API to save power.
  4. Click OK to save the policy selection for the cluster.
  5. Result:
    The cluster policy for the selected cluster has been updated.