Using HP-UX Workload Manager: A quick reference
24
2. Define the SLO.
The SLO in your WLM configuration file must specify a priority (pri) for the SLO, the workload
group to which the SLO applies (entity), and either a cpushares statement or a goal
statement so that WLM grants the SLO’s workload group some CPU resources. The condition
keyword determines when the SLO is enabled or disabled.
The following slo structure shows a fixed-allocation SLO for the sales group. When enabled,
this SLO requests 25 CPU shares for the sales group. Based on the condition statement, the
SLO is enabled between 8:00 p.m. and 11:00 p.m. every day.
slo condition_example {
pri = 1;
entity = PRM group sales;
cpushares = 25 total;
condition = 20:00 - 22:59;
}
Whenever the condition statement is false, the SLO is disabled and does not make any CPU
requests for the sales group. When a group has no enabled SLOs, it gets its gmincpu value (if
set); if this value is not set, a group gets the minimum allocation possible. For FSS groups, this
default is 1% of the total CPU resources in the default pSet. If the extended_shares tunable is
set to 1, the minimum allocation is 0.2% (with incremental allocations of 0.1%). For more
information on the extended_shares tunable, see the wlmconf(4) manpage.
You can use times, dates, or metrics to enable or disable an SLO.
For information on the syntax for the condition keyword, see the wlmconf(4) manpage.
3. Activate the configuration:
# /opt/wlm/bin/wlmd -a config.wlm
where config.wlm is the name of your configuration file.
Providing CPU resources as needed
To ensure a workload gets the CPU resources it needs—without preventing other workloads access to
unused CPU resources—WLM enables you to define usage goals. A major advantage with usage
goals is that you do not need to track and feed a metric to WLM.
The following figure shows a workload that initially uses 20 CPU shares. The usage goal for the
workload is to use between 60% and 90% of its allocation (entitlement). With the workload’s initial
allocation of 32 shares, the workload is using 20/32 or 62.5% of its allocation. Later, the workload
settles to using around 8 or 9 shares. WLM responds by reducing its allocation to 10 shares, still
meeting the usage goal while usage stays between 6 and 9 shares.