WLM Workload - Manager
WLM Workload - Manager
User’s Guide
Version A.03.02.02
Preface
System platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Associated software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Document Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
New in this edition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Feedback to the HP-UX WLM team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Support and patch policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Notational conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Associated documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1. Introduction
Performance and resource management overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
What is workload management? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
What is HP-UX Workload Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Workload management across partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Workload management within a single HP-UX instance . . . . . . . . . . . . . . . . . . . . . . 44
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Why use Workload Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Service-level objectives (SLOs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Prioritized SLOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
WLM and partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
What is the ideal environment for WLM? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Examples of solutions that WLM provides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
SLOs that ensure a specified amount of CPU shares for workloads . . . . . . . . . . . . . 52
Reserving CPU resources all of the time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Reserving CPU resources at specified times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Reserving CPU resources based on a condition or event . . . . . . . . . . . . . . . . . . . . 53
Ensuring resources in an HP Serviceguard failover . . . . . . . . . . . . . . . . . . . . . . . . 53
SLOs that dynamically allocate resources based on usage goals. . . . . . . . . . . . . . . . 54
Allocating CPU resources dynamically based on utilization . . . . . . . . . . . . . . . . . 54
Controlling the sharing and borrowing of excess CPU resources. . . . . . . . . . . . . . 54
Automatically resizing processor sets (PSETs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Automatically resizing virtual partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Automatically resizing nPartitions using Instant Capacity cores . . . . . . . . . . . . . 56
Optimizing use of Temporary Instant Capacity (TiCAP) and Pay per use (PPU) . 57
7
Contents
8
Contents
5. Configuring WLM
Configuration file syntactic conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Using the WLM configuration wizard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Using the WLM GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Tips on using the WLM GUI’s tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9
Contents
10
Contents
11
Contents
12
Contents
metric_condition.wlm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
par_manual_allocation.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
par_manual_allocation.wlmpar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
par_usage_goal.wlm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
par_usage_goal.wlmpar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
performance_goal.template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
stretch_goal.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
time_activated.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
transient_groups.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
twice_weekly_boost.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
usage_goal.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
usage_stretch_goal.wlm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
user_application_records.wlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
13
Contents
wlmgui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
wlminfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
wlmpard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
wlmrcvdc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
wlmsend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
14
Contents
15
Contents
16
Contents
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525
17
Contents
18
Tables
19
Tables
20
Figures
21
Figures
22
Preface
System platform
HP-UX WLM A.03.02 runs under the following HP-UX operating
systems and hardware:
Associated software
Installing HP-UX Workload Manager ensures that the following software
is also installed:
23
If you plan to use configuration files based on Process Resource Manager
(PRM), ensure that version C.03.00 or later of PRM is installed. To take
advantage of the latest updates to WLM, use the latest version of PRM
(C.03.02 or later). PRM is necessary for managing processor sets (PSETs)
or Fair Share Scheduler (FSS) groups, which are confined within a
specific instance of HP-UX. If you plan to use WLM to manage
host-based configurations only, PRM is not necessary. Host-based
configurations are designed for moving CPU resources (cores, which are
the actual data-processing engines within a processor; a processor might
have multiple cores, and a core might have multiple execution threads)
across virtual partitions and nPartitions; the configurations are not
confined within a specific instance of HP-UX as are PRM-based
configurations. For more information, see Chapter 7, “Managing SLOs
across partitions,” on page 255.
HP-UX WLM provides a method for collecting system and application
data from GlancePlus. You can use WLM with any HP-UX 11i version of
GlancePlus. On HP-UX 11i v1, be sure to install either the 11i
Enterprise Operating Environment or 11i Mission-critical Operating
Environment to ensure you have a GlancePlus version that is fully
compatible with WLM.
Document Structure
This document is organized as follows:
24
• Chapter 5 explains how to configure WLM. It describes the WLM
configuration file and the general syntactic conventions to use, and it
explains how to define the various WLM components. This chapter
also explains how to use the WLM graphical user interface to
configure WLM and how to activate the configuration file so that
WLM manages the system.
• Chapter 6 describes WLM auditing and billing. It explains how to
enable WLM to audit data and how you can display that data.
• Chapter 7 describes how WLM manages SLOs across virtual
partitions and nPartitions and explains how to configure
cross-partition management.
• Chapter 8 explains how to manage nested workloads.
• Chapter 9 presents example configuration files that are available
from WLM directories. These examples show how to use the syntax
discussed in Chapter 5.
• Chapter 10 explains how to monitor WLM SLO compliance and other
information.
• Appendix A is a command reference, describing the functions,
syntax, and arguments for each WLM command.
• Appendix B is a quick reference for the WLM configuration file
syntax, indicating the required and optional components.
• Appendix C lists standard HP-UX commands and system calls that
support WLM workload groups and allow you to use WLM more
efficiently. These commands are not shipped as part of the WLM
product.
• Appendix D describes how WLM integrates with other products to
provide better functionality.
• Appendix E lists PRM utilities that WLM users may find helpful.
These utilities are helpful only when the WLM configuration
includes a prm structure. For additional information, see the
manpages or to the Process Resource Manager User’s Guide
(available in /opt/prm/doc/).
• Appendix F describes how PRM manages resources. This appendix is
provided as background information, given that WLM uses some of
PRM resource management concepts and tools.
25
• Appendix G explains how to convert PRM configuration files to WLM
configuration files if you want to migrate from PRM to WLM.
• Appendix H explains advanced WLM usage pertaining to metric
goals and collecting performance data.
• The Glossary defines key terms used in this document.
26
New in this edition
This section lists the new or changed functionality for WLM A.03.02 and
WLM A.03.02.02. WLM A.03.02 supports HP-UX 11i v1 (B.11.11) and
HP-UX 11i v2 (B.11.23). WLM A.03.02.02 supports HP-UX 11i v3
(B.11.31).
27
NOTE With Hyper-Threading disabled, each core is seen as a CPU. With
Hyper-Threading enabled, each core can be seen as multiple, logical
CPUs.
28
• Temporary Instant Capacity (TiCAP) activates capacity in a
temporary “calling-card fashion,” such as in 20-day or 30-day
increments (where a day equals 24 hours for one core). With
Temporary Instant Capacity on the system, any number of Instant
Capacity cores can be activated as long as your prepaid temporary
capacity time has not expired. By default, if 15 or fewer processing
days are available, WLM stops activating Temporary Instant
Capacity. Beginning with this release of WLM, you can change this
default by setting the WLM global arbiter
utility_reserve_threshold keyword.
• The Pay per use Toolkit (PPUTK) and the utilitydc command are
no longer supported and have been removed from the product. Please
use the simpler and more robust Temporary Instant Capacity/Pay
per use solution available with wlmpard.
• The WLM installation script no longer detects whether the correct
version of the Java Runtime Environment (JRE) is running or
whether the correct version of PRM is running. To run the WLM GUI
(wlmgui) and the wizard (wlmcw) requires JRE version 1.4.2 or later.
For PRM-based configurations, PRM C.03.00 or later is required. To
take advantage of the latest updates to WLM, use the latest version
of PRM (C.03.02.02 or later).
• You can use WLM and PRM to manage resources on the same system
at the same time if the PRM configuration uses FSS groups only (no
PSET-based groups) and the WLM configuration is strictly
host-based. For more information, see “WLM and Process Resource
Manager (PRM)” on page 59.
29
Support and patch policies
The following Web site site provides information on WLM’s support
policy and patch policy:
http://www.hp.com/go/wlm
These policies indicate the time periods for which this version of WLM is
supported and patched.
Training
HP offers a course in HP-UX resource management using WLM. For
information, including a course outline, visit:
http://www.hp.com/education/courses/u5447s.html
Notational conventions
This section describes notational conventions used in this book.
30
Curly brackets ({}), In command syntax diagrams, text
Pipe (|) surrounded by curly brackets indicates a
choice. The choices available are shown inside
the curly brackets, separated by the pipe sign
(|).
The following command example indicates
that you can enter either a or b:
command {a | b}
Associated documents
Associated documents include:
31
• Managing MC/ServiceGuard manual
• GlancePlus User’s Guide manual (available through the Help in the
gpm interface to GlancePlus)
• Managing Systems and Workgroups: A Guide for HP-UX System
Administrators manual
These manuals, along with many other Hewlett-Packard manuals, are
available at the following Web site:
http://docs.hp.com
NOTE WLM manpages are also available at the following Web site:
http://www.hp.com/go/wlm
32
1 Introduction
Chapter 1 33
Introduction
Performance and resource management overview
34 Chapter 1
Introduction
Performance and resource management overview
Chapter 1 35
Introduction
Performance and resource management overview
One workload per server • Workloads do not • Server resources sit idle
compete for resources a large percentage of the
time
36 Chapter 1
Introduction
Performance and resource management overview
Chapter 1 37
Introduction
Performance and resource management overview
The remainder of this document focuses on the last two rows of Table 1-2:
Automatically managing multiple, prioritized workloads on a single
server—possibly across partitions—based on reported performance
levels or usage goals. This strategy is commonly referred to as goal-based
workload management.
WLM implements this type of workload management allowing you to:
38 Chapter 1
Introduction
What is workload management?
Chapter 1 39
Introduction
What is workload management?
• IT service management
A strategy driven by business requirements to provide, and in many
cases guarantee, levels of service from IT (Information Technology)
to end users. The needs of the end users are the primary driver for
the development of the IT infrastructure. The benefits of defining
this strategy are higher return on investment in IT expenditures and
also the proper setting of expectations for all organizations involved.
• Service-level agreements
Documents defining various service levels IT is expected to deliver to
the end user. These documents focus on individual applications and
the service levels required by the application users. SLAs can also be
used for budgeting, planning, and control purposes.
40 Chapter 1
Introduction
What is HP-UX Workload Manager?
• Service-level objectives
Objectives, derived from SLAs, explicitly describe the expected
utilization, availability, performance, security, accuracy, or recovery.
They can also describe expected response time, job duration, or
throughput.
SLOs lay the foundation for developing the actual utilization and
performance metrics that IT management must collect, monitor, and
report to determine whether the agreed-upon service levels are being
met.
• Goals
This data is used to ensure, and determine whether, an SLO is being
met.
Chapter 1 41
Introduction
What is HP-UX Workload Manager?
42 Chapter 1
Introduction
What is HP-UX Workload Manager?
Chapter 1 43
Introduction
What is HP-UX Workload Manager?
NOTE The term workload is used in this document to refer to any collection of
processes running in a PSET, FSS group, nPartition, virtual partition, or
Integrity VM host that are managed as a single unit. The term workload
group pertains specifically to FSS or PSET-based groups. However, in
WLM interfaces (such as the WLM configuration wizard or wlminfo
displays), the term workload group is often used for both workload and
workload groups.
When you configure WLM, you define workload groups for the system or
partition and assign processes to the groups based on the specific
applications, users, or Unix groups the processes run under. You can also
create your own criteria for placing application processes in specified
workload groups by defining process maps. In a process map, you map
a group to a script or command and its arguments that gathers process
IDs and causes the identified processes to be placed in that group. WLM
spawns the command or script at 30-second intervals, and at each
interval, places the identified processes in the appropriate groups. In
addition, the WLM SAP Toolkit, in conjunction with HP Serviceguard
Extension for SAP (SGeSAP), takes advantage of process maps,
providing a script that enables you to place specified SAP processes in
specific workload groups managed by WLM. For more information, see
“Integrating with SAP software” on page 438.
44 Chapter 1
Introduction
What is HP-UX Workload Manager?
NOTE The WLM daemon is designed to use minimal system resources. All of
the daemon’s processes run in the PRM_SYS (ID 0) workload, as explained
in the section “Reserved workload groups” on page 163.
Summary
WLM can manage the following resources for your workloads:
• CPU (cores)
Arbitrates CPU resource requests to ensure that high-priority SLOs
meet their objectives. SLOs make CPU resource requests for
workloads (or workload groups). CPU resources can be allocated in:
Chapter 1 45
Introduction
Why use Workload Manager?
46 Chapter 1
Introduction
Why use Workload Manager?
Chapter 1 47
Introduction
Why use Workload Manager?
• Usage Goals
Goals based on a workload’s utilization of its allocated CPU
resources. If the processes in a workload are not using a certain
amount of the workload’s allocation, the allocation is decreased; if
the processes are using a high percentage of the workload’s
allocation, the allocation is increased.
• Metric goals
Goals based on a metric, such as processing at least x transactions
per minute or a response time under y seconds. Metric goals are
based on performance data and require understanding of that data.
HP recommends using usage goals, as usage goals can be
implemented immediately without prior knowledge of workload
performance.
A goal-based SLO consists of:
• A workload
• A goal
• A priority ranking
48 Chapter 1
Introduction
Why use Workload Manager?
Prioritized SLOs
Another important reason for using WLM is that it allows you to
prioritize the SLOs. When CPU resources are not sufficient to satisfy all
SLOs, WLM grants CPU resources to the highest priority SLOs first.
After the demands of the higher priority SLOs are satisfied, WLM grants
the lower priority SLOs any resources that remain available. Valid
priorities start at 1, with 1 being the highest priority.
SLO priorities do not have to be uniquely assigned—multiple SLOs can
be granted the same priority, allowing more than one workload’s
objective to be top priority. This can be beneficial when multiple
workloads are equally important. Typically, all the SLOs in a given
configuration should not be assigned the same priority; otherwise, under
a heavy system load, WLM may not be able to allocate CPU resources
effectively when there is not enough resources to satisfy all SLOs.
A single workload can have multiple SLOs, each with a different priority.
One SLO would be the high priority, “must meet” goal and the remaining
SLOs would be lower priority, “meet if possible” goals. For example, a
priority 1 goal might be associated with a virtual partition to maintain
an allocation of at least two cores. A priority 2 goal might be to allocate
three or four cores if available when the workload becomes very busy.
This lower priority goal (a “stretch goal”) is met only after the priority 1
SLOs for this workload and all other workloads are met.
For information on how WLM uses priorities, see “Allocating CPU
resources: The rising tide model” on page 122.
Chapter 1 49
Introduction
WLM and partitions
50 Chapter 1
Introduction
What is the ideal environment for WLM?
Chapter 1 51
Introduction
Examples of solutions that WLM provides
52 Chapter 1
Introduction
Examples of solutions that WLM provides
Priority. 1
CPU shares. 800 shares
Condition. 15th or 28th
Chapter 1 53
Introduction
Examples of solutions that WLM provides
54 Chapter 1
Introduction
Examples of solutions that WLM provides
Chapter 1 55
Introduction
Examples of solutions that WLM provides
56 Chapter 1
Introduction
Examples of solutions that WLM provides
Chapter 1 57
Introduction
Using WLM on multiple servers
also that by default WLM does not activate Temporary Instant Capacity
when 15 or fewer processing days of temporary capacity are available.
You can change this default by setting the WLM global arbiter
utility_reserve_threshold keyword. For more information on the
utilitypri and utility_reserve_threshold keywords, see “Setting
up your WLM global arbiter configuration file” on page 265 or see
wlmparconf(4).
For more information on configuring WLM to use Temporary Instant
Capacity or PPU, see Chapter 7, “Managing SLOs across partitions,” on
page 255. For more information on integrating WLM with Temporary
Instant Capacity and PPU, see “Integrating with Temporary Instant
Capacity (TiCAP)/ Pay per use (PPU)” on page 410.
Management of Temporary Instant Capacity and PPU is available on
standalone systems as well as across partitions.
58 Chapter 1
Introduction
WLM and Process Resource Manager (PRM)
NOTE As of WLM A.03.01, PRM is no longer included with the bundle. If PRM
C.03.00 or later is already installed on the machine on which you install
or upgrade WLM, you can continue to manage FSS and PSET-based
workload groups just as if PRM had been installed with WLM—when
you purchase WLM, you receive a PRM license that enables you to
continue to use PRM.
If you install WLM for the first time on a machine, you can use a strictly
host-based configuration (no FSS or PSET-based workload groups).
However, to manage FSS or PSET-based workload groups, you must
install PRM (C.03.00 or later) separately.
Chapter 1 59
Introduction
WLM product directory structure
NOTE In addition to the WLM-specific files, the WLM installation ensures that
the HP-UX WLM Toolkits (WLMTK) A.01.10.xx are installed. For
information on the WLMTK files, see the HP-UX Workload Manager
Toolkits User’s Guide (/opt/wlm/toolkits/doc/WLMTKug.pdf).
Directory/file Description
60 Chapter 1
Introduction
WLM product directory structure
Directory/file Description
/opt/wlm/bin/wlmsend Command-line/scripting
interface for sending metric data
to WLM
Chapter 1 61
Introduction
WLM product directory structure
Directory/file Description
62 Chapter 1
Introduction
WLM product directory structure
Directory/file Description
• perfmon.html
Writing a Better WLM data
collector
• config.html
Configuring HP-UX
Workload Manager A.02.00
(although this paper was
written for an older version
of WLM, it may still be
relevant for certain
environments)
• tuning.html
Tuning HP-UX Workload
Manager
• flexcap.html
Using HP-UX Workload
Manager to Achieve Flexible
Capping
Chapter 1 63
Introduction
WLM product directory structure
Directory/file Description
64 Chapter 1
WLM quick start: the essentials for using WLM
Chapter 2 65
WLM quick start: the essentials for using WLM
Network operating environment
The WLM wlmpard and wlmcomd daemons use the following port
numbers by default:
wlmpard 9691
wlmcomd 9692
Make sure these ports are kept open. To change these port numbers, see
wlmpard(1M) and wlmcomd(1M).
66 Chapter 2
WLM quick start: the essentials for using WLM
WLM shown in action
NOTE You can define FSS or PSET-based workload groups and use WLM
partition management in the same WLM configuration. Certain
software restrictions apply to using PSET-based groups with virtual
partitions (vPars), Instant Capacity, and Pay per use. For more
information, see the WLM Release Notes (/opt/wlm/share/doc/Rel_Notes).
On HP-UX 11i v1 (B.11.11) systems, you must install PSET (PROCSET)
software to obtain PSET functionality; see the HP-UX WLM Release
Notes. PSET functionality comes with HP-UX 11i v2 (B.11.23) and
HP-UX 11i v3 (B.11.31) systems.
NOTE For this procedure to work, PRM must be installed on your system.
Chapter 2 67
WLM quick start: the essentials for using WLM
WLM shown in action
# /opt/wlm/bin/wlmd -a /opt/wlm/examples/userguide/multiple_groups.wlm
$maxcount = 3000000;
3. Sets bounds on CPU usage. The number of CPU shares for the
workload groups can never go below the gmincpu or above the
gmaxcpu values. These values take precedence over the minimum
and maximum values that you can optionally set in the slo
structures.
68 Chapter 2
WLM quick start: the essentials for using WLM
WLM shown in action
prm {
n groups = g2 : 2,
g3 : 3;
p gmincpu = g2 : 5, g3 : 5;
gmaxcpu = g2 : 30, g3 : 60;
}
q
slo test2 {
pri = 1;
cpushares = 15 total;
entity = PRM group g2;
}
r
slo test3 {
pri = 1;
cpushares = 20 total;
entity = PRM group g3;
Chapter 2 69
WLM quick start: the essentials for using WLM
WLM shown in action
Step 3. See what messages a WLM startup produces. Start another session to
view the WLM message log:
# tail -f /var/opt/wlm/msglog
08/29/06 08:35:23 [I] (p6128) wlmd initial command line:
08/29/06 08:35:23 [I] (p6128) argv[0]=/opt/wlm/bin/wlmd
08/29/06 08:35:23 [I] (p6128) argv[1]=-a
08/29/06 08:35:23 [I] (p6128) argv[2]=/opt/wlm/examples/userguide/multiple_gro
ups.wlm
08/29/06 08:35:23 [I] (p6128) what: @(#)HP-UX WLM A.03.02 (2006_08_21_17_04_11)
hpux_11.00
08/29/06 08:35:23 [I] (p6128) dir: @(#) /opt/wlm
08/29/06 08:35:23 [I] (p6128) SLO file path: /opt/wlm/examples/userguide/multipl
e_groups.wlm
08/29/06 08:35:26 [I] (p6128) wlmd 6128 starting
The text in the log shows when the WLM daemon wlmd started, as well
as what arguments it was started with—including the configuration file
used.
70 Chapter 2
WLM quick start: the essentials for using WLM
WLM shown in action
# /opt/prm/bin/prmlist
PRM configured from file: /var/opt/wlm/tmp/wmprmBAAa06335
File last modified: Thu Aug 24 08:35:23 2006
# /opt/wlm/bin/wlminfo group
Thu Jun 29 08:36:38 2006
Workload Group PRMID CPU Shares CPU Util Mem Shares Mem Util State
OTHERS 1 65.00 0.00 - - ON
g2 2 15.00 0.00 - - ON
g3 3 20.00 0.00 - - ON
Chapter 2 71
WLM quick start: the essentials for using WLM
WLM shown in action
72 Chapter 2
WLM quick start: the essentials for using WLM
WLM shown in action
Use the PID for loop.pl from the last step to move loop.pl to the
group g3:
# /opt/prm/bin/prmmove g3 -p loop.pl_PID
In this case, loop.pl_PID is 6793.
Looking at all the processes, we get output including the items shown in
the following example (column headings are included for convenience):
# ps -R g3
PID TTY TIME COMMAND
6793 ttyp1 1:29 loop.pl
6463 ttyp1 6:41 loop3.pl
# /opt/wlm/bin/wlminfo group
Workload Group PRMID CPU Shares CPU Util Mem Shares Mem Util State
OTHERS 1 65.00 0.00 - - ON
g2 2 15.00 14.26 - - ON
g3 3 20.00 19.00 - - ON
Chapter 2 73
WLM quick start: the essentials for using WLM
WLM shown in action
This output shows that both groups are using CPU resources (cores) up
to their allocations. If the allocations were increased, the groups’ usage
would probably increase to match the new allocations.
# /opt/wlm/bin/wlmd -k
Running the tail command again, you will see messages similar to
those shown in the following example:
# tail -f /var/opt/wlm/msglog
08/29/02 09:06:55 [I] (p6128) wlmd 6128 shutting down
08/29/02 09:06:55 [I] (p7235) wlmd terminated (by request)
Step 11. Stop the loop.pl, loop2.pl, and loop3.pl perl programs.
74 Chapter 2
WLM quick start: the essentials for using WLM
Where WLM is installed
WLM /opt/wlm/
If you are using WLM configurations that are based on the Process
Resource Manager (PRM) product, you must install PRM at:
/opt/prm/
Chapter 2 75
WLM quick start: the essentials for using WLM
Seeing how WLM will perform without actually affecting your system
76 Chapter 2
WLM quick start: the essentials for using WLM
Starting WLM
Starting WLM
Before starting WLM (activating a configuration), you may want to try
the configuration in passive mode, discussed in “Seeing how WLM will
perform without actually affecting your system” on page 75. Otherwise,
you can activate your configuration by logging in as root and running the
following command, substituting your configuration file’s name for
config.wlm.:
# /opt/wlm/bin/wlmd -a config.wlm
When you run the wlmd -a command, WLM starts the data collectors
you have specified in the WLM configuration.
Although data collectors are not necessary in every case, be sure to
monitor any data collectors you do have. Because data collection is a
critical link in the effective maintenance of your configured service-level
objectives, you need to be aware when a collector exits unexpectedly. One
method for monitoring collectors is to use wlminfo slo.
For information on creating your WLM configuration, see the section
“Creating a configuration file” on page 78.
WLM automatically logs informational messages to the file
/var/opt/wlm/msglog. In addition, WLM can log data that allows you to
verify WLM management as well as to fine-tune your WLM
configuration file. To log this data, use the -l option. This option causes
WLM to log data to /var/opt/wlm/wlmdstats. The following command line
starts WLM, logging data for SLOs every third WLM interval:
# /opt/wlm/bin/wlmd -a config.wlm -l slo=3
For more information on the -l option, see the wlmd(1M).
Stopping WLM
With WLM running, stop it by logging in as root and running the
command:
# /opt/wlm/bin/wlmd -k
Chapter 2 77
WLM quick start: the essentials for using WLM
Creating a configuration file
NOTE Usage of either the WLM graphical user interface or the wizard
requires Java Runtime Environment version 1.4.2 or later. For
PRM-based configurations, PRM C.03.00 or later is required. (To
take advantage of the latest updates to WLM, use the latest version
of PRM available.)
78 Chapter 2
WLM quick start: the essentials for using WLM
The easiest way to configure WLM
NOTE Set your DISPLAY environment variable before starting the wizard.
Usage of the wizard requires that the appropriate version of PRM is
installed on your system.
Chapter 2 79
WLM quick start: the essentials for using WLM
How WLM controls applications
These configurations are also available on the following Web site from
the “case studies / example configurations” page:
http://www.hp.com/go/wlm
80 Chapter 2
WLM quick start: the essentials for using WLM
How to put an application under WLM control
NOTE WLM adjusts only a workload group’s CPU allocation in response to SLO
performance. Thus, WLM SLO management is most effective for
workloads that are CPU-bound.
Chapter 2 81
WLM quick start: the essentials for using WLM
How to put an application under WLM control
82 Chapter 2
WLM quick start: the essentials for using WLM
How to put an application under WLM control
Chapter 2 83
WLM quick start: the essentials for using WLM
How to put an application under WLM control
84 Chapter 2
WLM quick start: the essentials for using WLM
How to put an application under WLM control
Chapter 2 85
WLM quick start: the essentials for using WLM
How to put an application under WLM control
In the prm structure that follows, the procmap statement causes the
PRM application manager to place in the sales group any processes
gathered by the ps command that have PIDs matching the application
pid_app. The application manager places in the mrktg group any
processes gathered by the external script pidsbyapp that have PIDs
matching the application mrketpid_app.
prm {
groups = OTHERS : 1,
sales : 2,
mrktg : 3;
procmap = sales :
/bin/env /UNIX95= /bin/ps -C pid_app -o pid=,
mrktg : /scratch/pidsbyapp mrketpid_app;
}
For more information on setting up process maps, see “Specifying process
maps to define your own criteria for workload separation (optional)” on
page 172.
86 Chapter 2
WLM quick start: the essentials for using WLM
How to determine a goal for your workload
NOTE Be aware of the resource interaction for each of your workloads. Limiting
a workload’s memory allocation can also limit its CPU use. For example,
if a workload uses memory and CPU resources in the ratio of 1:2,
limiting the workload to 5% of the memory implies that it cannot use
more than 10% of the CPU resources —even if it has a 20% CPU
allocation.
Chapter 2 87
WLM quick start: the essentials for using WLM
How to determine a goal for your workload
NOTE This configuration file is only for PRM-based configurations. PRM must
be installed on your system. For a similar configuration file that
demonstrates WLM’s ability to migrate cores across partitions, see the
par_manual_allocation.wlm and par_manual_allocation.wlmpar
configuration files in /opt/wlm/examples/wlmconf/ and also included in
Chapter 9, “Example configuration files,” on page 283.
In addition, you can compare this research with similar data for the
other workloads that will run on the system. This comparison gives you
insight into which workloads you can combine (based on their needed
CPU resources) on a single system and still achieve the desired SLOs.
Alternatively, if you cannot give a workload its optimal amount of CPU
resources, you will know what kind of performance to expect with a
smaller allocation.
Once you know how the workload behaves, you can decide more easily
the type of goal, either metric or usage, you want for it. You may even
decide to just allocate the workload a fixed amount of CPU resources or
an amount that varies directly in relation to some metric. For
information on the different methods for getting your workload CPU
resources, see the section “SLO TYPES” in wlm(5).
Similar to the manual_entitlement.wlm configuration, the
/opt/wlm/toolkits/weblogic/config/manual_cpucount.wlm configuration
allows you to adjust a workload group’s CPU allocation with a series of
wlmsend calls. (To see the contents of this configuration file, see
“manual_cpucount.wlm” on page 296.) However, manual_cpucount.wlm
uses a PSET as the basis for a workload group and changes the group’s
allocation by one whole core at a time.
88 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
Chapter 2 89
WLM quick start: the essentials for using WLM
Some common WLM tasks
Each partition on the system must have the WLM daemon wlmd running.
Create a WLM configuration file for each partition, ensuring each
configuration uses the primary_host keyword to reference the partition
where the global arbiter is running. For information on the
primary_host syntax, see “Setting up your WLM configuration file” on
page 264.
WLM operates in “passive mode” when you include the -p option in your
command to activate a configuration. With passive mode, you can see
approximately how a particular configuration is going to affect your
system—without the configuration actually taking control of your
system.
# wlmd -p -a configfile
# wlmd -a configfile
# wlmd -s -a configfile
The wlmd daemon runs in secure mode by default when you use the
/sbin/init.d/wlm script to start WLM. (If you upgraded WLM, secure
mode might not be the default. Ensure that the appropriate secure mode
variables in /etc/rc.config.d/wlm are set correctly. For more information
on these variables, see “Securing WLM communications” on page 244.)
On the system running the global arbiter, create a configuration file for
the global arbiter. (If this system is being managed by WLM, it will have
both a WLM configuration file and a WLM global arbiter configuration
90 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
file. You can set up and run the global arbiter configuration on a system
that is not managed by WLM if needed for the creation of fault-tolerant
environments or Serviceguard environments.)
This global arbiter configuration file is required. In the file specify the:
You can change the 15-day default by setting the WLM global arbiter
utility_reserve_threshold keyword. For more information, see
“Specifying the reserve threshold that determines when WLM stops
activating temporary capacity resources” on page 274 or see
wlmparconf(4).
For information on the syntax of this file, see the section “Setting up your
WLM global arbiter configuration file” on page 265 or see wlmparconf(4).
Step 6. (Optional) Activate the global arbiter configuration file in passive mode.
Similar to the WLM passive mode, the WLM global arbiter has a passive
mode (also enabled with the -p option) that allows you to verify wlmpard
settings before letting it control your system.
Chapter 2 91
WLM quick start: the essentials for using WLM
Some common WLM tasks
# wlmpard -p -a configfile
# wlmpard -a configfile
# wlmpard -s -a configfile
The global arbiter runs in secure mode by default when you use the
/sbin/init.d/wlm script to start WLM. (If you upgraded WLM, secure
mode might not be the default. Ensure that the appropriate secure mode
variables in /etc/rc.config.d/wlm are set correctly. For more information
on these variables, see “Securing WLM communications” on page 244.)
92 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
Chapter 2 93
WLM quick start: the essentials for using WLM
Some common WLM tasks
NOTE PRM must be installed on your system for WLM to be able to manage
FSS groups.
In the slo structure, use the cpushares keyword with total to request
CPU resources for the workload group. The following SLO requests 15
CPU shares for the workload group sales. Based on SLO priorities and
available CPU resources, WLM attempts to meet the request.
slo fixed_allocation_example {
pri = 2;
entity = PRM group sales;
cpushares = 15 total;
}
# /opt/wlm/bin/wlmd -a config.wlm
94 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
NOTE PRM must be installed on your system for WLM to be able to manage
workgroups based on PSETs.
Step 1. Define the workload group based on a PSET and assign a workload to it.
Chapter 2 95
WLM quick start: the essentials for using WLM
Some common WLM tasks
NOTE When WLM is managing PSETs, do not change PSET settings by using
the psrset command. Only use WLM to control PSETs.
# /opt/wlm/bin/wlmd -a config.wlm
96 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
SLO is enabled
Chapter 2 97
WLM quick start: the essentials for using WLM
Some common WLM tasks
prm {
groups = sales : 2;
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
8pm and 11pm every day.
slo condition_example {
pri = 1;
entity = PRM group sales;
cpushares = 25 total;
condition = 20:00 - 22:59;
}
98 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
# /opt/wlm/bin/wlmd -a config.wlm
Chapter 2 99
WLM quick start: the essentials for using WLM
Some common WLM tasks
With a usage goal, you indicate for a workload how much of its CPU
allocation it should use. If a workload is not consuming enough of its
current allocation, the workload’s CPU allocation is reduced, allowing
other workloads to consume more CPU resources if needed. Similarly, if
the workload is using a high percentage of its allocation, it is granted
more CPU resources.
To define a usage goal for a workload group:
100 Chapter 2
WLM quick start: the essentials for using WLM
Some common WLM tasks
The following example shows the prm structure for the sales group.
prm {
groups = sales : 2;
The following slo structure for the sales group shows a usage goal
statement:
slo usage_example {
pri = 1;
mincpu = 20;
maxcpu = 60;
entity = PRM group sales;
goal = usage _CPU 80 90;
}
With usage goals, WLM adjusts the amount of CPU resources it grants a
workload group so that the group uses between 50% and 75% of its
allocated CPU resources by default. In the previous example though,
with the values of 80 and 90 in the goal statement, WLM would try to
increase or decrease the CPU allocation for the workload group until the
group is using between 80% and 90% of the allocated share of CPU
resources. However, in attempting to meet the usage goal, the new CPU
allocations to the workload group will typically be within the
mincpu/maxcpu range.
Chapter 2 101
WLM quick start: the essentials for using WLM
Other functions WLM provides
tune {
wlm_interval = 5;
}
# /opt/wlm/bin/wlmd -a config.wlm
102 Chapter 2
WLM quick start: the essentials for using WLM
Status information WLM provides
• Oracle Databases
• HP-UX Apache-based Web Server software
• BEA WebLogic Server
• SNMP agents
• SAP software
• SAS software
WLM Toolkits are included with WLM. They are also freely available on
the following Web site:
http://www.hp.com/go/softwaredepot
For more information on the toolkits, see the HP-UX Workload Manager
Toolkits User’s Guide on http://docs.hp.com/hpux/netsys/ or wlmtk(5).
• /var/opt/wlm/msglog
Chapter 2 103
WLM quick start: the essentials for using WLM
Status information WLM provides
104 Chapter 2
WLM quick start: the essentials for using WLM
Monitoring WLM
Monitoring WLM
Several methods available for monitoring WLM are described in this
section.
ps
The following ps command has options specific to PRM that WLM uses
to define workload groups when dividing resources within a single
HP-UX instance:
ps [-P] [-R workload_group]
• -P
Adds the column PRMID, showing the workload group for each
process.
# ps -P
PRMID PID TTY TIME COMMAND
g3 6793 ttyp1 1:52 loop.pl
g3 6463 ttyp1 7:02 loop3.pl
g2 6462 ttyp1 4:34 loop2.pl
• -R workload_group
Lists only the processes in the group named by workload_group.
Here is output showing processes in the workload group g3:
# ps -R g3
PID TTY TIME COMMAND
6793 ttyp1 1:29 loop.pl
6463 ttyp1 6:41 loop3.pl
Chapter 2 105
WLM quick start: the essentials for using WLM
Monitoring WLM
wlminfo
The wlminfo command, available in /opt/wlm/bin/, displays information
about SLOs, metrics, workload groups, virtual partitions or nPartitions,
and the current host. To display information about workload groups,
specify the group keyword as in the following example. Note that as of
WLM A.03.02 you can use the -v option with the wlminfo group
command to display gmincpu, gmaxcpu, gminmem, and gmaxmem values, if
they are assigned in the active configuration file).
# wlminfo group
Workload Group PRMID CPU Shares CPU Util Mem Shares Mem Util State
OTHERS 1 65.00 0.00 6.00 2.10 ON
g2 2 15.00 0.00 64.00 32.43 ON
g3 3 20.00 0.00 30.00 9.17 ON
106 Chapter 2
WLM quick start: the essentials for using WLM
Monitoring WLM
# /opt/wlm/bin/wlminfo host
wlmgui
The wlmgui command, available in /opt/wlm/bin/, graphically displays
information about SLOs, metrics, workload groups, partitions, and the
current host.
prmmonitor
The prmmonitor command, available in /opt/prm/bin/, displays current
configuration and resource usage information, as in the following
example. The ‘CPU Entitle’ column indicates the CPU entitlement
(allocations) for the group. The ‘Upper Bound’ column indicates the
per-group consumption cap; the column is blank for each group because
the CPU consumption cap is not available with WLM. The ‘LCPU State’
column indicates the Hyper-Threading setting (ON or OFF) for
PSET-based groups. The column is blank if the system does not support
Hyper-Threading or if a group is not a PSET-based group.
Chapter 2 107
WLM quick start: the essentials for using WLM
Monitoring WLM
prmlist
The prmlist command, available in /opt/prm/bin, displays current CPU
allocations plus user and application configuration information. The
‘Upper Bound’ column indicates the per-group consumption cap; the
column is blank for each group because the CPU consumption cap is not
available with WLM. The ‘LCPU Attr’ column indicates the
Hyper-Threading setting (ON or OFF) for a PSET-based group; the
column is blank if the system does not support Hyper-Threading or the
group is not a PSET-based group.
PRM configured from file: /var/opt/wlm/tmp/wmprmBAAa06228
File last modified: Thu Aug 24 08:35:23 2006
GlancePlus
The optional HP product GlancePlus allows you to display resource
allocations for the workload groups as well as list processes for
individual workload groups.
wlm_watch.cgi
This CGI script, available in /opt/wlm/toolkits/apache/bin/, allows you to
monitor WLM using a web browser interface to prmmonitor, prmlist,
and other monitoring tools.
For information on setting up this script, see wlm_watch(1M).
108 Chapter 2
WLM quick start: the essentials for using WLM
Monitoring WLM
• /var/opt/wlm/msglog
• /var/opt/wlm/wlmdstats
• /var/opt/wlm/wlmpardstats
For information on these logs, including sample output, see the section
“Status information WLM provides” on page 103.
Chapter 2 109
WLM quick start: the essentials for using WLM
Monitoring WLM
110 Chapter 2
3 How WLM manages workloads
Chapter 3 111
How WLM manages workloads
How WLM works
112 Chapter 3
How WLM manages workloads
How WLM works
• Virtual partitions
• nPartitions that use Instant Capacity software (formerly known
as iCOD software)
8. Assigns new CPU and memory shares.
9. Writes to log files.
If you enabled statistics logging with the wlmd -l option, at the end
of each WLM interval, WLM adds data for the interval to the
/var/opt/wlm/wlmdstats file.
Also, the WLM global arbiter writes to its own statistics log file if you
enabled logging with the wlmpard -l option. At the end of each
global arbiter interval, the global arbiter adds data for the interval to
the /var/opt/wlm/wlmpardstats file.
10. Sets EMS resources for monitoring of SLO compliance.
11. Repeats tasks 2 through 10 the next WLM interval.
12. WLM adds messages, at any time, to its message log
/var/opt/wlm/msglog. This log, which WLM automatically creates,
informs you of the WLM daemon’s operations.
13. WLM and the global arbiter daemon generate audit data files, if
enabled (using the -t option to wlmd and wlmpard when you
activated your WLM configuration and global arbiter configuration).
Figure 3-1 on page 115 illustrates how WLM works.
Chapter 3 113
How WLM manages workloads
How WLM works
For more information on the components shown in the figure, see the
following sections:
• Types of SLOs
“Shares-based SLOs vs goal-based SLOs” on page 118
• Metric data collectors
“Supplying data to WLM” on page 482
• WLM daemon
“wlmd” on page 374
• WLM configuration file
Chapter 5, “Configuring WLM,” on page 135
• WLM global arbiter
Chapter 7, “Managing SLOs across partitions,” on page 255
• PRM
Appendix F, “Understanding how PRM manages resources,” on
page 447
• EMS
Chapter 10, “Monitoring SLO compliance and WLM,” on page 343
Figure 3-1 provides an overview of WLM functional flow. It shows WLM
running in each partition on the system. If you are using WLM on a
system without partitions, focus on Par 0 to understand how WLM
controls resources on your system to ensure SLOs are met. If you want to
understand how WLM manages resources across partitions, consider Par
0 as one of four partitions along with Par 1, Par 2, and Par 3; the WLM
global arbiter (defined in the partition for Par 0) determines resource
allocations for each of the four partitions. Detailed descriptions of the
functional processes illustrated in Figure 3-1 are provided after the
figure.
114 Chapter 3
How WLM manages workloads
How WLM works
PRM
Workload groups get
new CPU allocations
better suited to their SLOs WLM global arbiter
WLM creates a new PRM configuration daemon (wlmpard)
WLM
global arbiter
configuration
file
Par 0
HP-UX server
Chapter 3 115
How WLM manages workloads
How WLM works
Referring to Figure 3-1 on page 115, the main WLM functional flow is as
follows:
116 Chapter 3
How WLM manages workloads
How WLM works
NOTE For partitions, you can bypass creating workloads (workload groups),
treating the partition itself as the workload. Par 2 and Par 3 show
the scenario.
The monitoring and logging processes shown in Figure 3-1 include the
following:
Chapter 3 117
How WLM manages workloads
Shares-based SLOs vs goal-based SLOs
• With the WLM global arbiter configuration file activated using the
-l option to wlmpard, the global arbiter adds data to the
/var/opt/wlm/wlmpardstats/ statistics log file.
• Shares-based SLOs
A shares-based SLO allows you to specify either a fixed allocation of
shares or a shares-per-metric allocation for a workload. A
shares-per-metric allocation is of the form “x shares of the CPU
resources for each metric y”.
A shares-based SLO has a priority. It may also have maximum and
minimum CPU request bounds and an explicit shares request.
However, it does not have an explicit goal.
• Goal-based SLOs
A goal-based SLO has a specified performance or usage goal.
WLM automatically changes CPU allocations for an SLO’s associated
workload based on the:
118 Chapter 3
How WLM manages workloads
How WLM gets application data
Chapter 3 119
How WLM manages workloads
How a workload is managed (controllers)
SLO violations
• For usage goals:
An SLO violation occurs if the CPU utilization is above the target
utilization range. With usage goals, the goal is to keep CPU
utilization (CPU used / CPU granted) within a certain range, 50%
and 75% by default. When the workload goes above this range, giving
it more CPU resources can bring it back into the range.
Going below this range is not considered an SLO violation because
the situation cannot be improved by providing the workload with
additional CPU resources.
• For performance goals:
An SLO violation occurs when a workload’s performance varies from
the goal in the wrong direction. Which direction is wrong depends on
the goal definition. For example, if the goal is to keep response_time
less than 5 seconds, a response_time value of 4.3 seconds varies from
the goal in the right direction. However, a response_time value of 5.4
120 Chapter 3
How WLM manages workloads
How a workload is managed (controllers)
Chapter 3 121
How WLM manages workloads
Allocating CPU resources: The rising tide model
122 Chapter 3
How WLM manages workloads
Allocating CPU resources: The rising tide model
Figure 3-2 illustrates the rising tide model. Moving from left to right
within a single priority shows how WLM grants additional CPU
resources to the workloads.
25
15 +10
➜ +14 +14 ➜ 15 15
A B C A B C A B C
60 60 60
+8 +8 +8
+10 +10
25 25 ➜ 25 25 25
15 +14 ➜ 15 15
A B C A B C A B C
Chapter 3 123
How WLM manages workloads
Example of WLM in use
• Accounts payable
• Accounts receivable
The accounts payable and accounts receivable workloads run constantly.
Without WLM, the performance of these workloads varies greatly
throughout the day, based mainly on the amount of work competing
workloads have at any given time. Consequently, the server might be
overloaded with accounts payable processing, greatly slowing the
accounts receivable processing. Figure 3-3 illustrates this scenario.
Number of transactions
By using WLM, you can define SLOs for the workloads to specify their
desired performance levels. For example, the accounts payable workload
can be assigned a goal of paying out money in less than 2.5 seconds,
while the accounts receivable workload is assigned a goal of depositing
the incoming money in less than 1 second. WLM uses data from data
collectors to determine how much a workload is underachieving or
overachieving its desired performance level. WLM then automatically
adjusts the CPU allocation, based on priorities, for workloads that are
underachieving or overachieving. Figure 3-4 shows how the workloads
are controlled under WLM.
124 Chapter 3
How WLM manages workloads
Example of WLM in use
3
AP goal
2
1 AR goal
Number of transactions
Chapter 3 125
How WLM manages workloads
Example of WLM in use
126 Chapter 3
4 How do I use WLM?
This chapter the basic steps needed to use WLM. The remaining
chapters explain these steps in detail.
Chapter 4 127
How do I use WLM?
Steps for using WLM
Set mincpu to 0 and maxcpu to 100. Monitor the system for one to two
weeks to determine:
128 Chapter 4
How do I use WLM?
Steps for using WLM
NOTE Running the wizard requires Java Runtime Environment version 1.4.2
or later and, for PRM-based configurations, PRM C.03.00 or later. (To
take advantage of the latest updates to WLM, use the latest version of
PRM available.)
For information on the types of workloads and their associated SLOs, see
“Shares-based SLOs vs goal-based SLOs” on page 118.
Chapter 4 129
How do I use WLM?
Steps for using WLM
Step 4. For workloads with CPU usage goals, add goal-based SLOs to your
configuration. For information on usage goals, see “Specifying a goal
(optional)” on page 199.
Step 5. For workloads with performance goals, add goal-based SLOs to your
configuration, as explained in “Configuring WLM for metric-based SLOs”
on page 467.
Step 7. (Optional) For notification of SLO status changes, monitor the WLM
EMS resources.
WLM operates in “passive mode” when you include the -p option in your
command to activate a configuration. With passive mode, you can see
approximately how a particular configuration is going to affect your
system—without the configuration actually taking control of your
system.
# wlmd -p -a configfile
For wlmd syntax information, see “wlmd command syntax” on page 363.
130 Chapter 4
How do I use WLM?
Steps for using WLM
NOTE When you start WLM by using the /sbin/init.d/wlm script, WLM runs in
secure mode by default. However, if you are upgrading WLM and the
/etc/rc.config.d/wlm script had been modified prior to the upgrade, ensure
that the secure mode variables discussed in “Securing WLM
communications” on page 244 are enabled. You also must have set up
security certificates and distributed them to all systems or partitions
being managed by the same WLM global arbiter (wlmpard). HP
recommends using secure mode. If you choose not to use secure mode,
use global arbitration only on trusted local area networks. For
information on securing communications, see the section HOW TO
SECURE COMMUNICATIONS in wlmcert(1M).
# wlmd -a -s configfile
To generate audit data (-t) and log statistics (-l all), use the following
command:
Using wlmgui or wlminfo with its slo command allows you to monitor
your SLOs.
Also, the WLM EMS monitor makes various status data available to
EMS clients. Check this data to verify SLO compliance.
For more information on this topic, see Chapter 10, “Monitoring SLO
compliance and WLM,” on page 343.
When using wlminfo slo, there are two columns that can indicate the
death of a data collector process: State and Concern. For more
information on these columns, see wlminfo(1M).
Chapter 4 131
How do I use WLM?
Steps for using WLM
/applications/wlm/slo_status/SLONAME
changes to:
WLM_SLO_COLLECTOR_DIED (5)
NOTE By default, WLM global arbitration runs in secure mode when you use
the /sbin/init.d/wlm script to start WLM. However, if you are upgrading
WLM and the /etc/rc.config.d/wlm script had been modified prior to the
upgrade, ensure that the secure mode variables discussed in “Securing
WLM communications” on page 244 are enabled. You also must have
performed the required steps to set up security certificates and distribute
them. HP recommends using secure mode. If you choose not to use secure
mode, use global arbitration only on trusted local area networks.
For more information on the global arbiter, including its passive mode,
see the chapter Chapter 7, “Managing SLOs across partitions,” on
page 255.
Step 13. (Optional) Set up WLM to automatically start its wlmd and wlmpard
daemons at reboot.
132 Chapter 4
How do I use WLM?
Reconfiguring WLM
Reconfiguring WLM
To fine-tune an existing configuration, follow these steps:
# wlmd -p -a configfile
For wlmd syntax information, see “wlmd command syntax” on page 363.
# wlmd -a configfile
Chapter 4 133
How do I use WLM?
Disabling WLM and its global arbiter
134 Chapter 4
5 Configuring WLM
This chapter introduces the WLM configuration file and how to activate
the configuration so that WLM manages the system. It covers the
creation and activation of the WLM configuration file.
The WLM configuration file is the main user interface for controlling
WLM. This file is an ASCII file that you can edit with a text editor.
WLM does not have a default configuration file.
NOTE WLM and PRM have separate configuration files, each with its own
syntax. While WLM and PRM configuration files can define an
equivalent configuration, the files cannot be interchanged. For
information on converting an existing PRM configuration file to a WLM
configuration file, see Appendix G, “Migrating from PRM to WLM,” on
page 465.
Chapter 5 135
Configuring WLM
Configuration file syntactic conventions
136 Chapter 5
Configuring WLM
Configuration file syntactic conventions
Chapter 5 137
Configuring WLM
Using the WLM configuration wizard
NOTE Running the wizard requires Java Runtime Environment version 1.4.2
or later and, for PRM-based configurations, PRM C.03.00 or later. (To
take advantage of the latest updates to WLM, use the latest version of
PRM available.)
The following figure shows one of the Wizard’s screens. The left pane
shows the steps the Wizard guides you through.
138 Chapter 5
Configuring WLM
Using the WLM configuration wizard
Chapter 5 139
Configuring WLM
Using the WLM GUI
140 Chapter 5
Configuring WLM
Using the WLM GUI
Chapter 5 141
Configuring WLM
Using the WLM GUI
142 Chapter 5
Configuring WLM
Using the WLM GUI
• Start WLM
• Stop WLM
• Try WLM without it taking control of my system
Chapter 5 143
Configuring WLM
Specifying the WLM parser version
NOTE This notification is supported with PPU (v4, v7, or later) and with any
version of Instant Capacity.
If you plan on using Instant Capacity in combination with WLM vPar
management, use vPars A.03.01 or later.
144 Chapter 5
Configuring WLM
Notification of ‘Instant Capacity needed’ / Pay per use optimization
WLM does not enable Instant Capacity or Pay per use (PPU) reserves. It
merely informs you that the reserves could help you meet your SLOs;
manually activate the reserves if you feel it is appropriate. (Independent
of this keyword though, you can use wlmpard to automate activation of
these reserves.)
To enable notification, use the icod_thresh_pri keyword in your WLM
configuration. This is a global keyword—it should be outside all prm, slo,
and tune structures. The syntax for icod_thresh_pri is:
icod_thresh_pri = integer;
where
icod_thresh_pri
Is an optional keyword. Specifying this keyword allows
you to use an EMS resource to notify you when
Instant Capacity reserves could help meet SLOs.
integer
Is an integer value greater than or equal to 1. If Instant
Capacity reserves exist, they are considered needed
whenever SLOs with a priority from 1 to integer are
failing. If an SLO with a priority in this range is failing,
notification that Instant Capacity reserves are needed
is sent using an EMS resource.
Notification is made through the following EMS resource:
/applications/wlm/icod_reserves_needed
When Instant Capacity reserves are not available or are not required,
the EMS resource is set to:
ICOD_NEEDED_FALSE (0)
Chapter 5 145
Configuring WLM
Notification of ‘Instant Capacity needed’ / Pay per use optimization
When Instant Capacity reserves exist and are needed, the EMS resource
is set to:
ICOD_NEEDED_TRUE (1)
In this case, it may be possible to reduce SLO failures by activating some
Instant Capacity reserves.
When using icod_thresh_pri, you can also use
icod_filter_intervals, another global keyword that must be outside
all prm, slo, and tune structures. The syntax is:
icod_filter_intervals = integer;
where
icod_filter_intervals
Is an optional keyword. It allows you to ignore
short-term fluctuations in the conditions that affect the
EMS resource.
integer
Is an integer value greater than or equal to 1. This
value indicates the number of consecutive WLM
intervals over which Instant Capacity reserves must be
needed before the EMS resource is changed to
ICOD_NEEDED_TRUE. Similarly, it is the number of
intervals over which Instant Capacity reserves are not
required before the EMS resource is changed to
ICOD_NEEDED_FALSE.
For background information on Instant Capacity and PPU, see
“Integrating with Temporary Instant Capacity (TiCAP)/ Pay per use
(PPU)” on page 410.
146 Chapter 5
Configuring WLM
System-wide settings
System-wide settings
Use one or more of the following keywords outside all structures in your
configuration to set values for the host (typically a virtual partition or
nPartition).
To specify the minimum number of CPU shares a host receives, use the
hmincpu keyword and the following syntax:
hmincpu = min;
where
hmincpu Is an optional keyword.
You cannot specify this keyword in a configuration that
includes a prm structure.
min Is the host’s minimum number of CPU shares. The
value must be an integer between 0 and the host’s
hmaxcpu value, inclusive.
min is out of the total CPU resources, which is 100
multiplied by the number of cores (absolute CPU units
are implied). The default value is 0.
To specify the maximum number of CPU shares a host receives, use the
hmaxcpu keyword and the following syntax:
hmaxcpu = max;
where
hmaxcpu Is an optional keyword.
You cannot specify this keyword in a configuration that
includes a prm structure.
max Is the host’s maximum number of CPU shares. The
value must be an integer between the host’s hmincpu
value and the system’s total CPU resources, inclusive.
Total CPU resources is 100 multiplied by the number of
cores (absolute CPU units are implied).
Chapter 5 147
Configuring WLM
System-wide settings
NOTE For information on the effect of the hmincpu and hmaxcpu keywords in
passive mode, see “Passive mode versus actual WLM management” on
page 238.
The larger a host CPU weight value you assign a host, the more CPU
resources it receives when not enough CPU resources are available to
satisfy all requests at a given priority level. A larger host CPU weight
value also gets a host more CPU resources when all SLOs can be
satisfied and excess CPU resources are available for distribution.
To specify a host’s CPU weight, use the hweight keyword and the
following syntax:
hweight = wt;
where
hweight Is an optional keyword.
You cannot specify this keyword in a configuration that
includes a prm structure.
wt Is the host’s CPU weight. The value must be an integer
greater than or equal to 1. The default weight for a host
is 1.
148 Chapter 5
Configuring WLM
Defining the PRM components (optional)
WLM replaces any existing PRM configuration on the system with the
PRM items specified in the prm structure. For example, if a system was
using PRM before starting the WLM daemon, any PRM groups,
application records, user records, and Unix group records defined in
PRM must be defined in this structure as well, or they will not be in force
when WLM takes control of the system.
Defining a prm structure consists of the following tasks:
Chapter 5 149
Configuring WLM
Defining the PRM components (optional)
}
where
FSS_group_def has the syntax:
group : group_ID
PSET_group_def has the syntax:
group : PSET
150 Chapter 5
Configuring WLM
Defining the PRM components (optional)
procmap = finance :
/bin/env/ UNIX95= /bin/ps -C pid_app -o pid=,
sales : /scratch/pidsbyapp salespid_app,
marketing : /scratch/pidsbyapp mrketpid_app;
Chapter 5 151
Configuring WLM
Defining the PRM components (optional)
# /opt/wlm/bin/wlmgui
Step 4. Select the [New] button to start a new configuration. The left and right
panes change as shown in the next step.
152 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Step 5. Select the [Add] button. A new host name appears in the right pane and
in the left pane.
Chapter 5 153
Configuring WLM
Defining the PRM components (optional)
Step 6. Select the name of the new host, wlmhost0 in this case, in the left pane.
The right pane changes, allowing you to set the configuration elements
you would like to see in the new configuration. (The fields listed in the
top of the right pane are used when you want to open an existing
configuration; that is, for “Hostname” you would enter the name of the
host on which the configuration file resides, for “Port” you would enter
the port to use when connecting to the host, and so on.)
154 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Step 7. Click “PRM” in the left pane. This changes the right pane to show a
“Workload groups” item. Check the “Workload groups” box.
Chapter 5 155
Configuring WLM
Defining the PRM components (optional)
Step 8. Select the “Workload groups” item in the left pane. The right pane
changes, allowing you to add a group.
156 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Step 9. Select the [Add group] button. A new dialog appears. Accept the default
(FSS workload group) by selecting the [OK] button.
Chapter 5 157
Configuring WLM
Defining the PRM components (optional)
Step 10. The right pane changes again, with the GUI starting to define a
workload group for you. The GUI fills in the required fields for you,
although you can change the values if you like. Fill in other fields if you
like.
Step 11. Select the [Commit changes] button to save the current configuration
in memory. To save changes to disk, go to the Deploy tab. (The file is
saved to the file specified in the Filename field in the Modify tab when
the system is selected in the left pane.)
The previous steps highlight only one use of the WLM GUI. For
additional information, see the GUI’s online help.
158 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Chapter 5 159
Configuring WLM
Defining the PRM components (optional)
160 Chapter 5
Configuring WLM
Defining the PRM components (optional)
where
group
Is the workload group name. Use names that are less
than eight characters long for proper display by the
ps -P command. Do not start the name with an
underscore (_).
group cannot be either the PRM_SYS or OTHERS group.
Chapter 5 161
Configuring WLM
Defining the PRM components (optional)
NOTE You can define FSS or PSET-based workload groups and use WLM
partition management (by specifying the primary_host keyword) in the
same WLM configuration. Certain software restrictions apply to using
PSET-based groups with virtual partitions (vPars), Instant Capacity, and
Pay per use. For more information, see the WLM Release Notes
(/opt/wlm/share/doc/Rel_Notes). On HP-UX 11i v1 (B.11.11) systems, you
162 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Chapter 5 163
Configuring WLM
Defining the PRM components (optional)
164 Chapter 5
Configuring WLM
Defining the PRM components (optional)
init_group Is the name of the initial workload group for the user or
netgroup. This is the group login chooses when
launching the user’s login shell, and the group cron
chooses when scheduling jobs for that user.
For information on a user’s group placement when the
user belongs to multiple netgroups, see the Process
Resource Manager User’s Guide.
alt_groupX (Optional) Is the name of one of the alternate workload
groups for the user or netgroup. Alternate groups are
groups other than the initial group in which the user or
netgroup members are allowed to run processes.
NOTE A process may start in a workload group other than its assigned group
due to its inheriting the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its user record.
Chapter 5 165
Configuring WLM
Defining the PRM components (optional)
NOTE A process may start in a workload group other than its assigned group
due to its inheriting the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its Unix group record.
166 Chapter 5
Configuring WLM
Defining the PRM components (optional)
NOTE The system is polled every 30 seconds to ensure that processes are
running in the appropriate workload groups. If a process forks child
processes and immediately exits, the polling will likely miss the parent
process. As a result, the parent process is never placed in its workload
group. When the child processes are found during polling, WLM will not
be able to determine the parent of the processes. Then, instead of being
placed in the parent’s assigned group, the child processes are placed in
the group of the invoking user or in the OTHERS group. To avoid this
condition, be sure parent processes exist for at least 30 seconds (the
default polling interval). In various shells, you can use the wait
command in a script to prevent the process from exiting immediately.
(Placement of a process family can take up to two polling intervals: The
parent process is moved to its assigned group in the first interval, while
the child processes are moved to the group in the second interval.)
Chapter 5 167
Configuring WLM
Defining the PRM components (optional)
168 Chapter 5
Configuring WLM
Defining the PRM components (optional)
NOTE Beginning with WLM A.03.01, you can use wildcards in both the file
name and the alternate name in a single application record.
NOTE A process may start in a workload group other than its assigned group
due to its inheriting the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its application record.
Script example
To place a script in a workload group using an apps statement:
Step 1. Specify the full path of the shell or interpreter used in the script as the
application.
Step 2. Specify the name of the script (just the name—no path) as the alt_name.
Chapter 5 169
Configuring WLM
Defining the PRM components (optional)
NOTE Because the full pathname is not required for the script, a rogue user can
get access to workload groups—that would otherwise not be
accessible—by using the name of the script for new scripts or wrappers.
Step 2. Specify the new name the application takes once it is running as the
alt_name.
For example, here is an apps statement for an Oracle database with two
instances:
apps = Finance : /opt/oracle/bin/oracle "ora*Finance",
Sales : /opt/oracle/bin/oracle "ora*Sales";
The Oracle database executable is the same in both cases; however, the
alternate names specify different patterns to match. (Given the use of
wildcards, the alternate names are quoted.) The patterns are based on
the instance names. Consequently, processes starting with “ora” and
ending with “Finance” are placed in the Finance workload group.
Similarly, processes matching the pattern “ora*Sales” go into the
workload group Sales.
The following is an apps statement using an ERE with the alternate
name field:
apps = Finance_Sales : /opt/oracle/bin/oracle 'ora.*(Finance|Sales)';
The ERE expression is enclosed in single quotes. Any processes
beginning with the string “ora” followed by any strings that include
“Finance” or “Sales” are placed in the workload group Finance_Sales.
170 Chapter 5
Configuring WLM
Defining the PRM components (optional)
NOTE A process may start in a workload group other than its assigned group
because it inherits the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its compartment record.
Chapter 5 171
Configuring WLM
Defining the PRM components (optional)
172 Chapter 5
Configuring WLM
Defining the PRM components (optional)
NOTE A process may start in a workload group other than its assigned group
due to its inheriting the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its process map.
If a PID is specified by multiple PID_finder scripts or commands, the
process’s assignment might change from group to group with each
successive spawning of the PID_finder.
Process maps take precedence over WLM’s standard criteria for process
placement (compartment, application, user, and Unix group records).
The precedence given to the various records that define workload group
placement is described in “How the application manager affects
workload group assignments” on page 459.
Chapter 5 173
Configuring WLM
Defining the PRM components (optional)
NOTE If you use the disks keyword, you must explicitly create the OTHERS
workload group and assign it a disk bandwidth share.
Specify disk bandwidth shares for logical volume groups in the prm
structure using the following syntax:
disks = group : volume shares [, ...];
174 Chapter 5
Configuring WLM
Defining the PRM components (optional)
where
group Is the workload group name.
You cannot specify a PSET group in a disks statement.
volume Names a logical volume group. volume must begin with
/dev/v to be recognized.
shares Is an integer value greater than or equal to 0. shares
translates to a percentage of the disk bandwidth when
dividing it by the number of disk bandwidth shares
assigned to all the workload groups for the given
volume group.
If one FSS workload group has disk shares for a volume
group, then all FSS workload groups must have disk
shares for that volume group.
Here is an example disks statement:
disks = OTHERS : /dev/vg01 1,
finance : /dev/vg01 35,
sales : /dev/vg01 35,
marketing : /dev/vg01 29;
Chapter 5 175
Configuring WLM
Defining the PRM components (optional)
176 Chapter 5
Configuring WLM
Defining the PRM components (optional)
NOTE For information on the effect of this keyword in passive mode, see
“Passive mode versus actual WLM management” on page 238.
Chapter 5 177
Configuring WLM
Defining the PRM components (optional)
NOTE For information on the effect of this keyword in passive mode, see
“Passive mode versus actual WLM management” on page 238.
178 Chapter 5
Configuring WLM
Defining the PRM components (optional)
• A group’s CPU allocation must not exceed the SLO request unless all
SLOs at the same priority are satisfied.
• Any CPU allocation mandated by a group’s higher-priority SLO is
always retained (it is never reduced to achieve a weight-to-allocation
ratio that equals that of the other groups at the same priority level,
as sought under normal circumstances).
This policy for determining allocations also applies to CPU demand that
is not a direct result of a prioritized SLO, such as gmincpu values and
distribution of excess (when the distribute_excess tunable is set). The
ultimate consequence of this policy is that, in the absence of other SLO
requests, two requests at the same priority level that are not fully
satisfied will have the same ratio between their respective allocations as
Chapter 5 179
Configuring WLM
Defining the PRM components (optional)
between their respective weights (in other words, the ratio of group A’s
allocation to group B’s allocation equals the ratio of group A’s weight to
group B’s weight).
NOTE WLM uses this same policy for using weight to determine CPU
allocations across partitions. For more information on how WLM
manages CPU allocations across partitions, see Chapter 7, “Managing
SLOs across partitions,” on page 255.
Requested Final
Group Allocation Weight
allocation allocation
A 10 5 15 15
B 20 2 60 20
C 10 5 70 25
OTHERS 0 8 80 40
The sum of the weights assigned to the groups is 20. Groups A and C both
have equal weights (5) and allocations (10). Therefore, WLM attempts to
allocate 25% (5/20) of the total CPU resources to these groups. This
translates to 15 additional CPU shares each. Similarly, groups B and
OTHERS, with weights of 2 and 8 respectively, should get 10% (2/20) and
40% (8/20) of the total CPU resources.
However, before distributing the CPU resources, WLM must observe the
policy mentioned previously. Group B already has more shares than it is
entitled to—it has 20% of the CPU allocation while its weight is only 10%
(2/20) of the total weight. Consequently, B gets no more CPU resources.
180 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Recall that WLM attempts to equally satisfy all SLOs at a given priority
by allocating CPU in the same weight-to-allocation ratio. With B
satisfied, we focus on groups A, C, and OTHERS. The weight-to-allocation
ratio for A and C is 5/10, or 1/2. The ratio for OTHERS is undefined because
it currently has no allocation. Consequently, WLM first allocates shares
to OTHERS to bring its weight-to-allocation ratio in line with the ratios of
A and C. To match the ratio of 1/2, WLM grants OTHERS 16 shares so that
its ratio is 8/16, or 1/2, as well.
This leaves 44 excess shares for groups A and C. WLM allocates 5 each to
groups A and C, then another 8 to OTHERS to maintain the
weight-to-allocation ratio. At this point, both A and B have 15 shares each
and OTHERS has 24 shares. Group A’s SLO request is now satisfied. So,
group A will not be allocated more shares until the other SLO requests
are fulfilled.
Because the CPU allocations for groups C and OTHERS remain less than
their requested allocations, WLM will attempt to allocate more CPU
resources to these two groups. WLM allocates the remaining 26 shares to
groups C and OTHERS based on their weights. Thus, C gets an additional
10 and OTHERS gets 16 for a total of 25 and 40 shares, respectively.
Chapter 5 181
Configuring WLM
Defining the PRM components (optional)
larger than the requests, the requests are used first. Thus, A, B, and C all
receive a CPU allocation of 20. That leaves 40% of the CPU resources
unallocated. With distribute_excess not set, all 40% goes to OTHERS.
Table 5-2 weight example with distribute_excess = 0 (off)
Requested Final
Group Weight
allocation allocation
A 2 20 20
B 1 20 20
C 1 20 20
Table 5-3 shows the same example, but with distribute_excess set.
(This discussion assumes extended_shares is not set.) Again, A, B, and
C all receive a CPU allocation of 20, leaving 40% of the CPU unallocated.
This time though, distribute_excess is set. Consequently, the
remaining 40% (less the 1% default to OTHERS) goes to A, B, and C—based
on their weights. Dividing the weight of A (2), by the sum of the weights
(4), A gets 50% of the total CPU resources, while B and C get 25%. WLM
removes 1% from B to give to OTHERS so that it maintains the minimum
CPU percentage required for all groups.
Table 5-3 weight example with distribute_excess = 1 (on)
Requested Final
Group Weight
allocation allocation
A 2 20 50
B 1 20 24
C 1 20 25
182 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Chapter 5 183
Configuring WLM
Defining the PRM components (optional)
184 Chapter 5
Configuring WLM
Defining the PRM components (optional)
Consider the following example. We have four groups, with one being a
PSET group. The gminmem serves as an allocation for the groups because
each group gets the amount of memory represented by its gminmem value.
Table 5-4 memweight example
Allocation Final
Group Weight
(gminmem) allocation
A (PSET) 10 Unspecified 10
B 30 3 42
C 20 2 28
OTHERS 20 1 20
First, A gets its gminmem because it is a PSET group. That leaves 90% of
the memory to distribute. Next, OTHERS is granted its memory. It has a
memweight of 1, and the sum of the memweight values is 6. As a result,
OTHERS gets 1/6 * 90, or 15%. However, 15 is less than its gminmem, so it
gets its gminmem of 20 instead. Now there is 70% left. However, WLM
guarantees the gminmem for the groups B and C, 30 and 20 respectively.
So, there is only 20% to distribute between the two groups B and C. This
20% is distributed so that the groups’ final allocations are proportional to
their weights.
Chapter 5 185
Configuring WLM
Defining SLOs
Defining SLOs
Use slo structures to specify your service-level objectives and assign
priorities to those objectives.
You define slo structures for a host partition or based on the workload
groups you defined in the prm structure. For information on specifying
the prm structure, see “Defining the PRM components (optional)” on
page 149.
Defining an slo structure consists of the following tasks:
186 Chapter 5
Configuring WLM
Defining SLOs
[ mincpu = lower_bound_request; ]
[ maxcpu = upper_bound_request; ]
cpushares = value { more | total } [ per metric met [ plus offset ] ];
[ condition = condition_expression; ]
[ exception = exception_expression; ]
}
Here are several example slo structures:
slo buying {
pri = 1;
mincpu = 50;
maxcpu = 200;
goal = metric stock_price_1 < 50;
condition = 09:00 - 16:00;
exception = Sat - Sun;
}
slo selling {
pri = 1;
mincpu = 50;
maxcpu = 300;
goal = metric stock_price_2 > 75;
condition = 09:00 - 16:00;
exception = Sat - Sun;
}
Step 1. Select the name of the host, wlmhost0 in this case, in the left pane. The
right pane allows you to set the type of configuration elements you would
like to see in the new configuration.
Chapter 5 187
Configuring WLM
Defining SLOs
188 Chapter 5
Configuring WLM
Defining SLOs
Chapter 5 189
Configuring WLM
Defining SLOs
Step 3. Select the [Add SLO] button. A new dialog appears. The default option
is “Varies with the group’s usage”. This option is the usage goal. Select
the [OK] button.
190 Chapter 5
Configuring WLM
Defining SLOs
Step 4. The right pane changes, allowing you to define the SLO. The goal field
defines the usage goal.
Chapter 5 191
Configuring WLM
Defining SLOs
Step 6. Select the [Commit changes] button to save the current configuration
in memory. To save changes to disk, go to the Deploy tab. (The file is
saved to the file specified in the file name field in the Modify tab when
the system is selected in the left pane.)
The previous steps highlight only one use of the WLM GUI. For
additional information, see the GUI’s online help.
192 Chapter 5
Configuring WLM
Defining SLOs
Sales 1
Chapter 5 193
Configuring WLM
Defining SLOs
Finance 2
Finance 3
Sales 4
Sales and Finance are the only workloads in the configuration. After
the priority 1 and 2 SLOs are met, the remaining CPU resources go to
Finance. If there are any CPU resources left at that point, it goes to
Sales.
You can also use any remaining CPU resources by setting the
distribute_excess tunable, as explained in the section “Distributing
excess CPU resources to your workloads (optional)” on page 218.
You can assign multiple slo structures the same priority. However, if all
the SLOs have the same priority and there are not enough resources,
some or all of the SLOs will not be met consistently. Thus, determine
which SLOs must be met and assign priorities accordingly.
Consider the following example which has two workloads, where both
have SLOs at the same priority. Fortunately, the server has the resources
to meet both workloads’ goals, as shown in Figure 5-3.
2 AP goal
1 AR goal
Number of transactions
194 Chapter 5
Configuring WLM
Defining SLOs
Now add a third workload named Payroll with an SLO at the same
priority as those for the other workloads. This workload’s SLO is to
calculate each employee’s overtime, commissions, bonuses, taxes, and
total pay in less than 0.5 seconds. The system is now overloaded and
cannot meet each SLO.
Because each SLO has the same priority, WLM cannot allocate enough
resources to any one workload to help it achieve its SLO. Consequently,
no SLO is met, as shown in Figure 5-4.
2 AP goal
1 AR goal
P goal
Number of transactions
Accounts payable (AP)
Accounts receivable (AR)
Payroll (P)
In this case, assign the SLOs different priorities so that WLM can
determine how to allocate the limited system resources, allowing at least
one SLO to be met. Other options are to relax the SLOs or purchase more
hardware resources, if the applications are consistently in need of more
resources.
Chapter 5 195
Configuring WLM
Defining SLOs
Specify the workload group to which an SLO applies using the entity
keyword. The entity keyword is required. Use the following syntax:
entity = PRM group group_name;
where
group_name Is a workload group name.
196 Chapter 5
Configuring WLM
Defining SLOs
NOTE For information on the effect of these keywords in passive mode, see
“Passive mode versus actual WLM management” on page 238.
Specify the lower and upper bounds on CPU resources for an SLO using
the following syntax:
mincpu = lower_bound_request;
maxcpu = upper_bound_request;
where
lower_bound_request
Is an integer from 0 to upper_bound_request,
inclusive. lower_bound_request is the minimum
number of CPU shares the SLO’s controller can
request.
If an SLO does not also contain a cpushares statement
or a goal statement, the mincpu value is used as the
SLO’s shares request. If an SLO does not contain a
mincpu statement, 0 is used as the SLO’s shares
request—although a gmincpu value or hmincpu value
may keep the allocation from actually being 0 shares.
lower_bound_request is out of the total CPU
resources, which is 100 multiplied by the number of
cores (if you set the tunable absolute_cpu_units to 1
or it is implied by other elements in your
configuration)—or just 100 by default.
To have a minimum request of 2 cores on an 8-core
system with absolute_cpu_units enabled
(absolute_cpu_units = 1), you would specify:
mincpu = 200;
If you specify a lower_bound_request greater than
the total CPU resources, WLM treats it as equal to the
total CPU resources.
Chapter 5 197
Configuring WLM
Defining SLOs
upper_bound_request
Is an integer greater than or equal to
lower_bound_request. upper_bound_request is the
maximum number of CPU shares the SLO’s controller
can request.
upper_bound_request is out of the total CPU
resources, which is 100 multiplied by the number of
cores (if you set the tunable absolute_cpu_units to 1
or it is implied by other elements in your
configuration)—or just 100 by default.
If you specify an upper_bound_request greater than
the total CPU resources, WLM treats it as equal to the
total CPU resources.
To have a maximum request of 3 cores on an 8-core
system with absolute_cpu_units enabled
(absolute_cpu_units = 1), you would specify:
maxcpu = 300;
198 Chapter 5
Configuring WLM
Defining SLOs
Chapter 5 199
Configuring WLM
Defining SLOs
For details about specifying metric goals, see “Specifying a metric goal
(optional)” on page 470. Specify a usage goal in an slo structure as
follows:
goal = usage _CPU [low_util_bound [high_util_bound]];
where
low_util_bound
200 Chapter 5
Configuring WLM
Defining SLOs
high_util_bound
Is an integer greater than or equal to low_util_bound,
but less than or equal to 100. WLM attempts to keep
the utilization percentage under this threshold value.
It does so by increasing the requested allocation
whenever utilization surpasses this value. When not
specified, this value defaults to the specified
low_util_bound; when both are not specified, this
value defaults to 75.
Figure 5-5 shows conceptually how WLM works to keep CPU utilization
within a range. The goal here is to keep utilization in the default range,
50% to 75%.
Chapter 5 201
Configuring WLM
Defining SLOs
202 Chapter 5
Configuring WLM
Defining SLOs
Chapter 5 203
Configuring WLM
Defining SLOs
204 Chapter 5
Configuring WLM
Defining SLOs
Chapter 5 205
Configuring WLM
Defining SLOs
206 Chapter 5
Configuring WLM
Defining SLOs
exception_expression
Is an expression that must be false for the SLO to be
active.
Use the following components to form either of the expressions:
Chapter 5 207
Configuring WLM
Defining SLOs
• mm/dd/ccyy - mm/dd/ccyy
• hh:mm - hh:mm
• weekday - weekday
• mm/dd/ccyy hh:mm - mm/dd/ccyy hh:mm
• weekday hh:mm - weekday hh:mm
• mm/dd/* - mm/dd/*
• */dd/* - */dd/*
• *:mm - *:mm
• mm/dd/* hh:mm - mm/dd/* hh:mm
• */dd/* hh:mm - */dd/* hh:mm
For formats that do not specify the hh:mm component, the start-time
defaults to 00:00, and the end-time defaults to 23:59.
Here are some examples showing various condition and exception
statements. In the examples, consecutive statements are not used
together unless explicitly stated.
exception = Sat - Sun; # SLO is active during the week
condition = 20:00 - 22:59; # Combining these two lines,
exception = Fri - Sun; # the SLO is active from 8pm
# to 11pm every night except Friday, Saturday, and
# Sunday
condition = metric resp_time > 2; # SLO is active only
# when resp_time is greater than 2
condition = metric num_users > 5; # SLO is active only
# when the number of users logged in is greater than 5
208 Chapter 5
Configuring WLM
Defining SLOs
Chapter 5 209
Configuring WLM
Tuning the metrics and the SLOs
• Global structure
This tune structure applies to all metrics and SLOs. It does not
reference the name of any metric or SLO. It can be specified, at most,
once in the configuration file. Its syntax is:
tune {
[ wlm_interval = number_of_seconds; ]
[ absolute_cpu_units = {0 | 1}; ]
[ distribute_excess = {0 | 1}; ]
[ extended_shares = {0 | 1}; ]
[ transient_groups = {0 | 1}; ]
[ wlmdstats_size_limit = number_of_megabytes; ]
[ coll_argv = data_collector_and_arguments; ]
[ coll_stderr = file; ]|
[ cntl_smooth = smoothing_value; ]
[ cntl_avg = {0 | 1}; ]
[ cntl_kp = proportional_term; ]
[ cntl_convergence_rate = number_of_shares; ]
[ cntl_margin = margin_value; ]
[ cntl_base_previous_req = {0 | 1}; ]
}
210 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
• Metric-specific structure
A metric-specific tune structure applies to all SLOs using metric.
This structure can be specified, at most, once per metric. Its syntax
is:
tune metric {
[ coll_argv = data_collector_and_arguments; ]
[ coll_stderr = file; ]
[ cntl_smooth = smoothing_value; ]
[ cntl_avg = {0 | 1}; ]
[ cntl_kp = proportional_term; ]
[ cntl_convergence_rate = number_of_shares; ]
[ cntl_margin = margin_value; ]
[ cntl_base_previous_req = {0 | 1}; ]
}
• Metric/SLO-specific structure
This tune structure applies to the specified metric/SLO pair. It
can be specified, at most, once per metric/SLO pair. Its syntax
is:
tune metric slo_name {
[ cntl_kp = proportional_term; ]
[ cntl_convergence_rate = number_of_shares; ]
[ cntl_margin = margin_value; ]
[ cntl_base_previous_req = {0 | 1}; ]
}
In cases where two or more tune structures could apply in the same
situation, the more specific structure type takes precedence. Thus, a
metric/SLO-specific structure overrides a metric-specific structure,
which in turn overrides a global structure.
Here is a sample tune structure:
tune sales_app.resp_time {
coll_argv = /opt/sales_app/bin/sales_monitor -v;
}
Chapter 5 211
Configuring WLM
Tuning the metrics and the SLOs
Step 1. Select the name of the host, wlmhost0 in this case, in the left pane. The
right pane allows you to set the type of configuration elements you would
like to see in the new configuration.
Select the “Global tunables” box in the right pane. A “Global tunables”
item then appears in the left pane.
212 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
Chapter 5 213
Configuring WLM
Tuning the metrics and the SLOs
Step 2. Select the “Global tunables” item in the left pane. The right pane
changes, allowing you to set various tunables.
Step 3. Select the [Commit changes] button to save the current configuration
in memory. To save changes to disk, go to the Deploy tab. (The file is
saved to the file specified in the file name field in the Modify tab when
the system is selected in the left pane.)
The previous steps highlight only one use of the WLM GUI. For
additional information, see the GUI’s online help.
214 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
NOTE Data collectors invoked by WLM run as root and can pose a security
threat. Hewlett-Packard makes no claims of any kind with regard to the
security of data collectors not provided by Hewlett-Packard.
Furthermore, Hewlett-Packard shall not be liable for any security
breaches resulting from the use of said data collectors.
Chapter 5 215
Configuring WLM
Tuning the metrics and the SLOs
The shorter the interval, the more often WLM checks for new
performance data and alters the CPU allocation if workloads are not
meeting their SLOs. If there is no new data, WLM does nothing.
With longer intervals, WLM is more likely to receive new performance
data; however, a workload is also more likely to not achieve its SLO for
longer periods.
The wlm_interval tunable is optional. It is allowed only in a global tune
structure within the WLM configuration file.
NOTE The current WLM interval length is available to data collectors specified
in coll_argv statements. The length can be retrieved through the
WLM_INTERVAL environment variable.
216 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
• mincpu
• maxcpu
• gmincpu
• gmaxcpu
• cpushares
• cntl_kp
• cntl_convergence_rate
With absolute CPU units enabled (absolute_cpu_units = 1), you
specify CPU units in terms of 100, where 100 represents an entire core.
So, if you want a mincpu of half a core, you would specify:
mincpu = 50;
If you want a maxcpu of two cores, you would specify:
maxcpu = 200;
Absolute CPU units are used when the number of active CPU resources
changes due to WLM management of Instant Capacity, Temporary
Instant Capacity, Pay per use, or Virtual Partitions resources. Regardless
of the number of active cores, the absolute CPU units represent the same
amount of CPU resources. HP recommends using absolute CPU units.
Chapter 5 217
Configuring WLM
Tuning the metrics and the SLOs
218 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
tune {
distribute_excess = 1;
}
Only workloads with active SLOs receive the excess CPU resources.
This distribution is based on balancing the weight-to-allocation ratios for
the workloads. These ratios are discussed in “Weighting a group so it
gets more CPU resources (optional)” on page 178.
The distribution is subject to the group CPU maximum values specified
by the gmaxcpu keyword. If the excess CPU resources are not fully
distributed because of group CPU maximum values, the excess is given
to the OTHERS group as usual—even if giving OTHERS this excess places it
over its gmaxcpu value.
The default value for distribute_excess is 0, in which case the OTHERS
group is given any excess CPU resources.
Chapter 5 219
Configuring WLM
Tuning the metrics and the SLOs
220 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
tune {
transient_groups = 1;
}
Chapter 5 221
Configuring WLM
Tuning the metrics and the SLOs
222 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
attempted to place in the group with prmrun or prmmove are moved to the
group. (For information on how WLM determines which group
assignment takes precedence when the same process is identified by
multiple records, see “How the application manager affects workload
group assignments” on page 459.)
NOTE When WLM is managing PSETs, do not change PSET settings by using
the psrset command. Only use WLM to control PSETs.
Chapter 5 223
Configuring WLM
Tuning the metrics and the SLOs
224 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
Chapter 5 225
Configuring WLM
Tuning the metrics and the SLOs
P = 3 - 2 = 1
Performance goal with met > value:
P = value - met
Usage goal:
P = Actual utilization - Target utilization
Target utilization is either low_util_bound or
high_util_bound. If actual utilization is below
low_util_bound, then
P = Actual utilization - low_util_bound
If actual utilization is above high_util_bound,
P = Actual utilization - high_util_bound
For example, if the goal is to keep CPU utilization
between 50% and 75%, with the utilization at 85%, the
deviation from the goal is:
P = 85 - 75 = 10
226 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
Chapter 5 227
Configuring WLM
Tuning the metrics and the SLOs
228 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
NOTE You can also tune convergence with the cntl_kp tunable discussed in the
section “Tuning a workload’s SLO convergence: cntl_kp (optional)” on
page 224. (If cntl_convergence_rate is not zero, it is used instead of
cntl_kp.)
Using the cntl_convergence_rate tunable changes the allocation
algorithm to take the goal value into consideration, effectively
normalizing the result by the goal’s magnitude. Given the normalization
that cntl_convergence_rate provides, as well as the greater analysis
required to fine-tune the cntl_kp tunable, you may want to use
cntl_convergence_rate first. In many cases, setting
cntl_convergence_rate = 1.0 will provide the desired convergence and
meet your needs.
For each performance and usage goal, WLM must determine the
appropriate number of CPU shares needed to achieve that goal. To do
this, WLM creates a controller for each such goal.
Chapter 5 229
Configuring WLM
Tuning the metrics and the SLOs
230 Chapter 5
Configuring WLM
Tuning the metrics and the SLOs
Chapter 5 231
Configuring WLM
Tuning the metrics and the SLOs
2
Goal
Re-targeted goal
response_time 1
232 Chapter 5
Configuring WLM
Example configuration
For more information on how to use the cntl_margin tunable, see the
white paper “Tuning HP-UX Workload Manager” at
/opt/wlm/share/doc/howto/tuning.html.
Example configuration
The following is an example configuration consisting of two workload
groups and four SLOs. A discussion of the example is presented after the
example.
# Define the workload groups
prm {
groups = finance:2, sales:3;
apps = finance: /opt/fin_app/count_money, sales: /opt/sales/do_ebiz;
}
Chapter 5 233
Configuring WLM
Example configuration
# This is a stretch goal for the finance query group. If all other CPU
# requests of higher priority SLOs have been met, apply more CPU to
# group finance, so its application runs faster.
slo finance_query_stretch {
pri = 5;
mincpu = 20;
maxcpu = 80;
entity = PRM group finance;
goal = metric fin_app.query.resp_time < 1.0;
condition = Mon - Fri;
}
tune {
wlm_interval = 30;
}
tune fin_app.query.resp_time {
coll_argv = /opt/fin_app/finance_collector -a 123 -v;
cntl_kp = 0.8;
}
tune sales_app.resp_time {
coll_argv = /opt/sales_app/monitor -threshold 2 -freq 30 ;
cntl_kp = 2.0;
}
234 Chapter 5
Configuring WLM
Example configuration
Chapter 5 235
Configuring WLM
Trying a configuration without affecting the system
SLOs that use this metric. The value of the proportional constant
(cntl_kp) for those controllers is 2.0. All other tunables are set according
to the default values in the master tunables file.
For more examples files, see Chapter 9, “Example configuration files,” on
page 283.
NOTE Always wait at least 60 seconds (the default WLM interval) for WLM
changes to resource allocations to appear in the wlminfo output.
(Alternatively, you can adjust the interval using the wlm_interval
tunable in your WLM configuration file.)
236 Chapter 5
Configuring WLM
Trying a configuration without affecting the system
NOTE You can run wlmpard in passive mode with each partition’s wlmd
daemon running in regular mode. Thus, you can run wlmpard
experiments on a production system without consequence.
Chapter 5 237
Configuring WLM
Trying a configuration without affecting the system
Usage/metrics
System activity WLM
Allocation changes
238 Chapter 5
Configuring WLM
Trying a configuration without affecting the system
Usage/metrics
System activity WLM
• mincpu/maxcpu
• gmincpu/gmaxcpu
• hmincpu/hmaxcpu
However, because WLM does not adjust allocations in passive mode, it
may appear that these values are not used.
Chapter 5 239
Configuring WLM
Trying a configuration without affecting the system
240 Chapter 5
Configuring WLM
Activating the configuration file
Chapter 5 241
Configuring WLM
Setting WLM to start automatically at reboot
242 Chapter 5
Configuring WLM
Setting the WLM communications daemon to start automatically at reboot
You can set the global arbiter to start automatically at reboot by setting
the WLMPARD_ENABLE variable in the file /etc/rc.config.d/wlm to 1:
WLMPARD_ENABLE=1
When started at reboot, the WLM global arbiter automatically uses the
most recent configuration file that was activated.
If you want the global arbiter to activate a specific configuration when it
automatically starts at reboot, edit the following line in the
/etc/rc.config.d/wlm file:
WLMPARD_STARTUP_SLOFILE=”configfile”
where configfile is the configuration file to use at reboot.
For information on starting WLM automatically, see the section “Setting
WLM to start automatically at reboot” on page 242.
Chapter 5 243
Configuring WLM
Securing WLM communications
244 Chapter 5
Configuring WLM
Enabling statistics logging at reboot
• WLM_STATS_LOGGING
Set WLM to start logging statistics at reboot by setting the
WLM_STATS_LOGGING variable in the following file:
/etc/rc.config.d/wlm
Valid values are:
— all
— group
— host
— metric
— slo
Values can be combined, separated by commas, with no white space:
WLM_STATS_LOGGING=slo,metric
Be sure to include double quotes when you request logging less often
than once per WLM interval:
WLM_STATS_LOGGING=”slo=10,metric”
Setting WLM_STATS_LOGGING has the same effect as using the
wlmd -l option. For a description of the -l arguments, see the
reference section “wlmd” on page 374.
You can limit the size of /var/opt/wlm/wlmdstats as explained in the
section “Trimming the statistics log file automatically (optional)” on
page 224.
Chapter 5 245
Configuring WLM
Disabling statistics logging
• WLMPARD_STATS_LOGGING
Set the WLM global arbiter to start logging statistics at reboot by
setting the WLMPARD_STATS_LOGGING variable in /etc/rc.config.d/wlm
as follows:
WLMPARD_STATS_LOGGING="vpar"
You can limit the size of /var/opt/wlm/wlmpardstats as explained in
“Trimming the global arbiter statistics log automatically (optional)”
on page 272.
• Restart the WLM global arbiter with the last valid configuration:
# wlmpard -A
• Restart the WLM global arbiter with a new configuration:
# wlmpard -a configfile
NOTE If logging is set in the /etc/rc.config.d/wlm file, logging will resume at the
next reboot.
246 Chapter 5
Configuring WLM
WLM and kernel parameters
Chapter 5 247
Configuring WLM
WLM and kernel parameters
248 Chapter 5
6 Auditing and billing
NOTE To ensure the smooth running of the operating system and key HP-UX
daemons, WLM runs these system processes in a special workload called
PRM_SYS. This group is not restrained by WLM: It consumes system
resources as needed. As a result, a workload’s CPU usage may be less
than its allocation (or entitlement as it is seen in the wlmaudit report)
because PRM_SYS requires some of the group’s resources. However, the
low usage could also be the result of the group’s low CPU resource
demands, or a combination of the two factors. Also, there may be times
when CPU usage is slightly above the allocation due to dynamics in the
CPU scheduler that WLM uses. Likewise, if memory management is
enabled, a workload’s memory usage may be less than the number of
memory shares for reasons similar to those just stated. It could also be
slightly above the memory shares value due to extreme paging pressure
or when the current group allocation is being reduced.
Chapter 6 249
Auditing and billing
Example wlmaudit report
250 Chapter 6
Auditing and billing
Example wlmaudit report
Entity: PRM_SYS
Daily records:
Entity: g_apache
Daily records:
Entity: g_nice
Daily records:
Chapter 6 251
Auditing and billing
Example wlmaudit report
Entity: g_nightly
Daily records:
Entity: g_team
Daily records:
252 Chapter 6
Auditing and billing
Audit data files
Chapter 6 253
Auditing and billing
Enabling auditing at reboot
• WLMD_AUDIT_ENABLE
• WLMPARD_AUDIT_ENABLE
Both variables are set to 0 (no audit data) by default.
254 Chapter 6
7 Managing SLOs across
partitions
WLM can manage SLOs across virtual partitions and nPartitions. WLM
provides a global arbiter, wlmpard, that can take input from the WLM
instances on the individual partitions. The global arbiter then moves
CPU resources (cores) between partitions, as needed to better achieve
the SLOs specified in the WLM configuration files that are active in the
partitions. These partitions can be nested—and can even contain FSS
and PSET-based workload groups. (wlmpard can be running in one of the
managed partitions or on a supported platform with network
connectivity to the managed partitions.)
The following sections describe how WLM manages SLOs across virtual
partitions and nPartitions and explains how to configure cross-partition
management.
Overview
WLM virtual partition (vPar) management migrates cores between
virtual partitions. However, with nPartitions being physical entities,
WLM nPartition management only gives the appearance of migrating
cores. This pseudo-migration is achieved—using the Instant Capacity
(iCAP) software—by deactivating cores on one nPartition then activating
cores on another nPartition.
Figure 7-1 shows WLM managing the partitions on a server. For a
detailed explanation of the figure, see “How WLM works” on page 112.
Chapter 7 255
Managing SLOs across partitions
Overview
PRM
Workload groups get
new CPU allocations
better suited to their SLOs WLM global arbiter
WLM creates a new PRM configuration daemon (wlmpard)
WLM
global arbiter
configuration
file
Par 0
HP-UX server
256 Chapter 7
Managing SLOs across partitions
Recommendations, requirements, and restrictions
Chapter 7 257
Managing SLOs across partitions
Recommendations, requirements, and restrictions
• For managing nPartitions with WLM, you must use Instant Capacity
cores (formerly known as iCOD CPUs). Use the Instant Capacity
versions specified in the WLM Release Notes
(/opt/wlm/share/doc/Rel_Notes).
• If you manage virtual partitions in combination with Instant
Capacity, you must use vPars A.03.01 or later.
• Do not adjust any WLM-managed partition while wlmpard is
running. This includes using vparmodify, icapmodify, or
icod_modify to change the name, configuration, or resources (CPU
and memory) associated with the virtual partition or nPartition. This
also includes using parolrad to perform online cell (Cell OL*)
operations on any cell in a WLM-managed partition. (To check the
status of online cell operations, use the parolrad -m command.) To
adjust a partition or cell, first shut down WLM—including
wlmpard—on all partitions that will be affected by the modification,
then modify the partition. Restart WLM after modifying the
partition. (Changes to Instant Capacity affect the entire complex;
changes to a virtual partition affect the nPartition only, unless
Instant Capacity is configured on the nPartition.) For example, if
WLM is managing two virtual partitions vParA and vParB, and you
need to migrate memory resources from vParA to vParB, you must
shut down WLM in both virtual partitions. As another example, to
change the name of an nPartition, you must first shut down WLM in
every operating system instance across the entire complex, because
the name change affects Instant Capacity, and Instant Capacity
changes affect every nPartition across the complex.
For instructions on how to stop and start the WLM daemons, see
Appendix A, “WLM command reference,” on page 363, or see
wlmd(1M) and wlmpard(1M).
• Do not use cell-specific CPU bindings or user-assigned CPU bindings
on virtual partitions you are going to manage with WLM.
• With Instant Capacity v6 or earlier, do not include spaces in partition
names. Also, if icod_stat or icapstatus truncate the name of an
nPartition, use parmodify to shorten the name so that it is not
truncated.
You can configure WLM to manage FSS and PSET-based workload
groups and partitions (nPartitions or virtual partitions) at the same
time. Certain software restrictions apply to using PSET-based groups
258 Chapter 7
Managing SLOs across partitions
Recommendations, requirements, and restrictions
with virtual partitions (vPars), Instant Capacity, and Pay per use. For
more information, see the WLM Release Notes
(/opt/wlm/share/doc/Rel_Notes).
WLM allocates cores to a partition based on the CPU limits of the
partition (physical limits for nPartitions; logical limits for virtual
partitions). For example, WLM adjusts the number of cores assigned to a
vPar within the limits of the given vPar’s minimum and maximum
number of cores, which you set using vparmodify.
The way WLM uses group weighting to determine CPU allocations
across partitions is the same as the way it uses group weighting to
determine allocations within a partition. For more information, see
“Weighting a group so it gets more CPU resources (optional)” on
page 178.
Chapter 7 259
Managing SLOs across partitions
Setting up cross-partition management
Each partition on the system must have the WLM daemon wlmd running.
Create a WLM configuration file for each partition, ensuring each
configuration uses the primary_host keyword to reference the partition
where the global arbiter is running. For information on the
primary_host syntax, see “Setting up your WLM configuration file” on
page 264.
On systems with WLM installed, you can use the example configuration:
/opt/wlm/examples/wlmconf/par_usage_goal.wlm
NOTE Do not edit this configuration file in place. Copy it to a location outside
/opt/wlm/. Then edit and activate the configuration from the new
location.
260 Chapter 7
Managing SLOs across partitions
Setting up cross-partition management
This configuration specifies a usage goal for its workload group. The file
is included in this book in the section “par_usage_goal.wlm” on page 310.
(Be sure to use the par_usage_goal.wlmpar file for the WLM global
arbiter.)
/opt/wlm/examples/wlmconf/par_manual_allocation.wlm
NOTE Do not edit this configuration file in place. Copy it to a location outside
/opt/wlm/. Then edit and activate the configuration from the new
location.
With this configuration, you manually request the number of cores for an
nPartition using the wlmsend command to feed the request to WLM. The
file is in this book in the section “par_manual_allocation.wlm” on
page 304. (Be sure to use the par_manual_allocation.wlmpar file for the
WLM global arbiter.)
WLM operates in “passive mode” when you include the -p option in your
command to activate a configuration. With passive mode, you can see
approximately how a particular configuration is going to affect your
system—without the configuration actually taking control of your
system.
# wlmd -p -a configfile
Chapter 7 261
Managing SLOs across partitions
Setting up cross-partition management
# wlmd -a configfile
# wlmd -s -a configfile
The wlmd daemon runs in secure mode by default when you use the
/sbin/init.d/wlm script to start WLM. (If you upgraded WLM, secure
mode might not be the default. Ensure that the appropriate secure mode
variables in /etc/rc.config.d/wlm are enabled. For more information, see
“Securing WLM communications” on page 244.)
On the system running the global arbiter, create a configuration file for
the global arbiter. (The global arbiter can run on any HP-UX system that
has network connectivity to the partitions being managed by WLM. If
this system is being managed by WLM, it will have both a WLM
configuration file and a WLM global arbiter configuration file. You can
set up and run the global arbiter configuration on a system that is not
managed by WLM if needed for the creation of fault-tolerant
environments or Serviceguard environments.)
This global arbiter configuration file is required. In the file specify the:
262 Chapter 7
Managing SLOs across partitions
Setting up cross-partition management
You can change the 15-day default by setting the WLM global arbiter
utility_reserve_threshold keyword. For more information, see
“Specifying the reserve threshold that determines when WLM stops
activating temporary capacity resources” on page 274 or see
wlmparconf(4).
For information on the syntax of this file, see the section “Setting up your
WLM global arbiter configuration file” on page 265 or see wlmparconf(4).
You can use the WLM GUI (wlmgui) to configure the global arbiter, as
described in “Using the WLM GUI to set up the global arbiter
configuration file” on page 267.
On systems with WLM installed, you can use the example configuration
/opt/wlm/examples/wlmconf/par_usage_goal.wlmpar or
/opt/wlm/examples/wlmconf/par_manual_allocation.wlmpar. These files
are included in this book in the chapter Chapter 9, “Example
configuration files,” on page 283.
Step 6. (Optional) Activate the global arbiter configuration file in passive mode.
Similar to the WLM passive mode, the WLM global arbiter has a passive
mode (also enabled with the -p option) that allows you to verify wlmpard
settings before letting it control your system.
# wlmpard -p -a configfile
# wlmpard -a configfile
Chapter 7 263
Managing SLOs across partitions
Setting up your WLM configuration file
# wlmpard -s -a configfile
The global arbiter runs in secure mode by default when you use the
/sbin/init.d/wlm script to start WLM. If you upgraded WLM, secure mode
might not be the default. Ensure that the WLMPARD_SECURE_ENABLE
variable in /etc/rc.config.d/wlm is enabled. For more information, see
“Securing WLM communications” on page 244.
264 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
NOTE Recall that WLM uses absolute CPU units when a configuration includes
the primary_host keyword. As a result, 100 represents a single core,
and any CPU shares you specify are out of 100 multiplied by the number
of cores. For example, 200 represents 2 cores. For more information on
absolute CPU units, see “Using absolute CPU units” on page 217.
For information on creating the rest of the WLM configuration file, see
the chapter Chapter 5, “Configuring WLM,” on page 135 or see
wlmconf(4).
Chapter 7 265
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
The global arbiter configuration file allows you to control settings for the
HP-UX WLM global arbiter, which governs cross-partition management
and management of Temporary Instant Capacity (TiCAP) and Pay per
use (PPU) resources.
WLM can manage cores for virtual partitions and nPartitions. (The
partitions can even be nested and contain FSS and PSET-based workload
groups.) WLM virtual partition management migrates cores between
virtual partitions. With nPartitions being physical entities, WLM
nPartition management—through the use of Instant Capacity
software—only gives the appearance of migrating cores. This
pseudo-migration is achieved by deactivating cores on one nPartition and
then activating cores on another nPartition.
• How frequently the WLM global arbiter checks for input from the
individual WLM instances running in the partitions
• The port that the WLM global arbiter should monitor for input from
the individual WLM instances
• The size, in megabytes, at which the wlmpardstats file is
automatically truncated
• The lowest priority SLO at which WLM should use Temporary
Instant Capacity (TiCAP) or Pay per use (PPU) resources to manage
the total core capacity available
If you specify a port number in the primary_host statement of any of the
WLM configuration files or in the WLM global arbiter configuration file,
you must specify the same port number in all the files.
You can use the WLM GUI to set up the global arbiter configuration file,
as described in “Using the WLM GUI to set up the global arbiter
configuration file” on page 267. Otherwise, you can use a text editor to
266 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
create or modify this configuration file. To follow is the syntax of the par
structure, followed by an example structure. An explanation of the
syntax specific for each keyword is provided in subsequent sections.
If your configuration uses a previously supported structure type, such as
vpar or npar_icod, WLM silently interprets these as a par structure.
par structure
The structure takes the following format:
par {
[ interval = number_of_seconds; ]
[ port = port_number; ]
[ wlmpardstats_size_limit = number_of_megabytes; ]
[ utilitypri = integer; ]
[ utility_reserve_threshold = integer; ]
}
Here is an example par structure:
par {
interval = 180;
port = 3701;
wlmpardstats_size_limit = 3;
utilitypri = 2;
utility_reserve_threshold = 10;
}
# /opt/wlm/bin/wlmgui
Chapter 7 267
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
268 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
Step 5. Select the “Global arbiter configuration” box at the top of the right pane,
as in the following example. (The [Add], [Copy], and [Remove] buttons
are for setting up the WLM configurations for the partitions themselves.
You select a partition in the left pane to modify the WLM configuration
for that partition.)
Chapter 7 269
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
Step 6. Select the “Global Arbiter” item in the left pane. The right pane changes,
allowing you to fill in the various fields for the global arbiter
configuration keywords. The syntax for each of the keyword values you
specify is described in the remaining sections of this chapter. (The fields
listed in the top of the right pane are used when you want to open an
existing configuration; that is, for “Hostname” you would enter the name
of the host on which the configuration file resides, for “Port” you would
enter the port to use when connecting to the host, and so on.)
Step 7. When you have finished defining the various global arbiter settings,
select the [Commit changes] button to save the current configuration
in memory. To save changes to disk, go to the Deploy tab. (The file is
saved to the file specified in the Filename field in the Modify tab when
the system is selected in the left pane.)
270 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
interval = number_of_seconds;
where
interval Is a optional keyword.
number_of_seconds
Is an integer value greater than or equal to 1 indicating
how often, in seconds, WLM should consider moving
cores between partitions.
Chapter 7 271
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
272 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
Chapter 7 273
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
utilitypri = integer;
where
utilitypri Is an optional keyword.
integer Is an integer value greater than or equal to 1. If
Temporary Instant Capacity or PPU resources exist,
they are used whenever SLOs with a priority from 1 to
integer (inclusive) are demanding more cores.
274 Chapter 7
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
Chapter 7 275
Managing SLOs across partitions
Setting up your WLM global arbiter configuration file
276 Chapter 7
8 Management of nested nPars /
vPars / workload groups
You can manage any combination of FSS or PSET-based workload groups
inside virtual partitions inside nPartitions if desired.
NOTE You can use FSS and PSET-based workload groups with partition
management. Certain software restrictions apply to using PSET-based
groups with virtual partitions (vPars), Instant Capacity, and Pay per use.
For more information, see the WLM Release Notes
(/opt/wlm/share/doc/Rel_Notes).
Chapter 8 277
Management of nested nPars / vPars / workload groups
Setting up the various configurations
Assume you want to share cores, as indicated by the arrows in the figure,
among the:
In this file, say myfile, specify the utilitypri keyword to indicate the
range of SLO priorities that can cause WLM to activate Temporary
Instant Capacity (TiCAP) resources.
If you are not using Temporary Instant Capacity resources, you can omit
the utilitypri keyword.
278 Chapter 8
Management of nested nPars / vPars / workload groups
Setting up the various configurations
NOTE Specifying this keyword ensures WLM maintains compliance with your
Temporary Instant Capacity (TiCAP) usage rights. When your prepaid
amount of temporary capacity expires, WLM no longer attempts to use
the temporary resources.
You can change the 15-day default by setting the WLM global arbiter
utility_reserve_threshold keyword. For more information, see
“Specifying the reserve threshold that determines when WLM stops
activating temporary capacity resources” on page 274 or see
wlmparconf(4).
Use the file you created in the previous step with wlmpard:
# wlmpard -a myfile
Step 3. Set up and start a configuration for wlmd in each virtual partition.
primary_host = mysystem;
This configuration can be just for the virtual partition itself, or you can
add a prm structure and create FSS and PSET-based workload groups
inside the virtual partition.
Step 4. Set up and start a configuration for wlmd in nPar3 to manage the FSS
and PSET-based workload groups.
primary_host = mysystem;
Chapter 8 279
Management of nested nPars / vPars / workload groups
Setting up the various configurations
Again, assume you want to share cores, as indicated by the arrows in the
figure, among the:
280 Chapter 8
Management of nested nPars / vPars / workload groups
Setting up the various configurations
With Instant Capacity not available, you must have one wlmpard for each
nPartition containing virtual partitions. In particular:
Step 3. Set up and start a configuration for wlmd in nPar3 to manage the FSS
and PSET-based workload groups.
Chapter 8 281
Management of nested nPars / vPars / workload groups
Managing FSS and PSET-based groups inside vPars
Step 2. Create your FSS and PSET-based workload groups in each virtual
partition’s WLM configuration as desired.
282 Chapter 8
9 Example configuration files
This chapter presents the example configuration files available from the
/opt/wlm/examples/wlmconf/ directory, as well as an example from the
/opt/wlm/toolkits/weblogic/config/ directory. These examples show how to
use the syntax discussed in Chapter 5, “Configuring WLM,” on page 135.
NOTE Copy these examples to another directory before modifying them. Items
kept under /opt/wlm/ may be replaced or altered by future WLM product
updates.
Chapter 9 283
Example configuration files
284 Chapter 9
Example configuration files
brackets ([, ]). Because of the presence of the square brackets, the
sample file will not pass the syntax-checking mode of wlmd (wlmd -c
template).
• “stretch_goal.wlm” on page 318
Example configuration file to demonstrate how to use multiple SLOs
for the same workload (but at different priority levels) to specify a
stretch goal for a workload. A stretch goal is one that we would like
to have met if all other higher-priority SLOs are being satisfied and
additional CPU resources are available.
• “time_activated.wlm” on page 321
This configuration file demonstrates the use of WLM for allocating a
fixed entitlement to a particular group of users only during a certain
time period.
• “transient_groups.wlm” on page 323
This configuration file demonstrates the use of transient groups. The
groups in this configuration consume no resources when they have
no active SLOs.
• “twice_weekly_boost.wlm” on page 326
This configuration file demonstrates a conditional entitlement with a
moderately complex condition.
• “usage_goal.wlm” on page 331
This configuration demonstrates the usage goal for SLOs. This type
of goal is very different from the typical performance goal in that it
does not require explicit metric data.
• “usage_stretch_goal.wlm” on page 334
This configuration demonstrates how to use multiple SLOs for
several workloads, defining a stretch goal in addition to a base usage
goal for each workload.
• “user_application_records.wlm” on page 338
A configuration file that demonstrates the use of, and precedence
between, user and application records in placing processes in
workload groups.
Chapter 9 285
Example configuration files
distribute_excess.wlm
NOTE For example configuration files that you can use with Oracle instances,
see the section “How do I get started with ODBTK?” on page 429. For
pointers to the example configurations for the various WLM toolkits, see
the EXAMPLES section of wlmtk(5).
distribute_excess.wlm
This example features the distribute_excess and weight keywords.
#
# Name:
# distribute_excess.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.9 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the use of the weight and distribute_excess keywords
# to distribute resources among groups.
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.01.01
# or later.
#
286 Chapter 9
Example configuration files
distribute_excess.wlm
# prm structure
#
# In this example we have two groups using the machine, Orders
# and Sales. In the event there are additional resources available,
# we’d like for Sales to get three shares for every share that Orders
# receives.
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups= OTHERS : 1,
Orders : 2,
Sales : 3;
weight= Orders : 1,
Sales : 3;
}
#
# slo structure
#
# In this example we have two SLOs, one for actual order processing
# and another for sales’ product availability requests. These are
# deemed to be equal in priority and have goals based on the
# response times of their applications.
#
# In the event that both goals are met, we want to distribute the
# excess CPU resources according to the weight specification above.
# See the tune structure explanation for details on what the impact
# might be in this situation.
#
slo order_processing {
pri = 1;
mincpu = 0;
maxcpu = 100;
entity = PRM group Orders;
goal = metric order_transaction_time < 10.0;
}
slo product_availability {
pri = 1;
mincpu = 0;
maxcpu = 100;
entity = PRM group Sales;
goal = metric sales_request_time < 5.0;
}
Chapter 9 287
Example configuration files
distribute_excess.wlm
# tune structure
#
# We must define a data collector for every metric used in
# SLO definitions. In this example, we add a global tune structure
# where we enable distribution of excess shares to groups defined in
# the prm structure above. This is accomplished by simply setting
# the keyword distribute_excess to 1 (TRUE). Without this setting,
# HP-UX WLM would allocate all excess shares to the OTHERS group.
#
# HP-UX WLM will, by default, provide an allocation sufficient to meet
# the specified goals. Let us assume that both goals are being met and
# that the Orders group is consuming 20% of the CPU resources and
# the Sales group is also consuming 20%. Then 60% of the machine is
# available for distribution to the two groups. If distribute_excess
# is enabled, WLM will ultimately allocate about 25% of the CPU
# resources to the Orders group and about 75% of the CPU resources to
# the Sales group, reflecting the 3:1 weight ratio specified for the
# groups in the prm structure. (The OTHERS group must get a minimum
# of 1% of the CPU. This 1% will be taken from either the Sales group
# or Orders group. As a result, WLM will not be able to grant CPU
# exactly in the 3:1 weight ratio.)
#
# Enabling distribute_excess is likely to reduce the response
# times for both groups well below the goals specified (for example,
# the sales_request_time may drop down to 3 seconds). Without the
# distribute_excess keyword set, HP-UX WLM would keep the response
# times close to the goals (so, sales_request_time would be kept
# around 4.5 seconds).
#
# With distribute_excess enabled, HP-UX WLM allocates excess shares so
# that the resulting allocations are as close as possible to the
# weight distribution without decreasing allocations resulting from
# SLOs. Thus, HP-UX WLM will distribute CPU resources sufficient to
# meet the SLOs and only after that action will HP-UX WLM begin
# distributing excess shares to achieve the weight distribution.
#
# Consider yet another scenario where SLO goals are being met.
# However, the Orders group is using 50% of the resources to meet its
# response time goal, and the Sales group is using only 20%. HP-UX WLM
# tries to match the allocations according to the weight
# specifications, but it will not reduce an allocation if doing so
# will cause the SLOs to fail (the goals to not be achieved).
# HP-UX WLM will give the Sales group the remaining 30% of the CPU
# resources so that the resulting allocation is 50% for each group.
# This does not meet the 3:1 ratio (that is, 75%/25%), but doing so
# would cause the order_processing SLO to fail. (As OTHERS must get
288 Chapter 9
Example configuration files
enabling_event.wlm
# at least 1% of the CPU, the allocation for either the Sales group
# or Orders group would be reduced by 1%.)
#
tune {
distribute_excess = 1;
}
tune sales_request_time {
coll_argv = /home/sales/data_collector;
}
tune order_transaction_time {
coll_argv = /home/orders/data_collector;
}
For more information on the distribute_excess and weight keywords,
see “Distributing excess CPU resources to your workloads (optional)” on
page 218 and “Weighting a group so it gets more CPU resources
(optional)” on page 178.
enabling_event.wlm
This example enables an SLO based on an event.
#
# Name:
# enabling_event.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.9 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
Chapter 9 289
Example configuration files
enabling_event.wlm
# Purpose:
# Demonstrate the use of HP-UX WLM to enable a service-level objective
# (SLO) when a certain event occurs.
#
# Dependencies:
# This example was designed to run with version HP-UX WLM A.01.02
# or later.
#
#
# prm structure
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
# Define workload groups in the prm structure. Individual users are
# assigned to groups in this structure as well.
#
# In this example configuration, the user backup_meister can execute
# applications in only the Backups group.
#
prm {
groups = Backups : 3;
users = backup_meister: Backups;
}
#
# slo structure
#
# The following slo structure is enabled and disabled based on the
# value of the metric backup_running. If backup_running’s value is
# zero then the SLO is disabled, and any application running in the
# group Backups will get only 1% of the CPU resources. When the
# value is nonzero (for example, 1) the SLO is enabled and the groups
# within the Backups group get a fixed allocation of 60% of the CPU
# resources on the system.
#
slo backup_processing {
pri = 1;
cpushares = 60 total;
entity = PRM group Backups;
condition = metric backup_running;
}
290 Chapter 9
Example configuration files
entitlement_per_process.wlm
# tune structure
#
# Use of a metric in a SLO structure, whether it is a goal or
# condition, requires that the metric have a tune structure associated
# with it. The structure must specify the data collector for the
# metric. In this example, the collector specified with the coll_argv
# keyword is wlmrcvdc. This allows the metric backup_running to be set
# with wlmsend from a command line. For example,
#
# % wlmsend backup_running 1
#
# would enable the SLO above.
#
tune backup_running {
coll_argv = wlmrcvdc;
}
For information on the condition keyword, see “Specifying when the
SLO is active (optional)” on page 205.
entitlement_per_process.wlm
The following example shows how to request five CPU shares for each
active process in a workload group.
#
# Name:
# entitlement_per_process.wlm
#
# Version information:
#
# (C) Copyright 2001-2065 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.14 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
Chapter 9 291
Example configuration files
entitlement_per_process.wlm
# Purpose:
# Demonstrate the use of a shares-per-metric goal.
#
# A machine hosts a group’s web servers. However, the group would
# like to use the rest of the CPU cycles without impacting the web
# servers, which are often not busy. From past experience, they
# have determined an httpd base entitlement (allocation) of 10
# percent of the CPU resources gives good response for random queries,
# and that sustained web processing can be done by providing an
# additional 5 shares per active (not sleeping) process. The httpd
# processes and their children (CGI scripts, servlets, etc) that were
# recently active are included in the count. See the glance(1)
# documentation for more information on available metrics.
#
# Components:
# The glance toolkit is used. See glance_app(1M) for more
# information on the glance data collectors.
#
# Allocation change frequency:
# Because wlm_interval is not explicitly set, the 60 second default
# is used. This means wlmd will collect measurements and make
# allocation changes every 60 seconds.
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.01.02 or
# later. It uses the cpushares keyword introduced in A.01.02, so
# is incompatible with earlier versions of HP-UX WLM.
#
#
# prm structure
# Create workload groups. Designate which workload binaries will
# be placed in each. We will be actively managing one workload,
# apache, and leaving the rest of the CPU resources to workload
# group OTHERS.
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups = OTHERS : 1,
servers : 2 ;
292 Chapter 9
Example configuration files
entitlement_per_process.wlm
# Any CPU resources that remain after satisfying the above SLO is given to
# the OTHERS group by default. You can change this default using the
# distribute_excess keyword. For more information on this keyword, see
# the wlmconf(4) manpage.
#
# Collect the glance metric APP_ACTIVE_PROC as a measure
# of how many httpd processes are actually busy.
#
# NOTE: If the number of active processes is too volatile, consider using the
# smooth(1M) tool to calculate a running average, smoothing out the extreme
# values. smooth is shown below, commented out.
#
tune apache.active_procs {
coll_argv =
wlmrcvdc
# smooth
glance_prm APP_ACTIVE_PROC servers ;
}
For information on the cpushares keyword, see “Specifying a
shares-per-metric allocation request (optional)” on page 205.
Chapter 9 293
Example configuration files
fixed_entitlement.wlm
fixed_entitlement.wlm
The following example shows a fixed entitlement for a workload group.
#
# Name:
# fixed_entitlement.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.7 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the use of HP-UX WLM in allocating a fixed entitlement
# (allocation) to a particular group of users.
#
# Dependencies:
# This example was designed to run with version HP-UX WLM A.01.02
# or later.
#
#
# prm structure
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
# All workload groups must be defined in the prm structure. Individual
# users are assigned to groups in this structure as well.
#
# In this example, the user bob will have all of his applications
# run in the Marketing workload group. The user sally can execute
# applications in either Marketing or OTHERS. Marketing is listed
# first for sally, so it is the group that all of her applications
# will execute in by default. Because OTHERS is also listed, it is an
# alternate group for sally. She can move existing processes to, or
# start new processes in, alternate groups using the prmmove or prmrun
294 Chapter 9
Example configuration files
fixed_entitlement.wlm
prm {
groups = Marketing : 2;
users = bob : Marketing,
sally: Marketing OTHERS;
}
#
# slo structure
#
# The keywords pri (priority) and entity (group to which
# the SLO applies) are required for any SLO specification.
#
# The cpushares statement requests a fixed allocation of 30% of the
# CPU resources on the system for the Marketing group.
#
slo Marketing_Analysis {
pri = 1;
cpushares = 30 total;
entity = PRM group Marketing;
}
For information on the cpushares keyword, see “Specifying a
shares-per-metric allocation request (optional)” on page 205.
Chapter 9 295
Example configuration files
manual_cpucount.wlm
manual_cpucount.wlm
This example is similar to the previous one: It allows you to easily step
through a number of different CPU allocations for a workload group. The
difference is that this configuration uses a PSET-based workload group.
When you change CPU allocations, you are changing the number of CPU
resources assigned to the group’s PSET. The file is located at
/opt/wlm/toolkits/weblogic/config/manual_cpucount.wlm.
#
# Name:
# manual_cpucount.wlm
#
# Version information:
#
# (c) Copyright 2002, Hewlett-Packard Company, all rights reserved.
#
# $Revision: 1.9 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/toolkits location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example is similar to the
# /opt/wlm/examples/wlmconf/manual_entitlement.wlm
# example. It lets a user or system administrator easily set the
# CPU count for a PRM PSET group using the wlmsend command.
#
# This is useful for benchmarking or capacity-planning situations--
# a benchmark can be run against an instance, then the PSET
# CPU count changed. After the count is changed, the benchmark
# can be measured again, all without restarting WLM or the instance
# or manually reconfiguring the PSET.
#
# Components:
# This example does use a data collector, but it has no other
# required configuration file.
296 Chapter 9
Example configuration files
manual_cpucount.wlm
# Dependencies:
# This example was designed to run with HP-UX WLM version A.02.01 or
# later. It uses the CPU movement among PSET groups feature
# introduced in WLM A.02.01. Consequently, it is incompatible with
# earlier versions of HP-UX WLM.
#
#
# prm structure
# There is a single WebLogic instance, instA, being controlled
# in a WLM workload group, wls1_grp.
#
# The users statement allows the user named ‘wladmin’ to run jobs in
# OTHERS or wls1_grp, with group wls1_grp being his default group.
#
prm {
groups =
OTHERS : 1,
wls1_grp : PSET
;
#
# Create an SLO that allocates CPU resources to group wls1_grp based on the
# metric wls1_grp.desired.cpucount. If wls1_grp.desired.cpucount is 1.0, the
# allocation is 100, which is one core of CPU resources. 2 is 200, or two
# cores, and so on.
#
slo wls_base {
pri = 1;
entity = PRM group wls1_grp;
cpushares = 100 total per metric wls1_grp.desired.cpucount;
}
Chapter 9 297
Example configuration files
manual_entitlement.wlm
#
# Check for new metrics every 5 seconds.
# Also, turn on absolute CPU units, so resources on a 4-core box are
# represented as 400 shares instead of 100 shares.
#
tune {
wlm_interval = 5;
absolute_cpu_units = 1;
}
For information on the cpushares keyword, see “Specifying a
shares-per-metric allocation request (optional)” on page 205. For
information on using wlmrcvdc and wlmsend in this manner, see
“Sending data from the command line” on page 495.
manual_entitlement.wlm
This next example is helpful in determining what type of performance to
expect from a workload at various amounts of CPU resources. With that
information, you can create better service-level objectives for the
workload. As such, this example is a good model to follow when setting
up your WLM configuration.
#
# Name:
# manual_entitlement.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.14 $
298 Chapter 9
Example configuration files
manual_entitlement.wlm
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example demonstrates the use of a parametric entitlement
# (allocation) to characterize the behavior of a workload. The user
# can directly set an allocation for a workload with wlmsend. By
# gradually increasing the workload’s allocation with a series of
# wlmsend commands, the operator can determine how the workload
# behaves with various amounts of CPU. This research can then be
# compared with similar data for the other workloads that will run on
# the system. This comparison gives you insight into which workloads
# you can combine (based on their needed CPU) on a single system
# and still achieve the desired SLOs. Alternatively, if you
# cannot give a workload its optimal amount of CPU, you will know
# what kind of performance to expect with a smaller allocation.
#
# The user’s workload is placed in grp1 and is associated with
# a metric called myapp.desired.allocation. The metric value
# represents an absolute allocation request as defined by the
# controlling SLO’s cpushares statement (see the definition for
# grp1 below).
#
# The workload is tested by sending a series of allocation requests
# like the following:
#
# % wlmsend myapp.desired.allocation 10
# % <manually measure workload performance under new allocation>
# % wlmsend myapp.desired.allocation 20
# % <manually measure workload performance under new allocation>
# % wlmsend myapp.desired.allocation 30
# % <manually measure workload performance under new allocation>
# % wlmsend myapp.desired.allocation 40
# % <manually measure workload performance under new allocation>
# % wlmsend myapp.desired.allocation 50
# % <manually measure workload performance under new allocation>
# % wlmsend myapp.desired.allocation 60
# % <manually measure workload performance under new allocation>
# etc.
#
# After each allocation request is sent, the user must manually
# measure the workload performance to determine its response to
Chapter 9 299
Example configuration files
manual_entitlement.wlm
#
# prm structure
# Create a workload group called grp1 and define the binaries that
# make it up. In this example, the apache webserver binary
# /opt/hpws/apache/bin/httpd and the apache benchmark utility
# /opt/hpws/apache/bin/ab are used as the workloads. This
# also illustrates how to place two different binaries into
# the same workload group. See the example configurations in
# /opt/wlm/toolkits/apache/config/ for more WLM configurations
# to place and control apache.
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups = OTHERS : 1, grp1 : 2;
apps = grp1 : /opt/hpws/apache/bin/httpd,
grp1 : /opt/hpws/apache/bin/ab;
}
#
# Have HP-UX WLM manage the CPU allocation such that the workload group
# grp1 gets 1 share per metric. That is, setting the metric
# myapp.desired.allocation to 20 results in 20 shares for grp1,
# setting the metric myapp.desired.allocation to 50 results in 50
# shares for grp1, and so forth.
#
slo grp1 {
pri = 1;
entity = PRM group grp1;
cpushares = 1 total per metric myapp.desired.allocation;
}
300 Chapter 9
Example configuration files
metric_condition.wlm
# Any CPU that remains after satisfying the above SLO is given to the
# OTHERS group by default. You can change this default using the
# distribute_excess keyword. For more information on this keyword, see
# the wlmconf(4) manpage.
#
# Relay a metric from the outside user.
#
tune myapp.desired.allocation {
coll_argv = wlmrcvdc;
}
For information on the cpushares keyword, see “Specifying a
shares-per-metric allocation request (optional)” on page 205. For
information on using wlmrcvdc and wlmsend in this manner, see
“Sending data from the command line” on page 495.
metric_condition.wlm
This example shows a metric enabling an SLO only when the associated
workload has work to do.
#
# Name:
# metric_condition.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.8 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
Chapter 9 301
Example configuration files
metric_condition.wlm
# Purpose:
# Demonstrate the use of HP-UX WLM to enable a service-level objective
# (SLO) when a measurable metric value is reached. Also make use of a
# glance data collector to provide a metric value.
#
# Components:
# The glance toolkit (included with HP-UX WLM) is used. See
# glance_prm(1M) for more information on the glance data collectors.
#
# Dependencies:
# This example was designed to run with version HP-UX WLM A.01.01
# or later.
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
#
# prm structure
# Define all workload groups in the prm structure.
#
prm {
groups = OTHERS : 1,
jobs : 2;
apps = jobs: /opt/batch/bin/submit;
}
# slo structures
#
# This SLO has a metric goal. It also has a metric used in the
# condition statement. Both these metrics will require that more
# information be provided in metric-specific tune structures.
#
# This SLO becomes active based on the number of active jobs, once
# the server actually has jobs submitted to it. It attempts to keep
# the average job-completion time under 10 minutes (these are batch
# jobs, so we’re not dealing in seconds of response time) when there
# are any active jobs. If there are no jobs, this SLO is inactive.
#
slo job_processing {
pri = 1; # SLO of highest priority
mincpu = 40; # minimum CPU allocation (percentage)
maxcpu = 90; # maximum CPU allocation (percentage)
entity = PRM group jobs;
goal = metric avg_completion_time < 10;
condition = metric number_of_active_jobs > 0;
302 Chapter 9
Example configuration files
metric_condition.wlm
}
# tune structures
#
# These structures provide the data collector information
# for the metrics used in the slo structure above.
#
# One data collector is a hypothetical application, written to
# calculate and provide average job-completion time in minutes.
#
# The other metric is calculated using the glance toolkit and
# a glance metric called APP_ALIVE_PROC.
#
tune avg_completion_time {
coll_argv = /opt/batch/metrics/job_complete_time -minutes;
}
tune number_of_active_jobs {
coll_argv = wlmrcvdc glance_prm APP_ALIVE_PROC jobs;
}
For information on the condition keyword, see “Specifying when the
SLO is active (optional)” on page 205.
Chapter 9 303
Example configuration files
par_manual_allocation.wlm
par_manual_allocation.wlm
This file, in combination with the global arbiter configuration file in the
next section, can migrate cores across HP-UX Virtual Partitions (vPars)
and/or nPartitions (nPars) based on the number of cores you request on
the command line using wlmsend. The way WLM manages cores depends
on the software enabled on the complex (such as Instant Capacity, Pay
per use, and Virtual Partitions).
Activate the WLM configuration file in each partition. However, you need
to activate the WLM global arbiter’s configuration in only one partition.
#
# Name:
# par_manual_allocation.wlm
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.4 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example, used with par_manual_allocation.wlmpar, demonstrates
# WLM’s ability to resize HP-UX Virtual Partitions and/or
# nPartitions based on manual feedback from the user through the
# wlmsend command.
#
# The configuration is strictly host-based, not supporting FSS
# or PSET groups; thus, applications within a partition are
# treated as a single workload. Because the utilitypri feature is
# not used in par_manual_allocation.wlmpar, the total number of
# active cores remains constant, but the allocations change
# to meet the manual requests.
#
# The way WLM manages CPU resources depends on the software enabled
# on the complex (such as Instant Capacity, Pay per use, and Virtual
# Partitions.)
304 Chapter 9
Example configuration files
par_manual_allocation.wlm
# Dependencies:
# This example was designed to run with HP-UX WLM version A.03.00 or
# later. (A.03.00 was the first version to support strictly
# host-based configurations.)
#
# To implement WLM’s dynamic partition resizing:
# 1. Set the primary_host keyword in this file
#
# 2. Copy this WLM configuration to each partition in the system
#
# 3. Adjust the priority for the SLO named slo_myslo to reflect the
# priority of the applications for the current partition relative
# to the priority of the applications in all the other partitions
#
# 4. Customize the configuration file
# par_manual_allocation.wlmpar used by the WLM global
# arbiter (see that file for details)
#
# 5. Activate the par_manual_allocation.wlmpar file on the
# primary host:
#
# wlmpard -a par_manual_allocation.wlmpar
#
# 6. Activate the WLM configuration file on each partition:
#
# wlmd -a par_manual_allocation.wlm
#
# NOTE: You will activate both the par_manual_allocation.wlmpar
# file and the par_manual_allocation.wlm file on the primary
# host.
#
# 7. Change the number of cores a partition requests using wlmsend
#
# Using the wlmsend command on a partition, you can explicitly
# request a certain number of cores for that partition. The
# configuration below defines a metric named num_cpus. You can
# change the value of this metric with wlmsend. For example, the
# following command requests 3 cores:
#
# % /opt/wlm/bin/wlmsend num_cpus 3
#
# After using wlmsend, wait one wlm_interval (set at 5 seconds
# below) then use the wlminfo command from the next step to see
# how the group’s allocation is affected. Continue changing the
Chapter 9 305
Example configuration files
par_manual_allocation.wlm
#
# Set the interval on which WLM takes CPU requests and makes changes in CPU
# allocations to 5 seconds. (The default interval is 60 seconds. Using a
# smaller interval allows WLM to respond more quickly. If you change this
# interval, be sure the global arbiter interval set in par_usage_goal.wlmpar
# is greater than the new wlm_interval value you set here.)
#
tune {
wlm_interval = 5;
}
#
# Change the priority (pri) value after copying this file to each partition.
# This value (1 being the highest priority) indicates the importance of the
306 Chapter 9
Example configuration files
par_manual_allocation.wlmpar
#
# The following structure sets up the metric num_cpus that is used in the
# cpushares statement above. This set up allows you to change the metric’s
# value using wlmsend on the command line. See Steps 7 and 8 above for
# usage and monitoring examples.
#
tune num_cpus {
coll_argv = wlmrcvdc;
}
For more information on WLM partition management, see Chapter 7,
“Managing SLOs across partitions,” on page 255.
par_manual_allocation.wlmpar
This file is a configuration file for the WLM global arbiter. In
combination with the WLM configuration file in the previous section,
this file can migrate cores across HP-UX Virtual Partitions and/or
nPartitions based on the number of cores you request for a partition by
using the wlmsend command. The way WLM manages cores depends on
the software enabled on the complex (such as Instant Capacity, Pay per
use, and Virtual Partitions). This file also shows how several additional
par structure keywords (including utilitypri) are used (these are
commented out).
Activate the WLM global arbiter’s configuration in only one partition.
However, activate the WLM configuration file in each partition.
Chapter 9 307
Example configuration files
par_manual_allocation.wlmpar
#
# Name:
# par_manual_allocation.wlmpar
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.6 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example, used with par_manual_allocation.wlm, demonstrates
# WLM’s ability to resize HP-UX Virtual Partitions and/or
# nPartitions based on manual feedback from the user through the
# wlmsend command.
#
# This configuration is for the WLM global arbiter, wlmpard, which
# takes CPU requests from the WLM instances in each partition.
# It then shifts cores between the partitions based on the requests
# and priorities of partition workloads. Because the utilitypri
# feature is not used here, the total number of active cores remains
# constant, but the CPU allocations change to meet the manual requests.
#
# The way WLM manages CPU resources depends on the software enabled
# on the complex (such as Instant Capacity, Pay per use, and Virtual
# Partitions.)
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.03.00 or
# later.
#
# To implement WLM’s dynamic partition resizing:
# See instructions in par_manual_allocation.wlm for the steps
# needed to configure WLM for dynamic partition resizing.
#
# The WLM global arbiter’s interval is set to 10 seconds. Every interval,
# the arbiter takes CPU requests from the WLM instances running on the
# partitions and makes changes in the partitions’ CPU allocations. (If you
# change the global arbiter interval, be sure it is greater than the
308 Chapter 9
Example configuration files
par_manual_allocation.wlmpar
par {
interval = 10;
# port = 9692;
# wlmpardstats_size_limit = 1024;
# utilitypri = 2;
}
For more information on WLM partition management, see Chapter 7,
“Managing SLOs across partitions,” on page 255.
Chapter 9 309
Example configuration files
par_usage_goal.wlm
par_usage_goal.wlm
This file, in combination with the global arbiter configuration file in the
next section, can migrate cores across HP-UX Virtual Partitions and/or
nPartitions based on usage goals. The way WLM manages cores depends
on the software enabled on the complex (such as Instant Capacity, Pay
per use, and Virtual Partitions).
Activate the WLM configuration file in each partition. However, you only
need to activate the WLM global arbiter’s configuration in one partition.
#
# Name:
# par_usage_goal.wlm
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.4 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example, used with par_usage_goal.wlmpar, demonstrates WLM’s
# ability to resize HP-UX Virtual Partitions and/or nPartitions
# based on workload usage. The configuration is strictly host-based,
# not supporting FSS or PSET groups; thus, applications within a
# partition are treated as a single workload. Because the utilitypri
# feature is not used in par_usage_goal.wlmpar, the total number of
# active cores remains constant, but the CPU allocations for partitions
# change automatically to meet each partition’s usage needs.
#
# The way WLM manages CPU resources depends on the software enabled
# on the complex (such as Instant Capacity, Pay per use, and Virtual
# Partitions.)
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.03.00 or
# later. (A.03.00 was the first version to support strictly
310 Chapter 9
Example configuration files
par_usage_goal.wlm
Chapter 9 311
Example configuration files
par_usage_goal.wlmpar
# where WLM’s global arbiter will run. (This keyword has the same value
# on each partition.)
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
primary_host = myserver; # Change this value
#
# Set the interval on which WLM takes CPU requests and makes changes in CPU
# allocations to 5 seconds. (The default interval is 60 seconds. Using a
# smaller interval allows WLM to respond more quickly to changes in
# workload performance. If you change this interval, be sure the global
# arbiter interval set in par_usage_goal.wlmpar is greater than the new
# wlm_interval value you set here.)
#
tune {
wlm_interval = 5;
}
#
# Change the priority (pri) value after copying this file to each
# partition. This value (1 being the highest priority) indicates the
# importance of the current partition’s applications relative to
# the importance of the applications in all the other partitions.
#
slo slo_myslo {
pri = 1; # Change this value
goal = usage _CPU;
}
For more information on WLM partition management, see Chapter 7,
“Managing SLOs across partitions,” on page 255.
par_usage_goal.wlmpar
This file is a configuration file for the WLM global arbiter. In
combination with the WLM configuration file in the previous section,
this file can migrate cores across HP-UX Virtual Partitions and/or
nPartitions based on usage goals. The way WLM manages cores depends
on the software enabled on the complex (such as Instant Capacity, Pay
312 Chapter 9
Example configuration files
par_usage_goal.wlmpar
per use, and Virtual Partitions). This file also shows how several
additional par structure keywords (including utilitypri) are used
(these are commented out).
Activate the WLM global arbiter’s configuration in only one partition.
However, activate the WLM configuration file in each partition to be
managed by WLM.
#
# Name:
# par_usage_goal.wlmpar
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.7 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example, used with par_usage_goal.wlm, demonstrates WLM’s
# ability to resize either HP-UX Virtual Partitions or nPartitions
# based on workload usage.
#
# This configuration is for the WLM global arbiter, wlmpard, which
# takes CPU requests from the WLM instances in each partition.
# It then shifts cores between the partitions based on the requests
# and priorities of partition workloads. Because the utilitypri
# feature is not used here, the total number of active cores remains
# constant, but the CPU allocations for partitions change
# automatically to meet each partition’s usage needs. The way WLM
# manages CPU resources depends on the software enabled on the
# complex (such as Instant Capacity, Pay per use, and Virtual
# Partitions).
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.03.00 or
# later.
#
# To implement WLM’s dynamic partition resizing:
# See the instructions in par_usage_goal.wlm for the steps needed to
Chapter 9 313
Example configuration files
par_usage_goal.wlmpar
par {
interval = 10;
# port = 9692;
# wlmpardstats_size_limit = 1024;
# utilitypri = 2;
}
For more information on WLM partition management, see Chapter 7,
“Managing SLOs across partitions,” on page 255.
314 Chapter 9
Example configuration files
performance_goal.template
performance_goal.template
The following file is a template showing how to use various components
of the configuration file. The file shows how to use performance-based
goals to determine whether an SLO is being met. Values that you must
customize are shown in square brackets ([ ]). You must remove the
brackets.
#
# Name:
# performance_goal.template
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.5 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This file contains a SAMPLE HP-UX WLM configuration file, meant
# to expand on the descriptions given in the wlmconf(4) manpage.
#
# Specifically in this file, we illustrate the use of performance-
# based goals to determine whether an SLO is being met.
#
# Keep in mind that this example is for illustration purposes ONLY.
# While it does contain all the required components, the specific
# values (such as group, user, SLO names, and executable locations)
# are hypothetical. The service-level objectives (SLOs) and all
# other identifiers must be tailored to your environment.
#
# This sample file can be viewed as a simple template, as the non-
# keyword items that the user would need to customize are contained
# within square brackets ([]’s). Because of these brackets, this
# file will not “pass” the syntax-checking mode of wlmd.
#
Chapter 9 315
Example configuration files
performance_goal.template
##################
# PRM Components #
##################
#
# prm structure
#
# First, we define the workload groups.
#
# For this example, we will assume two basic workload groups:
# finance and sales
# Each group only has one application that we will monitor.
#
prm {
groups = [finance:2], [sales:3];
apps = [finance]: [/opt/fin_app/count_money], # app for finance group
[sales]: [/opt/sales/do_ebiz]; # app for sales group
}
############################
# Service-Level Objectives #
############################
#
# This is an SLO for the finance group and is only “active” on weekdays.
# It has a response-time goal, desiring that finance queries should
# complete in less than 2 seconds. A data collector to provide these
# response-time metrics to HP-UX WLM is specified later in a tune
# structure (a tune structure is required for all metrics used in an
# slo structure).
#
# In the goal line of this SLO, even though “metric” is a keyword, it could
# also have been contained within the brackets (as a user-configurable item).
# This is because there are other types of goal statements (such as usage)
# besides a metric (performance-based) goal. However, as this template is
# focused on showing the use of performance goals, “metric” is used
# explicitly, leaving just the “what-am-I-measuring?” piece as configurable.
#
slo [finance_query] {
pri = [1]; # SLO of highest priority
mincpu = [20]; # minimum CPU allocation (%)
maxcpu = [50]; # maximum CPU allocation (%)
entity = PRM group [finance];
316 Chapter 9
Example configuration files
performance_goal.template
#
# This is an SLO for the Sales group, active at all times (there are no
# conditions or exceptions).
#
slo [sales_query] {
pri = [1];
mincpu = [40];
maxcpu = [80];
entity = PRM group [sales];
goal = metric [sales_app.resp_time < 10.0];
}
#########################
# Global tune structure #
#########################
#
# Have HP-UX WLM check for new performance data (and make any necessary
# adjustments to allocations) every 30 seconds.
#
tune {
wlm_interval = [30]; # wlmd polling interval
}
###################################
# Metric-specific tune structures #
###################################
#
# This structure specifies the data collector (coll_argv) for the
# fin_ap.query.resp_time metric, used in the goal statements of the
Chapter 9 317
Example configuration files
stretch_goal.wlm
#
# Structure specifying similar information for the sales_app.resp_time
# metric.
#
tune [sales_app.resp_time] {
coll_argv = [/opt/sales_app/monitor -threshold 2 -freq 30];
cntl_kp = [2.0];
}
For related information, see Chapter 5, “Configuring WLM,” on page 135.
stretch_goal.wlm
Stretch goals are secondary goals and are of lower priority than a
workload group’s main SLO. Here, we have a stretch goal to provide a
workload group with more CPU resources if available. For an example
configuration with stretch goals for several workload groups, see
“usage_stretch_goal.wlm” on page 334.
#
# Name:
# stretch_goal.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
318 Chapter 9
Example configuration files
stretch_goal.wlm
# $Revision: 1.7 $
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the use of multiple SLOs at different priority levels,
# but for the same workload, used to facilitate a “stretch” goal (one
# that we’d like to have met if all other higher-priority SLOs are
# being met).
#
# This file is very similar to the performance_goal.template file.
# It is provided without the user-customizable fields in brackets.
# But, more importantly, we have added an SLO to illustrate how one
# can accomplish stretch (“would-be-nice-if-there-are-extra-cycles”)
# goals.
#
# PRM structure
#
# In this example, we have two groups again:
# finance and sales
# Each workload has one application.
#
prm {
groups = finance:2,
sales:3;
apps = finance: /opt/fin_app/count_money, # application for finance group
sales: /opt/sales/do_ebiz; # application for sales group
}
#
# slo structures
#
#
# This is an SLO for the finance group, only “active” on weekdays.
slo finance_query {
pri = 1; # SLO of highest priority
mincpu = 20; # minimum CPU allocation (percentage)
Chapter 9 319
Example configuration files
stretch_goal.wlm
#
# This is an SLO for the Sales group, active at all times (there are no
# conditions or exceptions).
#
slo sales_query {
pri = 1;
mincpu = 40;
maxcpu = 80;
entity = PRM group sales;
goal = metric sales_app.resp_time < 10.0;
}
#
# tune structures
#
# This first structure specifies the data collector (coll_argv) for
# the fin_ap.query.resp_time metric, used in the goal statements
# of the finance SLOs (above). This hypothetical application
# (/opt/fin_app/finance_collector) is developed or otherwise provided
# by the user.
#
# NOTE: Because the data collectors for these metrics are
# hypothetical applications, this file will not pass the syntax-
# checking mode of wlmd (wlmd -c stretch_goal.wlm). A real data-
# collecting program must exist, as HP-UX WLM will launch it and rely
# upon it to provide performance metrics (or the HP-provided interface,
# wlmrcvdc, can be used when appropriate).
320 Chapter 9
Example configuration files
time_activated.wlm
#
tune fin_app.query.resp_time {
coll_argv = /opt/fin_app/finance_collector -a 123 -v;
}
#
# tune structure specifying similar information for the
# sales_app.resp_time metric.
#
tune sales_app.resp_time {
coll_argv = /opt/sales_app/monitor -threshold 2 -freq 30;
}
For information on the condition keyword, see “Specifying when the
SLO is active (optional)” on page 205. Also see “Goals vs stretch goals” on
page 203.
time_activated.wlm
The following example enables an SLO based on time, or in this case,
date.
#
# Name:
# time_activated.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.9 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the use of HP-UX WLM in allocating a fixed allocation
# to a particular group of users only during a certain time period.
#
Chapter 9 321
Example configuration files
time_activated.wlm
# Dependencies:
# This example was designed to run with version HP-UX WLM A.01.02
# or later.
#
# prm structure
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
# Define all workload groups in the prm structure. Individual
# users are assigned to particular groups in this structure as well.
#
# In this example configuration, the user don can execute
# applications in either the Payroll or OTHERS workload groups. So,
# he can move existing processes to, or start new processes in,
# OTHERS using the prmmove or prmrun commands. For more information,
# see prmmove(1) and prmrun(1). The users paysupv and payadm can
# execute applications in the Payroll group but nowhere else.
#
# Note that the group OTHERS is created automatically. Applications
# run by users not referenced in the prm structure will execute in
# the OTHERS group. Given the prm structure below, only don,
# paysupv and payadm can execute applications in the Payroll
# group.
prm {
groups= Payroll : 3;
users= don: Payroll OTHERS,
paysupv: Payroll,
payadm: Payroll;
}
#
# slo structure
#
# The keywords pri (priority), and entity (group to which
# the SLO applies) are required for any SLO specification.
#
# The cpushares statement requests a fixed allocation of 80% of the
# CPU resources on the system for the Payroll group.
#
# With the condition set as shown, this SLO is only in effect
# on the 6th and 21st of each month. On these dates, applications
# executing in the Payroll group will have 80% of the system’s CPU
# resources dedicated to them. Note that on all other dates, the
# SLO is disabled, and only the minimum default of 1% of the CPU
322 Chapter 9
Example configuration files
transient_groups.wlm
slo Payroll_Processing {
pri = 1;
cpushares = 80 total;
entity = PRM group Payroll;
condition = */06/* || */21/*;
}
For information on the condition keyword, see “Specifying when the
SLO is active (optional)” on page 205.
transient_groups.wlm
This example shows how you can reduce the resources used by groups
with no active SLOs.
#
# Name:
# transient_groups.wlm
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.7 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# This example demonstrates WLM’s management of groups with no active
# SLOs. By default, WLM workload groups continue to consume system
# resources even when the groups have no active SLOs.
#
Chapter 9 323
Example configuration files
transient_groups.wlm
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.02.02 or
# later. (A.02.02 was the first version to support PSET-based groups
# as transient groups.)
#
prm {
groups = OTHERS : 1,
Apache : 2,
Billing : 3,
Paying : PSET;
324 Chapter 9
Example configuration files
transient_groups.wlm
# The SLO for the Apache workload is going to request 1 to 2 cores. It has a
# usage goal, which will ensure the group uses a certain percentage of its
# CPU allocation. This SLO is priority 1, as Apache must get the CPU
# resources it needs.
slo Apache_slo {
pri = 1;
mincpu = 100;
maxcpu = 200;
entity = PRM group Apache;
goal = usage _CPU;
}
Chapter 9 325
Example configuration files
twice_weekly_boost.wlm
twice_weekly_boost.wlm
This example presents an interesting mix of conditions for active SLOs.
#
# Name:
# twice_weekly_boost.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.12 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/toolkits location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
326 Chapter 9
Example configuration files
twice_weekly_boost.wlm
# Purpose:
# Demonstrate a conditional allocation with a moderately complex
# condition.
# A baseball park’s server runs a number of different workloads
# for two groups: the front office and the scouting staff. The
# basic allocations are 30 shares for front_office, 30 shares for
# scouting, and the remainder (40 in this case) for OTHERS.
#
# The front office staff has one important, long running job,
# “analyze_ticket_sales”, which is usually run every Tuesday and
# Thursday. During these days, the front_office group receives a
# ‘boost’, and its allocation is 60 shares.
#
# For these regularly scheduled runs, the system administrator relies
# on HP-UX WLM to automatically re-allocate CPU resources.
#
# In addition to those regular runs, occasionally a special events
# ticket sale is held. For these sales, the job is run at an
# unscheduled time, with an allocation of 70 shares.
#
# To manually enable the front office boost for special events,
# the system administrator executes this command:
#
# % wlmsend front_office.boost_enable 1
#
# To manually disable after the special event, the system
# administrator executes this command:
#
# % wlmsend front_office.boost_enable 0
#
# The scouting staff has one particularly important, long running
# job, /opt/baseball/scouting/bin/batting_averages, which is
# usually run every Monday and Wednesday, when it receives 60
# shares.
#
# In addition to those regular runs, occasionally farm league
# makeup games are held, and the job must be run at an unscheduled
# time. During these times, the scouting group receives a manual
# ‘boost’ to 70 shares.
#
# To manually enable the scouting boost for special events,
# the system administrator executes this command:
#
# % wlmsend scouting.boost_enable 1
#
# To manually disable after the special event, the system
Chapter 9 327
Example configuration files
twice_weekly_boost.wlm
#
# prm structure
# Create workload groups and designate which workload binaries
# will be placed in each. Because the baseball application
# is nicely split into scouting/bin and finance/bin, wildcards
# can be used to place the processes in the correct workload
# groups.
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups = OTHERS : 1,
front_office : 2,
scouting : 3 ;
328 Chapter 9
Example configuration files
twice_weekly_boost.wlm
##########
#
# Give the front office its basic allocation of 30 shares.
#
slo front_office_basic {
pri = 3;
entity = PRM group front_office;
cpushares = 30 total;
}
#
# When the day is correct, boost the front office to 60 shares, unless
# scouting has requested a manual boost.
#
slo front_office_date_boost {
pri = 2;
entity = PRM group front_office;
cpushares = 60 total;
condition = (Tue || Thu);
exception = (metric scouting.boost_enable > 0) ;
}
#
# If the system administrator requests it, boost the front
# office to 70 shares.
#
slo front_office_manual_boost {
pri = 1;
entity = PRM group front_office;
cpushares = 70 total;
condition = (metric front_office.boost_enable > 0) ;
}
##########
#
# Give the scouting staff its basic allocation of 30 shares.
#
slo scouting_basic {
pri = 3;
entity = PRM group scouting;
cpushares = 30 total;
}
Chapter 9 329
Example configuration files
twice_weekly_boost.wlm
#
# If the system administrator requests it, boost scouting to 70 shares.
#
slo scouting_manual_boost {
pri = 1;
entity = PRM group scouting;
cpushares = 70 total;
condition = (metric scouting.boost_enable > 0) ;
# Any CPU that remains after satisfying the above SLOs is given to the
# OTHERS group by default. You can change this default using the
# distribute_excess keyword. For more information on this keyword, see
# the wlmconf(4) manpage.
#
# Relay the boost enable metrics from the outside user.
#
tune front_office.boost_enable {
coll_argv = wlmrcvdc;
}
tune scouting.boost_enable {
coll_argv = wlmrcvdc;
}
For information on the condition keyword, see “Specifying when the
SLO is active (optional)” on page 205.
330 Chapter 9
Example configuration files
usage_goal.wlm
usage_goal.wlm
This example shows a CPU usage goal, where WLM attempts to keep a
workload’s CPU utilization, defined as (CPU used) / (CPU allocated),
between a certain range.
#
# Name:
# usage_goal.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.10 $
#
# Caveats:
# DO NOT MODIFY this script in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the usage goal for service-level objective (SLO)
# specifications.
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.01.01
# or later.
#
#
# prm structure
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups= OTHERS : 1,
Orders : 2,
Batch: 3;
Chapter 9 331
Example configuration files
usage_goal.wlm
# slo structures
#
#
# This SLO is defined with a CPU usage, or utilization, goal. This
# is a special goal in that WLM tracks the utilization for you.
# By default, WLM attempts to keep the group’s utilization of its
# allocated CPU between 50% and 75%. If utilization falls below 50%
# (due perhaps to fewer applications running), WLM reduces the Orders
# group’s allocation, making more CPU available to the OTHERS and
# Batch groups. Similarly, when utilization is above 75%, WLM
# allocates more CPU to the group.
#
slo order_processing {
pri = 1;
mincpu = 20;
maxcpu = 80;
entity = PRM group Orders;
goal = usage _CPU;
}
#
# This SLO is also defined with a CPU usage goal. It is at a
# lower priority than the SLO for the Orders group. We also
# explicitly specify the utilization bounds. We use a small value
# (25) for the upper bound, because we want this group to request
# more CPU whenever there is any activity in the group. The
# order_processing SLO is higher priority, so it can steal CPU from
# this SLO whenever it needs it. The gmincpu value for OTHERS
# ensures that we never completely starve that group.
#
# If the boundary values are not specified (as in the previous SLO),
# then they default to 50 and 75.
#
slo batch_processing {
pri = 99;
mincpu = 5;
maxcpu = 100;
entity = PRM group Batch;
goal = usage _CPU 15 25;
}
332 Chapter 9
Example configuration files
usage_goal.wlm
# tune structure
#
# Have WLM modify allocations (if necessary) every 5 seconds
# because the configuration includes usage goals.
#
tune {
wlm_interval = 5;
}
For more information on usage goals, see “Specifying a goal (optional)” on
page 199.
Chapter 9 333
Example configuration files
usage_stretch_goal.wlm
usage_stretch_goal.wlm
This example shows the use of stretch goals in addition to base CPU
usage goals for several different workload groups. A priority 1 SLO
specifies a base CPU usage goal for the OTHERS group to ensure that it
receives between 1 and 100 CPU shares. Additional priority 1 SLOs are
defined for three additional groups to ensure that they receive between 1
and 200 CPU shares. For each of these three groups, an additional
priority 10 SLO defines a stretch goal calling for between 1 and 800 CPU
shares if any remain after the priority 1 SLOs are satisfied.
#
# Name:
# usage_stretch_goal.wlm
#
# Version information:
#
# (C) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.6 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate workload groups with multiple SLOs at different
# priority levels, creating a base goal and a “stretch” goal (a goal
# that we’d like to have met if all other higher-priority SLOs are
# being met). All the SLOs are based on usage goals.
#
# With a usage goal, WLM adjusts a workload group’s number of CPU
# shares to keep its CPU utilization within a certain range. For
# example, if a workload group’s processes are using 20 CPU shares
# and have a 50 CPU share allocation, the group’s utilization is
# 20/50 or 40%. WLM attempts to keep a workload group’s utilization
# between a low and high bound--50% and 75% by default. To bring our
# example group’s utilization up to 50%, WLM would change its
# allocation from 50 shares to 40 shares. The utilization is
# then 20/40, or 50%.
#
#
334 Chapter 9
Example configuration files
usage_stretch_goal.wlm
# Dependencies:
# This example was designed to run with version HP-UX WLM A.02.00
# or later.
#
# prm structure
#
# In this example there are four groups defined. Each group, except
# OTHERS, has application records. An application record
# tells WLM to run an application in a certain group. (OTHERS does
# not have an application record because it is the default group:
# Any nonroot processes without application records or user records
# run in OTHERS.)
#
# The paths in the application records are examples. Modify them to
# fit your environment.
#
prm {
groups =
OTHERS : 1,
OVO : 2,
SVCDESK : 3,
SIP : 4;
apps =
SVCDESK : /path/to/svcdesk/binaries,
SIP : /path/to/sip/binaries,
OVO : /path/to/ovo/binaries;
}
#
# tune structure
#
# WLM uses absolute CPU units mode because the absolute_cpu_units
# tunable is set to 1. With these units, 100 shares equates to
# 1 core of CPU resources.
#
# With the wlm_interval tunable set to 5, WLM will adjust CPU shares
# allocated to the workloads every 5 seconds.
#
tune {
absolute_cpu_units = 1;
wlm_interval = 5;
}
#
# slo structure
Chapter 9 335
Example configuration files
usage_stretch_goal.wlm
#
# There are seven SLOs in this example.
#
# This first SLO ensures that OTHERS receives between 0 and 100
# shares. (The 100 shares represent 1 core because absolute_cpu_units
# is set to 1). The goal is a usage goal, attempting to ensure the
# group uses between 50% and 75% of its allocated CPU shares (as
# explained in the “Purpose” section above).
#
slo OTHERS_Base {
pri = 1;
entity = PRM group OTHERS;
mincpu = 1;
maxcpu = 100;
goal = usage _CPU;
}
#
# These next SLOs are set to priority 1 (pri = 1) to make sure that
# each group is allocated CPU shares. Each SLO is for a different
# group and requests between 1 and 200 shares (that is, 2 cores).
# With the usage goals, WLM allocates CPU to the groups based on how
# much of their allocations they are currently using. WLM changes
# their allocations so that the groups are using between 50% and 75%
# of those allocations.
#
slo SIP_Base {
pri = 1;
entity = PRM group SIP;
mincpu = 1;
maxcpu = 200;
goal = usage _CPU;
}
slo SD_Base {
pri = 1;
entity = PRM group SVCDESK;
mincpu = 1;
maxcpu = 200;
goal = usage _CPU;
}
slo OVO_Base {
pri = 1;
entity = PRM group OVO;
mincpu = 1;
336 Chapter 9
Example configuration files
usage_stretch_goal.wlm
maxcpu = 200;
goal = usage _CPU;
}
#
# The following SLOs are for the groups with priority 1 SLOs above.
# The SLOs below are all priority 10 (pri = 10) and are stretch goals.
# These SLOs are met only if there are shares left over after the
# higher priority SLOs have been satisfied. Each SLO is for a
# different group and requests between 1 and 800 shares (or 8
# cores). With the usage goals, WLM allocates CPU resources to the
# groups based on how much of their allocations they are currently
# using. WLM changes their allocations so that the groups are using
# between 50% and 75% of those allocations.
#
slo SIP_Stretch {
pri = 10;
entity = PRM group SIP;
mincpu = 1;
maxcpu = 800;
goal = usage _CPU;
}
slo SD_Stretch {
pri = 10;
entity = PRM group SVCDESK;
mincpu = 1;
maxcpu = 800;
goal = usage _CPU;
}
slo OVO_Stretch {
pri = 10;
entity = PRM group OVO;
mincpu = 1;
maxcpu = 800;
goal = usage _CPU;
}
For more information on usage goals and stretch goals, see “Specifying a
goal (optional)” on page 199.
Chapter 9 337
Example configuration files
user_application_records.wlm
user_application_records.wlm
This example shows how to place applications in workload groups. It also
shows that application records take precedence when both user records
and application records are in effect for an application.
#
# Name:
# user_application_records.wlm
#
# Version information:
#
# (C) Copyright 2001-2006 Hewlett-Packard Development Company, L.P.
#
# $Revision: 1.13 $
#
# Caveats:
# DO NOT MODIFY this file in its /opt/wlm/examples/wlmconf location!
# Make modifications to a copy and place that copy outside the
# /opt/wlm/ directory, as items below /opt/wlm will be replaced
# or modified by future HP-UX WLM product updates.
#
# Purpose:
# Demonstrate the use of, and precedence between, user and application
# records in placing processes in workload groups.
#
# A development server is funded and used by two groups, test and
# development. Along with normal test and development work, the
# server also supports the two groups’ joint website (via apache),
# and is the box employees use to fetch web pages (with netscape).
# However, in the past, both web functions, apache and netscape,
# have negatively affected the performance of the box. To correct
# this problem, users’ netscape sessions are limited to 10% of the
# CPU resources, and the httpd processes are limited to 10%. The
# remaining 80 percent is split 35 for test, 35 for development, and
# 10 percent for users not belonging to either group.
#
# Components:
# No external data collectors are required.
#
# Dependencies:
# This example was designed to run with HP-UX WLM version A.01.02 or
# later. It uses the cpushares keyword introduced in A.01.02, so
# is incompatible with earlier versions of HP-UX WLM.
338 Chapter 9
Example configuration files
user_application_records.wlm
#
# prm structure
# Create workload groups. Designate which workload binaries
# and users will be placed in each. We will be managing
# two workloads, apache and netscape, and two groups of users,
# testers and coders. Users not belonging to either group
# are placed in OTHERS.
#
# The users section places individuals into a workload group based
# on their login. Users not listed will run in OTHERS. Because
# application records take precedence over user records, if user larry
# runs netscape, that process will run in workload group ‘surfers’
# rather than ‘testers’. In a similar manner, if user larry runs
# httpd, it will run in ‘servers’ because the app record is used
# even though the user, larry, does not have permission to
# explicitly start or move other jobs to ‘servers’. Consult
# wlmconf(4) and prmconf(4) for more information.
#
#
# Note that netgroups can be used in the users record. For
# instance, if all development staff belonged to a netgroup
# ‘devel_netgrp’, this line could be used to place them all in
# workload group ‘coders’:
#
# users = +devel_netgrp : coders surfers,
# +test_netgrp : testers surfers;
#
# See wlmconf(4) for complete HP-UX WLM configuration information.
#
prm {
groups = OTHERS : 1,
testers : 2,
coders : 3,
servers : 4,
surfers : 5;
Chapter 9 339
Example configuration files
user_application_records.wlm
#
# Grant 35 shares to coders.
#
slo coders_fixed {
pri = 1;
entity = PRM group coders;
cpushares = 35 total;
}
#
# Grant 35 shares to testers.
#
slo testers_fixed {
pri = 1;
entity = PRM group testers;
cpushares = 35 total;
}
#
# Grant 10 shares to servers.
#
slo servers_fixed {
pri = 1;
entity = PRM group servers;
cpushares = 10 total;
}
# Any CPU that remains after satisfying the above SLOs is given to the
# OTHERS group by default. You can change this default using the
# distribute_excess keyword. For more information on this keyword, see
# the wlmconf(4) manpage.
For information on user and application records, see “Assigning users
and user access to workload groups (optional)” on page 164 and
“Assigning applications to workload groups (optional)” on page 166.
340 Chapter 9
Example configuration files
user_application_records.wlm
For more information on how the application manager works, see “How
application processes are assigned to workload groups at start-up” on
page 455 and “How the application manager affects workload group
assignments” on page 459.
Chapter 9 341
Example configuration files
user_application_records.wlm
342 Chapter 9
10 Monitoring SLO compliance and
WLM
WLM allows you to monitor SLO compliance and much more information
through wlminfo, wlmgui, and EMS, as described in the following
sections:
NOTE To ensure the smooth running of the operating system and key HP-UX
daemons, WLM runs these system processes in a special workload called
PRM_SYS. This group is not restrained by WLM: It consumes system
resources as needed. As a result, a workload’s CPU usage (shown in the
‘CPU Util’ column) may be less than its CPU shares because PRM_SYS
requires some of the group’s resources. However, the low usage could also
be the result of the group’s low CPU resource demands, or a combination
of the two factors. Also, CPU usage might at times be slightly above the
shares value due to dynamics in the CPU scheduler that WLM uses.
Likewise, if memory management is enabled, a workload’s memory
usage may be less than the number of memory shares for reasons similar
to those just stated. It could also be slightly above the memory shares
value due to extreme paging pressure or when the current group
allocation is being reduced.
Chapter 10 343
Monitoring SLO compliance and WLM
Monitoring WLM with the wlminfo command
SLO Name Group Pri Metric Goal Req Shares State Concern
s_nightly_kickof g_nightl 1 - - - 0 OFF Disabled
s_nightly_run g_nightl 1 30.5 75 - 0 OFF Disabled
s_apache_10min g_apache 2 7 - 72 72 PASS
s_apache_2min g_apache 2 0 - 72 72 PASS
s_nice g_nice 2 30.5 50 30 30 PASS
s_others OTHERS 2 1.35 50 433 462 PASS
s_team_playgroun g_team 2 0 75 1 30 PASS
s_apache_more g_apache 3 0 - 72 72 PASS
s_nice_xtra_min g_nice 3 - - 30 30 PASS
s_team_playgroun g_team 3 - - 30 30 PASS
Now we focus on workloads/workload groups. Entering wlminfo group,
we see by the ‘CPU Util’ column the amount of CPU resources the
processes in the workloads are using. This command also displays (as of
WLM A.03.02) a ‘Mem Util’ column indicating the memory utilization of
each group for which memory management is in effect.
% /opt/wlm/bin/wlminfo group
Tue Jun 11 16:06:27 2006
Workload Group PRMID CPU Shares CPU Util Mem Shares Mem Util State
OTHERS 1 432.00 171.34 40.00 30.21 ON
g_nice 2 84.00 49.22 15.00 4.89 ON
g_nightly 3 0.00 0.00 0.00 0.00 OFF
g_team 4 6.00 0.00 15.00 0.00 ON
g_apache 5 72.00 0.00 29.00 0.00 ON
_IDLE_ 7 6.00 0.00 1.00 0.00 ON
344 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with the wlminfo command
Note also that beginning with WLM A.03.02 you can use the -v option
with the wlminfo group command to see the minimum and maximum
percentage of CPU resources (gmincpu and gmaxcpu) and the minimum
and maximum percentage of memory (gminmem and gmaxmem) assigned
for each group, if applicable in the active configuration (if a minimum or
maximum is not assigned, wlminfo displays “-” in place of a numeric
value; if memory management is not being used for a group, wlminfo
displays a “-” in the ‘Mem Shares’ column). Because the width of the
display exceeds 80 characters, the wlminfo group -v command displays
the information in long-line format, each row wrapping to the next line
as in the following example:
% /opt/wlm/bin/wlminfo group -v
Tue Jun 11 16:06:27 2006
Workload Group PRMID CPU Shares CPU Min CPU Max CPU Util Mem Shares
Mem Min Mem Max Mem Util State
OTHERS 1 432.00 - - 171.34 40.00
- - 30.21 ON
g_nice 2 84.00 10 80 49.22 15.00
10 20 4.89 ON
g_nightly 3 0.00 - - 0.00 -
10 20 - ON
g_team 4 6.00 2 4 0.00 15.00
2 10 0.00 ON
g_apache 3 72.00 10 55 0.00 29.00
4 15 0.00 ON
_IDLE_ 7 6.00 - - 0.00 1.00
1 - 0.00 ON
Last, we look at the metrics used in the current WLM configuration. The
‘PID’ column shows the PID of the data collector providing the metric to
WLM. In this example, the WLM daemon, wlmd, with PID 2103 is
providing many of the metrics itself, for usage goals. (Because wlmd
starts, and then starts the data collectors, wlmd typically has the lowest
PID.) The ‘State’ column indicates whether the metric value was updated
in the interval (NEW), no value has been received for the metric since the
WLM daemon started (INIT), or the metric’s value was not updated in
the interval (OLD). The last column shows the value received for the
metric.
% /opt/wlm/bin/wlminfo metric
Chapter 10 345
Monitoring SLO compliance and WLM
Monitoring WLM with the wlminfo command
NOTE You can configure EMS to set an alarm for a metric value (for example, if
the metric value exceeds a certain threshold, you can have EMS notify
you). For more information on using EMS, see the Using the Event
Monitoring Service manual. For information about the metric value
resource monitored by EMS, see “Metric status updates” on page 358.
346 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
• Monitor
• Modify
• Deploy
You can perform these operations on the local system or on remote
systems.
To begin monitoring:
# /opt/wlm/bin/wlmgui
For additional information on navigating the WLM GUI, see its online
help.
Chapter 10 347
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
348 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
Chapter 10 349
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
350 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
In addition to the default ‘CPU Shares’ and ‘CPU Usage’ values, you can
graph the selected groups’ ‘Minimum CPU’ and ‘Maximum CPU’ values.
These correspond to the gmincpu and gmaxcpu keywords in the
configuration.
To adjust what values are being graphed, right-click in the graph area to
display the menu of options. Figure 10-4 shows this menu.
Chapter 10 351
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
Monitoring SLOs
In the “Service-level objectives” tab, we can see graphs of metrics used in
SLOs—along with the CPU allocations WLM granted in response to the
changing metrics. This view provides a significant amount of other data.
Figure 10-5 shows details for the SLO for the test group.
352 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with the wlmgui command
Chapter 10 353
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
SAM, SMH, or
OpenView operations for unix
...
354 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
• Passing
Chapter 10 355
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
• /applications/wlm/daemon_status
Indicates the state of the WLM daemon. Possible values are:
WLM_DOWN WLM daemon not running
WLM_UP Daemon is running: PRM
configuration is actively being
managed by the WLM daemon
• /applications/wlm/config_modify
Indicates the time when the last WLM configuration was activated.
• /applications/wlm/slo_config/
This resource class contains resources for each SLO configured in
WLM. Each of the resources provides information specific to that
SLO.
• /applications/wlm/slo_config/slo_name/
This resource class contains resources that provide information
about the SLO slo_name.
• /applications/wlm/slo_config/slo_name/priority
This resource specifies the priority for slo_name.
• /applications/wlm/slo_config/slo_name/metric
This resource specifies the metric to which the SLO applies.
• /applications/wlm/slo_config/slo_name/groupname
This resource specifies the workload/workload group groupname to
which the SLO applies.
356 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
• /applications/wlm/slo_status/
This class contains a resource instance for each SLO. That instance
provides the status of that SLO.
• /applications/wlm/slo_status/slo_name
This provides the status for slo_name. Possible values are:
WLM_SLO_COLLECTOR_DIED The data collector for this SLO
exited; consequently, the status
(passing or failing) is unknown
WLM_SLO_STARTUP_NODATA The data collector for this SLO
has started but not yet sent data
to WLM; consequently, the status
(passing or failing) is unknown
WLM_SLO_INACTIVE This SLO is currently inactive
WLM_SLO_PASS This SLO is currently passing
(meeting its goal)
WLM_SLO_CLIP_FAIL This SLO is currently failing, but
is not receiving as large an
allocation as requested by the
controller, due to higher-priority
SLOs
WLM_SLO_AT_MAXCPU_FAIL This SLO is currently failing, but
is receiving the maximum CPU
allocation allowed for this SLO
WLM_SLO_FAIL This SLO is failing
Chapter 10 357
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
• /applications/wlm/metric_config/met_name/coll_argv
This identifies a specific metric’s data collector as specified with the
coll_argv keyword in the tune structure. For more information on
specifying the coll_argv keyword in the configuration file, see
“Specifying a data collector (optional)” on page 215.
• /applications/wlm/metric_config/met_name/cntl_smooth
This indicates a specific metric’s smoothing value as specified with
the cntl_smooth keyword in the tune structure. The resource value
can range from 0 to 0.999. A value of 0 (the default) signifies that a
running average is not taken for the data collected; in other words,
dips and spikes of data received by the data collector are not
smoothed out before WLM uses the data. The higher the value, the
more smoothing that is performed. For more information on
specifying the cntl_smooth keyword in the configuration file, see
“Smoothing metric values (optional)” on page 223.
• /applications/wlm/metric_config/met_name/cntl_avg
This indicates whether averaging is enabled for a specific metric, as
specified with the cntl_avg keyword in the tune structure. Possible
values are:
WM_METRIC_CNTL_AVG_ON Averaging is enabled
WM_METRIC_CNTL_AVG_OFF Averaging is disabled, meaning
that only the most recent
interval’s (wlm_interval) usage
data is used for a usage metric
For more information on specifying the cntl_avg keyword in the
configuration file, see “Controlling averaging in usage controllers
(optional)” on page 223.
• /applications/wlm/metric_status/met_name
This indicates the current value for a specific metric. In contrast to
the previous metric resources (which are constant for a given WLM
configuration), the metric_status value is dynamic, meaning that the
value changes periodically during a configuration’s deployment.
358 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
tune {
absolute_cpu_units = 1;
wlm_interval = 1;
}
tune more_1 {
coll_argv = /workforce/sales/data_collector division1;
cntl_avg = 1;
cntl_smooth = 0.4;
}
prm {
groups = sales : 3, marktg : 4;
}
The EMS instances returned for the metric more_1 in this configuration
would be as follows, where current_value (reported for metric_status)
is the current value (which changes at each WLM interval) :
/applications/wlm/metric_status/more_1/
current_value
/applications/wlm/metric_config/more_1/coll_argv/
"/workforce/sales/data_collector division1"
/applications/wlm/metric_config/more_1/cntl_avg
WM_METRIC_CNTL_AVG_ON
/applications/wlm/metric_config/more_1/cntl_smooth
0.40000
Chapter 10 359
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
http://SMH_host:2301
where SMH_host is an HP-UX 11i v3 (B.11.31) system that has SMH and
WLM A.03.02.02 or later installed. By using port 2301, if SMH is not
currently running on SMH_host, it is started. For more information, see
the hpsmh(1M) manpage. Additional SMH documentation is available on
http://docs.hp.com by selecting the Network and System Management
link.
# /usr/sbin/smh
Step 3. Select the Tools menu item at the top of the page.
Step 5. Select the Run button to run the EMS configuration GUI.
Step 6. Select Actions followed by Add Monitoring Request from the menu bar.
Step 7. Double-click the following resource class in the Add or Copy Monitoring
Request window:
applications
wlm
360 Chapter 10
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
Step 11. Specify the Monitoring Request Parameters to indicate how you want to
receive notification of various WLM events.
Chapter 10 361
Monitoring SLO compliance and WLM
Monitoring WLM with EMS
362 Chapter 10
A WLM command reference
• wlmaudit
WLM audit report generator
• wlmcert
WLM certificate manager
• wlmcomd
WLM communications daemon
• wlmcw
WLM configuration wizard
• wlmd
WLM daemon
• wlmgui
WLM graphical user interface
• wlminfo
WLM information monitor
• wlmpard
WLM global arbiter (cross-partition management)
• wlmrcvdc
WLM built-in data collector
• wlmsend
Command that makes your command-line or script data available to
the wlmrcvdc utility for forwarding to the WLM daemon
Appendix A 363
WLM command reference
wlmaudit
wlmaudit
The wlmaudit command displays audit data generated by WLM and its
global arbiter.
Use the -t option with the WLM daemon wlmd or the global arbiter
daemon wlmpard before using wlmaudit.
wlmaudit uses /opt/perl/bin/perl to display data from audit files stored in
the /var/opt/wlm/audit/ directory. For information on the structure of
these files, see wlmaudit(1M).
The command syntax is:
wlmaudit -h
wlmaudit -V
wlmaudit [-d {wlmd | wlmpard}] [-s start_date] [-e end_date] [-o html]
where
-h
Displays usage information and exits. This option
overrides all other options.
-V
Displays version information and exits. This option
overrides all other options other than -h.
-d wlmd | wlmpard
Specifies the daemon for which to display audit data. If
you do not specify this option, wlmaudit displays the
audit data from both daemons, if available.
-s start_date
Instructs wlmaudit to display audit data beginning
from start_date. The default is 01/01/1900. Use the
format mm/dd/yyyy when specifying start_date.
364 Appendix A
WLM command reference
wlmaudit
-e end_date
Instructs wlmaudit to display audit data up to
end_date. The default is the date on the current
system. Use the format mm/dd/yyyy when specifying
end_date.
-o html
Displays audit data in a formatted HTML report. The
default is text.
Appendix A 365
WLM command reference
wlmcert
wlmcert
wlmcert allows you to manage your WLM security certificates.
WLM uses secure communications by default when you use the
/sbin/init.d/wlm script to start WLM. For information on using security
certificates, see wlmcert(1M).
The command syntax is:
wlmcert -h [cmd]
wlmcert -V
wlmcert reset
wlmcert install -c certificate
wlmcert delete -c certificate
wlmcert list
wlmcert extract [-d directory]
where
-h [cmd]
Displays usage information and exits. This option
overrides all other options.
To get usage information for the command reset,
install, delete, list, or extract, specify the
command after -h. For example:
# wlmcert -h reset
-V
Displays version information and exits. This option
overrides all options other than -h.
reset
Creates the certificates for the system on which the
command is executed.
Only root can execute this operation.
366 Appendix A
WLM command reference
wlmcert
Appendix A 367
WLM command reference
wlmcert
list
Lists the certificates in the WLM truststore on the
current system.
The current system can communicate securely with
any system for which it has a certificate in its
truststore. When using WLM management of virtual
partitions or nPartitions, each partition must have in
its truststore the certificate for every other partition
with which it is being managed.
extract [-d directory]
Extracts the WLM certificate for the current system,
placing it in the named directory. If a directory is not
specified, the certificate is placed in the current
directory.
The certificate is named host.pem, where host is the
name of the current system.
368 Appendix A
WLM command reference
wlmcomd
wlmcomd
The wlmcomd communications daemon services requests from the HP-UX
Workload Manager (WLM) graphical user interface, wlmgui, allowing
local and remote access to the system.
You must start wlmcomd to use wlmgui.
Start wlmcomd on any system running a WLM daemon (wlmd) or a WLM
global arbiter daemon (wlmpard) that you would like to interact with
using wlmgui. (wlmpard is needed only if you are using WLM vPar
management or its Instant Capacity-based nPartition management. You
only need to start one wlmcomd even if the system is running both wlmd
and wlmpard.)
You can start wlmcomd on the command line. Or, you can start wlmcomd
at boot time by editing the file /etc/rc.config.d/wlm, as described in the
section “Setting the WLM communications daemon to start
automatically at reboot” on page 243.
The syntax for wlmcomd is:
wlmcomd -h
wlmcomd -V
wlmcomd [-p port]
wlmcomd [-s]
wlmcomd -k
where
-h Displays usage information and exits. This option
overrides all other options.
-V Displays version information and exits. This option
overrides all options other than -h.
-p port Changes the port that wlmcomd monitors for requests to
port. When using this option, be sure to configure
wlmgui to send requests to port as well.
port is a port number greater than 0.
If you do not specify a port, wlmcomd searches the file
/etc/services for the first line with the following format:
Appendix A 369
WLM command reference
wlmcomd
hp-wlmcom port_number/tcp
If such an entry is found, port_number is used as the
port. If such an entry is not found, the default port of
9692 is used, assuming it is not in /etc/services with
protocol tcp. If it is, an error is issued.
-s Causes WLM to run in secure mode if you have
distributed security certificates to the systems or
partitions being managed by the same WLM global
arbiter (wlmpard). For more information on using
security certificates, see wlmcert(1M).
WLM runs in secure mode by default when you use the
/sbin/init.d/wlm script to start WLM. (If you upgraded
WLM, secure mode might not be the default. Ensure
that the appropriate secure mode variables in
/etc/rc.config.d/wlm are set correctly. You can change
the default by editing the values for these variables.
For more information on these variables, see “Securing
WLM communications” on page 244.)
-k Kills any running instance of wlmcomd, preventing the
servicing of any more requests. However, requests that
are already being serviced (via children of wlmcomd) are
not interrupted. Thus, active monitoring sessions can
continue, without service interruption.
NOTE If you are not using secure communications (enabled manually using the
wlmcomd -s option or automatically when you use the /sbin/init.d/wlm
script to start WLM, use wlmcomd only on trusted LANs where you trust
all the users: All data exchanged between wlmcomd and wlmgui,
including the user’s password, is transmitted without encryption over
the network.
Restrict communications between wlmcomd and wlmgui to only
authorized users to improve security.
Each connection to wlmcomd represents a separate process on the system.
As such, each connection consumes resources, such as open file
descriptors, a process ID, memory, and so forth. A large number of
370 Appendix A
WLM command reference
wlmcomd
Appendix A 371
WLM command reference
wlmcw
wlmcw
The wlmcw command starts the WLM configuration wizard. The wizard
greatly simplifies the creation of your initial WLM configuration. The
wizard is only for creating new configurations. It cannot edit existing
configurations. Also, it provides only a subset of the WLM functionality
to simplify the initial configuration process. After you create a
configuration, you can view it to gain a better understanding of how to
create more complex configurations manually.
Because the wizard is an X-windows application, be sure to set your
DISPLAY environment variable before attempting to start the wizard.
wlmcw requires Java Runtime Environment version 1.4.2 or later and,
for PRM-based configurations, PRM C.03.00 or later must be installed on
your system. (To take advantage of the latest updates to WLM, use the
latest version of PRM available.)
The syntax for wlmcw is:
wlmcw [ -s { small | medium | large } ]
where
-s size Changes the font point size used by wlmcw to size.
Acceptable values for size are:
small Default system font point size.
medium Default system font point size plus 4.
large Default system font point size plus 6.
If -s is not specified, the wizard uses the default system font point size
plus 2.
After creating your configuration file, called configfile for example,
you can activate it in passive mode as follows:
# wlmd -p -a configfile
With passive mode, you can see approximately how a particular
configuration is going to affect your system—without the configuration
actually taking control of your system’s resources. To see how the
configuration would affect your workloads, use the WLM utility wlminfo.
Fine-tune the configuration until the wlminfo output is as desired, then
activate the configuration as follows:
372 Appendix A
WLM command reference
wlmcw
# wlmd -a configfile
Appendix A 373
WLM command reference
wlmd
wlmd
The wlmd (daemon) command controls the WLM daemon, allowing you to
activate configurations as well as stop the daemon. You must log in as
root to run wlmd, unless you are just using the -c option. The following
are valid option combinations:
wlmd -h
wlmd -V
wlmd -C
wlmd [-p] [-s] [-t] [-W] [-i] -A [-l logoption[=n][,...]]
wlmd [-p] [-s] [-t] [-W] [-i] -a configfile [-l logoption[=n][,...]]
wlmd [-W] -c configfile
wlmd -k
where:
-h Displays usage information and exits. This option
overrides all other options.
-V Displays version information and exits. This option
overrides all options other than -h.
-C Displays the most recent configuration, appending two
commented lines that indicate the origin of the
configuration.
374 Appendix A
WLM command reference
wlmd
Appendix A 375
WLM command reference
wlmd
376 Appendix A
WLM command reference
wlmd
Appendix A 377
WLM command reference
wlmd
% wlminfo slo -o
In place of slo, you can also use group, host, or
metric. For more information on wlminfo, see
wlminfo(1M).
You can enable automatic trimming of the wlmdstats
file by using the wlmdstats_size_limit tunable in
your WLM configuration. For more information, see
wlmconf(4).
-k Stops (kills) wlmd.
NOTE Do not use prmconfig -r while wlmd is active. Use wlmd -k to stop
WLM.
378 Appendix A
WLM command reference
wlmgui
wlmgui
The wlmgui command invokes the WLM graphical user interface. It
allows you to create, modify, and deploy WLM configurations both locally
and remotely. In addition, it provides monitoring capabilities. Valid
option combinations are:
wlmgui
wlmgui -h
wlmgui -V
where:
-h Displays usage information and exits. This option
overrides all other options.
-V Displays version information and exits. This option
overrides all options other than -h.
wlmgui is part of the B8843CA WLM product bundle. If you would like to
install wlmgui on HP-UX systems where WLM is not installed, you can
install just the WLMUtilities bundle from the quarterly AR CD-ROM or
from the following Web site:
http://www.hp.com/go/softwaredepot
For Microsoft Windows, you can also download wlmgui from this site.
You can run wlmgui on a system where WLM is running or on any
remote system with the appropriate JRE (Java Runtime Environment)
version installed. Running wlmgui requires JRE version 1.4.2 or later.
On PRM-based configurations, PRM C.03.00 or later is required on the
system being managed by WLM. (To take advantage of the latest updates
to WLM and the GUI, use the latest version of PRM available.) (For
more on JRE version requirements, see the DEPENDENCIES section in
wlmgui(1M).)
The version of mongui must match the version of the WLM product that
it will manage. You can install multiple versions of mongui on a Microsoft
Windows PC.
Appendix A 379
WLM command reference
wlmgui
You must start wlmcomd on each system that has a WLM (wlmd) or a
WLM global arbiter (wlmpard) that you want to manage using wlmgui.
(wlmpard is needed only if you are using WLM vPar management or its
Instant Capacity-based nPartition management.)
As a security measure, wlmcomd must be explicitly started:
/opt/wlm/bin/wlmcomd
You can also start wlmcomd at boot time by editing the following file:
/etc/rc.config.d/wlm
Be sure to set your DISPLAY environment variable before attempting to
start wlmgui.
380 Appendix A
WLM command reference
wlminfo
wlminfo
The wlminfo command provides various WLM data. You indicate the
type of data to display by specifying a command with wlminfo.
Commands include slo, metric, group, host, and par. Each command
has its own options. The following are valid option combinations:
wlminfo -h [cmd]
wlminfo -V
wlminfo -i
wlminfo slo [-l] [-o] [-v] [-b { 0 | 1 }] [-q] [-c]
wlminfo slo -s slo1 [-s slo2 ...] [-l] [-o] [-v] [-b { 0 | 1 }] [-q] [-c]
wlminfo slo -g grp1 [-g grp2 ...] [-l] [-o] [-v] [-b { 0 | 1 }] [-q] [-c]
wlminfo slo -m met1 [-m met2 ...] [-l] [-o] [-v] [-b { 0 | 1 }] [-q] [-c]
wlminfo metric [-l] [-o] [-b { 0 | 1 }] [-q]
wlminfo metric -m met1 [-m met2 ...] [-l] [-o] [-b { 0 | 1 }] [-q]
wlminfo group [-l] [-o] [-b { 0 | 1 }] [-q] [-S] [-v]
wlminfo group -g grp1 [-g grp2 ...] [-l] [-o] [-b { 0 | 1 }] [-q] [-S] [-v]
wlminfo host [-l] [-o] [-b { 0 | 1 }] [-q]
wlminfo par [-l] [-o] [-b { 0 | 1 }] [-q]
wlminfo par -h host1 [-h host2 ...] [-l] [-o] [-b { 0 | 1 }] [-q]
wlminfo proc [-l] [-t secs] [-n cnt] [-p] [-v] [-b { 0 | 1 }]
wlminfo proc -g grp1 [-g grp2 ...] [-l] [-t secs] [-n cnt] [-p] [-v]
[-b { 0 | 1 }]
where
-h [cmd]
Appendix A 381
WLM command reference
wlminfo
382 Appendix A
WLM command reference
wlminfo
Appendix A 383
WLM command reference
wlmpard
wlmpard
The wlmpard command controls the HP-UX WLM global arbiter, which
governs cross-partition management as well as management of
Temporary Instant Capacity (TiCAP) and Pay per use (PPU) resources.
Every global arbiter interval (120 seconds by default), the WLM global
arbiter checks for CPU resource requests from the partitions using that
global arbiter.
When managing partitions, the arbiter then moves cores across
partitions, if needed, to better achieve the SLOs specified in the WLM
configuration files that are active in the partitions. (Given the physical
nature of nPartitions, WLM only simulates core movement—as
described in Chapter 7, “Managing SLOs across partitions,” on
page 255.) The WLM daemon wlmd must be running in each partition.
Also, the WLM configuration in each partition must use the keyword
primary_host to reference the name of the host of the partition where
the global arbiter is running.
For information on the syntax of the global arbiter configuration file, see
wlmparconf(4).
Only root can run wlmpard. The following are valid option combinations:
wlmpard -h
wlmpard -V
wlmpard -C
wlmpard [-p] [-s] [-t] [-n] [-l par[=n]] -A
wlmpard [-p] [-s] [-t] [-n] [-l par[=n]] -a configfile
wlmpard [-n] -c configfile
wlmpard -k
where:
-h
Displays usage information and exits. This option
overrides all other options.
384 Appendix A
WLM command reference
wlmpard
-V
Displays version information and exits. This option
overrides all options other than -h.
-C
Displays the most recent global arbiter configuration,
appending two commented lines that indicate the
origin of the configuration.
-n
Prevents the global arbiter from running in daemon
mode (that is, forces it to run in the foreground).
-p
Causes the global arbiter to run in passive mode. In
this mode, you can see how a particular global arbiter
configuration is going to approximately affect your
system—without the configuration actually taking
control of your system. Using this mode allows you to
verify and fine-tune a configuration.
To see how the configuration would affect your
workloads and virtual partitions, use the WLM utility
wlminfo.
The -p option must be used with the -a or -A options.
For information on passive mode, including its
limitations, see “Passive mode versus actual WLM
management” on page 238.
-s
Causes the global arbiter to run in secure mode if you
have distributed security certificates to the systems or
partitions being managed by the same WLM global
arbiter (wlmpard). For more information on using
security certificates, see wlmcert(1M).
The global arbiter runs in secure mode by default when
you use the /sbin/init.d/wlm script to start WLM. (If
you upgraded WLM, secure mode might not be the
default. Ensure that the WLMPARD_SECURE_ENABLE
variable in /etc/rc.config.d/wlm is set correctly. You can
change the default by editing the value for this
Appendix A 385
WLM command reference
wlmpard
-a [configfile]
Activates the configuration specified in the file
configfile. If configfile is not valid, an error
message is displayed, and wlmpard exits.
-c configfile
Checks the configuration specified in the file
configfile for syntax errors. The current
configuration is not affected.
386 Appendix A
WLM command reference
wlmpard
-l par
Logs statistics in the file /var/opt/wlm/wlmpardstats.
You must use -A or -a configfile with -l par.
When using -l, specifying:
par Logs statistics every global arbiter
interval.
par=n Logs statistics every n global arbiter
intervals.
Change the interval as explained in “Specifying the
global arbiter interval (optional)” on page 270.
For information on setting logging as a default, see
“Enabling statistics logging at reboot” on page 245.
You can use the wlminfo command to review statistics
from /var/opt/wlm/wlmpardstats:
% wlminfo par -o
For more information on wlminfo, see wlminfo(1M).
You can enable automatic trimming of the
wlmpardstats file by using the keyword
wlmpardstats_size_limit in your WLM global
arbiter configuration. For more information, see
wlmparconf(4).
-k
Kills any running instance of wlmpard. Use this option
to shutdown the HP-UX Workload Manager global
arbiter.
Appendix A 387
WLM command reference
wlmrcvdc
wlmrcvdc
The wlmrcvdc utility collects data and forwards it to the WLM daemon.
It can collect this data from either of the following rendezvous points:
NOTE If you use both a named pipe and a command to send the values of a
single metric to WLM, be aware that the WLM daemon checks for new
metric values once every WLM interval, and that the daemon uses only
the last value sent during this interval. This value may have come from
the named pipe or the command, depending on which one was updated
more recently.
The wlmrcvdc name comes from receive (rcv) data collector (dc).
388 Appendix A
WLM command reference
wlmrcvdc
This utility simplifies the process of providing WLM the data it needs to
gauge SLO performance, set shares-per-metric allocations, and
enable/disable SLOs. By using wlmrcvdc, you can avoid using the WLM
API, which is discussed in “Sending data from a collector written in C” on
page 499.
On the command line, the following options are available:
-h Displays usage information and exits. This option
overrides all other options.
-V Displays version information and exits. This option
overrides all other options except -h.
Otherwise, use wlmrcvdc only in a WLM configuration file, as a value for
a coll_argv keyword:
tune metric {
...
coll_argv = wlmrcvdc options_and_arguments;
...
}
For information on coll_argv, see “Specifying a data collector
(optional)” on page 215.
The options_and_arguments are based on whether the data source is a
named pipe or a command’s standard output:
• Named pipe
[-u user] [-g group]
• A command’s standard output
[-u user] [-g group] command [args...]
where:
-u user
Sets the user (owner) of the FIFO file to user (symbolic
or numeric) and gives user write permission on the
rendezvous point. If command is specified, this option
also sets the owner of the command process to user. By
default, user is root.
Appendix A 389
WLM command reference
wlmrcvdc
-g group
Sets the Unix group of the FIFO file to group (symbolic
or numeric) and changes permissions on the
rendezvous point to 0620. If command is specified, this
option also sets the Unix group of the command process
to group. By default, group is bin.
command [args...]
Instructs wlmrcvdc to start command with the specified
args arguments in the background and use its
standard output as the rendezvous point.
Use the full path to command unless you are using one
of the following commands.
Although you are able to use other commands, WLM
provides a number of commands to be used in this
context:
glance_app
Retrieves data for applications
defined in the GlancePlus file
/var/opt/perf/parm
glance_gbl
Retrieves GlancePlus global data
(system data)
glance_prm
Retrieves general PRM data and
PRM data for specific workload
groups (also known as PRM groups)
390 Appendix A
WLM command reference
wlmrcvdc
glance_prm_byvg
Retrieves PRM data regarding logical
volumes
glance_tt/glance_tt+
Retrieve ARM transaction data for
applications registered through the
ARM API function arm_init()
sg_pkg_active
Checks on the status of a
Serviceguard package
time_url_fetch
Measures the response time for
fetching a URL using the Apache ab
tool. You can use this command with
the WLM Apache Toolkit (ApacheTK)
to manage your Apache-based
workloads
wlmdurdc
Helps manage the duration of
processes in a workload
Appendix A 391
WLM command reference
wlmrcvdc
wlmoradc
Produces an SQL value or an
execution time (walltime) that results
from executing SQL statements
against an Oracle instance
wlmwlsdc
Gathers WebLogic Server
Management Bean (MBean)
information to track how busy
WebLogic instances are
NOTE The WLM daemon discards the stderr for command; however, using the
coll_stderr tunable, you can redirect stderr to a specified file. For more
information on this tunable, see “Capturing your collectors’ stderr
(optional)” on page 223. Also, be aware that wlmrcvdc immediately sends
data in the rendezvous point to wlmd. However, wlmd only uses the last
piece of data sent before the WLM interval ends.
For more information on wlmrcvdc, see “Sending data with wlmsend and
wlmrcvdc: How it works” on page 509.
392 Appendix A
WLM command reference
wlmsend
wlmsend
The wlmsend utility sends data to a rendezvous point for the wlmrcvdc
utility to collect. Use wlmsend on the command line, in a shell script, or
in a perl program.
For examples showing how to use wlmsend to get data to WLM, see
“What methods exist for sending data to WLM?” on page 493.
The syntax is:
wlmsend [-h] [-V] [-w wait_time] metric [value]
Appendix A 393
WLM command reference
wlmsend
NOTE Be careful of I/O buffering when feeding data to wlmsend. For example,
the following line works as expected:
tail -f logfile | wlmsend job_time
However, adding awk or other utilities that buffer I/O can result in data
being delayed, or not even sent, to wlmsend—depending on when the
buffer is flushed:
tail -f logfile | awk ‘{print $1}’ | wlmsend job_time
Always check the file /var/opt/wlm/wlmdstats, created by wlmd -l
metric as explained in wlmd(1M), to ensure that your data gets to WLM
in a timely fashion.
For more information on wlmsend, see “Sending data with wlmsend and
wlmrcvdc: How it works” on page 509.
394 Appendix A
B WLM configuration file
syntax overview
This appendix provides a quick reference for the WLM configuration file
syntax, indicating the required and optional components. Optional
components are enclosed in square brackets ([]). Pointers to detailed
syntax information are also included. Also included is an example WLM
configuration.
[
prm {
groups = { FSS_group_def | PSET_group_def [: LCPU = {ON | OFF} ]} [, ...];
[ users = user : init_group [alt_group1 alt_group2 ...] [, ...]; ]
[ uxgrp = uxgrp_name : group [, ...]; ]
[ apps = group : application [alt_name1 alt_name2...] [, ... ]; ]
[ scomp = compartment : group [, ...]; ]
[ procmap = group : PID_finder [, ...]; ]
[ disks = group : volume ent [, ...]; ]
[ gmincpu = group : min [, ...]; ]
[ gmaxcpu = group : max [, ...]; ]
[ weight = group : wt [, ...]; ]
[ gminmem = group : min [, ...]; ]
[ gmaxmem = group : max [, ...]; ]
[ memweight = group : wt [, ...]; ]
}
]
slo slo1_name {
pri = priority;
[ entity = PRM group group_name; ]
[ mincpu = lower_bound_request; ]
[ maxcpu = upper_bound_request; ]
[ goal = goal_expression; ]
[ condition = condition_expression; ]
[ exception = exception_expression; ]
Appendix B 395
WLM configuration file syntax overview
Configuration file syntax
slo slo2_name {
pri = priority;
[ entity = PRM group group_name; ]
cpushares = value { more | total } [ per metric met [ plus offset ] ];
[ mincpu = lower_bound_request; ]
[ maxcpu = upper_bound_request; ]
[ condition = condition_expression; ]
[ exception = exception_expression; ]
}
}
where
FSS_group_def has the syntax:
group : group_ID
PSET_group_def has the syntax:
group : PSET [: LCPU = {ON | OFF} ]
For more information on the three structure types, see the following
sections:
396 Appendix B
WLM configuration file syntax overview
Configuration file syntax
Appendix B 397
WLM configuration file syntax overview
Configuration file example
procmap = finance :
/bin/env/ UNIX95= /bin/ps -C pid_app -o pid=,
sales : /scratch/pidsbyapp salespid_app,
marketing : /scratch/pidsbyapp mrketpid_app;
398 Appendix B
WLM configuration file syntax overview
Configuration file example
# This is a stretch goal for the finance query group. If all other CPU
# requests of higher priority SLOs have been met, apply more CPU to
# group finance, so its application runs faster.
slo finance_query_stretch {
pri = 5;
mincpu = 20;
maxcpu = 80;
entity = PRM group finance;
goal = metric fin_app.query.resp_time < 1.0;
condition = Mon - Fri;
}
# On weekends, we do not expect any query transactions, but just in
# case, we will specify a nominal CPU allocation for this application
# for off-hours.
slo finance_query_weekend {
pri = 1;
cpushares = 5 total;
entity = PRM group finance;
condition = Sat - Sun;
}
tune {
wlm_interval = 30;
}
tune fin_app.query.resp_time {
coll_argv = /opt/fin_app/finance_collector -a 123 -v;
cntl_kp = 0.8;
}
tune sales_app.resp_time {
coll_argv = /opt/sales_app/monitor -threshold 2 -freq 30;
cntl_kp = 2.0;
}
Appendix B 399
WLM configuration file syntax overview
Configuration file example
400 Appendix B
C HP-UX command and system
call support
Several HP-UX commands and system calls support WLM in assigning
users and applications to the proper workload groups. Other commands
have options that allow you to use WLM more efficiently. These are
standard HP-UX commands and system calls; they are not shipped as
part of the WLM or PRM products.
Table C-1 lists HP-UX commands and system calls that support
workload groups.
Table C-1 HP-UX commands/system calls that support workload groups
Command/
Supports WLM as follows
system call
Appendix C 401
HP-UX command and system call support
Table C-2 describes HP-UX commands that have options for WLM.
Table C-2 WLM options in HP-UX commands
402 Appendix C
D Integration with other products
Appendix D 403
Integration with other products
Integrating with Process Resource Manager (PRM)
404 Appendix D
Integration with other products
Integrating with processor sets (PSETs)
NOTE When WLM is managing PSETs, do not use the psrset or kctune
command to change PSET settings (including the Hyper-Threading state
of the system or the Hyper-Threading state set for any PSET). Stop
WLM before using these commands to modify PSETs. Whenever
possible, use WLM to control PSETs.
Appendix D 405
Integration with other products
Integrating with processor sets (PSETs)
406 Appendix D
Integration with other products
Integrating with nPartitions (nPars)
Appendix D 407
Integration with other products
Integrating with HP Integrity Virtual Machines (Integrity VM)
WLM
HP-UX system with Integrity Virtual Machines installed
408 Appendix D
Integration with other products
Integrating with HP Integrity Virtual Machines (Integrity VM)
Appendix D 409
Integration with other products
Integrating with Temporary Instant Capacity (TiCAP)/ Pay per use (PPU)
410 Appendix D
Integration with other products
Integrating with Temporary Instant Capacity (TiCAP)/ Pay per use (PPU)
NOTE Specifying this priority ensures WLM maintains compliance with your
Temporary Instant Capacity usage rights. When your prepaid amount of
temporary capacity expires, WLM no longer attempts to use the
temporary resources
NOTE When 15 or fewer processing days (the default) of temporary capacity are
available, WLM will stop using Temporary Instant Capacity; in this case,
you must purchase extra capacity. Before you add the capacity, stop
wlmpard (using the -k option). For information about how to stop
wlmpard, see Appendix A, “WLM command reference,” on page 363.
You can change the 15-day default by setting the WLM global arbiter
utility_reserve_threshold keyword. For more information, see
“Specifying the reserve threshold that determines when WLM stops
activating temporary capacity resources” on page 274 or see
wlmparconf(4).
• http://www.hp.com/go/utility
• http://search.hp.com/, and search for “Temporary Instant Capacity”
Fore more information on Pay per use, visit:
• http://www.hp.com/go/utility
• http://docs.hp.com, and search for “Pay per use”
Appendix D 411
Integration with other products
Integrating with Security Containment (to form Secure Resource Partitions)
412 Appendix D
Integration with other products
Integrating with OpenView Performance Agent (OVPA) / OpenView Performance Manager (OVPM)
Integrating with
OpenView Performance Agent (OVPA) /
OpenView Performance Manager (OVPM)
You can treat your workload groups as applications and then track their
application metrics in OpenView Performance Agent for UNIX as well as
in OpenView Performance Manager for UNIX.
NOTE NOTE: If you complete the procedure that follows, OVPA/OVPM will
track application metrics only for your workload groups; applications
defined in the parm file will no longer be tracked. GlancePlus, however,
will still track metrics for both workload groups and applications defined
in your parm file.
1. Edit /var/opt/perf/parm
Edit your /var/opt/perf/parm file so that the “log” line includes
“application=prm” (without the quotes). For example:
log global application=prm process dev=disk,lvm
transaction
2. Restart the agent
With WLM running, execute the following command:
% mwa restart scope
NOTE The WLM workload groups must be enabled at the time the scopeux
collector is restarted by the mwa restart scope command. If WLM
is not running, or transient_groups is set to 1 in your WLM
configuration, data for some—or all—workload groups may be absent
from OpenView graphs and reports. Also, it may affect alarms
defined in /var/opt/perf/alarmdefs.
Appendix D 413
Integration with other products
Integrating with Serviceguard
http://openview.hp.com.
Now all the application metrics will be in terms of workload (PRM)
groups. That is, your workload groups will be “applications” for the
purposes of tracking metrics.
414 Appendix D
Integration with other products
Integrating with Serviceguard
Before failover
PackageA
PackageC
PackageB
Server1 Server2
After failover
X
PackageA
PackageB
PackageC
Server1 Server2
Appendix D 415
Integration with other products
Integrating with Serviceguard
Step 2. Edit a single WLM configuration file to handle all the Serviceguard
packages in the cluster. The following example assumes there are two
packages: pkgA and pkgB. This configuration file must:
tune pkgB_active {
coll_argv = wlmrcvdc sg_pkg_active;
}
These tune structures set the metric values pkgA_active and
pkgB_active to 1 if their packages are indeed active on the current
node. The key component is the sg_pkg_active data collector, which
is included with WLM. For more information on this data collector,
see sg_pkg_active(1M).
Rather than creating tune structures for each package, you can set
up a global tune structure that takes in package status data from any
running sg_pkg_active:
tune {
coll_argv = wlmrcvdc sg_pkg_active;
}
416 Appendix D
Integration with other products
Integrating with Serviceguard
c. Set up slo structures for each status metric, with the SLO being
active when the package is active:
slo pkgA_slo {
...
condition = metric pkgA_active;
...
}
slo pkgB_slo {
...
condition = metric pkgB_active;
...
}
Recall that the condition statement governs when an SLO is active:
If an SLO’s condition expression is true, the SLO is active. In these
cases, the expressions “metric pkgA_active” and
“metric pkgB_active” are true when the pkgA_active and
pkgB_active metrics are 1.
NOTE Workload groups that have only inactive SLOs continue to consume
system resources. To prevent this needless consumption, use the
transient_groups tunable, which is described in Step e.
Appendix D 417
Integration with other products
Integrating with Serviceguard
# /opt/wlm/bin/wlmd -c configfile
Step 4. Distribute the WLM configuration file to all the nodes in the cluster.
418 Appendix D
Integration with other products
Integrating with Serviceguard
Step 5. Activate WLM with your configuration file on all the nodes:
# /opt/wlm/bin/wlmd -a configfile
NOTE If you are using WLM’s secure communications, be sure to distribute the
security certificates as explained in the section HOW TO SECURE
COMMUNICATIONS in wlmcert(1M).
Appendix D 419
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
420 Appendix D
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
Enable WLM
Sets the variable WLM_ENABLE to 1 in the file /etc/rc.config.d/wlm on the
selected nodes. This allows WLM to start automatically whenever the
system is booted or “/sbin/init.d/wlm start” is run.
Disable WLM
Sets the variable WLM_ENABLE to 0 in the file /etc/rc.config.d/wlm on the
selected nodes. This prevents WLM from starting automatically
whenever the system is booted or “/sbin/init.d/wlm start” is run.
Restart WLM
Stops and restarts WLM by invoking the command
/sbin/init.d/wlm stop
followed by the
/sbin/init.d/wlm start
command. When restarted, WLM uses:
Appendix D 421
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
Start WLM
Starts WLM using the command /sbin/init.d/wlm start.
Stop WLM
Stops WLM using the command /sbin/init.d/wlm stop.
422 Appendix D
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
Checking the syntax after distributing the files allows you to verify that
the applications, data collectors, and any users in the configuration file
actually exist on the selected nodes. However, if you have other types of
syntax issues, you will have to fix the issues in each of the distributed
files—or fix them once in the CMS file and redistribute.
Appendix D 423
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
NOTE Using WLM with SIM / SCM requires that you install the fileset
CMSConfig.WLMB-CMS-Tools on the SIM / SCM CMS. This fileset is
available from the depot /var/opt/mx/depot11 on the host where WLM
has been installed.
Also be aware: If you are installing this fileset on a CMS that has WLM
installed, the installation will fail if the fileset is not compatible with
(does not have the same revision string as) the installed WLM.
How you access the tools depends on whether your are using SIM or
SCM. (With SCM, the version also determines how you access the tools.)
With SIM:
Step 2. Select the menu item corresponding to your desired WLM tool:
Using a SCM version prior to 3.0, access the WLM tools as follows:
For SCM version 3.0 and later, SCM has a web interface. To access the
WLM tools:
Step 3. In the left portion of the browser window, select the Tools tab if it is not
already selected.
424 Appendix D
Integration with other products
Integrating with HP Systems Insight Manager (SIM) and Servicecontrol Manager (SCM)
Appendix D 425
Integration with other products
Integrating with Oracle® databases
426 Appendix D
Integration with other products
Integrating with Oracle® databases
Appendix D 427
Integration with other products
Integrating with Oracle® databases
428 Appendix D
Integration with other products
Integrating with Oracle® databases
Appendix D 429
Integration with other products
Integrating with Oracle® databases
Table D-2 describes the wlmoradc configuration files. These files can be
used to set database environment variables for wlmoradc to use. You can
also place the SQL statements for wlmoradc to execute in these files.
Table D-2 wlmoradc example configuration files described
wlmoradc configuration
Purpose
file
430 Appendix D
Integration with other products
Integrating with Oracle® databases
ODBTK examples
As noted in the previous section, ODBTK comes with many useful
examples in the directory /opt/wlm/toolkits/oracle/config/. We will look at
parts of those files here.
The first example draws from
/opt/wlm/toolkits/oracle/config/shares_per_user.wlm. The slo structure
gives workload group Ora_grp_1 three CPU shares for each user
connected to the associated Oracle instance.
slo Ora_1_slo {
pri = 1;
mincpu = 5;
maxcpu = 90;
entity = PRM group Ora_grp_1;
cpushares = 3 total per metric oracle.instance1.user_cnt;
}
Looking at the tune structure in the same file, we see that the metric
oracle.instance1.user_cnt is provided by wlmoradc, which uses the SQL
in the configuration file user_cnt.oradc to get the user count.
tune oracle.instance1.user_cnt {
coll_argv =
wlmrcvdc
wlmoradc
--configfile /opt/wlm/toolkits/oracle/config/user_cnt.oradc
--home /oracle/app/oracle/product/8.1.5
--instance instance1
;
}
Appendix D 431
Integration with other products
Integrating with Oracle® databases
slo Ora_1_slo {
pri = 3;
cpushares = 20 total;
entity = PRM group Ora_grp_1;
}
Again, the tune structure shows wlmoradc providing the metric to WLM.
This tune structure also uses the smooth tool, which calculates a
running average of the last five user counts, smoothing out extreme
values when the user count is volatile.
tune oracle.instance1.user_cnt {
coll_argv =
wlmrcvdc
smooth -c 5
wlmoradc
--configfile /opt/wlm/toolkits/oracle/config/user_cnt.oradc
--home /oracle/app/oracle/product/8.1.5
--instance instance1
;
}
432 Appendix D
Integration with other products
Integrating with Oracle® databases
• wlmtk(5)
• wlmoradc(1M)
• smooth(1M)
• HP-UX Workload Manager Toolkits User’s Guide
(opt/wlm/toolkits/doc/WLMTKug.pdf)
• HP-UX Workload Manager Toolkits A.01.10.xx Release Notes
(/opt/wlm/toolkits/doc/Rel_Notes)
Appendix D 433
Integration with other products
Integrating with Apache
Tools in ApacheTK
ApacheTK includes a white paper and example configuration files that
demonstrate resource separation of Apache-based workloads. It also
includes the simple data collector time_url_fetch, which uses the
Apache benchmark tool ab to time URL response times. Also, ApacheTK
provides the script wlm_watch.cgi, which provides a web-based view of
the standard prmmonitor, prmlist, and other WLM and PRM
command-line tools. These are view-only reports—no modifications are
allowed from the CGI script.
434 Appendix D
Integration with other products
Integrating with Apache
• /opt/wlm/toolkits/apache/doc/apache_wlm_howto.html
• wlmtk(5)
• time_url_fetch(1M)
• wlm_watch(1M)
• HP-UX Workload Manager Toolkits User’s Guide
(opt/wlm/toolkits/doc/WLMTKug.pdf)
• HP-UX Workload Manager Toolkits A.01.10.xx Release Notes
(/opt/wlm/toolkits/doc/Rel_Notes)
• http://www.hp.com/go/webservers, then select the Apache link
Appendix D 435
Integration with other products
Integrating with BEA WebLogic Server
Tools in WebLogicTK
WebLogicTK includes a white paper and example configuration files that
demonstrate resource separation of WebLogic-based workloads. It also
includes the data collector wlmwlsdc, which tracks metrics for WebLogic
instances. Also, WebLogicTK provides the expsmooth utility for
smoothing values from WLM data collectors by computing a running
average in which the importance of old values diminishes (decays) over
time.
436 Appendix D
Integration with other products
Integrating with BEA WebLogic Server
• /opt/wlm/toolkits/weblogic/doc/weblogic_wlm_howto.html.
• wlmtk(5)
• wlmwlsdc(1M)
• expsmooth(1M)
• HP-UX Workload Manager Toolkits User’s Guide
(opt/wlm/toolkits/doc/WLMTKug.pdf)
• HP-UX Workload Manager Toolkits A.01.10.xx Release Notes
(/opt/wlm/toolkits/doc/Rel_Notes)
Appendix D 437
Integration with other products
Integrating with SAP software
Tools in SAPTK
This toolkit includes the following tool:
438 Appendix D
Integration with other products
Integrating with SAP software
wlmsapmap
wlmsapmap is the SAP process ID collector for WLM. It
returns a list of process IDs that are of a specified
process type. SAP has several process types, including
dialog (DIA), batch (BTC), and update (UPD).
• wlmtk(5)
• wlmsapmap(1M)
• HP-UX Workload Manager Toolkits A.01.09 Release Notes
/opt/wlm/toolkits/doc/Rel_Notes
Appendix D 439
Integration with other products
Integrating with SAS software
NOTE The HP-UX WLM Duration Management toolkit (DMTK), including its
wlmdurdc command, and the HP-UX WLM Toolkit for Base SAS
Software (SASTK), will be deprecated in a future release. However, a
new and improved SASTK will be made available and will include a
white paper and example configuration files. Support for the DMTK
wlmdurdc command will be removed in a future release. In the
meantime, for wlmdurdc documentation, see the wlmdurdc(1M). HP
recommends using usage-based controllers instead of DMTK.
WLM and DMTK help control CPU resources by granting a critical job
only the amount of CPU resources needed to complete within a certain
timeframe. Because the business-critical job is being duration managed,
the extra compute resource on the server can be made available to other
users or jobs without affecting the managed business-critical job. This
translates to more efficient use of existing compute resources. This
feature, known as duration management, is useful in Base SAS
environments and many other environments.
Furthermore, even without DMTK, WLM can grant computing resources
upon demand by providing an “express lane” to ensure that your most
important jobs are given top priority. Express lanes can be particularly
beneficial in a Base SAS environment where any user has the ability to
launch a job that can, regardless of its business priority, significantly
affect the performance of other jobs.
440 Appendix D
Integration with other products
Integrating with SAS software
Tools in SASTK
SASTK provides a macro:
hp_wlmtk_goals_report
This is a SAS macro that is useful in instrumenting SAS jobs to:
• wlmtk(5)
• wlmdurdc(1M)
• hp_wlmtk_goals_report(1M)
• HP-UX Workload Manager Toolkits User’s Guide
(opt/wlm/toolkits/doc/WLMTKug.pdf)
• HP-UX Workload Manager Toolkits A.01.10.xx Release Notes
(/opt/wlm/toolkits/doc/Rel_Notes)
Appendix D 441
Integration with other products
Integrating with the HP-UX SNMP agent
Tools in SNMPTK
SNMPTK provides the snmpdc data collector for pulling data from the
SNMP agent.
442 Appendix D
Integration with other products
Integrating with the HP-UX SNMP agent
• wlmtk(5)
• snmpdc(1M)
• HP-UX Workload Manager Toolkits A.01.10.xx Release Notes
(/opt/wlm/toolkits/doc/Rel_Notes)
Appendix D 443
Integration with other products
Integrating with the HP-UX SNMP agent
444 Appendix D
E Useful PRM utilities
This appendix highlights PRM utilities that WLM users may find
helpful.
NOTE These PRM utilities are helpful only when the current WLM
configuration includes a prm structure.
NOTE The prmconfig command has other options, but do not use them
with WLM.
Appendix E 445
Useful PRM utilities
446 Appendix E
F Understanding how PRM
manages resources
One of the ways in which WLM performs resource management is
through HP Process Resource Manager (PRM).
This appendix focuses on management using PRM. The appendix is for
background information and is included here only for completeness, as
WLM uses some of these concepts and tools.
Table F-1 provides an overview of the resource management.
Table F-1 Resources managed
Resource
Management algorithm
managed
CPU (core) Set minimum and maximum CPU request values and/or a
shares-per-metric request, then WLM automatically adjusts cores based on
workload performance, priority, and available cores.
With WLM, you can also set hard limits on CPU usage with the gmincpu
and gmaxcpu keywords.
Disk PRM re-orders the Logical Volume Manager (LVM) volume group’s I/O
bandwidth requests in the kernel based on the PRM group shares.
Real If the system is paging or a workload group is exceeding its cap, the prm2d
memory memory manager forces the group’s processes to re-use their own workload
group’s memory.
With WLM, you can also set hard limits on memory usage with the gminmem
and gmaxmem keywords.
Appendix F 447
Understanding how PRM manages resources
Management of CPU resources
448 Appendix F
Understanding how PRM manages resources
Management of real memory
NOTE WLM manages memory based on your use of the keywords gminmem,
gmaxmem, and memweight in your WLM configuration.
Appendix F 449
Understanding how PRM manages resources
Management of real memory
NOTE Processes in the PRM_SYS group (ID 0) and the kernel are not subject to
memory capping.
450 Appendix F
Understanding how PRM manages resources
Management of real memory
170 Mbytes of
lockable memory
GroupB GroupC
PRM does not suppress a process that uses locked memory once the
process has the memory because suppressing the process will not cause it
to give back memory pages. However, the memory resources that such a
process consumes are still counted against its PRM group. If processes
using locked memory consume as much or more memory than their
group is entitled to, other processes in that group may be suppressed
until the demands of the processes with locked memory are lower than
the group’s share.
Also, if a workload group is using all of its lockable memory, you cannot
reduce its memory allocation. This is because a reduction in its allocation
would result in a reduction in its amount of lockable memory. However,
because the group is already using all of its lockable memory, it cannot
give that memory up.
Appendix F 451
Understanding how PRM manages resources
Management of disk bandwidth
NOTE When setting up LVM, do not create swap partitions in any volume group
that is under PRM control.
452 Appendix F
Understanding how PRM manages resources
How resource allocations interact
Multiple users accessing raw devices (raw logical volumes) will tend to
spend most of their time seeking. The overall throughput on this group
will tend to be very low. This degradation is not due to PRM’s disk
bandwidth management.
When performing file system accesses, you need approximately six disk
bandwidth consumers in each workload group before I/O scheduling
becomes noticeable. With two users, you just take turns. With four, you
still spend a lot of your time in system call overhead relative to the peak
device bandwidth. At six, PRM disk bandwidth management begins to
take effect. The more demand you put on the system, the closer the disk
bandwidth manager approaches the specified values for the shares.
Appendix F 453
Understanding how PRM manages resources
Management of applications
Management of applications
This section describes how PRM assigns processes to run in workload
groups. The following topics are discussed:
454 Appendix F
Understanding how PRM manages resources
Management of applications
These rules may not apply to processes that bypass login. For more
information, see the Process Resource Manager User’s Guide.
By user Process runs in the user’s initial group. If the user does
By at not have an initial group, the process runs in the user
By cron default group, OTHERS. (If the process has a
Upon login compartment record or an application record, or is
owned by a user or Unix group that has a record, or if it
is identified by a process map, it still starts in the
invoking user’s initial group. However, the application
manager will soon move the process to its assigned
group—with process maps taking precedence over
compartment records, compartment records over
application records, application records over user
records, and user records over Unix group records.
Record types and their precedence in workload group
assignments are discussed in Chapter 5, “Configuring
WLM,” on page 135.)
By prmrun {-g targetgrp | -i} Process runs in the workload group specified by
targetgrp or in the user’s initial group. The application
manager cannot move a process started in this manner
to another group. For more information on the PRM
utility prmrun, see Appendix E, “Useful PRM utilities,”
on page 445 and prmrun(1).
Appendix F 455
Understanding how PRM manages resources
Management of applications
456 Appendix F
Understanding how PRM manages resources
Management of applications
However, the next record uses a wildcard in the directory name and is
not valid:
apps = PRM_SYS : “/opt/wl?/bin/wlmd”; #INVALID
NOTE Beginning with WLM A.03.01, you can use wildcards in both the file
name and the alternate name in a single application record.
NOTE Use pattern matching only when it is not practical to list all possible
alternate names.
Appendix F 457
Understanding how PRM manages resources
Management of applications
db02_payroll
db03_payroll
db04_payroll
dbsmon_payroll
dbwr_payroll
dbreco_payroll
To make sure all payroll processes are put in the same workload group,
use pattern matching in the alternate names field of the application
record, as shown in the following example:
apps = business_apps : “/usr/bin/database db*payroll”;
For alternate names and pattern matching to work, the processes must
share the same file ID. (The file ID is based on the file system device and
the file’s inode number.) PRM performs this check to make sure that only
processes associated with the application named in the application
record are put in a configured workload group.
If there are multiple application records with alternate names that
match an application name due to redundant pattern matching
resolutions, the first record to match the application name takes
precedence. For example, the application abb matches both of the
following application records:
apps = GroupA : /opt/foo/bin/bar “a*”,
GroupB : /opt/foo/bin/bar “*b”;
Because the *b record is first (based on ASCII dictionary order), the
application abb would be assigned to the workload group GroupB.
Note that Extended Regular Expression alternate names are matched
against the entire available command line, while non-ERE alternate
names are matched against non-dash command-line arguments only.
Note also that commas within an ERE are not separators for alternate
names; they must match commas in the command line.
Knowing the names of all the processes spawned and renamed by the
applications can help in creating pattern matching that is only as
general as it needs to be. Eliminate redundant name resolutions
whenever possible, and make sure pattern matching does not cause
unwarranted moves.
For information on how alternate name pattern matching affects
precedence, see the next section.
458 Appendix F
Understanding how PRM manages resources
Management of applications
1. Process maps
2. Compartment records
3. Application records
4. User records
5. Unix group records
Thus, if a PID specified by a PID_finder script defined in a process map
matches a compartment, application, user, or Unix group record, the
process map determines the placement of the process.
A process may start in a workload group other than its assigned group
because it inherits the group of the process that started it. However,
WLM will eventually move the process to the workload group specified in
its record. For information on process placement for inactive FSS groups
and PSET-based groups, see “Temporarily removing groups with inactive
SLOs (optional)” on page 220
If you use the prmmove or prmrun command to place a process in a
workload group, that assignment takes precedence over any of the
assignments defined by the WLM records or process maps.
To determine where to place a process, the application manager checks
for the following:
Appendix F 459
Understanding how PRM manages resources
Management of applications
460 Appendix F
Understanding how PRM manages resources
Management of applications
Appendix F 461
Understanding how PRM manages resources
Management of applications
462 Appendix F
Understanding how PRM manages resources
Management of applications
% calendar
The second and fourth records both seem to match the calendar
command. The expressions are expanded in the order they appear in the
configuration file. So, the second record is expanded first and is used for
the calendar process, placing it in GroupB.
Appendix F 463
Understanding how PRM manages resources
Management of applications
464 Appendix F
G Migrating from PRM to WLM
Appendix G 465
Migrating from PRM to WLM
466 Appendix G
H Advanced WLM usage: Using
performance metrics
This appendix includes details about configuring WLM SLOs based on
metric goals and supplying performance data to WLM.
Overview
To use WLM with metric goals, follow these basic steps:
Step 2. For workloads with performance goals, add goal-based SLOs to your
WLM configuration by following these steps. For details on how to
specify a metric goal, see “Specifying a metric goal (optional)” on
page 470 and “Specifying a shares-per-metric allocation request
(optional)” on page 472.
Appendix H 467
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
NOTE Data collectors invoked by WLM run as root and can pose a security
threat. Hewlett-Packard makes no claims of any kind with regard to
the security of data collectors not provided by Hewlett-Packard.
Furthermore, Hewlett-Packard shall not be liable for any security
breaches resulting from the use of said data collectors.
Step 4. (Optional) For notification of SLO status changes, monitor the WLM
EMS resources.
468 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
# wlmd -p -a configfile
# wlmd -a configfile
To generate audit data (-t) and log statistics (-l all), use the following
command:
Using wlmgui or wlminfo with its slo command allows you to monitor
your SLOs.
Also, the WLM EMS monitor makes various status data available to
EMS clients. Check this data to verify SLO compliance.
For more information on this topic, see Chapter 10, “Monitoring SLO
compliance and WLM,” on page 343.
Appendix H 469
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
When using wlminfo slo, there are two columns that can indicate the
death of a data collector process: State and Concern. For more
information on these columns, see wlminfo(1M).
/applications/wlm/slo_status/SLONAME
changes to:
WLM_SLO_COLLECTOR_DIED (5)
For more information on the global arbiter, including its passive mode,
see the chapter Chapter 7, “Managing SLOs across partitions,” on
page 255.
Step 10. (Optional) Set up WLM to automatically start its wlmd and wlmpard
daemons at reboot.
470 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
Appendix H 471
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
472 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
Appendix H 473
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
474 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
Workload gets 5
CPU shares for each
active process in
the workload
Appendix H 475
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
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;
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;
}
The simplest method for getting a metric to WLM is through the WLM
data collector wlmrcvdc.
476 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
tune application_procs {
coll_argv = wlmrcvdc glance_prm APP_ACTIVE_PROC sales;
}
# /opt/wlm/bin/wlmd -a config.wlm
NOTE Data collectors invoked by WLM run as root and can pose a security
threat. Hewlett-Packard makes no claims of any kind with regard to the
security of data collectors not provided by Hewlett-Packard.
Furthermore, Hewlett-Packard shall not be liable for any security
breaches resulting from the use of said data collectors.
Appendix H 477
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
data_collector_and_arguments
Is the full path to a data collector, plus any arguments.
Separate arguments with white space. Use double
quotes to form single arguments for an option and
when using characters used in the syntax, such as
semicolons, pound characters (#), and curly brackets.
This string cannot exceed 240 characters.
stdout and stderr for each data collector are sent to /dev/null; however,
you can capture a collector’s stderr output using the coll_stderr
tunable, described in “Capturing your collectors’ stderr (optional)” on
page 479.
Here is an example coll_argv statement:
coll_argv = /opt/finance/bin/fin_mon -freq 3;
WLM provides a built-in data collector called wlmrcvdc. Specify this
collector as follows:
coll_argv = wlmrcvdc [command];
where
command (optional)
Is a command provided for gathering data from
GlancePlus, Oracle, other applications, or for checking
on the status of a Serviceguard package, or a
user-supplied data collector command.
For information on commands available with wlmrcvdc, see “wlmrcvdc”
on page 388.
WLM simplifies the task of developing data collectors with its wlmsend
and wlmrcvdc utilities. For information on these utilities and data
collectors in general, see “Supplying data to WLM” on page 482.
Here is a partial WLM configuration showing the use of wlmrcvdc in a
global tune structure.
# Global wlmrcvdc to collect any metric values sent in via wlmsend:
tune {
coll_argv = wlmrcvdc;
}
478 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
tune order_transaction_time {
coll_argv = /home/orders/data_collector;
}
slo order_processing {
...
goal = metric order_transaction_time < 10.0;
...
}
If you are using WLM with Serviceguard, you might consider using
wlmrcvdc in a global tune structure with sg_pkg_active to check the
status of all the Serviceguard packages on the current system. For more
information, see “Integrating with Serviceguard” on page 414 or see
sg_pkg_active(1M).
Appendix H 479
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
tune load_average {
...
coll_stderr = /logs/load_average.stderr;
...
}
480 Appendix H
Advanced WLM usage: Using performance metrics
Configuring WLM for metric-based SLOs
NOTE Do not use cntl_smooth for metrics that are expected to equal zero in
SLO condition expressions. For example, do not use smoothing globally
if your configuration uses the sg_pkg_active collector to indicate a
Serviceguard package is active (1) or inactive (0). You could use
cntl_smooth in metric-specific tune structures in such a configuration,
as long as those structures are not for Boolean metrics.
Appendix H 481
Advanced WLM usage: Using performance metrics
Supplying data to WLM
• Data-centric:
I have this type of data. How do I get it to WLM?
• Transport-centric:
I want to get data to WLM this way. What data is available for that
transport method?
482 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
• Independent collectors
• Stream collectors
• Native collectors
These collector types are explained in the remainder of this section.
Appendix H 483
Advanced WLM usage: Using performance metrics
Supplying data to WLM
484 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H 485
Advanced WLM usage: Using performance metrics
Supplying data to WLM
tune metricNC {
coll_argv = collector_path collector_args ;
}
wlmrcvdc is an example of a native collector.
NOTE The current WLM interval length is available through the WLM_INTERVAL
environment variable to data collectors started by WLM (by specifying
the data collector in a coll_argv statement in a WLM configuration
file).
486 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
You have metrics you are collecting outside GlancePlus WLM API
using a C program
Appendix H 487
Advanced WLM usage: Using performance metrics
Supplying data to WLM
488 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H 489
Advanced WLM usage: Using performance metrics
Supplying data to WLM
490 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
tune active_procs {
...
coll_argv = wlmrcvdc glance_prm
APP_ACTIVE_PROC # Metric to monitor
Grp3; # Name of workload (PRM) group
...
}
tune mem_util {
...
coll_argv = wlmrcvdc glance_prm
APP_PRM_MEM_UTIL # Metric to monitor
Grp3; # Name of workload (PRM) group
...
}
Use glance_prm to collect metrics of the form APP_* and APP_PRM_*.
Although the APP_* metrics do not appear to be PRM-related, they are
actually specific to workload (PRM) groups by virtue of glance_prm’s
design.
For wlmrcvdc conceptual information, see “Sending data with wlmsend
and wlmrcvdc: How it works” on page 509. For wlmrcvdc syntax
information, see “wlmrcvdc” on page 388.
Appendix H 491
Advanced WLM usage: Using performance metrics
Supplying data to WLM
492 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Existing metrics
If you already maintain application-specific metrics or system metrics,
you can send that data to WLM in one of two ways:
Appendix H 493
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Table H-2 provides an overview of how to send your data to WLM. For
more information on the transport methods, read the sections following
the table.
Table H-2 Available transport methods
494 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H 495
Advanced WLM usage: Using performance metrics
Supplying data to WLM
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
On the command line that follows, some program is updating logfile.
With the tail command, wlmsend gets the latest updates to the file and
sends them to a rendezvous point for wlmrcvdc to collect:
# tail -f logfile | /opt/wlm/bin/wlmsend job_time
This rendezvous point is created by wlmrcvdc.
For background information on how wlmsend and wlmrcvdc work
together to get your data to WLM, as well as a warning about I/O
buffering, see “Sending data with wlmsend and wlmrcvdc: How it works”
on page 509.
496 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
Next, set up wlmsend in a loop in a shell script. Here, the function
get_value provides the metrics to feed wlmsend. Alternatively the script
itself could be interacting with the workload to gather performance data.
Add a sleep command to slow down how often metrics are retrieved. The
loop might look like the following:
while (true)
do
value = ‘get_value‘
/opt/wlm/bin/wlmsend job_time $value
sleep 60
done
NOTE Run your data collection script in the group PRM_SYS to ensure it receives
the proper resources.
Appendix H 497
Advanced WLM usage: Using performance metrics
Supplying data to WLM
mincpu = 15;
maxcpu = 25;
entity = PRM group crunch;
goal = metric job_time < 2.0;
}
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
Next, set up wlmsend in a loop in a perl program. Here, the function
get_value provides the metrics to feed wlmsend. Alternatively the
program itself could interact with the workload to gather performance
data. Add a sleep command to slow down how often metrics are
retrieved. The loop might look the following:
while (1) {
$value = &get_value;
system “/opt/wlm/bin/wlmsend job_time $value”;
sleep(60);
}
The loop could also look like the following loop, using a print statement
instead of a system statement:
open(WLM, “| /opt/wlm/bin/wlmsend job_time”);
# make the new file descriptor unbuffered
select ((select(WLM), $|=1)[0]);
while (1) {
$value = &get_value;
print WLM “$value\n”;
sleep(60);
}
NOTE Run your data collection script in the group PRM_SYS to ensure it receives
the proper resources.
498 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
NOTE If the command exits with status zero, you can use wlmsend to continue
feeding data to the rendezvous point for wlmrcvdc. (wlmrcvdc creates the
rendezvous point when it is invoked by WLM.)
Appendix H 499
Advanced WLM usage: Using performance metrics
Supplying data to WLM
• Develop a program that writes its data to stdout and use it with
wlmrcvdc
For information on this approach, see “Sending data via stdout” on
page 499.
• Use the WLM API
This section discusses the API.
NOTE You can also write a program that invokes the wlmsend command.
However, if you are writing a program, it is recommended that you use
wlmrcvdc to capture stdout or you use the API.
• wlm_mon_attach()
Opens communication to the WLM daemon.
• wlm_mon_write()
Writes data to the WLM daemon.
• wlm_mon_detach()
Closes communication to the WLM daemon.
The compile line for a program using these functions is:
% cc -I/opt/wlm/include -L/opt/wlm/lib -lwlm [ flag ... ]
file ...
NOTE The stdout and stderr for each data collector that WLM starts are
discarded. However, WLM provides the coll_stderr tunable that allows
you to log each collector’s stderr. In addition, data collectors can
communicate using either syslog(3C) or logger(1) with the daemon
facility.
500 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Each data collector should send data to WLM once per WLM interval, if
possible. (For information on this interval, see “Specifying the WLM
interval (optional)” on page 215.) If the data collector sends data to WLM
less than once per interval (meaning an entire interval passes with no
new data), the associated controller requests the same allocation as it did
for the previous interval. When your data collector sends data more than
once per interval, WLM only receives the last data sent before the
interval ended. All the other data sent during the interval is lost. In this
case, your data should reflect performance over a period of time rather
than at a single point in time.
NOTE WLM runs data collectors with UID set to root. If a data collector that
uses the WLM API changes its UID, all subsequent calls to the WLM API
will fail.
Appendix H 501
Advanced WLM usage: Using performance metrics
Supplying data to WLM
NOTE This function is not thread-safe: Multiple threads cannot call the
function at the same time.
502 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
/opt/wlm/include/wlm.h
NOTE This function is not thread-safe: Multiple threads cannot call the
function at the same time.
Appendix H 503
Advanced WLM usage: Using performance metrics
Supplying data to WLM
NOTE This function is not thread-safe: Multiple threads cannot call the
function at the same time.
504 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
If you are using the HP ARM implementation, you can send transaction
data to WLM using wlmrcvdc with the glance_tt command.
Figure H-1 presents an overview of how an application that is
instrumented with ARM API calls works with WLM. First, the
application invokes the ARM API calls, made available through libarm.
libarm then feeds the data from the ARM calls to an
implementation-specific storage facility. An ARM collection agent, in this
case GlancePlus, then picks up this data. Next, wlmrcvdc / glance_tt or
a user-written data collector sends the relevant data to WLM to use in
determining CPU allocations. The new allocations then affect the
application’s performance, which is again tracked by the ARM API calls.
arm_start() Implementation-
Application libarm specific
arm_stop() database/kernel
CPU
resources wlmrcvdc /
glance_tt or
HP-UX WLM user-written ARM collection agent
data collector
Appendix H 505
Advanced WLM usage: Using performance metrics
Supplying data to WLM
You add the API calls to your source, isolating the desired transactions.
For example, consider the following pseudo-code that tracks individual
times for various tasks and also gets a time for all three processes
together:
arm_init(“application_name”, “user_name”)
arm_getid(“total_time”)
arm_getid(“pull_data”)
arm_getid(“process_data”)
arm_getid(“report_data”)
arm_start(pull_data)
(get the data)
arm_stop(pull_data, status)
arm_start(process_data)
506 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
arm_start(report_data)
(generate report)
arm_stop(report_data, status)
arm_stop(total_time, status)
end loop
arm_end
To use ARM transaction data with WLM:
Step 1. Modify your program to use the ARM API calls described previously. To
use these calls, you must reference the include file
/opt/perf/include/arm.h.
Be sure to:
• Mark the start and stop of each transaction in which you are
interested
Step 2. Compile your program, specifying the locations for the ARM header file
and library—being sure to link against the ARM library.
For HP-UX 11.0 and HP-UX 11i v1 (B.11.11), the compile/link line is:
The -Ae option ensures you compile using the extended ANSI mode.
Appendix H 507
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Step 3. Ensure that ttd is configured and running. For more information, see
ttd(1).
The start and stop times for your transactions will now be made
available through the HP ARM implementation. For more information,
see ttd(1) and midaemon(1).
For more information on the wlmrcvdc utility, see “Sending data via
stdout” on page 499.
# wlmd -a configfile
For information on the ARM API and the ARM software developer’s kit,
see:
http://www.cmg.org/regions/cmgarmw
508 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Step 1. Create a simulation. For example, use remote terminal emulation (RTE)
software to capture sessions in which key transactions of the workload
(that WLM is going to manage) are executed.
Step 2. Save each captured session to a file, then add ARM API calls to the file.
(In some cases, the RTE software produces files that are editable as C
code.)
Step 5. Send the ARM data to WLM using the wlmrcvdc utility described in the
section “Sending ARM transaction data from a modified C program” on
page 504.
For additional information on using RTE software, see the white paper
“Service Management Using the Application Response Measurement
API Without Application Source Code Modification” on the following Web
site:
http://www.cmg.org/regions/cmgarmw
Appendix H 509
Advanced WLM usage: Using performance metrics
Supplying data to WLM
NOTE Avoid the process overhead of using wlmsend in a compiled data collector;
let wlmd invoke your data collector through the configuration file if
possible. Use the API described in “Sending data from a collector written
in C” on page 499 to write such a data collector.
The wlmrcvdc utility creates a rendezvous point and forwards data from
that rendezvous point to WLM. Use wlmsend to send data to a
rendezvous point to be collected by a wlmrcvdc invocation.
If you use wlmsend, you must also use wlmrcvdc. You can, however, use
wlmrcvdc without wlmsend if you specify wlmrcvdc with a data-collecting
command.
The syntaxes for the commands follow:
wlmrcvdc [-h] [-V] [-u user] [-g group] [command [args...]]
wlmsend [-h] [-V] [-w wait_time] metric [value]
For an explanation of the syntaxes, see Appendix A, “WLM command
reference,” on page 363.
NOTE Be careful of I/O buffering when feeding data to wlmsend. For example,
the following line works as expected:
tail -f logfile | /opt/wlm/bin/wlmsend job_time
However, adding awk or other utilities that buffer I/O can result in data
being delayed, or not even sent, to wlmsend—depending on when the
buffer is flushed:
tail -f logfile | awk ‘{print $1}’ | /opt/wlm/bin/wlmsend
job_time
Always check the file /var/opt/wlm/wlmdstats, created by wlmd -l
metric as explained in wlmd(1M), to ensure that your data gets to WLM
in a timely fashion.
510 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
stdout
command wlmrcvdc wlmd
Appendix H 511
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Rendezvous
point wlmrcvdc wlmd
wlmsend
512 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Rendezvous
wlmsend point wlmrcvdc wlmd
command
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
Second, we set up wlmsend in a data collector shell script, a perl
program, or on the command line to feed data to the rendezvous point. If
the data is coming from a file, say logfile, we can forward the data to
WLM as follows:
# tail -f logfile | /opt/wlm/bin/wlmsend job_time
Appendix H 513
Advanced WLM usage: Using performance metrics
Supplying data to WLM
value
Rendezvous
wlmsend point wlmrcvdc wlmd
In this example, the setup is the same as in the previous example. Thus,
in the configuration file, we define an slo structure to keep the metric
job_time under 2.0, and we set up wlmrcvdc to receive the job_time
metric values from wlmsend:
# Set up the SLO
slo data_cruncher {
pri = 3;
mincpu = 15;
maxcpu = 25;
entity = PRM group crunch;
goal = metric job_time < 2.0;
}
# Set up wlmrcvdc
tune job_time {
coll_argv = wlmrcvdc;
}
Next, we set up wlmsend in a loop in either a shell script or a perl
program. The function get_value provides the metrics to feed wlmsend.
We add a sleep command to slow down how often metrics are retrieved.
For a shell script, that loop might look like the following:
while (true)
do
value = ‘get_value‘
514 Appendix H
Advanced WLM usage: Using performance metrics
Supplying data to WLM
Appendix H 515
Advanced WLM usage: Using performance metrics
Supplying data to WLM
516 Appendix H
Glossary
active workload group A workload group API Application Program Interface. WLM
with at least one active SLO. provides an API so that your data collectors
can send it metrics for your workloads.
active SLO An SLO is active under either of
the following situations: ARM Application Response Measurement. A
standard for transaction-based (bounded
• It has no condition or exception events) response-time instrumentation.
statements specified
controller A control algorithm that
• Its condition statement is true and/or requests new CPU resource allocations for
its exception statement is false, workload groups.
allowing WLM to try to enforce the SLO
core The actual data processing engine
You might set an SLO to be active, for
within a processor. A single processor might
example, based on time of day or day of week
have multiple cores, and a core might
or whether a Serviceguard package is
support multiple execution threads. See
running on the local host.
also Hyper-Threading.
alternate name Other names assigned to
CPU manager WLM uses the fair share
processes spawned by an application. This is
scheduler (FSS) to manage CPU resources
most common for complex programs such as
for FSS workload groups. (PSET workload
database programs that launch many
groups are assigned whole cores and do not
processes and rename them.
require the CPU manager.)
Glossary 517
Glossary
deactivated processor
disk manager A kernel routine that global arbiter A WLM daemon used in
monitors bandwidth at the logical volume managing WLM instances on various virtual
group level, rearranging I/O requests as partitions.
needed to ensure disk bandwidth shares.
Hyper-Threading The logical CPU feature
EMS Event Monitoring Service. An HP that allows multiple execution threads
product for monitoring system resources and (logical CPUs) within a single core. See
sending/receiving notifications when events also core, logical CPU.
occur. WLM uses the EMS notification
framework to send alarms. initial group The first workload group
listed in a user’s record in a configuration
entitlement The minimum percentage file. Typically, the applications a user
(lower limit) of a resource that a workload
group receives. For CPU resources, this
518 Glossary
Glossary
nPartitions
Glossary 519
Glossary
OTHERS group
OTHERS group The reserved workload creator. When you create a job, the shell
group OTHERS with ID 1. WLM uses this assigns all the processes in the job to the
group as the initial group for any user who same process group. Signals can propagate
does not have a user record in the WLM to all processes in a process group; this is a
configuration file. principal advantage of job control.
partitions See the definition for nPartitions process group ID Each process group is
and virtual partitions. uniquely identified by an integer called a
process group ID. Each process group also
Pay per use (PPU) For customers has a process group leader. The process
interested in leasing CPU capacity from HP group’s ID is the same as the process ID of
Finance, Pay per use is supported on the process group leader. Every process in a
cell-based Integrity servers and is part of the process group has the same group ID.
HP Utility Pricing Solutions program. It is a
product that provides CPU (core) capacity as process ID An integer, assigned to a process
needed, basing payment on actual metered at creation, that uniquely identifies the
or monitored use of that capacity. You process to HP-UX.
acquire a particular hardware platform and
number of processors, and are charged for process map A powerful and flexible tool
usage of the processors based on demand. that allows you to establish your own
criteria for how processes are placed in
See also Instant Capacity (iCAP), Temporary
workload groups rather than using WLM’s
Instant Capacity (TiCAP).
default criteria (application, user, Unix
group, or secure compartment records).
PID Process ID.
PSET workload A WLM workload that is
PRM Process Resource Manager. An HP
assigned CPU resources based on the
product used to dynamically divide resource
processor set (PSET) upon which it is
utilization among different applications and
defined. See also FSS workload group.
users. WLM builds on the features of PRM
and provides automatic resource allocation.
real memory Real memory is shared by all
processes. The data and instructions of any
PRM_SYS group The reserved workload
process (a program in execution) must be
group PRM_SYS with ID 0. WLM places all
available to the core by residing in real
system processes in this group by default.
memory at the time of execution.
System processes are processes started by a
user with UID 0.
relative CPU units In WLM
configurations, relative CPU units represent
process group Every process (except
a percentage of the system’s total CPU
system processes, such as init and
resources. Consequently, the number is
swapper) belongs to a process group. A newly
relative to the number of active cores. For
created process joins the process group of its
example, 50 relative CPU units is 50% of the
520 Glossary
Glossary
system administrator
system’s CPU resources, which is half of 1 shares Shares are the amounts of CPU
core on a system with only 1 active core, but resources, real memory, or disk bandwidth
8 cores on a system with 16 active cores. assigned to workload groups. A CPU share is
1/100 of a single core or 1/100 of each core (or
See also absolute CPU units.
1/1000 of each core) on the system,
depending on the WLM operating mode.
rendezvous point A designated location for
holding performance data. The wlmsend
SLA Service-level agreement. An agreement
utility forwards data for a given metric to a
or contract between an IT group or a data
rendezvous point. The wlmrcvdc utility
center and its customer, based upon
monitors the rendezvous point, receiving the
measurable service-level objectives (SLOs).
data and sending it the WLM daemon.
SLO Service-level objective. Generally a
secure compartment See the definition for
specific, measurable item/objective within a
Secure Resource Partition.
broader, more comprehensive service-level
agreement (SLA) contract.
secure mode The mode of operation in
which WLM (the daemons and the
SLO violation An SLO violation occurs
monitoring GUI) can communicate securely
when the performance of a workload does
with certain other systems. Each system has
not meet the stated goal for that workload.
a security certificate that can be distributed
When such a violation happens, WLM
to the security repositories (truststores or
adjusts CPU resource allocations, based on
keystores) of other systems with which it
SLO priorities and available CPU resources,
will communicate securely. WLM can
to better meet the SLO’s performance goal.
communicate securely with any system for
which it has a security certificate in its
stretch goal Any goal that is not the
truststore. For more information on security
highest priority goal for the associated
certificates and setting up secure
workload. Stretch goals are met only after
communications, see wlmcert(1M).
the higher priority goals have been met. A
stretch goal indicates desired performance,
Secure Resource Partition If you use the
whereas a goal indicates required
HP-UX feature Security Containment, you
performance. See also goal.
can create secure compartments to isolate
files and processes. WLM allows you to place
Strictly host-based A WLM configuration
your secure compartments in workload
is strictly host-based when it does not
groups, providing automatic resource
include a prm structure.
allocation control to the compartments as
well. This combination of secure
system administrator A person
compartments and workload groups is
responsible for day-to-day system
known as Secure Resource Partitions.
configuration and maintenance. This person
has root user capabilities.
Glossary 521
Glossary
Temporary Instant Capacity (TiCAP)
Temporary Instant Capacity (TiCAP) user default group The reserved workload
group OTHERS with ID 1. WLM uses this
An HP product option included with Instant
group as the initial group for any user who
Capacity (iCAP) that enables you to
does not have a user record in the WLM
purchase prepaid processor/core activation
configuration file.
rights for a specified (temporary) period of
time. Temporary capacity is sold in
virtual machine A software entity
increments such as 20-day or 30-day
provided by HP Integrity Virtual Machines
increments, where a day equals 24 hours for
(Integrity VM). This technology allows a
a core. TiCAP was formerly referred to as
single server or nPartition to act as an
TiCOD. See also Instant Capacity (iCAP),
Integrity VM Host for multiple individual
Pay per use (PPU).
virtual machines, each running its own
instance of an operating system (referred to
total CPU The maximum amount of CPU
as a guest OS). Virtual machines are servers
resources (cores) on the system. With
in theVirtual Server Environment (VSE).
absolute CPU units, total CPU is 100
multiplied by the number of cores. When
virtual partitions Also known as vPars.
using relative CPU units, total CPU is 100.
HP-UX Virtual Partitions offer a unique
Absolute CPU units are advantageous on
granularity of partitioning. For each single
systems where the number of active cores
core, you can create one virtual partition
change due to Instant Capacity, Temporary
running its own “instance” of the HP-UX
Instant Capacity, Pay per use (PPU)
operating system. Complete software
(versions prior to B.05.00), or virtual
isolation is provided between virtual
partitions. On such systems, the CPU shares
partitions. In addition, HP-UX Virtual
you specify remain the same amount of cores
Partitions provides the ability to
regardless of the number of cores that are
dynamically move cores across virtual
active.
partitions.
transient group A workload group that is
Virtual Server Environment (VSE) . An
temporarily removed from the active WLM
integrated virtualization offering for HP-UX
configuration because it has no active SLOs
and Linux servers. VSE provides a flexible
and the transient_groups keyword is set
computing environment that maximizes
to 1. (Workload groups associated with a
utilization of server resources. VSE consists
process map always remain active.)
of a pool of dynamically sizable virtual
servers, each of which can grow and shrink
user A user is any person using the system.
based on service-level objectives and
Each user has a unique name and ID,
business priorities.
corresponding to their login and real user ID
defined in password files (such as
/etc/passwd).
522 Glossary
Glossary
workload group
WLM Workload Manager. HP-UX WLM You assign critical applications to workload
provides automatic resource allocation and groups. WLM then manages the
application performance management performance of FSS workload groups by
through the use of prioritized service-level adjusting their CPU resources, while
objectives (SLOs). assigning PSET workload groups whole
cores for their dedicated use. See also
WLM daemon See wlmd. active workload group.
Glossary 523
Glossary
workload group
524 Glossary
Index
525
Index
login fixed, 92
support for WLM, 401 for time period, 96
ps rising tide model, 122
examples, 73 de-allocating, 233
support for WLM, 402 management
smooth, 428 how PRM manages CPU resources, 448
wlmgui, 347 maximum
communications specifying for workload group, 177
securing migrating across partitions, 89, 255
automatically at reboot, 244 real-time processes, 448
compartment records units
defining, 171 absolute, 54, 217
workload group placement precedence, 459 relative, 54, 217
condition keyword, 206 upper and lower bound requests for an SLO
configuration file specifying, 196
activating cpushares keyword, 205, 472
global arbiter (wlmpard -a filename), 265, not using with goal keyword, 200, 471
384 providing fixed or additive allocations, 204
WLM (wlmd -a filename), 241, 376 providing shares per metric allocation, 205,
characters allowed, 136 472
configuration wizard (wlmcw command), cron command
138 support for WLM, 401
conventions, 136 cross-partition management, 255
creating, 136 recommendations and restrictions, 257
getting started, 78 setting up, 260
examples, 233, 283
location, 79 D
global arbiter (cross-partition daemon status EMS resource, 356
management), 265 data
specifying file to use when starting sending from a data collector written in C,
automatically at reboot, 242 499
specifying file to use when starting global sending from a perl program, 497
arbiter automatically at reboot, 243 sending from a shell script, 496
syntactic conventions, 136 sending from stdout, 499
syntax overview, 395 sending from the command line, 495
validating (wlmd -c filename), 376 data collector
configuration wizard (wlmcw command), 138 ARM-instrumented applications, 504
configuring WLM, 135 buffering of I/O, 394, 484, 510
with a wizard (wlmcw command), 138 communicating performance to WLM, 493
with the WLM GUI (wlmgui command), 140 dummy transactions, 509
controllers GlancePlus application data, 488
limiting CPU allocation request values, 197
GlancePlus global data, 489
role in WLM, 115, 256
GlancePlus PRM-controlled volume group
tuning allocation requests, 224, 229, 231
data, 491
CPU resources GlancePlus PRM-specific application data,
allocation
490
526
Index
how to write, 482 /etc/rc.config.d/wlm, 245
independent, 484 /opt/prm/shells (and scripts in application
monitoring to ensure it is running, 131, 469 records), 170
native, 485 audit data (/var/opt/wlm/audit/), 253
Oracle data, 492 configuration (global arbiter)
sending existing metrics to WLM, 493 activating (wlmpard -a filename), 91, 92,
SIGTERM signal, 515 263
specifying in the configuration file, 215, 477 configuration (WLM)
stderr (capturing), 223, 479 activating (wlmd -a filename), 241
white paper, 483 example configuration
data collector stream, 484 (/opt/wlm/examples/wlmconf/), 283
de-allocating CPU resources when not included with WLM, 60
needed, 233 log (global arbiter statistics),
disk bandwidth /var/opt/wlm/wlmpardstats, 63, 113
manager log (message), /var/opt/wlm/msglog, 63, 113
and swap partitions, 452 log (statistics), /var/opt/wlm/wlmdstats, 63,
how PRM manages disk bandwidth, 452 113, 376, 387
disk bandwidth shares, specifying, 174 firewalls, 66
disks keyword, 174 fork system call
distribute_excess keyword, 179, 218 support for WLM, 401
default value (0—do not distribute), 219
FSS workload groups, 159
interaction with weight keyword, 182 defining
DMZ, 66 manually, 159
dummy transactions, 509
with the WLM GUI (wlmgui command),
157
E
minimum CPU allocation, 176
EMS process placement, 222
configuring notification, 360
monitoring WLM with, 354 G
resources
daemon status, 356 glance_app, 488
glance_gbl, 489
overview, 354
glance_prm, 490
SLO status information, 357 glance_prm_byvg, 491
time of last configuration activation, 356 glance_tt, 508
entity keyword, 196 GlancePlus
environment variables application data, 488
WLM_INTERVAL, 216 global data, 489
WLM_METRIC_NAME, 502 PRM-controlled volume group data, 491
exception keyword, 206 PRM-specific application data, 490
exec system call transaction data, 508
support for WLM, 401
global arbiter
extended_shares keyword, 219 disabling, 134
specifying host
F in WLM configuration file, 264
feedback starting
sending feedback to WLM development automatically at reboot, 242
team, 29 in passive mode, 91, 263
file name on the command line, 92, 263
pattern matching and, 456 stopping, 134
files
527
Index
528
Index
cntl_smooth, 223, 480 weight, 178
coll_argv, 215, 477 default value (1), 179
coll_stderr, 223, 479 interaction with distribute_excess
condition, 206 keyword, 182
cpushares, 204, 205, 472 wlm_interval, 216
not using with goal keyword, 200, 471 default value (60 seconds), 216
disks, 174 wlmdstats_size_limit, 224
distribute_excess, 179, 218 default value (0—do not trim file), 224
default value (0—do not distribute), 219 wlmpardstats_size_limit, 272
interaction with weight keyword, 182 default value (0—do not trim file), 272
entity, 196
exception, 206 L
extended_shares, 219 LCPU keyword, 161
gmaxcpu, 177 log file
default value (total CPU resources), 178 /var/opt/wlm/msglog, 63, 113
gmaxmem, 184 /var/opt/wlm/wlmdstats, 63, 113, 376, 387
default value (100%), 184 trimming automatically, 224
gmincpu, 175 /var/opt/wlm/wlmpardstats, 63, 113
default value (1% of system CPU trimming automatically, 272
resources), 176 logging
gminmem, 183 wlmd statistics
default value (1% of system memory), 183 enabling on the command line, 376
goal, 200 wlmpard statistics
not using with cpushares keyword, 200, enabling on the command line, 387
471 logical CPU
groups, 82, 159 defined, 519
hmaxcpu, 147 login command
hmincpu, 147 support for WLM, 401
hweight, 148
icod_filter_intervals, 146 M
icod_thresh_pri, 145 management
LCPU, 161 application
maxcpu, 197 how PRM manages applications, 454
memweight, 184 CPU resources
default value (1), 185 how PRM manages CPU resources, 448
mincpu, 197 disk bandwidth
pri, 193 and swap partitions, 452
primary_host how PRM manages disk bandwidth, 452
in WLM configuration file, 264 memory
procmap, 85, 172, 438 how PRM manages memory, 449
scomp, 85, 171 nPartitions, 255
transient_groups, 220 PSET, 159
caution when using with conditions, 207 virtual partitions, 255
effect on minimum CPU allocation, 176 virtual partitions (inside nPartitions), 277
users, 83, 164 maxcpu keyword, 197
utility_reserve_threshold, 274 memory
utilitypri, 273 allocation
uxgrp, 84, 166 granularity of, 219
version, 144 available, 449
529
Index
530
Index
data procmap keyword, 85, 172
sending to WLM, 500 identifying SAP processes, 438
goals, 471 ps command
management, overview, 34 examples, 73
monitoring methods, 34 support for WLM, 402
perl interface to send data to WLM, 497 PSET-based workload groups, 159
ports defining
used by WLM, 66 manually, 159
pri keyword, 193 defining with the WLM GUI (wlmgui
primary_host keyword command), 157
in WLM configuration file, 264 minimum CPU allocation, 176
PRM process placement, 222
integrating with WLM, 404 releasing unneeded CPU resources, 233
migrating from PRM to WLM, 465 PSETs
not using with WLM, 59 and WLM, 405
utilities, 445 integrating with WLM, 405
prm structure pstat system call
configuring, 151 support for WLM, 401
PRM_SYS group
as a reserved workload group, 163 Q
prmmove, 86
prmrun, 86 quick reference
process ID (PID) finder getting started, 65
and process maps, 172
and SAP processes, 438 R
process map, 44 ratio (allocation-to-weight), 179
defining, 172 real-time processes, 448, 450
described, 85 reboot
specifying securing communications automatically at,
to identify SAP processes, 438 244
workload group placement precedence, 459 starting global arbiter automatically at, 242
process placement starting WLM automatically at, 242
according to application names, 83, 166 starting wlmcomd automatically at, 243
according to process IDs, 85, 172 reconfiguring WLM, 133
according to secure compartments, 85, 171 records
according to Unix group IDs, 84, 85, 165 application
according to user IDs, 83, 164 pattern matching (regular expressions)
default, 87 in, 456, 457
inactive FSS groups, 222 using shell scripts in, 169, 173
methods, 81 workload group placement precedence, 459
PSET-based groups, 222
process priorities, 448 records
processes compartment, 171
assigning to workload groups, 85 regular expressions
moving, 86 in an application’s alternate names, 457
starting, 86 in an application’s file name, 456
suppressing, 449 relative CPU units
processor sets described, 54
and WLM, 405 enabling, 217
integrating with WLM, 405 releasing unneeded CPU resources, 233
531
Index
532
Index
command and system call, 401 workload group placement precedence, 459
policies, 30 Unix groups
swap partitions, not placing under PRM assigning to workload groups, 84, 85, 165
control, 452 usage controllers
system calls disabling averaging, 223
exec usage goals, 200
support for WLM, 401 user records
fork assigning to workload groups, 83
support for WLM, 401 defining, 164
pstat workload group placement precedence, 459
support for WLM, 401 users
System Management Homepage (SMH), 360 assigning to workload groups, 83, 164
Systems Insight Manager users keyword, 83, 164
integrating with WLM, 420 utilities, PRM, 445
utility_reserve_threshold keyword, 274
T utilitypri keyword, 273
uxgrp keyword, 84, 166
Temporary Instant Capacity (TiCAP) uxgrp records
integrating with WLM, 410 assigning to workload groups, 84, 85
optimizing, 57, 102
global arbiter configuration, 265 V
specifying priority for resource usage, 273
validating
specifying reserve threshold, 274 a configuration file (wlmd -c filename), 376
temporary_reserve_threshold keyword, 274
a global arbiter configuration file (wlmpard
utilitypri keyword, 273
-c filename), 265
time ranges for SLOs, 207 version keyword, 144
Toolkit
Apache, 434 version of WLM (wlmd -V), 374
version of WLM documented, 23
HP-UX WLM Oracle Database (ODBTK), violations of SLOs, 120
426 Virtual Machines (Integrity VM), 42
SAP, 438 and WLM, 58, 408
SAS, 440 integrating with WLM, 408
SNMP, 442 virtual partitions (vPars), 255
WebLogic, 436 and WLM, 50, 407
training available from HP, 30 inside nPartitions, 277
transient_groups keyword, 220 integrating with WLM, 407
and effect on minimum CPU allocation, 176 Virtual Server Environment (VSE), 42
and Serviceguard, 417
caution when using with conditions, 207 W
trimming
the wlmdstats statistics log file WebLogicTK, 436
automatically, 224 weight keyword, 178
default value (1), 179
the wlmpardstats log file automatically, 272
interaction with distribute_excess
tune structure, 210 keyword, 182
configuring, 210
white papers
tuning the controllers, 224, 229, 231 Apache (apache_wlm_howto.html), 435
data collectors, 483
U
how to perform WLM tasks, 63
Unix group records SAP (sap_wlm_howto.html), 439
defining, 165 SAS, 441
533
Index
534
Index
default value (0—do not trim file), 224 assigning Unix groups to, 165
wlmgui assigning users to, 164
monitoring WLM, 347 CPU weight assignment, 178
wlmgui command syntax, 379 described, 44
wlminfo FSS, 159
command syntax, 381 giving users access to, 164, 166
display examples, 106 maximum memory, 184
monitoring data collectors, 131, 469 memory
monitoring SLO violations, 121 specifying minimum, 183
monitoring WLM, 343 memory weight, 184
wlmoradc (integrating with Oracle), 428 PSET, 160
wlmpard reserved, 163
configuration file, 265
specifying, 159
disabling, 134
with no active SLOs, 220
starting, 242
workload management
stopping, 134 described, 39
wlmpard command syntax, 384 workloads
wlmpard statistics described, 44
enabling logging at reboot, 246
how WLM manages, 111
wlmpardstats file, 63, 113 SAP, 438
wlmpardstats_size_limit keyword, 272
default value (0—do not trim file), 272 separation
wlmprmconf command syntax, 465 by application name, 83
wlmrcvdc by customized criteria, 172
how it works, 509 by customized criteria (process ID), 85
syntax, 388 by process Unix group ID, 84, 85
wlmsend by process user ID, 83
how it works, 509 by secure compartments, 85
syntax, 393 writing a data collector, 482
WLMTK
ApacheTK, 434
ODBTK, 426
SAPTK, 438
SASTK, 440
SNMPTK, 442
WebLogicTK, 436
wlmwlsdc (integrating with BEA WebLogic),
436
workload groups
assigning applications to, 83, 166
assigning processes by process IDs, 85
assigning processes by secure
compartments, 85
assigning processes by Unix group IDs, 84,
85
assigning processes by user IDs, 83
assigning processes to (customized
criteria), 172
assigning secure compartments to, 171
assigning to SLO, 195
535
Index
536