z/OS MVS Planning: Global Resource Serialization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Viewing system performance

z/OS MVS Planning: Global Resource Serialization
SA23-1389-00

The cause of a response time problem that shows up either as an increase in interactive user response time or an increase in the time it takes to complete a batch job, is sometimes difficult to pinpoint. One way to obtain a very useful end user view of performance is to code a program that issues repetitive global resource requests (ENQ macros with a scope of SYSTEMS) and measures the elapsed time required for a response.

Figure 2 shows an example of how to invoke a program that measures request response time from the perspective of the problem program issuing the request. You can take repetitive samples, allowing you to analyze response time over a longer period. The program, GENQRESP, is provided in SYS1.SAMPLIB(ISGNQRSP). You will need to ensure that G.SAMPLES DD is appropriate for your installation.

The program uses STIMER to suspend itself for a user-specified interval. When the interval has expired, the program issues an ENQ with a scope of SYSTEMS for a nonexistent resource. The program notes the value of the system TOD clock before issuing the ENQ request and again when control returns. The difference between the two values is the global resource request response time. The program then frees the resource and repeats the request.

The GENQRESP program encounters the same contention for the processor and storage as does any other problem program in your system. Thus, even after the system grants the global resource request, the program might not receive control immediately because of other factors, such as waiting for the processor, paging, or swapping. To ensure that the response time GENQRESP measures is as close as possible to the actual response time:

  1. It is a good idea to run GENQRESP on a lightly-loaded system. Run the program on the system in the global resource serialization complex that has the lightest workload to minimize the effect of dispatching, paging and swapping delays on the results. Also, try to run the program each time under the same set of conditions. That is, come as close as you can to ensuring that the system is processing the same workload each time you run the program.
  2. Run GENQESP at a dispatching priority that matches the component or subsystem you are analyzing (CATALOG, CICS®, BATCH, ON-LINE, and others).

Use the RNL=NO keyword to prevent the alteration of the requested ENQ's SCOPE and to insure that global resource serialization processes a GLOBAL ENQ. When specifying the default of RNL=YES, the resulting SCOPE can be altered by the RNL, installation exit, or an alternate method of serializing global resources. You can have different versions of GENQRESP to use RNL=NO or RNL=YES. Use these to measure the differences between having the ENQ altered and managed by another serialization method and Global Resource Serialization. You can also use the ISGENQ macro TEST=YES option to determine if the ENQ issued is being altered, managed, or both by alternate serialization methods.

Figure 1 shows an example of the output of GENQRESP.

Figure 1. Sample Output of GENQRESP

    TOD CLOCK                ENQ TIME (IN U-SEC)

0A2CC4DDE984EAB1              00000000011336

0A2CC4DDE9D9F421              00000000008485

0A2CC4DDEA239931              00000000014236

0A2CC4DDEA856D41              00000000014689

0A2CC4DDEAE7DA41              00000000006145

0A2CC4DDEB28D4A1              00000000007376

0A2CC4DDEB6E86D1              00000000012141

0A2CC4DDEBC6B451              00000000008454

0A2CC4DDEC182481              00000000006383

0A2CC4DDEC59CCD1              00000000010125
Figure 2. Measurement Program Example

//GENQRESP  JOB accounting information...
//*
//* THE NUMBER OF REQUESTS TO ISSUE BEFORE TERMINATING AND THE INTERVAL
//* BETWEEN REQUESTS ARE SPECIFIED AS CONSTANTS IN THE CODE.
//*
//* THE OUTPUT DATASET, DD 'SAMPLES', HAS THE FOLLOWING FORMAT:
//*
//* START   END
//* COL     COL   FORMAT             DESCRIPTION
//*-----   -----  ------   ---------------------------------------------
//*  1      16   TODCLOCK  TOD CLOCK VALUE WHEN ENQ WAS ISSUED
//* 31      44   DECIMAL   RESPONSE TIME FOR GLOBAL ENQ REQUEST
//*                        IN MICROSECONDS (1 SECOND = 10**6 MICROSECOND
//*
//* BECAUSE THE PROGRAM SAVES ONLY 32 BITS OF THE TOD CLOCK, RESPONSE
//* TIMES LONGER THAN ABOUT ONE HOUR ARE NOT RECORDED CORRECTLY.
//*
//* FOR THE MOST CONSISTENT RESULTS, ASSIGN THIS JOB TO A DOMAIN
//* WITH A MINIMAL MPL HIGH ENOUGH TO KEEP IT FROM BEING SWAPPED.
//*
//STEP 1 EXEC ASMHCLG,PARM.L='MAP,LIST,NET,NCAL',
// REGION.L=400K
//C.SYSPUNCH DD DUMMY
//C.SYSIN   DD DSN=SYS.SAMPLIB(ISGNQRSP),DISP=SHR
//C.SYSIN   DD *
        ENTRY GENQRESP
/*
//G.SAMPLES DD DSN=yourhlq.ENQRESP.DATA,
// UNIT=SYSDA,
// DISP=(NEW,CATLG),
// DCB=(LRECL=80,BLKSIZE=3200, RECFM=FB),
// SPACE=(CYL,(1,1))

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014