Chapter 19 Process Resource Manager (PRM) HP-UX Handbook Revision 13.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 TERMS OF USE AND LEGAL RESTRICTIONS FOR THE HP-UX RECOVERY HANDBOOK ATTENTION: PLEASE READ THESE TERMS CAREFULLY BEFORE USING THE HP-UX HANDBOOK. USING THESE MATERIALS INDICATES THAT YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THE HP-UX HANDBOOK. THE HP-UX HANDBOOK HAS BEEN COMPILED FROM THE NOTES OF HP ENGINEERS AND CONTAINS HP CONFIDENTIAL INFORMATION.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 TABLE OF CONTENTS Introduction ______________________________________________________________________ 4 PRM’s Resource Managers _________________________________________________________________4 How the FSS scheduler works _______________________________________________________________ 5 Installation _______________________________________________________________________ 6 Current PRM Version and Patches _________________________________________
Chapter 19 Process Resource Manager (PRM) October 29, 2013 Introduction Process Resource Manager (PRM) is a resource management tool used to control the amount of resources that processes use during peak system load (at 100% CPU resource or 100% memory resource). PRM can guarantee a minimum allocation of system resources available to a group of processes through the use of PRM groups.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 purposes. APPL (application) Ensures that specified applications and their child processes run in the appropriate PRM groups. The following daemons belong to the PRM subsystem: prm1d prm2d Provides application management. Provides in-kernel memory management of both private memory and shared memory. CPU and DISK resource management is done in the kernel. How the FSS scheduler works Consider the PRM CPU scheduler as the carousel below.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 For all FSS PRM groups in the configuration The CPUCAPON mode, enabled through the prmconfig -M option discussed below, treats the FSS PRM group’s minimum allocation as its maximum allocation. When CPUCAPON mode is enabled, CPU capping is in effect for all user-configured FSS PRM groups on a system - regardless of CPU load. Each FSS PRM group takes its entire CPU allocation. Thus, no group can obtain more CPU resources.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 NOTE: If the PRM-Sw-Krn.PRM-KRN fileset is not installed or it is installed but its revision is older than the current revision, the current revision will be installed, causing a reboot. PRM Release History C.02.00.04 C.03.00 C.03.01 C.03.02 C.03.02.02 C.03.03.01 C.03.04 C.03.05 C.03.05.01 11.11 11.23 11.22 11.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 Post Installation Steps PRM module: Check if the prm module is in the kernel. # kcmodule prm Module State Cause prm static best Restart WLM / MeasureWare Restart WLM if it was running before the PRM upgrade/installation: # /opt/wlm/bin/wlmd –A Restart MeasureWare if it was running before the PRM upgrade/installation: # /sbin/init.d/mwa start Preparation Your PRM configuration should reflect some aspect of your business priorities.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 $ ps -ef UID root root root root ... ... kdoi22 kdoi22 kdoi22 kdoi22 kdoi22 kdoi22 kdoi22 ... ... PID PPID C STIME TTY TIME COMMAND 0 0 0 Jan 10 ? 1:09 swapper 1 0 0 Jan 10 ? 1:34 init 2 0 0 Jan 10 ? 8:24 vhand 3 0 0 Jan 10 ? 79:28 statdaemon 5403 5242 5420 5422 5424 5426 5428 1 1 1 1 1 1 1 0 0 0 0 0 0 0 Jan 10 Jan 10 Jan 10 Jan 10 Jan 10 Jan 10 Jan 10 ? ? ? ? ? ? ? 0:42 ora_smon_bfl 1:18 /oracle/app/oracle/product/8.1.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 $ORACLE_SID. The Oracle processes are named: ora__$ORACLE_SID $ORACLE_HOME and $ORACLE_SID are standard environment variable names for Oracle’s home directory (usually /oracle/app/oracle/product//) and the name of the Oracle database instance, respectively. The Oracle Server Manager ($ORACLE_HOME/bin/svrmgrl) starts following instance processes: /oracle/app/oracle/product/8.0.6 /oracle/app/oracle/product/8.1.
Chapter 19 Process Resource Manager (PRM) ora_pmon_orm7q ora_reco_orm7q ora_smon_orm7q oracleorm7q oracleorm7q ... October 29, 2013 (server process) (server process) (server process) (shadow process) (shadow process) NOTE: A shadow process is created for each user connecting to the database instance.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr::::Mktg, ’tnslsnr.*Mktg’ /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr::::Support, ’tnslsnr.*Support’ Launching a script under PRM To always run a script in a specific PRM group, use an application record. In this record, specify the full path of the shell or interpreter used in the script as the application. Also, give the name without the path - of the script as an alternate name.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 groups. Basically there are two different approaches: 1) Analytic Approach The command prmanalyze(1) reads standard HP-UX accounting information and allows an estimate of the resource consumption per process. Therefore process accounting needs to be running for some time to deliver statistically valuable information. $ /usr/sbin/acct/accton /var/adm/pact switches accounting on Check if the file /var/adm/pacct grows over time.
Chapter 19 opcuisrv prm3d rep_serv rpcbind scopeux snmpdm Process Resource Manager (PRM) 2 6 2 2 2 2 210.32 857.77 267.61 157.79 389.66 205.46 247.86 1024.00 338.00 187.04 557.00 226.95 October 29, 2013 30151185915.25 73680510360.90 38375920535.21 22636186149.09 55879680622.10 29465439020.68 2.70 6.61 3.44 2.03 5.01 2.64 $ prmanalyze -1 -p -r disk summary disk report by command name : 1961 records processed unique id processes ave Bps peak Bps total KB % total diagmond 1 265.43 265.43 8685980.47 3.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 A process that has to wait for memory cannot use up its CPU entitlement. In this example the initial configuration is as follows: PRM Group OTHERS EXPRESS ORA_ORM ORA_BFL OAS PRM-ID 1 2 3 4 5 CPU 10% 15% 30% 25% 20% MEM 10% 20% 10% 15% 15% DISK / / / / / (PRM-ID 1 is reserved for group OTHERS) Configuration Creating the PRM Configuration File /etc/prmconf The PRM configuration is contained in the ASCII file /etc/prmconf.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 ########## PRM memory record ###################################### # # #!PRM_MEM:{PRMID|GROUP}:SHARES:[CAP]:[SUPPRESS]::[[IMPORT]:[EXPORT]:[LOCKABLE]] # #!PRM_MEM:OTHERS:10:::: #!PRM_MEM:EXPRESS:20:::: #!PRM_MEM:ORA_ORM:10:::: #!PRM_MEM:ORA_BFL:15:::: #!PRM_MEM:OAS:15:::: # # in this section the memory entitlement are defined ########## PRM application record ################################# # # APPLICATION::::GROUP[,ALTERNATE_NAME[, ...
Chapter 19 Process Resource Manager (PRM) GROUP:PSET:::[CORES]:[CORE_LIST][:PSET_ATTR] GROUP PRMID HIER PSET SHARES MAX CORES CORE_LIST PSET_ATTR October 29, 2013 PSET PRM group The PRM group name. The PRM group can be the traditional PRM group (FSS PRM group) or a PSET PRM group. To use PSET PRM groups, you must have the PSET software installed. The FSS PRM group ID. PRMIDs for PSET PRM groups are assigned by PRM and are not specified in the group record.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 for a minimum allocation. User record: USER::::INITIALGROUP[,ALTERNATEGROUP[, ...]] USER INITIAL_GROUP Is either an individual user's login name or a + character followed by a netgroup name. Login names must be in /etc/passwd. Netgroup names must be associated with a list of login names in /etc/netgroup. Is the name of the initial PRM group for the user or netgroup.
Chapter 19 VOLUME PRMID | GROUP SHARES Process Resource Manager (PRM) October 29, 2013 Is the name of a logical volume group (LVM) or a disk group (VxVM). This name must begin with /dev/v to be recognized as a disk record. Is the FSS PRM group ID or FSS PRM group name. PRMIDs must be uniquely assigned integer values between 1 and 63 (inclusive) or between 1 and 255 (inclusive) starting with HP-UX 11i v2 Update 2.
Chapter 19 (NONE) Process Resource Manager (PRM) October 29, 2013 You can specify (NONE) in place of a group name if you would like to explicitly show in your configuration file that a Unix group is not to be mapped to a PRM group. NOTE: By default, PRM gives PRM_SYS 100 CPU shares. If you assign 100 shares to the PRM groups you create, PRM_SYS gets 50% (100/200) of the CPU resource. The PRM_SYS group must get at least 20% of the CPU resource.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 # PRM_CAPPING=0 # PRM_INT_APPL=0 # PRM_INT_MEM=0 # PRM_LOG_APPL=0 # PRM_LOG_MEM=0 # PRM_SNMPAGT=0 # PRM_USE_REALUID=0 # # PRM_CONFIG: Set to 1 to configure PRM # PRM_CONFIG_FILE: Set filename for PRM configuration # PRM_ENABLE: Set to 1 to enable PRM when configured # PRM_SLEEP: Set seconds to sleep after PRM is configured # PRM_CAPPING: Set to 1 to start PRM in CPU capping mode when enabled # PRM_INT_APPL: Set seconds for PRM APPL manager interv
Chapter 19 Process Resource Manager (PRM) October 29, 2013 -i Configure (or reconfigure) PRM using the default configuration file. This option does not alter the current state of any resource until a PRM resource manager is enabled for that resource. In ther words, if the HPUX scheduler is in effect, it remains in effect. Similarly, if PRM is already managing resources, it continues to do so. Use -e to enable PRM resource management. -e Enable PRM resource and application managers.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 ATTENTION: If you like to activate the CPU capping feature (i.e. unused CPU time will not be given to PRM groups going beyond their entitlement), you need to specify the -M option with prmconfig: $ prmconfig -ie -M CPUCAPON Details regarding the capping and other features can be found in the man pages and the HP Process Resource Manager User Guide.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 ------------------------------------------------------------------------------/home/ohaensel/seti SETI /home/ohaensel/seti SETI /home/ohaensel/seti SETI You can log PRM memory messages to a file. These messages contain information similar to that of the prmmonitor command. Messages are logged in the file /var/adm/syslog/syslog.log. Example: # prmconfig -L APPL # tail /var/adm/syslog/syslog.log ... ...
Chapter 19 Process Resource Manager (PRM) File last modified: Thu Mar October 29, 2013 1 17:22:57 2009 HP-UX grcdg071 B.11.11 U 9000/800 03/05/01 Mon Mar 5 09:24:27 2009 Sample: CPU scheduler state: Enabled 1 second CPU CPU PRM Group PRMID Entitlement Used ____________________________________________________________ OTHERS 1 55.56% 0.00% WWW 2 41.67% 0.00% SETI 3 2.78% 0.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 # prmconfig -e Confirm that the processes are running in the appropriate PRM groups: # ps -efP It is also possible to change a configuration using cron jobs. PRM Interfaces PRM con be configured on the command line or through SMH and SIM: HP System Management Homepage (SMH) enables you to perform various system administration tasks on a system through a single web interface. You can also configure and monitor PRM through SMH.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 Appendix PRM Manual Pages The following manual pages/commands are available with PRM: prm(1) PRM overview prmagt(1) HP PRM SNMP read-only agent prm1d(1) Process Resource Manager (PRM) daemons prmanalyze(1) Utility that uses the HP-UX system accounting log to generate PRM group usage statistics. This is useful for configuration planning, monitoring, and billing. prmavail(1) Displays resource availability to help plan PRM configurations.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 PRM File Locations /etc/prmconf The default PRM configuration file /etc/opt/prm/conf/* The suggested location for additional PRM configurations /opt/prm/conf/* A location previously suggested for additional PRM configurations /etc/rc.config.d/prm Configuration file used by /sbin/init.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 CPU Hogger Source Code The following C program is suited to test the functionality of PRM’s CPU resource manager. It simply tries to consume as much CPU time as it can get. # cat cpuhogger.c main() { while (1); } NOTE: A process can only execute on one CPU at a time. Hence a single cpuhogger process can never use 50% CPU time on an 8-way system. The maximum would be 12,5%.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 What is the difference? PRM is entitlement-based in its management of CPU, memory and I/O resources WLM utilizes pre-defined policies and goals to facilitate the dynamic allocation of resources based on conditions such as time of day, application responsiveness, business priorities, etc. WLM can work across partitions on the same machine, and can dynamically re-allocate resources between these partitions Refer to http://www.hp.
Chapter 19 Process Resource Manager (PRM) October 29, 2013 Additional Information The starting point for PRM documentation is: http://www.hp.com/go/prm/ This website links to all information about PRM such as: White papers HP Process Resource Manager overview (PDF, 704 KB) Using HP Process Resource Manager with Oracle (PDF, 205 KB) Technical Whitepaper (PDF, 1 MB) HP-UX Processor Sets technical white paper (PDF) Technical documentation HP PRM Version C.03.05.