process resource manager 2002. 10. 17 강사 : 이 동 주 과장 hpcs / mc
TRANSCRIPT
![Page 1: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/1.jpg)
Process Resource Manager
2002. 10. 17강사 : 이 동 주 과장
HPCS / MC
![Page 2: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/2.jpg)
Agenda
• Process Resource Manager • Resource Managed• 4 Resource Managers • Why use PRM • PRM — Application Groups • The “Carousel” Paradigm • Two types of PRM Group• What are Shares• How PRM manages Resources• Configuring PRM – quick start • PRM configuration file• What Is HP-UX Workload Manager• PRM DEMO, Q&A
![Page 3: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/3.jpg)
The HP Process Resource Manager
• Resource management tool
• control the amount of resources that applications
or users consume
• enforce a maximum cap of cpu and memory resource
Process Resource Manageris an optional HP-UX performance management product.
![Page 4: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/4.jpg)
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 !Group 1
Group 1
Other
![Page 5: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/5.jpg)
Resources Managed
Memory
Disk I/O
CPU
Memory paging
Process/Thread scheduler
Disk read/writerequests
![Page 6: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/6.jpg)
4 Resource Managers
• CPU – ensures that each PRM group is grantd at least it entilement, but (optionally) no more than it’s capped amount of CPU
• MEMORY - ensures that each PRM group is grantd at least it entilement, but (optionally) no more than it’s capped amount of MEMORY
• DISK - ensures that each PRM group is grantd at least it entilement, of disk bandwidth
• APPL - ensures that specified applications and their child processes run in the appropriate PRM groups
![Page 7: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/7.jpg)
Why use PRM
• improve the response time for critical users and applications
• set and manage user expectations for performance
• allocate shared servers based on budgeting
• ensure that an application package in a MC/SG cluster has sufficient resources on an active standby system in the event of failover
• ensure that critical users or applications have sufficient CPU, memory and disk bandwidth resources
• restrict the CPU, memory and disk bandwidth resources available to relatively low-priority users and application during times of heavy demand
• monitor resource consumption by users or applications
![Page 8: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/8.jpg)
Resource Allocations without PRM
Resource allocated evenly between all the processes on the system
![Page 9: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/9.jpg)
Resource Allocations with PRM
Resource usage balanced between users
![Page 10: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/10.jpg)
Resource Allocations with PRM
GroupC takes priority over GroupA and GroupB
![Page 11: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/11.jpg)
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 12: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/12.jpg)
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 13: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/13.jpg)
Two types of PRM Groups
• FSS PRM Group – resources allocated to them using the shares model
• PSET PRM Group – the CPU entitlement is specified by assigning them a subset of the system’s processors
![Page 14: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/14.jpg)
What are Shares
• Minimum amounts of a resources assigned to each PRM group
• A share is a guaranteed minimum when the system is at peak load
![Page 15: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/15.jpg)
How PRM manages CPU
• Group1 has 33 CPU shares, and Group2 has 66 CPU shares
![Page 16: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/16.jpg)
How PRM manages real memory
Two memory managers• prm0d – default on HP-UX version prior to 11i• Prm2d – default as of HP-UX 11i
Exception of memory control• Interactive shells• Login shells• PRM commands• Applications listed in /opt/prm/exempt• Processes with locked memory• The kernel• Processes in the PRM_SYS group (PRMID 0)
Shares and Cap• Share is a lower bound, Cap is a upper bound(optional)
![Page 17: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/17.jpg)
How PRM manages real memory
Isolating a group’s memory resources• Can be useful for applications that need dedicated memory
resources
![Page 18: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/18.jpg)
How PRM manages disk bandwidth
• Disk must be under the control of LVM• Works only when there is contention for disk bandwidth• Works only for actual I/O to the disk(no buffer cache I/O)• Cannot allocate disk bandwidth shares for PSET PRM groups
![Page 19: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/19.jpg)
How PRM manages Applications
• By the user• By at• By cron• Upon login• By prmrun• By prmmove• By another process
PRM’s group assignments at process start-up
![Page 20: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/20.jpg)
Configuring PRM – quick start
• Determine configuration model• Create configuration file use prmloadconf command to create /etc/prmconf file• Customize the configuration file• Check the syntax
prmconfig –s [-f configfile]• Load the configuration
prmconfig –i [-f configfile] or prmconfig –k [-f configfile]
• Enable PRMprmconfig -e
• Confirm that process are running in the PRM groupsps -efP
![Page 21: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/21.jpg)
PRM configuration file
• Default configuration file - /etc/prmconfalternate configuration file - /opt/prm/conf directory
• Five record types - Group/CPU
- Memory- Disk bandwidth- Application- User
![Page 22: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/22.jpg)
Group/CPU record syntax
GROUP:{ PRMID | HIER | PSET }:SHARES::[CPUS]:[CPU_LIST]
![Page 23: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/23.jpg)
Memory record syntax
#!PRM_MEM:{PRMID|GROUP}:SHARES:[CAP]:[SUPRESS]::[[IMPORT]:[EXPORT]:[LOCKABLE]]
![Page 24: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/24.jpg)
Disk record syntax
VOLUME:{ PRMID | GROUP }:SHARES::
# PRM disk records
/dev/vg01/lvol1:1:15::/dev/vg01/lvol1:2:30::/dev/vg01/lvol1:3:40::/dev/vg01/lvol1:4:80::/dev/vg02/lvol2:1:15::/dev/vg02/lvol2:2:30::/dev/vg02/lvol2:3:40::/dev/vg02/lvol2:4:80::
![Page 25: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/25.jpg)
Application record syntax
APPLICATION::::GROUP[,ALT_NAME[,…,ALT_NAME]]
# PRM application records
/usr/bin/database::::business_apps,db_inventory,db_payroll
/usr/bin/database::::order_process,db_orders,order_report*
/usr/bin/mail::::mailserver
![Page 26: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/26.jpg)
User record syntax
USER::::INITIALGROUP[,ALTERNATEGROUP[, …]]
# PRM user records
sysadm::::OTHERSengineer1::::development,OTHERSuser1::::OTHERSuser2::::sales+marketing::::mktg
![Page 27: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/27.jpg)
Resource Monitoring
• PRM monitor (prmmonitor command)shows percentage of CPU, memory and disk bandwidthallocated to and used by PRM groups
• prmanalyze analyzes accounting files• Perfview analyzer• GlancePlus• acctcom• PRM memory message logging
prmconfig –L MEM
![Page 28: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/28.jpg)
Viewing CPU Allocations with gpm
CPU Allocationwith PRM Disabled
CPU Allocationwith PRM Enabled
![Page 29: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/29.jpg)
PRM — Commands
•xprm•prmanalyze•prmavail•prmconfig•prmlist•prmloadconf•prmmonitor•prmmove•prmrecover•prmrun
![Page 30: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/30.jpg)
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 31: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/31.jpg)
Setting Up PRM Groups
...
OTHERS:1:20::ORACLE1:2:60::ORACLE2:3:20::...
/etc/prmconf
xprm GUI Interface
![Page 32: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/32.jpg)
Setting Up PRM Applications
...
# Application records#/ora1/bin/oracle::::ORACLE1,ora*oracle1/ora2/bin/oracle::::ORACLE2,ora*oracle2...
/etc/prmconf
xprm GUI Interface
![Page 33: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/33.jpg)
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 34: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/34.jpg)
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 35: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/35.jpg)
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 36: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/36.jpg)
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 37: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/37.jpg)
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 38: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/38.jpg)
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 39: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/39.jpg)
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 40: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/40.jpg)
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 41: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/41.jpg)
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 42: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/42.jpg)
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 43: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/43.jpg)
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 44: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/44.jpg)
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 45: Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC](https://reader035.vdocuments.net/reader035/viewer/2022062519/5697bfc81a28abf838ca83e2/html5/thumbnails/45.jpg)
PRM DEMO, Q&A