1 / 45

Process Resource Manager

Process Resource Manager. 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC. 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

malanis
Download Presentation

Process Resource Manager

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Process Resource Manager 2002. 10. 17 강사 : 이 동 주 과장 HPCS / MC

  2. 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

  3. 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 Manager is an optional HP-UX performance management product.

  4. And They’re off ! The HP Process Resource Manager Group 1 Group 1 Other 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.

  5. CPU Memory Disk I/O Resources Managed Process/Thread scheduler Memory paging Disk read/write requests

  6. 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

  7. 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

  8. Resource Allocations without PRM Resource allocated evenly between all the processes on the system

  9. Resource Allocations with PRM Resource usage balanced between users

  10. Resource Allocations with PRM GroupC takes priority over GroupA and GroupB

  11. 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).

  12. The “Carousel” Paradigm PRM groups are represented by different color horses on a resource carousel.The number of horses of each color depends on that groups entitlement. The kernel references the carousel when making scheduling decisions.

  13. 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

  14. 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

  15. How PRM manages CPU • Group1 has 33 CPU shares, and Group2 has 66 CPU shares

  16. 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)

  17. How PRM manages real memory Isolating a group’s memory resources • Can be useful for applications that need dedicated memory resources

  18. 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

  19. How PRM manages Applications PRM’s group assignments at process start-up • By the user • By at • By cron • Upon login • By prmrun • By prmmove • By another process

  20. 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 PRM prmconfig -e • Confirm that process are running in the PRM groups ps -efP

  21. PRM configuration file • Default configuration file - /etc/prmconf alternate configuration file - /opt/prm/conf directory • Five record types - Group/CPU - Memory - Disk bandwidth - Application - User

  22. Group/CPU record syntax GROUP:{ PRMID | HIER | PSET }:SHARES::[CPUS]:[CPU_LIST]

  23. Memory record syntax #!PRM_MEM:{PRMID|GROUP}:SHARES:[CAP]:[SUPRESS]::[[IMPORT]:[EXPORT]:[LOCKABLE]]

  24. 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::

  25. 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

  26. User record syntax USER::::INITIALGROUP[,ALTERNATEGROUP[, …]] # PRM user records sysadm::::OTHERS engineer1::::development,OTHERS user1::::OTHERS user2::::sales +marketing::::mktg

  27. Resource Monitoring • PRM monitor (prmmonitor command) • shows percentage of CPU, memory and disk bandwidth • allocated to and used by PRM groups • prmanalyze analyzes accounting files • Perfview analyzer • GlancePlus • acctcom • PRM memory message logging • prmconfig –L MEM

  28. Viewing CPU Allocations with gpm CPU Allocationwith PRM Disabled CPU Allocationwith PRM Enabled

  29. PRM — Commands • xprm • prmanalyze • prmavail • prmconfig • prmlist • prmloadconf • prmmonitor • prmmove • prmrecover • prmrun

  30. # 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 Starting the Process Resource Manager Create your prmconf file As root enter # prmconfig -ek Monitor your system behavior using prmmonitor and glance/gpm (if available)

  31. Setting Up PRM Groups /etc/prmconf ... OTHERS:1:20:: ORACLE1:2:60:: ORACLE2:3:20:: ... xprm GUI Interface

  32. Setting Up PRM Applications /etc/prmconf ... # Application records # /ora1/bin/oracle::::ORACLE1,ora*oracle1 /ora2/bin/oracle::::ORACLE2,ora*oracle2 ... xprm GUI Interface

  33. 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

  34. Moving Processes to Different PRM Groups # ps -efP UID PRMID PID PPID C STIME TTY TIME COMMAND oracle OTHERS 4078 1 0 04:41:52 ? 0:00 tnslsnr LISTENER_oracle1 oracle OTHERS 4159 1 0 04:38:16 ? 0:00 tnslsnr LISTENER_oracle2 # prmmove ORACLE1 -p 4078 # prmmove ORACLE2 -p 4159 # ps -efP UID PRMID PID PPID C STIME TTY TIME COMMAND oracle ORACLE1 4078 1 0 04:41:52 ? 0:00 tnslsnr LISTENER_oracle1 oracle ORACLE2 4159 1 0 04:38:16 ? 0:00 tnslsnr LISTENER_oracle2

  35. 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

  36. 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

  37. 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.

  38. How WLM Works wlmd 1. Sets initial PRM resource entitlements 2. Accepts metric data from data collectors 3. Compares metric data to user-specified goals for each SLO 4. Sets new entitlement requests for each SLO so that performance is closer to goal 5. Arbitrates between SLO entitlement requests when resources are insufficient to satisfy all 6. Implements new CPU entitlements 7. Repeats 2 through 6

  39. WLM configuration file WLM EMS monitor Data collector 3 Data collector 1 Data collector 2 EMS EMS monitor WLM daemon (wlmd) App1 App2 App3 Arbiter Controller Controller Controller PRM control WLM Components SLOs defined here   SLO stats     

  40. 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

  41. 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

  42. 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.

  43. 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

  44. 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.

  45. PRM DEMO, Q&A

More Related