29
1 hp education services education.hp.co m Managing Processes and Workloads Version B.02 H4262S Module 7 Slides

Managing Processes and Workloads

Embed Size (px)

DESCRIPTION

Managing Processes and Workloads. Version B.02 H4262S Module 7 Slides. Module Objectives: Process Resource Manager. At the end of this module you will be able to: Describe the Process Resource Manager solution. List the key features and benefits of PRM. List the resources managed by PRM. - PowerPoint PPT Presentation

Citation preview

Page 1: Managing Processes and Workloads

1

hp education services

education.hp.com

Managing Processes and Workloads

Version B.02H4262S Module 7 Slides

Page 2: Managing Processes and Workloads

2 © 2001 Hewlett-Packard Company

H4262S B.02

Module Objectives: Process Resource Manager

At the end of this module you will be able to:• Describe the Process Resource Manager solution.• List the key features and benefits of PRM.• List the resources managed by PRM.• Explain what an application group is.• List the PRM operations which can be controlled

under the gpm graphical user interface.• Describe the algorithm under which PRM manages

CPU resources.• Tell how PRM memory management differs in HP-UX

11i from earlier implementations.• Describe how PRM manages I/O bandwidth.

Page 3: Managing Processes and Workloads

3 © 2001 Hewlett-Packard Company

H4262S B.02

Module Objectives: Workload Manager

At the end of this module you will be able to:• Describe HP-UX Workload Manager.• Define what is meant by “service level objective.”• Describe how WLM works.• Explain how data collectors work.• Describe the operation of WLM’s Event Monitoring

Service.

Page 4: Managing Processes and Workloads

4 © 2001 Hewlett-Packard Company

H4262S B.02

The HP Process Resource Manager

Resource usage doesn’t have to be a “horse race” !PRM allows the system administrator to group processes and specify the level of importance (and resource allocation limits) of each group.

And They’re off !

Process Resource Manageris an optional HP-UX performance management product.

Group 1

Group 1

Other

Page 5: Managing Processes and Workloads

5 © 2001 Hewlett-Packard Company

H4262S B.02

Resources Managed

Memory

Disk I/O

CPU

Memory paging

Process/Thread scheduler

Disk read/writerequests

Page 6: Managing Processes and Workloads

6 © 2001 Hewlett-Packard Company

H4262S B.02

Oracle App 1(31%)

Oracle App 2(31%)

Others (31%)

System (7%)

Oracle App 1(31%)

Oracle App 2(31%)

Others (31%)

System (7%)

Resource Allocations without PRM

CPU Allocation Memory Allocation

Disk I/O Allocation

Oracle App 1(31%)

Oracle App 2(31%)

Others (31%)

System (7%)

Oracle App 1

CPU Util: 70%Mem Util: 56%Disk Util: 50%

Oracle App 2

CPU Util: 80%Mem Util: 74%Disk Util: 70%

(% Desired)

Page 7: Managing Processes and Workloads

7 © 2001 Hewlett-Packard Company

H4262S B.02

Resource Allocations with PRM

Oracle App 1(50%)

Oracle App 2(20%)

Others(20%)

Oracle App 1(50%)

Oracle App 2(25%)

Others(20%)

Others(20%)

Oracle App 1(45%)

Oracle App 2(30%)

CPU Allocation Memory Allocation

Disk I/O Allocation

System (10%)

System (5%)

System (5%)

Oracle App 1

CPU Util: 70%Mem Util: 56%Disk Util: 50%

Oracle App 2

CPU Util: 80%Mem Util: 74%Disk Util: 70%

(% Desired)

Page 8: Managing Processes and Workloads

8 © 2001 Hewlett-Packard Company

H4262S B.02

Viewing PRM CPU Allocations with gpm

CPU Allocationwith PRM Disabled

CPU Allocationwith PRM Enabled

Page 9: Managing Processes and Workloads

9 © 2001 Hewlett-Packard Company

H4262S B.02

PRM — Application Groups

• All PRM actions are based on processes belonging to an application group.

• Processes are initially assigned to the PRM group of the user that invoked them.

• A process may be moved to another group by the “Application Manager” if it matches the application definition criteria (executable name, executable pathname).

Page 10: Managing Processes and Workloads

10 © 2001 Hewlett-Packard Company

H4262S B.02

The “Carousel” Paradigm

PRM groups are represented by different color horses on a resource carousel.The numberof horses of each color dependson that groups entitlement.

The kernel references thecarousel when makingscheduling decisions.

Page 11: Managing Processes and Workloads

11 © 2001 Hewlett-Packard Company

H4262S B.02

PRM — Commands

•xprm•prmanalyze•prmavail•prmconfig•prmlist•prmloadconf•prmmonitor•prmmove•prmrecover•prmrun

Page 12: Managing Processes and Workloads

12 © 2001 Hewlett-Packard Company

H4262S B.02

Starting the Process Resource Manager

Create your prmconf file

As root enter # prmconfig -ekMonitor your systembehavior using prmmonitorand glance/gpm (if available)

# PRM Group/CPU records PRM_SYS:0:20:: ORACLE1:1:50:: ORACLE2:2:20:: OTHERS:3:10:: # Application records /ora1/bin/oracle::::ORACLE1,ora*oracle1 /ora2/bin/oracle::::ORACLE2,ora*oracle2

Page 13: Managing Processes and Workloads

13 © 2001 Hewlett-Packard Company

H4262S B.02

Setting Up PRM Groups

...

OTHERS:1:20::ORACLE1:2:60::ORACLE2:3:20::...

/etc/prmconf

xprm GUI Interface

Page 14: Managing Processes and Workloads

14 © 2001 Hewlett-Packard Company

H4262S B.02

Setting Up PRM Applications

...

# Application records#/ora1/bin/oracle::::ORACLE1,ora*oracle1/ora2/bin/oracle::::ORACLE2,ora*oracle2...

/etc/prmconf

xprm GUI Interface

Page 15: Managing Processes and Workloads

15 © 2001 Hewlett-Packard Company

H4262S B.02

How Application Processes Are Assigned to PRM Groups at Start-Up

• By the user• By at• By cron• Upon login• By prmrun• By prmmove• By another process

Page 16: Managing Processes and Workloads

16 © 2001 Hewlett-Packard Company

H4262S B.02

Identifying Processes to Manage

oracle 4129 1 0 04:19:19 ? 0:00 ora_pmon_oracle1 oracle 4131 1 0 04:19:19 ? 0:00 ora_dbw0_oracle1 oracle 4138 1 0 04:19:20 ? 0:00 ora_lgwr_oracle1 oracle 4140 1 0 04:19:20 ? 0:01 ora_ckpt_oracle1 oracle 4142 1 0 04:19:20 ? 0:00 ora_smon_oracle1 oracle 4144 1 0 04:19:20 ? 0:00 ora_reco_oracle1

oracle 4047 1 0 04:17:34 ? 0:00 ora_pmon_oracle2 oracle 4049 1 0 04:17:34 ? 0:00 ora_dbw0_oracle2 oracle 4056 1 0 04:17:34 ? 0:00 ora_lgwr_oracle2 oracle 4058 1 0 04:17:34 ? 0:01 ora_ckpt_oracle2 oracle 4060 1 0 04:17:35 ? 0:00 ora_smon_oracle2 oracle 4062 1 0 04:17:35 ? 0:00 ora_reco_oracle2

user4 6247 6244 0 04:41:52 ? 0:00 oracleoracle1 user2 6158 6155 0 04:38:16 ? 0:00 oracleoracle2 user3 6260 6257 0 04:42:44 ? 0:00 oracleoracle2 user1 6279 6276 0 04:43:25 ? 0:00 oracleoracle1

oracle 4078 1 0 04:41:52 ? 0:00 tnslsnr LISTENER_oracle1 oracle 4159 1 0 04:38:16 ? 0:00 tnslsnr LISTENER_oracle2

Page 17: Managing Processes and Workloads

17 © 2001 Hewlett-Packard Company

H4262S B.02

Moving Processes to Different PRM Groups

# ps -efPUID PRMID PID PPID C STIME TTY TIME COMMANDoracle OTHERS 4078 1 0 04:41:52 ? 0:00 tnslsnr LISTENER_oracle1oracle OTHERS 4159 1 0 04:38:16 ? 0:00 tnslsnr LISTENER_oracle2

# prmmove ORACLE1 -p 4078

# prmmove ORACLE2 -p 4159

# ps -efPUID PRMID PID PPID C STIME TTY TIME COMMANDoracle ORACLE1 4078 1 0 04:41:52 ? 0:00 tnslsnr LISTENER_oracle1oracle ORACLE2 4159 1 0 04:38:16 ? 0:00 tnslsnr LISTENER_oracle2

Page 18: Managing Processes and Workloads

18 © 2001 Hewlett-Packard Company

H4262S B.02

Ponderables• Are all of a user’s processes of equal

importance?• Are a process’ resource needs sporadic or

fairly constant throughout the course of the day?

• Could PRM be used to monitor resource usage?

• What happens when a parent process spawns children?

• Does a process always run under the same process name?

• How does PRM interact with real-time schedulers?

• What about multiple-processor environments?

• How do processes that request memory locking affect PRM actions?

Page 19: Managing Processes and Workloads

19 © 2001 Hewlett-Packard Company

H4262S B.02

What Is HP-UX Workload Manager?

• System management: availability of the system.– Is good system availability enough?

• Workload management: availability of applications at a specified level of performance.

– IT service management– service-level agreements– service-level objectives

Page 20: Managing Processes and Workloads

20 © 2001 Hewlett-Packard Company

H4262S B.02

What WLM Does

• Extends the ability of PRM– CAUTION: WLM controls PRM to deliver the required service levels. Do not modify PRM

directly on a system that uses WLM!• Defines workload groups

– Users and Applications are registered as with PRM• Defines Service Level Objectives (SLOs)

– Entitlement based vs Goal based SLOs• Collects data on system operation

– Metrics are defined in SLO• Redistributes resources

Page 21: Managing Processes and Workloads

21 © 2001 Hewlett-Packard Company

H4262S B.02

How Workload EntitlementsAre Determined• CPU

- Initial controller requests are between min and max CPU

- Subsequent dynamic controller requests are based on performance needs measured against actual metrics.

- Data collection interface is required for goal based SLOs

• Real memory is set in configuration file. Not dynamic.– Not recommended for groups with goal based SLOs

• Disk bandwidth is set in the configuration file. Not dynamic.– Needs LVM. Not possible on discs with swap partitions.

Page 22: Managing Processes and Workloads

22 © 2001 Hewlett-Packard Company

H4262S B.02

How WLM Works

wlmd1. Sets initial PRM resource entitlements2. Accepts metric data from data collectors3. Compares metric data to user-specified goals for each SLO4. Sets new entitlement requests for each SLO so that

performance is closer to goal5. Arbitrates between SLO entitlement requests when

resources are insufficient to satisfy all6. Implements new CPU entitlements7. Repeats 2 through 6

Page 23: Managing Processes and Workloads

23 © 2001 Hewlett-Packard Company

H4262S B.02

WLM daemon (wlmd)

Controller

Controller

Controller

Arbiter

Datacollector 1

Datacollector 2

Datacollector 3

PRM control

App1

App2

App3

WLMconfiguration

file

SLOsdefined

here

WLMEMS monitor

EMSSLOstatsEMS

monitor

WLM Components

Page 24: Managing Processes and Workloads

24 © 2001 Hewlett-Packard Company

H4262S B.02

Migrating from PRM to WLM

• The wlmprmconf utility– Takes a valid PRM configuration file and translates it

to the equivalent WLM configuration.– Warning PRM warnings become WLM errors!– “distribute_excess” may be required to remove CPU

cap.

• The resulting text file can be edited to:– add SLO goals– change priorities– add time-based conditions and exceptions– modify WLM tuning parameters

Page 25: Managing Processes and Workloads

25 © 2001 Hewlett-Packard Company

H4262S B.02

Supplying Data to WLM

• Data-centric approach– ARM-instrumented applications– Glance Plus resources– source code modification

• Transport-centric approach– command line– shell script– perl programs– stdout– WLM API

Page 26: Managing Processes and Workloads

26 © 2001 Hewlett-Packard Company

H4262S B.02

WLM Data Collectors

• Data collectors report workload performance to WLM– Directly using the WLM API– Indirectly using wlmrcvdc and a “rendezvous point”

• The source of performance information depends on the application.– Application Response Measurement (ARM) library.– Monitor Processes

• Use C or Perl to utilize the WLM APIs directly.• Use Shell scripts to send data via the wlmsend

command.• Reported metrics are compared to goals.

Page 27: Managing Processes and Workloads

27 © 2001 Hewlett-Packard Company

H4262S B.02

Monitoring wlmd

• Turn on WLM Logging

• wlmd –a configfile –l slo,metric– Provides logging of SLO compliance and all all metric

values– Logfile is /var/opt/wlm/wlmdstats

Page 28: Managing Processes and Workloads

28 © 2001 Hewlett-Packard Company

H4262S B.02

WLM EMS Monitor

– WLM has an EMS monitor to track performance.– EMS monitor available for WLM System– EMS monitors available for each SLO– This data is available to standard EMS clients

including SAM and IT/O.

Page 29: Managing Processes and Workloads

29 © 2001 Hewlett-Packard Company

H4262S B.02

Review of the Module

In this module you looked at:• Process Resource Manager

– Resource allocation– Application groups– Carousel algorithm– gpm GUI

• Workload Manager– Workload entitlements– WLM components and operation– Migrating from PRM to WLM– Supplying data– Monitoring SLO compliance