CI Commands for the Workload Manager [ COMMUNICATOR 3000 MPE/iX General Release 5.0 (Core Software Release C.50.00) ] MPE/iX Communicators
COMMUNICATOR 3000 MPE/iX General Release 5.0 (Core Software Release C.50.00)
CI Commands for the Workload Manager
by Bellos Nisan
Commercial Systems Division
Product Overview
MPE/iX Release 5.0 provides several new and enhanced CI commands for the
new Workload Manager purchasable product (product number B3879AA). The
Workload Manager allows system managers to partition the system workload
into entities called workgroups to effectively balance the load on that
system. Each workgroup uses several filters, or workgroup membership
criteria, to determine which processes become members. By grouping user
processes and assigning appropriate scheduling characteristics to each
workgroup, the system manager can have greater control over CPU
allocation.
This article describes the new and enhanced CI commands to support the
Workload Manager product. Detailed information about each command and
its parameters are available in the Online Help Facility and the product
manual Using the HP 3000 Workload Manager (B3879-90001). Also, more
details about the Workload Manager product are available in the
"Introducing New Workgroups on the HP 3000" and "The Workload Manager
Technical Overview" articles in this issue of the Communicator.
Creating a User-Defined Workgroup
Users that have System Manager (SM) or System Supervisor (OP) capability
can use the new CI command NEWWG to create one or many new user-defined
workgroups. his command to validate the syntax of an indirect file.
This command is available to users who have purchased and installed the
Workload Manager.
The NEWWG command accepts multiple parameters and options to allow you to
add a single workgroup to the existing workgroup configuration. The
workgroup name may be up to 255 characters long. In addition to
specifying its name, you must specify its base and limit priorities,
referred to as workgroup scheduling characteristics, and at least one of
the following workgroup membership criteria.
* Logon name. Use the MEMB_LOGON parameter to specify one or more
logon names. Each logon name may contain wildcards. Note that if
you supply a job or session name with the logon, you must enclose
the whole logon in double quotes to group it as one entity. For
example:
;MEMB_LOGON = (OP#.ORDERS, "USER##,@.INVENTRY")
* Program name. Use the MEMB_PROGRAM parameter to specify one or
more program names in MPE or Hierarchical File System (HFS)
syntax. Note that the MPE names must be fully qualified, and HFS
names must be given as absolute paths. For example:
;MEMB_PROGRAM = (UPDATE.SECURE.INVENTRY, /Purchase/Order_Items)
* Traditional scheduling subqueue attribute. Use the MEMB_QUEUE
parameter to specify one or more of AS, BS, CS, DS, and ES
subqueue names. For example
;MEMB_QUEUE = (CS, DS)
The following command creates a user-defined workgroup named
wm_catch_batch that captures all processes that logon to the batch
account and imposes on them a base priority of 170 and a limit priority
of 217.
:newwg wm_catch_batch; memb_logon=(@.batch); base=170; limit=217
It is important to note that every time you create a new workgroup, all
the processes that are currently assigned to the other workgroups are
matched against the membership criteria of the newly created workgroup
for possible inclusion in it. This is referred to as system-wide scan.
When creating new workgroups, you should take into account the load on
your system and the effect that this may have on its performance.
Replacing an Existing Workgroup Configuration
The NEWWG command also allows you to specify an indirect file on the
command line to replace the current workgroup configuration. The
indirect file is an ASCII file that contains one or more workgroup
specifications.
You may decide to alter the workload management scheme of your system by
activating different workgroup configurations at different times. To
accomplish this, you can create multiple indirect files that contain
different combinations of user-defined workgroup specifications. For
example to manage the system load in the morning, you may use the
./wm_morning_shift indirect file as follows:
:newwg ^./wm_morning_shift
And, to manage the system load in the evening, you may use the
./wm_evening_shift indirect file as follows:
:newwg ^./wm_evening_shift
You have the option of automating these tasks via job streams that
execute at pre-assigned times.
To ensure effective use of indirect files, the NEWWG command provides the
VALIDATE option that lets you create and test an indirect file before
using it. For example, to ensure that the ./wm_evening_shift indirect
file will execute successfully, you can verify it as follows:
:newwg ^./wm_evening_shift; validate
When using indirect files, remember that the operation is whole or
atomic: it either succeeds or fails for the entire file. If it
succeeds, the current configuration is replaced with that specified in
the indirect file. If it fails, the current configuration is not
changed. It is important to remember that using an indirect file is
equivalent to purging and recreating all the user-defined workgroups.
Therefore, it is a good idea to keep a copy of the current workgroup
configuration in an indirect file.
To help you create an indirect file, the new CI command SHOWWG (described
below) provides the WGFILE format that generates an output suitable for
indirect file creation. The output of this format can be redirected to a
file using the CI's I/O redirection (CIOR) facility as follows:
:showwg @,wgfile > WMIndir
:save WMIndir
Changing the Attributes of a Workgroup
Users with System Manager (SM) or System Supervisor (OP) capability can
use the new CI command ALTWG to alter all attributes of a user-defined
workgroup except the workgroup membership criteria, and to change certain
scheduling characteristics of the CS_Default, DS_Default, and ES_Default
system-defined workgroups. (Scheduling characteristics that can be
changed for these system-defined workgroups are base and limit
priorities, quantum bounds, boost property, and timeslice.)
For example, to change the limit priority of the wg_catch_batch workgroup
to 233, we enter the following command:
:altwg wg_catch_batch; limit=233
As mentioned above, you cannot use ALTWG to change the workgroup
membership criteria and, as a result, the command does not support the
MEMB_LOGON, MEMB_PROGRAM, and MEMB_QUEUE parameters. To alter these
attributes you must recreate that workgroup. The easiest way is to
redirect the output of the SHOWWG ;FORMAT=WGFILE command to an indirect
file (for example wgindir), edit that file, and use the NEWWG ^wgindir to
replace all the workgroups. For example,
:showwg @,wgfile > wgindir
:copy wgindir,wgindir2
At this point, edit wgindir if you wish. Then enter:
:newwg ^wgindir
Displaying Workgroup Information
Users with System Manager (SM) or System Supervisor (OP) capability can
use the new CI command SHOWWG to display workgroup information. You can
display information about one or more workgroups, and use wildcards in
the workgroup name specification. Four different formats, SUMMARY,
WGFILE, PROCS, and DETAIL, are available. Each of these formats is
briefly explained below.
SUMMARY Format.
This format provides a quick review of a workgroup's scheduling
characteristics. It does not display any information about the workgroup
membership criteria. The workgroup name will always be truncated if it
is longer than eighteen characters and the nineteenth character will be
replaced with the "$" character to indicate truncation. To see the full
name of a workgroup use the WGFILE format (see below). Here is an
example output of the SUMMARY format.
:showwg
-----QUANTUM----- TIME CPU %
WORKGROUP BASE LIMIT MIN MAX ACTUAL BOOST SLICE PROCS MIN MAX
------------------- ---- ----- ----- ----- ------ ----- ----- ----- --- ---
program_developmen$ 160 170 1 2000 0 DECAY 200 0 0 100
payroll_data_entry 155 180 1 2000 0 DECAY 200 0 0 100
telephone_sales_re$ 152 165 1 2000 0 OSC 200 1 0 100
AS_Default 30 99 N/A N/A N/A N/A 1000 15 N/A N/A
BS_Default 100 150 N/A N/A N/A N/A 1000 27 N/A N/A
CS_Default 152 200 1 2000 1 DECAY 200 12 N/A N/A
DS_Default 202 238 2000 2000 0 DECAY 200 0 N/A N/A
ES_Default 240 253 2000 2000 0 DECAY 200 0 N/A N/A
WGFILE Format
This format provides a list of all user-defined and system-defined
workgroup names along with their membership criteria and scheduling
characteristics. This format provides an output suitable for creating
indirect files to be used later with the NEWWG command. This format is
never truncated and is exempt from the TRUNCATE option. Here is an
example of a portion of the output of the WGFILE format.
:showwg telephone_s@,wgfile
Workgroup = telephone_sales_representatives
;Memb_Logon = @.tellreps
;Base = 152
;Limit = 165
;MinQuant = 1
;MaxQuant = 2000
;Boost = OSCILLATE
;Timeslice = 200
;MinCPUPCT = 0
;MaxCPUPCT = 100
*************************
Note that all information that was specified during the creation of this
workgroup is displayed in its expanded form. In this example the queue
and program memberships are not displayed because they were not specified
when this workgroup was created.
As mentioned earlier, the output of the WGFILE is suitable for creating
an indirect file that contains all the information necessary to recreate
the current workgroup configuration. To capture the names of all the
user-defined workgroups you can enter the following commands.
:showwg @, wgfile > ./WGConfig
:save ./WGConfig
Note that the information about all workgroups including user-defined,
system-defined, and purge-pending workgroups will be saved in the
wgconfig file. However, information about the system-defined and
purge-pending workgroups will be commented out in the file. Since the
scheduling characteristics of one of the system-defined workgroups may
have been altered via the ALTWG command, it is recommended that you keep
the information about those workgroups in the file for future reference.
PROCS Format
This format provides a list of all the processes that belong to a
workgroup along with that workgroup's name and membership criteria. The
output of this format is modeled after that of the SHOWPROC command's
format SUMMARY. Here is an example output of the PROCS format.
:showwg telephone_sal@,procs
WORKGROUP : telephone_sales_representatives
PROCESSES : 2
PIN PARENT PRI CPUTIME STATE JOBNUM (PROGRAM) STEP
----- ------ ----- -------- ----- ------ --------------
59 47 152 D 0:00.708 READY S3 :SHOWWG teleph@,procs
47 45 152 D 0:00.186 WAIT S3 (JSMAIN.PUB.SYS)
********************
The security measures on the output of this format are the same as those
for the SHOWPROC command. Also, it is important to remember that the
output from the PROCS format is a snapshot of an instance of the system
activity. It is possible that processes die while information about them
is being displayed.
DETAIL Format
This format is a superset of the SUMMARY and PROCS formats. It displays
the workgroup name, number of its member processes, its membership
criteria, its scheduling characteristics, and information about each of
its member processes. Here is an example output of the DETAIL format.
:showwg teleph@,detail
WORKGROUP : telephone_sales_representatives
PROCESSES : 2
MEMBERSHIP CRITERIA
LOGON : @.tellreps
-----QUANTUM----- TIME CPU %
BASE LIMIT MIN MAX ACTUAL BOOST SLICE PROCS MIN MAX
---- ----- ----- ----- ------ ----- ----- ----- --- ---
152 165 1 2000 6 OSC 200 2 0 100
PIN PARENT PRI CPUTIME STATE JOBNUM (PROGRAM) STEP
----- ------ ----- -------- ----- ------ --------------
59 47 152 D 0:00.708 READY S3 :SHOWWG teleph@,procs
47 45 152 D 0:00.186 WAIT S3 (JSMAIN.PUB.SYS)
********************
Purging a Workgroup
Users with System Manager (SM) or System Supervisor (OP) capability can
use the new CI command PURGEWG to remove one or more user-defined
workgroups. PURGEWG is modeled after the PURGE command in that it allows
wildcarding and control over the function of the command. You cannot
delete any of the system-defined workgroups.
For example, to delete the payroll_data_entry user-defined workgroup,
enter the following:
:purgewg payroll_data_entry
To delete all three user-defined workgroups that begin with wm_test enter
the following:
:purgewg wm_test@
3 workgroups matched
Continue PURGEWG ? (YES/NO)yes
3 selected. 3 succeeded. 0 failed.
To delete a number of workgroups one at a time in an interactive mode so
that you can skip a workgroup or completely stop the processing of the
command, you may use the CONFIRMALL option as follows:
:purgewg wm_test@; confirmall
3 workgroups matched
wm_test_morning_config ? (NO/YES/QUIT)yes
wm_test_midday_config ? (NO/YES/QUIT)no
wm_test_evening_config ? (NO/YES/QUIT)yes
2 selected. 2 succeeded. 0 failed.
When you delete a workgroup, all its processes are automatically assigned
to the first workgroup whose membership criteria they match. Unlike the
scan that happens when creating a new workgroup, this scan is limited
only to those processes that belong to the workgroup that is being
purged. Since this activity can be somewhat time consuming on larger
systems, the PURGEWG command provides the NOPURGESCAN option to logically
remove the workgroup but defer the scanning. In this case, the workgroup
is placed in what is known as the purge-pending state and remains until
it loses its last member process, or a scan is done through issuing of
the NEWWG or the PURGEWG ;PURGESCAN commands. The purge-pending state
ensures that when a new process is created, it is not assigned to this
workgroup. When a workgroup is placed in the purge-pending state, a "~"
character is appended to the beginning of its name to provide a visual
clue to that effect.
The following example demonstrates the use of NOPURGESCAN option and its
effect on the output of the SHOWWG command. For the purposes of this
example, assume that all the workgroups exist and each one has at least
one member process.
:purgewg wm_#@; nopurgescan
4 workgroups matched
Continue PURGEWG ? (YES/NO)yes
4 selected. 4 succeeded. 0 failed.
:showwg wm_#@
-----QUANTUM----- TIME CPU %
WORKGROUP BASE LIMIT MIN MAX ACTUAL BOOST SLICE PROCS MIN MAX
------------------- ---- ----- ----- ----- ------ ----- ----- ----- --- ---
~wm_1_example 152 171 1 2000 0 DECAY 200 1 0 100
~wm_2_example 172 191 1 2000 1 DECAY 200 1 0 100
~wm_3_example 192 211 1 2000 1 DECAY 200 1 0 100
~wm_4_example 212 240 1 2000 1 DECAY 200 1 0 100
AS_Default 30 99 N/A N/A N/A N/A 1000 14 N/A N/A
BS_Default 100 150 N/A N/A N/A N/A 1000 26 N/A N/A
CS_Default 152 154 1 1998 0 DECAY 200 12 N/A N/A
DS_Default 202 238 2000 2000 0 DECAY 200 0 N/A N/A
ES_Default 240 253 2000 2000 0 DECAY 200 0 N/A N/A
As shown in the example, all the user-defined workgroups are in the
purge-pending state. Note that the processes that belong to each of the
purge-pending workgroups are not moved and still abide by the
restrictions placed on them through that workgroup's scheduling
characteristics.
Altering a Process' Workgroup Assignment
The CI command ALTPROC has been enhanced to support the Workload Manager.
A new keyword WG has been added to allow the system manager to reassign a
process into a different workgroup. This overrides the natural
assignment of a process into a workgroup. Such a process is referred to
as an artificial member of the workgroup to which it has been assigned.
Both the SHOWWG and SHOWPROC commands provide visual clues denoting that
a process is an artificial member of a workgroup.
For example, to place pin 59 in a workgroup that will allow it higher
priority you may do the following:
:altproc 59;wg=BS_Default
:showproc 59;format=detail
PIN PARENT PRI CPUTIME STATE JOBNUM (PROGRAM) STEP
----- ------ ----- -------- ----- ------ --------------
%59 47 100 L 0:01.315 READY S3 :SHOWPROC 59;format=detail
LOGON : MGR.TELLREPS
PROGRAM : CI.PUB.SYS
QUEUE : CS
WORKGROUP : %BS_Default
********************
Note that a percent sign (%) appears in the first column of the PIN
column display. Because the first part of the display is common to
SHOWPROC and the PROCS format of the SHOWWG command, the percent sign
appears when SHOWWG BS_DEFAULT,PROCS command is issued. Also a percent
sign is placed before the workgroup name to denote that this workgroup is
not the natural workgroup of this process.
To return a process to its natural workgroup, you can use the special
workgroup name NATURAL_WG with the ALTPROC command as follows:
:altproc pin=59; wg=natural_wg
It is possible that the natural workgroup of a process be removed while
that process is an artificial member of another workgroup. When an
attempt is made to return that process to its natural workgroup which is
no longer present (purge-pending workgroups are considered not present),
it is treated as a newly created process and it is matched against the
membership criteria of the available workgroups to determine a new
natural workgroup for it.
Displaying Process Information
The CI command SHOWPROC has been enhanced to support the Workload
Manager. A new format, DETAIL, has been added to display information
about a process, its workgroup assignment, and the criteria that has made
it a member of that workgroup.
For example, to determine why pin 59 became a member of the workgroup
telephone_sales_representatives, we obtain its logon, program name, and
queue information and compare them against the membership criteria of the
workgroup. To obtain the needed information about the pin, we enter the
following:
:showproc 59;format=detail
PIN PARENT PRI CPUTIME STATE JOBNUM (PROGRAM) STEP
----- ------ ----- -------- ----- ------ --------------
59 47 152 D 0:00.905 READY S3 :SHOWPROC 59;format=detail
LOGON : MGR.TELLREPS
PROGRAM : CI.PUB.SYS
QUEUE : CS
WORKGROUP : telephone_sales_representatives
********************
The first part of the output is the same as that of the PROCS format of
the SHOWWG command. The second part displays that process' logon, its
program name, and the queue in which it was placed, followed by the
workgroup name whose membership criteria it matched. It is important to
remember that the headings "LOGON", "PROGRAM", and "QUEUE" denote the
process' attributes and not the membership criteria of the workgroup
telephone_sales_representatives.
MPE/iX Communicators