Logical Domains 1.3 Administration Guide

Using Dynamic Resource Management Policies

Starting with the Logical Domains 1.3 software, you can use policies to determine how to automatically perform dynamic reconfiguration activities. At this time, you can only create policies to govern the dynamic resource management of virtual CPUs.


Caution – Caution –

The following issues impact CPU dynamic resource management (DRM):


A resource management policy specifies under what conditions virtual CPUs can be automatically added to and removed from a logical domain. A policy is managed by using the ldm add-policy, ldm set-policy, and ldm remove-policy commands:


ldm add-policy [enable=yes|no] [priority=value] [attack=value] [decay=value]
  [elastic-margin=value] [sample-rate=value] [tod-begin=hh:mm[:ss]]
  [tod-end=hh:mm[:ss]] [util-lower=percent] [util-upper=percent] [vcpu-min=value]
  [vcpu-max=value] name=policy-name ldom...
ldm set-policy [enable=[yes|no]] [priority=[value]] [attack=[value]] [decay=[value]]
  [elastic-margin=[value]] [sample-rate=[value]] [tod-begin=[hh:mm:ss]]
  [tod-end=[hh:mm:ss]] [util-lower=[percent]] [util-upper=[percent]] [vcpu-min=[value]]
  [vcpu-max=[value]] name=policy-name ldom...
ldm remove-policy [name=]policy-name... ldom

For information about these commands and about creating resource management policies, see the ldm(1M) man page.

A policy is in effect during the times specified by the tod-begin and tod-end properties. The policy uses the value of the priority property to determine which policy to use if more than one policy is in effect simultaneously.

The policy uses the util-high and util-low property values to specify the high and low watermarks for CPU utilization. If the utilization exceeds the value of util-high, virtual CPUs are added to the domain until the number is between the vcpu-min and vcpu-max values. If the utilization drops below the util-low value, virtual CPUs are removed from the domain until the number is between the vcpu-min and vcpu-max values. If vcpu-min is reached, no more virtual CPUs can be dynamically removed. If the vcpu-max is reached, no more virtual CPUs can be dynamically added.


Example 9–1 Adding Resource Management Policies

For example, after observing the typical utilization of your systems over several weeks, you might set up policies to optimize resource usage. The highest usage is daily from 9:00 a.m. to 6:00 p.m. Pacific, and the low usage is daily from 6:00 p.m. to 9:00 a.m. Pacific.

Based on this system utilization observation, you decide to create the following high and low policies based on overall system utilization:

The following ldm add-policy command creates the high-usage policy to be used during the high utilization period on the ldom1 domain.

The following high-usage policy does the following:


# ldm add-policy tod-begin=09:00 tod-end=18:00 util-lower=25 util-upper=75 \
vcpu-min=2 vcpu-max=16 attack=1 decay=1 priority=1 name=high-usage ldom1

The following ldm add-policy command creates the med-usage policy to be used during the low utilization period on the ldom1 domain.

The following med-usage policy does the following:


# ldm add-policy tod-begin=18:00 tod-end=09:00 util-lower=10 util-upper=50 \
 vcpu-min=2 vcpu-max=16 attack=1 decay=1 priority=1 name=med-usage ldom1