HP-UX Workload Manager User's Guide
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
Appendix H476
In this example, the focus is the sales group, which will get a varying
amount of CPU resources based on a metric:
prm {
groups = sales : 2;
apps = sales : /opt/sales/bin/sales_monitor;
}
Step 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 the
cpushares statement to request CPU resources in proportion to a metric.
The following slo structure shows the cpushares statement. This SLO
requests 5 CPU shares for the sales group for each process in the
application—as given by the metric application_procs.
slo per_metric_example {
pri = 1;
mincpu = 25;
maxcpu = 50;
entity = PRM group sales;
cpushares = 5 total per metric application_procs;
}
However, if application_procs is less than five or greater than ten, the
values for the optional keywords mincpu and maxcpu will force the
request for additional CPU shares to be between 25 and 50.
Sources for a metric include data available through GlancePlus, SNMP,
and any other metrics you may already have available.
Step 3. Set up WLM to take values for the metric.
The simplest method for getting a metric to WLM is through the WLM
data collector wlmrcvdc.
To receive a value for the metric application_procs, set up a tune
structure. The following tune structure takes advantage of glance_prm,
one of the commands that WLM provides to simplify pulling data from
the optional HP product GlancePlus. In this case, glance_prm pulls the
APP_ACTIVE_PROC metric for the sales workload group: