Computer Corporation of America
|
Feedback
Search CCA:
   
USA CCA
CCA Products
CCA Customer Support
CCA Resources
CCA - Company
CCAPRINT: A Newsletter for Model 204® and System 1032® Users
April, 10, 2002

Model 204
Tracking Transactions for Performance: Part 1

By James Damon

Over the past several months, Iíve written several articles about collecting performance statistics, automating the collection of those statistics, and simulating multi-user environments as a way to generate performance statistics in a controlled environment. What I havenít discussed until now is which of the statistics are the most helpful in analyzing performance and what do they say about performance in your environment.

Youíve gone to the trouble of collecting this data because youíve wondered or youíve been asked by others to answer some very basic questions about your environment.

How well is your system tuned?
How many transactions per second do you process?
What does an average transaction cost?
Whatís the average response time an end-user sees? What kind of response times do end users see?
If you change a CCAIN parameter, reorganize a file, or enhance an application, how can you tell what effect the change had on performance and response time?
What kinds of resources does Model 204 require?

These are the kinds of questions managers, directors and capacity planners often ask. The answers are available from Model 204.

Identifying a Unit of Work

The first step in measuring performance is to determine what constitutes a unit of work in your environment. Once you have a count of the number of units of work processed, you can use other statistics to compute costs and response times.

As seen by the end-user in a Model 204, full-screen APSY environment, a unit of work or transaction is the work that occurs between one screen display and the next. Regardless of whether the unit of work is update or read-only, it is counted as a transaction.

The work that occurs between two READ SCREEN statements might look something like the following in User Language pseudo code:

    BEGIN
   

Define screens and variables
READ SCREEN ABC - Collect data from user

START TRANSACTION  
- User presses ENTER or PFKEY
|----   Find records
  |   Extract data
  |   Perform calculations
  |   Cross reference to other files and do FINDs
  |   Continue in next APSY procedure
  |   END
  |  
  |   BEGIN
  |  
CHANGE, STORE, and so on start update transaction
  |  
COMMIT end update transaction
  |----   READ SCREEN XYZ display next screen
END TRANSACTION
   
    Continue
    END

 

Understanding the SCREENS statistic

Between the two screen displays a certain amount of processing occurs. CPU is consumed to get the user from START to END. Some database I/O and CCATEMP I/O occurs. It is possible that the end-user is swapped to CCASERVR between START and END statements. Also, record and resource locking might introduce some delays, as will device and channel contention and contention for CPU.

This between-screens type of transaction is counted in the SCREENS statistic. Whenever a User Language READ SCREEN statement is evaluated, the SCREENS statistic is incremented by one. If the Online consists primarily of APSY or even non-APSY, full-screen applications then the SCREENS statistic provides a direct count of the number of those kinds of transactions processed. This statistic is maintained separately for each user, each application, and as a cumulative statistic for the entire run.

The SCREENS statistic is available at the end of the run in CCAAUDIT as part of system-final statistics. You can also view it at any time during the run by issuing a MONITOR STAT command. The SCREENS statistic, when combined with several others, can give an extremely accurate picture of performance for the run as a whole or for the run up to any point in time when the MONITOR STAT command is used.

To see how you might use this at your site, consider the following statistics collected recently from an end-of-day CCAAUDIT at a large customer site:

CPU=95732379   CNCT=83688
DKRD=120253771   DKWR=29320411
SVRD=619713   SVWR=623193
SCREENS=2470563    

Evaluating a set of statistics

With this small subset of end-of-run statistics, you get a clear picture of workload and performance in this environment.

You know from the data available that:

  1. The run was up for a total of 23.25 hours, because
  2. CNCT = 83688 seconds

  3. The run processed 2.47M full-screen transactions, because

SCREENS = 2470563

For the sake of this discussion, assume that User Language, full-screen transactions are the only type of transaction processed in this system. Then you can also draw the following conclusions:

  1. The transaction rate was 30 transactions per second (TPS), because
  2. (SCREENS/CNCT)

  3. The average transaction consumed 38.75ms of CPU; because
  4. (CPU/SCREENS)

  5. The average transaction performed 60.5 database and CCATEMP I/Os, because
  6. (DKRD+DKWR) / SCREENS

  7. The average transaction incurred .5 swaps to or from CCASERVR

(SVRD+SVWR) / SCREENS

Establishing Benchmarks

Once you have a raw or derived number, you have a transaction count that you can use as a benchmark for measuring subsequent changes in performance. These performance changes might result from changes in system or CCAIN parameters or from application or file changes. The only way to know if those changes had an effect is to measure transaction performance in the new environment using a benchmark transaction count.

Assessing Other Units of Work

In reality, other types of transactions are processed in an Online while the screen-to-screen transactions are occurring. For example, there might be BATCH2 threads, Horizon threads, background tasks doing file backups, and other types of processes that do not employ the READ SCREEN statement. Those processes all consume resources. How then, do we define a transaction in those instances? This is where measuring performance becomes more challenging.

There is no clear-cut definition of a transaction for these units of work. If you simply ignore them, then you are averaging the resources they consumeóCPU, database I/O, server swapping and othersóacross the quantifiable APSY, full-screen transactions, which gives a less than accurate picture of transaction performance.

Coming attractions

It is difficult to determine which statistic to consider when attempting to factor these other units of work into the transaction metric. Should we consider FINDS, RECADD, RECDEL, RECDS, or other statistics as other types of transactions? If so, do we end up double counting certain kinds of transactions?

Weíll explore those issues and others in the next CCAPRINT.

System 1032
Locating System 1032 Files

By Tym Stegner

For the past two months, I've discussed dataset maintenance and dataset damage detection. By now, I expect several sites are looking over their existing processes for dataset maintenance, or are considering creating processes to do so.

One thing that would help is the ability to locate all the System 1032 datasets and related files on the system. As System 1032 isn't locked in to the formal DBA management of a user's datasets, after a few years it may be difficult to locate all the System 1032-created files on your system.

While you are very familiar with DMB, DMC, DMD, and DMS files (database, command, definition, and dataset files, respectively), System 1032 actually creates a number of files, ranging from DMB, a database catalog, through DMW, a System 1032/REQuest description file. The full list of System 1032-related file types, all with an extension that begins with DM, can be found on pages 9-10 of the System 1032 Programmer's Reference Manual, Module II.

Although you can easily locate DMS and DMB files on your system, it is more difficult to locate them across more than one disk. Furthermore, if you have many disks, it is a nuisance to list all the disks you want to consider and to know which disks should be considered. You need the DM_SCAN utility.

Introducing DM_SCAN

Executing the DM_SCAN utility with its default settings locates and lists (to a file) every System 1032-created file, except .LIS and .RPT files, on all disks present in your cluster. Other capabilities include automatic dataset damage detection, and creation of DMC files to open located datasets.

Executing the DM_SCAN utility without any parameters invokes its help text. The help text begins with a list of System 1032 file extensions with explanations. The following syntax is for the DM_SCAN utility:

System 1032 file extensions:

.DMB - Database container

  .DMC - PL1032 command script
.DMD - Container definition   .DME - Bulk IO error log

.DMF - ASCII image of Form

  .DMI - Bulk data input

.DMJ - Dataset journaling

  .DMK - Dataset keys
.DML - Library container   .DMO - Bulk data output

.DMP - Shared IC storage*

  .DMR - Dataset records

.DMS - Dataset container

  .DMT - System 1032 temporary

.DMU - Extra damage history

  .DMV - Saved selection set

.DMW - Request report

   

*May not be in use on your system

DM_SCAN command syntax:

@DM_SCAN {ALL|DMS|[{-L...|-X...}]}

-
!p1- Extensions

[{ALL|list}] -

  !p2- Disks

[{action(s)|ALL}] -

  !p3- Tasks to perform

[options]

  !p4+ Task options

P1 ALL

  = All System 1032 file extensions

P1 DMS

  = Only .DMS extensions

P1 -L...

  = Locate only these exts (from valid list)

P1 -X...

  = Exclude these exts from valid list
    *** Required parameter ***

P2 ALL

  = All file-oriented disks [default]

P2 list

  = only these disk(s) (comma delimited)

P3 action
= DM_SCAN action (Add values for multiple actions)
  1 - List
[Default, if nothing else selected]
  2 - Check datasets for Damage
(Only DMS files)
  4 - Create DMC to open datasets
(Only DMS files)
P3 ALL = Shorthand for all actions
(Action=7)

P4+

Options

= Per action settings

[Default]
  -D... - Damage check logfile name
[CheckDam.RPT]
  -F... - DMC file name
[OPEN[_nn].DMC]
  -L... - Listing file name
[DMFILES.RPT]
  -N... - Number of OPEN commands per DMC file
[0=unlimited]
   
(Creates multiple DMC files if required)
 

The DM_SCAN utility takes three primary parameters and four optional parameters. The P1 parameter controls which of the System 1032 file extensions to locate. Parameter P1 is the only required parameter. The other parameters have a default value, if nothing is specified.

Note: The DM_SCAN utility uses the F$SEARCH DCL lexical function to scan for "*.DM%*", filter the results, and perform the required actions on the qualifying files. The number of files present on your system determines how long the scan takes.

Extension Parameter P1

The P1 parameter value, ALL, directs the DM_SCAN utility to locate all System 1032-related files. The DMS parameter value limits the scan to only dataset files. The -L or -X option of P1 lets you manipulate the default extension list.

-L precedes a list of only those file extensions you want to locate.
-X precedes a list of file extensions to exclude from the default list.

Note: -L and -X are mutually exclusive; you cannot both include and exclude file extensions. Extensions listed in -L or -X are validated against the default extension list.

For example, to locate the basic System 1032 catalog files, you would execute DM_SCAN as follows. The period separators are required.

$ @DM_SCAN -L.DMB.DML.DMS ALL ALL

Disk Parameter P2

The P2 parameter controls which disks are searched for the file extensions listed in the parameter P1.

By default, and if the ALL parameter value is specified, all file-oriented disks in the current cluster are searched. You can limit the file scan to a particular disk or to a list of disks by specifying the disk name(s) as a comma-delimited list.

For example, to locate System 1032 files on only a disk named CHECKOUT, issue the following command:

$ @DM_SCAN ALL DISK$CHECKOUT: 1

Action Parameter P3

In addition to the basic listing capability [action=1], the DM_SCAN utility can also perform two other tasks:

Checking System 1032 datasets for damage [action=2]. For more information, please see the CCAprint article Locating Dataset Damage.
Creating System 1032 DMC files to open located datasets [action=4]. By default, and if not specified, DM_SCAN creates a listing file.

You can also specify ALL to indicate all possible tasks.

The action parameter values are read as a bitmask, which enables one or more of the actions to be performed simultaneously by adding the action values together. For example, to create a listing of dataset files on the TESTING1 disk, and also checking damage on those datasets, you would use the following command:

$ @DM_SCAN DMS DISK$TESTING1: 3

The listing action is value 1; the damage check is value 2; the total is 1 + 2 = 3.

Action Options Parameter P4+

The DM_SCAN utility has several outputs for its functionality. These values have defaults, which can be overridden.

Task ActionValue   Default file   Override Option
Listing   1   DMFILES.RPT   -L{filename.type}
Damage Check   2   CHECKDAM.RPT e}   -D{filename.typ
OPEN cmd   4   OPEN[-n].DMC   -O{filename-only}
        #lines per file -N{#}    

You can specify the options in any order, beginning at P4.

Availability

The DM_SCAN utility is available As-Is via anonymous FTP from FOX.CCA-INT.COM, subdirectory [.CCAPRINT] to help you locate the datasets and other System 1032-related files your end-users created.

Copyright © 2008 Computer Corporation of America.
All right reserved. Published in the United States of America.


Contact CCA Webmaster
Copyright 2008