Go to main content

Oracle® VM Server for SPARC 3.5 Administration Guide

Exit Print View

Updated: November 2017
 
 

Using Dynamic Resource Management

You can use policies to determine how to automatically perform DR activities. At this time, you can create policies only to govern the dynamic resource management of virtual CPUs.


Caution

Caution  - The following restrictions affect CPU dynamic resource management (DRM):

  • On UltraSPARC T2 and UltraSPARC T2 Plus platforms, DRM cannot be enabled when the PM elastic policy is set.
  • On UltraSPARC T2 and UltraSPARC T2 Plus platforms, any change from the performance policy to the elastic policy is delayed while DRM is enabled.
  • Ensure that you disable CPU DRM prior to performing a domain migration operation, or you will see an error message.
  • When the PM elastic policy is set, you can use DRM only when the firmware supports normalized utilization (8.2.0).



Note - Kernel zones and dynamic pools limitations prevent a DRM policy from working correctly with these features. Because DRM policies must not violate the limits that are established by these features, sometimes DRM does not appear to work when used with kernel zones or dynamic pools. For information about these limitations, see Creating and Using Oracle Solaris Kernel Zones and Administering Resource Management in Oracle Solaris 11.3.

A resource management policy specifies the conditions under which 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 domain-name...
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 domain-name...
ldm remove-policy [name=]policy-name... domain-name

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 time specified by tod-begin must be earlier than the time specified by tod-end in a 24-hour period. By default, values for the tod-begin and tod-end properties are 00:00:00 and 23:59:59, respectively. When the default values are used, the policy is always in effect.

The policy uses the value of the priority property to specify a priority for a dynamic resource management (DRM) policy. Priority values are used to determine the relationship between DRM policies on a single domain and between DRM-enabled domains on a single system. Lower numerical values represent higher (better) priorities. Valid values are between 1 and 9999. The default value is 99.

    The behavior of the priority property depends on the availability of a pool of free CPU resources, as follows:

  • Free CPU resources are available in the pool. In this case, the priority property determines which DRM policy will be in effect when more than one overlapping policy is defined for a single domain.

  • No free CPU resources are available in the pool. In this case, the priority property specifies whether a resource can be dynamically moved from a lower-priority domain to a higher-priority domain on the same system. The priority of a domain is the priority specified by the DRM policy that is in effect for that domain.

    For example, a higher-priority domain can acquire CPU resources from another domain that has a DRM policy with a lower priority. This resource-acquisition capability pertains only to domains that have DRM policies enabled. Domains that have equal priority values are unaffected by this capability. So, if the default priority is used for all policies, domains cannot obtain resources from lower-priority domains. To take advantage of this capability, adjust the priority property values so that they have unequal values.

    For example, the ldg1 and ldg2 domains both have DRM policies in effect. The priority property for the ldg1 domain is 1, which is more favorable than the priority property value of the ldg2 domain (2). The ldg1 domain can dynamically remove a CPU resource from the ldg2 domain and assign it to itself in the following circumstances:

  • The ldg1 domain requires another CPU resource.

  • The pool of free CPU resources has been exhausted.

The policy uses the util-high and util-low property values to specify the high and low thresholds 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 69  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:

  • High: Daily from 9:00 a.m. to 6:00 p.m. Pacific

  • Low: Daily from 6:00 p.m. to 9:00 a.m. Pacific

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:

  • Specifies that the beginning and ending times are 9:00 a.m. and 6:00 p.m. by setting the tod-begin and tod-end properties, respectively.

  • Specifies that the lower and upper limits at which to perform policy analysis are 25 percent and 75 percent by setting the util-lower and util-upper properties, respectively.

  • Specifies that the minimum and maximum number of virtual CPUs is 2 and 16 by setting the vcpu-min and vcpu-max properties, respectively.

  • Specifies that the maximum number of virtual CPUs to be added during any one resource control cycle is 1 by setting the attack property.

  • Specifies that the maximum number of virtual CPUs to be removed during any one resource control cycle is 1 by setting the decay property.

  • Specifies that the priority of this policy is 1 by setting the priority property. A priority of 1 means that this policy will be enforced even if another policy can take effect.

  • Specifies that the name of the policy file is high-usage by setting the name property.

  • Uses the default values for those properties that are not specified, such as enable and sample-rate. See the ldm(1M) man page.

primary# 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:

  • Specifies that the beginning and ending times are 6:00 p.m. and 9:00 a.m. by setting the tod-begin and tod-end properties, respectively.

  • Specifies that the lower and upper limits at which to perform policy analysis are 10 percent and 50 percent by setting the util-lower and util-upper properties, respectively.

  • Specifies that the minimum and maximum number of virtual CPUs is 2 and 16 by setting the vcpu-min and vcpu-max properties, respectively.

  • Specifies that the maximum number of virtual CPUs to be added during any one resource control cycle is 1 by setting the attack property.

  • Specifies that the maximum number of virtual CPUs to be removed during any one resource control cycle is 1 by setting the decay property.

  • Specifies that the priority of this policy is 1 by setting the priority property. A priority of 1 means that this policy will be enforced even if another policy can take effect.

  • Specifies that the name of the policy file is high-usage by setting the name property.

  • Uses the default values for those properties that are not specified, such as enable and sample-rate. See the ldm(1M) man page.

primary# 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