HPlogo Using the HP 3000 Workload Manager: HP 3000 MPE/iX Computer Systems > Chapter 5 Commands Reference

NEWWG

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Creates a new, user-defined workgroup either directly, via command line input, or indirectly, through a file. (Native Mode)

SYNTAX

   NEWWG ^filename [;VALIDATE]

Or:

   NEWWG [WORKGROUP=]workgrp



   { [;MEMB_LOGON=]logon

     [;MEMB_PROGRAM=]program_file

     [;MEMB_QUEUE=]queue_attribute }



   [;BASE=]base [;LIMIT=]limit



   [[;MINQUANT=]min] [[;MAXQUANT=]max]



   [[;BOOST= { DECAY

               OSCILLATE }]]



   [[;TIMESLICE=]tslice]



   [[;MINCPUPCT=]minpercent] [[;MAXCPUPCT=]maxpercent]



   [[;POSITION=]existingwg]
NOTE: Misuse of this command can significantly degrade system operating efficiency.

PARAMETERS

Use the first parameter (^filename) and the first option (VALIDATE) to specify an indirect file with the NEWWG command.

^filename

The name of the indirect file which contains workgroup specifications. This file can be used to replace the current workgroup configuration with that specified in the indirect file. The file name must be preceded with the "^" (caret) character.

When you specify an indirect file, the current user-defined workgroup configuration is replaced with the valid workgroup specification in the file. This action is atomic, i.e., either all workgroups are created or, if there were syntax or semantic errors, none are. A system-wide scan is done after all workgroups are created to determine workgroup membership for all processes on the system.

Note that this is an indirect file, not a command file. A command file would issue a NEWWG command for every new workgroup created and force a system-wide scan after each. Furthermore, creation would not be atomic.

Refer to the File Format section below for a description of the parameters valid for use within the indirect file (they include all of the parameters valid for the command-line specification except POSITION, since POSITION is actually the workgroup's position within the indirect file).

;VALIDATE

Use this option to check the indirect file for the correct syntax and report any errors. The workgroup configuration in the file isnot invoked. This option lets you ensure that when you subsequently issue the NEWWG command specifying this indirect file, the operation will not fail due to errors in syntax or semantics. Do not include this option in the indirect file or you will get an error.

Use the following parameters to create a new workgroup and add it to the current configuration by entering information on the command line.

workgrp

The name of the workgroup you are creating. This is a required parameter.

The workgroup name follows the convention for CI variables and Job Control Words (JCWs) and can be a maximum of 255 alphanumeric characters or underscores, where the first character cannot be numeric. The user-specified name (including case) is preserved, though comparisons are case-insensitive. All 255 characters are significant.

The following names, expressed in any case (all upper, all lower, or mixed) are unavailable: AS_Default, BS_Default, CS_Default, DS_Default, ES_Default, and Natural_wg.

The following parameters for logon, program file and queue attribute consistute the membership criteria for the workgroup. You must specify at least one of these parameters. Multiple specifications are permitted within a parameter (with commas as delimiters). Paremeters that you do not specify are assumed matches.

OR is used between values within each parameter and, AND is used across specified parameters. That is, a process must match one of the specifications for each of the specified parameters. Membership conflicts are resolved by assigning the process to the first matching workgroup defined. That is, a first-fit algorithm is used and, once a match is found, no further workgroups are considered.

logon

Specifies the job/session, user, and account name of potential workgroup members. The job/session name is optional, but if specified, you must enclose the entire logon string in double quotes (" "). The user and account names are required. You may use wildcards in any part of the logon string. The format is shown below:

   

   MEMB_LOGON = (logonname [,logonname]...)

Where logonname is:

   

   "job/session name, username.acctname"

or

   

   username.acctname
program_file

Specifies the program files of potential workgroup members. The program_file must be a fully qualified MPE/iX file name or absolute Hierarchical File System (HFS) file name. You may use wildcards in MPE/iX filenames. The format is shown below:

   

   MEMB_PROGRAM = (program_file [,program_file]..)

Note that for HFS file names, comparison is case-sensitive. Thus, if the file exists in the MPE name space, you must specify it in upper case, for example, /SYS/PUB/WMTEST instead of /sys/pub/wmtest.

queue_attribute

Specifies the traditional queue attribute. The MEMB_QUEUE parameter is provided for compatibility. It enables the system manager to collect processes into workgroups without having to change their existing logon priority or job card. Any current specification or alteration of scheduling queue attribute (via HELLO, JOB, LINK, ALTPROC, AIFPROCPUT, GETPRIORITY) will continue to set the queue attribute, but this attribute can be used to determine the workgroup membership of the process. As new job streams or tasks are created, you may wish to avoid specifying scheduling queue and allow workgroup membership to be determined by the other categories such as MEMB_LOGON and MEMB_PROGRAM.

You may enter the following values for queue_attribute: AS, BS, CS, DS, and ES.

   

MEMB_QUEUE = (queue_attribute [,queue_attribute]..)
base

An integer from 150 to 255 specifying the highest priority at which processes executing in the workgroup begin their Dispatcher transactions. Priority is inversely related to the integer: a higher-priority process has a lower number. While the full range is provided for compatability, avoid setting the base priority between 150 and 152, since user processes running at priorities greater than 152 can adversely affect system performance. The base is a required scheduling characteristic.

limit

An integer specifying the lowest priority which processes executing in the workgroup can attain. Priority is inversely related to the integer: a higher-priority process has a lower number. The limit, which can range from 150 to 255, must be greater than or equal to the base. It is a required scheduling characteristic.

min

The minimum number of milliseconds that a process may use the CPU before its priority is reduced. The min is a lower bound for the quantum value, which determines the rate of priority decay for processes within the workgroup. Values range between 1 and 32767. The minimum quantum is an optional scheduling characteristics with a default value of 1 millisecond.

max

The maximum number of milliseconds that a process may use the CPU before its priority is reduced. The max is an upper bound for the quantum value, which determines the rate of priority decay for processes within the workgroup. The value of max must be greater than or equal to the value of min. Again, values range between 1 and 32767. The maximum quantum is an optional scheduling characteristics with a default value of 2000 milliseconds.

DECAY

Sets the workgroup to the default decay behavior associated with circular scheduling subqueues. If set, a process decays normally to the limit priority and returns to the base priority when the Dispatcher transaction is complete. DECAY is the default boost property.

OSCILLATE

Sets the workgroup to oscillate behavior. If set, a process returns to the base priority once its priority has decayed to the limit of the workgroup, even if it has not completed a Dispatcher transaction.

tslice

The timeslice is the maximum number of milliseconds a process in the workgroup can hold a CPU before returning to the Scheduler to have its priority recalculated. Values must be multiples of 100, with a minimum value of 100 and a maximum value of 32700. The timeslice is an optional scheduling characteristic with a default value of 200 milliseconds.

minpercent

The minimum percentage of time that the CPU is available to the workgroup's member processes. Within the target workgroup, this CPU time is allocated according to the processes' priorities. The workgroup is guaranteed this minimum percentage even if higher-priority processes in other workgroups are ready to run.

If the processes in the workgroup do not require as much CPU time as their guaranteed minimum, that time will be available to processes in other workgroups. The default value for this optional workgroup characteristic is that the workgroup is not guaranteed any minimum CPU percent and that CPU allocation is based on process priority only.

maxpercent

The maximum percentage of time that the CPU is available to the workgroup's member processes. The workgroup will be limited to this maximum percentage of time even if no other process in another workgroup is ready to run. In other words, a workgroup will be limited to this maximum percentage even if the system must remain idle for the remainder of the time.

The default value for this optional workgroup characteristic is that there is no maximum which would prevent a workgroup's processes from getting the CPU time their priorities warrant.

existingwg

Workgroups are maintained in an ordered file. Therefore, the POSITION parameter, existingwg, establishes the position of the new workgroup within the set of existing user-defined workgroups. The existingwg value is the name of any existing, user-defined workgroup or the AS_Default system-defined workgroup. The new workgroup is inserted before the existing workgroup. Specifying AS_Default positions the new workgroup at the end of the list of user-defined workgroups, immediately preceding the system-defined workgroups.

The POSITION specification is optional. If omitted, the new workgroup is appended to the end of the list of existing user-defined workgroups.

NOTE: You may wish to define workgroups with "dummy" membership criteria that would never match process attributes. Such workgroups will not have natural members, but you can use them as the target of an ALTPROC;WG= command when you need to quickly move a process that is affecting system performance. Such workgroups should be placed after all user-defined workgroups to minimize the number of workgroups that must be scanned to determine process workgroup membership.

FILE FORMAT

The NEWWG command accepts an indirect file, containing the specifications for creating user-defined workgroups, as input. The indirect file should be an ASCII file that is temporary or permanent and have fixed or variable length records. When you specify an indirect file, its workgroup configuration replaces the existing workgroup configuration on your system.

Workgroup creation begins after all specifications within the file have passed a syntax and semantic check. Furthermore, the system will consider the creation an atomic operation, i.e, either all workgroups within the file are created or none are. Once all workgroups are created, a system-wide scan is performed to determine workgroup membership.

The specification for an individual workgroup is given below. The parameters shown match those described when using the command line. The POSITION parameter is not valid within the indirect file, since a workgroup's position in the ordered list of workgroups is determined by its position within the file.

   

   Workgroup     = workgrp

   ;Memb_Logon   = logon

   ;Memb_Program = program_file

   ;Memb_Queue   = queue_attribute

   ;Base         = base

   ;Limit        = limit

   ;MinQuant     = min

   ;MaxQuant     = max

   ;Boost        = {DECAY | OSCILLATE}

   ;Timeslice    = tslice

   ;Mincpupct    = minpercent

   ;Maxcpupct    = maxpercent

You must specify the workgroup name, at least one membership parameter, and the base and limit parameters. Multiple specifications are permitted within a parameter. Use commas as delimiters and an "&" or Return to indicate the continuation of a specification onto a new line. Parameters that you do not specify are assumed matches. For example, if you only specified MEMB_QUEUE=(CS), the workgroup would capture all processes with the CS queue attribute (with any logon, running any program). Since only the MEMB_QUEUE category has been specified, the other categories are assumed matches.

Only BASE and LIMIT are required scheduling parameters. The others are optional and will be set to default values unless explicitly changed.

The example above shows each parameter on a new line. However, the entire workgroup specification may reside in one physical record. The only restriction is that you cannot have two workgroup specifications in the same physical record.

You may "comment out" a specification by using the COMMENT keyword, as shown below. Characters appearing on the same line and after the COMMENT keyword are ignored.

   

   COMMENT  Workgroup     = Old_Finance_WG

   COMMENT  ;Memb_Logon   = @.TEST

   COMMENT  ;Memb_Program = EDITOR.PUB.SYS

   COMMENT  ;Memb_Queue   = ES

   COMMENT  ;Base         = 200

   COMMENT  ;Limit        = 230

   COMMENT  ;MinQuant     = 200

   COMMENT  ;MaxQuant     = 1000

   COMMENT  ;Boost        = DECAY

   COMMENT  ;Timeslice    = 400

   COMMENT  ;Mincpupct    = 20

   COMMENT  ;Maxcpupct    = 30
NOTE: Before you invoke the NEWWG command and specify an indirect file to replace workgroups, you may want to use the SHOWWG command and redirect the output to create an ASCII file that describes the existing configuration. For example, to create an ASCII file named "currwg" enter:
   

   :SHOWWG @; format=wgfile > currwg

   :SAVE currwg

Substitute a file name of your own choosing, and make certain that it is unique. If you want to use a name that's longer than 8 characters, for example, current_workgroups, precede it with ./ to indicate HFS syntax.

OPERATION

The system manager creates workgroups to reflect a partitioning of the system workload and control the allocation of the CPU to user processes on the system. There is essentially no hard limit to the maximum number of workgroups that a system may have. The system will always be configured with five default workgroups, which exist to support system processes and to provide backward compatibility.

Each workgroup consists of three components, a name, membership criteria, and scheduling characteristics. The membership criteria (MEMB_LOGON, MEMB_PROGRAM and MEMB_QUEUE parameters), determine process assignment. Workgroup assignment is made at each process create, and whenever one of the process attributes on which membership can be based is changed, and when workgroups are purged or new workgroups created. Membership conflicts are resolved by keeping the workgroups in an ordered list. A process is assigned to the first workgroup whose membership criteria is matched. That is, a first-fit algorithm is used. Once a match is found, no other workgroups are considered. Therefore, order your workgroup specifications from those with the most precise membership criteria to those with more general membership criteria.

The scheduling characteristics define the scheduling policies which govern processes within the workgroup. The MPE/iX Dispatcher is priority-driven, giving a CPU to the highest priority process that is ready to run. Each workgroup has a base and a limit, defining the priority range for processes within that workgroup. Processes will begin their Dispatcher transactions at the base priority and decay towards the limit priority as they consume system resources. The process priority will never drop below the limit of the workgroup. If the boost property of the workgroup is set to oscillate, the process priority will be reset to the base priority when it decays to the limit priority. Processes completing Dispatcher transactions (typically via a terminal read) are reset to the base priority.

Each of the five system-defined workgroups represents one of the five scheduling subqueues, AS, BS, CS, DS and ES. Their only membership criteria is the scheduling queue attribute. For example, the AS_Default workgroup has as its membership criteria MEMB_QUEUE=AS. These workgroups appear last in the ordered list so that the Scheduler can guarantee that all processes will be assigned to a workgroup.

The user-defined workgroups can control all user processes. System processes, however, are placed in one of the five default workgroups and handled appropriately by the Scheduler. The system manager can customize the characteristics of the default workgroups to reflect the CPU scheduling needs of the various components of the system workload.

The SHOWWG command offers a format option, WGFILE, whose output has a format suitable as input to NEWWG. You may use CI I/O redirection to place the output from SHOWWG into a file. For example, SHOWWG @;FORMAT=WGFILE > filename, and then issue the SAVE command to save it.

Creating a new workgroup can affect the workgroup assignment of existing processes. The NEWWG command forces the Scheduler to scan all processes on the system and adjust their workgroup membership as necessary. This is referred to as a system-wide scan. As a result, there is a performance advantage in using an indirect file, since it allows you to define multiple workgroups and, once all workgroups have been created, performs a single system-wide scan.

The NEWWG command may be issued from a session, job, program or in BREAK. Pressing Break has no effect on this command. NEWWG requires System Supervisor (OP) or System Manager (SM) capability.

The following default settings are established when the system is booted from the system disk (a START RECOVERY or START NORECOVERY), unless the user has customized a workgroup configuration.

Table 5-1 Default Workgroup Settings After a System Start

Setting:AS_DefaultBS_DefaultCS_DefaultDS_DefaultES_Default
base13100152202240
limit99150200238253
minN/AN/A120002000
maxN/AN/A200020002000
boostN/AN/ADECAYDECAYDECAY
tslice10001000200200200
mincpupctN/AN/AN/AN/AN/A
maxcpupctN/AN/AN/AN/AN/A

 

NOTE: Processes within the workgroup are not constrained to have their priorities fall within the specified base and limit values. N/A refers to the fact that the scheduling characteristic is Not Applicable for the system-defined workgroup. For example, processes within the AS_Default or BS_Default workgroup (usually system processes) do not experience decay. Therefore, these workgroups do not support the concept of a quantum or boost priority. Also, CPU percentages are not available for the default workgroups; they apply only to user-defined workgroups.

EXAMPLE

The following example creates a user-defined workgroup named Program_Development:

   

:NEWWG Program_Development; memb_program= (editor.pub.sys,&

qedit.@.@, hpedit.@.@);memb_logon=("nm@,@.mytest"); base=&

160; limit= 170; boost= oscillate

Or, using positional parameters instead of keywords, you would enter:

   

:NEWWG Program_Development, "@nm@,@.mytest",&

(editor.pub.sys,qedit.@.@,hpedit.@.@),,160,170,,,oscillate

The membership criteria must appear in the order MEMB_LOGON, MEMB_PROGRAM and MEMB_QUEUE when the keywords are not specified. In the preceding example, since MEMB_QUEUE isn't specified, a comma is used as a placeholder. The ampersand character (&) appears at the end of the command lines in the examples above to indicate continuation. If you type the command on one single line (so that it wraps), omit the ampersand.

This workgroup has a base priority of 160, a limit of 170, the default minimum and maximum quantum of 1 and 2000 milliseconds, an oscillating boost property, and the default timeslice of 200 milliseconds. The membership criteria requires a program of editor.pub.sys or qedit.@.@ or hpedit.@.@, AND a logon equal to nm@,@.mytest. This workgroup will be appended to the end of the user-defined workgroups.

To create a second workgroup, ahead of the workgroup in the previous example, enter:

   

:NEWWG Program_Test; memb_logon= (@.test); base= 175;&

limit= 190; boost= oscillate; position= Program_Development

This workgroup has a base priority of 175, a limit of 190, the default minimum and maximum quantum of 1 and 2000 milliseconds, an oscillating boost property, and the default timeslice of 200 milliseconds. The membership criteria requires a logon equal to @.test.

To validate the indirect file spec1.workgrp.system for correctness (without invoking the changes), enter:

   

   :NEWWG ^spec1.workgrp.system; validate

To have NEWWG replace the current workgroup configuration with the workgroups specified in spec1.workgrp.system, enter:

   

   :NEWWG ^spec1.workgrp.system

Related Information

Commands

ALTWG, PURGEWG, SHOWWG, TUNE, SHOWQ, ALTPROC, SHOWPROC

Manuals

MPE/iX Intrinsics Reference Manual (32650-90028)

Feedback to webmaster