This chapter contains information about performing resource management on Logical Domains systems.
This chapter covers the following topics:
To use CPU Power Management (PM) software, you first need to set the power management policy in ILOM 3.0 firmware. This section summarizes the information that you need to be able to use power management with LDoms software. Refer to “Monitoring Power Consumption” in the Sun Integrated Lights Out Manager (ILOM) 3.0 CLI Procedures Guide for more details.
The power policy is the setting that governs system power usage at any point in time. The Logical Domains Manager, version 1.3, supports two power policies, assuming that the underlying platform has implemented Power Management features:
Performance – The system is allowed to use all the power that is available.
Elastic – The system power usage is adapted to the current utilization level. For example, power up or down just enough system components to keep utilization within thresholds at all times, even if the workload fluctuates.
For instructions on configuring the power policy using the ILOM 3.0 firmware CLI, refer to “Monitoring Power Consumption” in the Sun Integrated Lights Out Manager (ILOM) 3.0 CLI Procedures Guide.
To achieve maximum power savings, do not run the ldm bind-domain command and then leave the domain in the bound state for a long period of time. When a domain is in the bound state, all of its CPUs are powered on.
This section shows how to list power-managed strands and virtual CPUs.
List power-managed strands by doing one of the following.
Use the list -l subcommand.
A dash (---) in the UTIL column of the CPU means the strand is power-managed.
# ldm list -l primary NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv SP 8 4G 4.3% 7d 19h 43m SOFTSTATE Solaris running MAC 00:14:4f:fa:ed:88 HOSTID 0x84faed88 CONTROL failure-policy=ignore DEPENDENCY master= VCPU VID PID UTIL STRAND 0 0 0.0% 100% 1 1 --- 100% 2 2 --- 100% 3 3 --- 100% 4 4 --- 100% 5 5 --- 100% 6 6 --- 100% 7 7 --- 100% .... |
Use the parseable option (-p) to the list -l subcommand.
A blank after util= means the strand is power-managed.
# ldm list -l -p VCPU |vid=0|pid=0|util=0.7%|strand=100 |vid=1|pid=1|util=|strand=100 |vid=2|pid=2|util=|strand=100 |vid=3|pid=3|util=|strand=100 |vid=4|pid=4|util=0.7%|strand=100 |vid=5|pid=5|util=|strand=100 |vid=6|pid=6|util=|strand=100 |vid=7|pid=7|util=|strand=100 |
List power-managed CPUs by doing one of the following.
Use the list-devices -a cpu subcommand.
In the power management (PM) column, a yes means the CPU is power-managed and a no means the CPU is powered on. It is assumed that 100 percent free CPUs are power-managed by default, hence the dash (---) under PM.
# ldm list-devices -a cpu VCPU PID %FREE PM 0 0 no 1 0 yes 2 0 yes 3 0 yes 4 100 --- 5 100 --- 6 100 --- 7 100 --- |
Use the parseable option (-p) to the list-devices -a cpu subcommand.
In the power management (pm=) field, a yes means the CPU is power-managed and a no means the CPU is powered on. It is assumed that 100 percent free CPUs are power-managed by default, hence the blank in that field.
# ldm list-devices -a -p cpu VERSION 1.4 VCPU |pid=0|free=0|pm=no |pid=1|free=0|pm=yes |pid=2|free=0|pm=yes |pid=3|free=0|pm=yes |pid=4|free=0|pm=no |pid=5|free=0|pm=yes |pid=6|free=0|pm=yes |pid=7|free=0|pm=yes |pid=8|free=100|pm= |pid=9|free=100|pm= |pid=10|free=100|pm= |
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.
The following issues impact CPU dynamic resource management (DRM):
When Power Management (PM) is in elastic mode, DRM cannot be enabled.
If DRM is enabled, PM cannot change from performance to elastic mode.
Ensure that you disable CPU DRM prior to performing a domain migration operation.
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.
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.
# 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.
# 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 |
This section shows the syntax usage for the ldm subcommands, defines some output terms, such as flags and utilization statistics, and provides examples that are similar to what you actually see as output.
If you are creating scripts that use ldm list command output, always use the -p option to produce the machine-readable form of the output. See Generate a Parseable, Machine-Readable List (-p) for more information.
Look at syntax usage for all ldm subcommands.
primary# ldm --help |
For more information about the ldm subcommands, see the ldm(1M) man page.
The following flags can be shown in the output for a domain (ldm list). If you use the long, parseable options (-l -p) for the command, the flags are spelled out; for example, flags=normal,control,vio-service. If not, you see the letter abbreviation; for example -n-cv-. The list flag values are position dependent. Following are the values that can appear in each of the six columns from left to right.
Column 1
s starting or stopping
- placeholder
Column 2
n normal
t transition
Column 3
d delayed reconfiguration
- placeholder
Column 4
c control domain
- placeholder
Column 5
v virtual I/O service domain
- placeholder
Column 6
s source domain in a migration
t target domain in a migration
e error occurred during a migration
- placeholder
The per virtual CPU utilization statistic (UTIL) is shown on the long (-l) option of the ldm list command. The statistic is the percentage of time that the virtual CPU spent executing on behalf of the guest operating system. A virtual CPU is considered to be executing on behalf of the guest operating system except when it has been yielded to the hypervisor. If the guest operating system does not yield virtual CPUs to the hypervisor, the utilization of CPUs in the guest operating system will always show as 100%.
The utilization statistic reported for a logical domain is the average of the virtual CPU utilizations for the virtual CPUs in the domain. A dash (---) in the UTIL column means that the strand is power-managed.
Generate output as a subset of resources by entering one or more of the following format options. If you specify more than one format, delimit the items by a comma with no spaces.
primary# ldm list -o resource[,resource...] ldom |
console – Output contains virtual console (vcons) and virtual console concentrator (vcc) service
cpu – Output contains virtual CPU (vcpu) and physical CPU (pcpu)
crypto – Cryptographic unit output contains Modular Arithmetic Unit (mau) and any other LDoms-supported cryptographic unit, such as the Control Word Queue (CWQ)
disk – Output contains virtual disk (vdisk) and virtual disk server (vds)
domain – Output contains variables (var), host ID (hostid), domain state, flags, and software state
memory – Output contains memory
network – Output contains media access control (mac) address , virtual network switch (vsw), and virtual network (vnet) device
physio – Physical input/output contains peripheral component interconnect (pci) and network interface unit (niu)
resmgmt – Output contains dynamic resource management (DRM) policy information.
serial – Output contains virtual logical domain channel (vldc) service, virtual logical domain channel client (vldcc), virtual data plane channel client (vdpcc), virtual data plane channel service (vdpcs)
stats – Output contains statistics that are related to resource management policies.
status – Output contains status about a domain migration in progress.
The following examples show various subsets of output that you can specify:
List CPU information for the control domain
# ldm list -o cpu primary |
List domain information for a guest domain
# ldm list -o domain ldm2 |
List memory and network information for a guest domain
# ldm list -o network,memory ldm1 |
List DRM policy information for a guest domain
# ldm list -o resmgmt,stats ldm1 |
Show a variable and its value for a domain.
primary# ldm list-variable variable-name ldom |
For example, the following command shows the value for the boot-device variable on the ldg1 domain:
primary# ldm list-variable boot-device ldg1 boot-device=/virtual-devices@100/channel-devices@200/disk@0:a |
The ldm list-config command lists the logical domain configurations that are stored on the service processor. When used with the -r option, this command lists those configurations for which autosave files exist on the control domain.
For more information about configurations, see Managing Logical Domains Configurations. For more examples, see the ldm(1M) man page.
primary# ldm list-config factory-default 3guests foo [next poweron] primary reconfig-primary |
The labels to the right of the configuration name mean the following:
[current] – Last booted configuration, only as long as it matches the currently running configuration; that is, until you initiate a reconfiguration. After the reconfiguration, the annotation changes to [next poweron].
[next poweron] – Configuration to be used at the next powercycle.
List the amount of memory available to be allocated.
primary# ldm list-devices mem MEMORY PA SIZE 0x14e000000 2848M |
To the Logical Domains Manager, constraints are one or more resources you want to have assigned to a particular domain. You either receive all the resources you ask to be added to a domain or you get none of them, depending upon the available resources. The list-constraints subcommand lists those resources you requested assigned to the domain.