DAL For AS/400 & SNA■ps 5250: Improve Performance

  • Last Modified: July 31, 2000
  • Article: TA29594
  • Old Article: 12498
This article covers two items which can be done to the configuration of an AS/400 which will improve the performance of SNA*ps 5250 and DAL for The AS/400.
AS/400 Process Overview
To understand these configuration changes, it is helpful to review how these products are connected externally and internally with the AS/400. Both SNA*ps 5250 and DAL use APPC sessions which are Prebound-Contention Winners that are provided through a SNA*ps Gateway connection. The physical connection to the AS/400 is via a Token Ring or SDLC line
attachment. Since this is an APPC connection and the SNA*ps gateway is in a Peer-to-Peer relationship, the Macintosh client applications make a call to a transaction program which is available on the AS/400. SNA*ps 5250 calls the Display-Station Passthru program while DAL for the AS/400 calls the DALSERVER.

The AS/400 is divided up into subsystems which receive and manage work for the system and users. The major subsystems are QBATCH, QINTER and QCMN. QBATCH manages all batch processing jobs running in the AS/400. The QINTER subsystem is used by all interactive jobs such as terminal emulation and print emulation. When SNA*ps 5250 is logged onto the AS/400, an interactive job is running in the QINTER subsystem. The QCMN subsystem is used by the APPC connections to the AS/400. These include DAL for the AS/400, SNA*ps 5250, and PC Support (for IBM PCs). Any client application which makes a program call via an APPC link, has to first be managed by QCMN and have a job assigned to the process.

When SNA*ps 5250 requests the Display Station Passthru request to the AS/400, QCMN deals with the request. Once the user logs on the AS/400, a second job is started in the QINTER subsystem which manages that part of the user process. So with SNA*ps 5250, there are two AS/400 jobs running, one in QCMN for APPC and one in QINTER for the interactive terminal process.

When DAL for the AS/400 requests a connection to the AS/400, a call to the DALSERVER is made and the QCMN subsystem manages the entire job. The DAL client user logs on to the DALSERVER using AS/400 security for validation but a DAL session is always an APPC session on the AS/400 and does not create a second interactive job to support the process like SNA*ps 5250.

So you can see the QCMN subsystem is very important to the operation and performance of both DAL and SNA*ps 5250. There are two entries in the QCMN subsystem which can be altered to better optimize performance: routing entries and prestart job entries.

Based on how QCMN is configured for routing entries, a Class gets assigned to the process. A class contains parameters that control the running of a routing step. The Class defines the overall Run Priority of the job in the AS/400. The rating for Run Priority ranges from 1 (very high availability of the AS/400 resources to the job) to 99 (very low availability of AS/400 resources to the job). The Class also defines the Time Slice of the AS/400 that is assigned to the job. Time Slice is defined as a maximum amount of processor time, in milliseconds, given to the job before other jobs are given the opportunity to run. The time slice establishes the amount of time needed by the job to accomplish a meaningful amount of processing. At the end of the time slice, the job might be put in an inactive condition so that other jobs can become active. The larger that Time Slice value, the more processor time can be assigned to the job before other jobs step in. The range of Time Slice is 1000 to 10,000 milliseconds.

The Prestart job entries allow the QCMN subsystem to be prepared to run a large program, such as, the DALSERVER. A Prestart job can have a Class with a higher Run Priority than the default values given the routing entries in the Subsystem.

Changing Routing Entries Details For SNA*ps 5250

QCMN Routing Entries

If a DSPSBSD AS/400 command is done for the QCMN subsystem, the following screen appears:

Subsystem description: QCMN Library: QSYS
Status: ACTIVE

Select one of the following:

1. Operational attributes
2. Pool definitions
3. Autostart job entries
4. Work station name entries
5. Work station type entries
6. Job queue entries
7. Routing entries
8. Communications entries
9. Remote location name entries
10. Prestart job entries

* Select option 7, Routing Entries:

>>>>>>>>>>>>>>>>>>>>>>>>>>
                                                                    Start
Opt    Seq Nbr    Program       Library       Compare Value            Pos
         50      *RTGDTA                     'QVPPRINT'               37
        100      *RTGDTA                     'QTFDWNLD'               37
        150      *RTGDTA                     'QMFRCVR'                37
        180      *RTGDTA                     'QPAPAS'                 37
        200      *RTGDTA                     'QMFSNDR'                37
        210      *RTGDTA                     'QHQTRGT'                37
        220      *RTGDTA                     'QRQSRV'                 37
        230      *RTGDTA                     'QPCSUPP'                37
        250      *RTGDTA                     'QCNPCSUP'               37
        275      *RTGDTA                     '#INTER'                  1
        300      *RTGDTA                     'PGMEVOKE'               29

325 *RTGDTA 'QPCSUPP' 1
350 *RTGDTA 'RSCLIB47' 1

>>>>>>>>>>>>>>>>>>>>>>>>>>

The Sequence numbers are in order of system searches for a match in the program call to the subsystem. The program call is in the form of a call record which is character start position oriented. The word PGMEVOKE always appears starting in column position 29 followed by the actual name of the program in start position 37. The routing entries shown above have
two entries which are found in OS/400 V2R2M0 and important to SNA*ps and DAL. Sequence number 300 is a generalized matching entry, supplied by IBM, for any PGMEVOKE with a name that does not match any of the specific names found starting in position 37. The routing entry with sequence number 180 was added to catch the Display Station Passthru call from SNA*ps 5250 to the QCMN subsystem. Before the addition of sequence 180, the call was routed based on the entry with sequence number 300. Lets look at the differences between these two entries.

Sequence number 300:

Routing entry sequence number . . . . . . . : 300
Program . . . . . . . . . . . . . . . . . . : *RTGDTA
Library . . . . . . . . . . . . . . . . . :
Class . . . . . . . . . . . . . . . . . . . : QBATCH
Library . . . . . . . . . . . . . . . . . : QGPL
Maximum active routing steps . . . . . . . : *NOMAX
Pool identifier . . . . . . . . . . . . . . : 1
Compare value . . . . . . . . . . . . . . . : 'PGMEVOKE'

Compare start position . . . . . . . . . . : 29

The Class for this entry is QBATCH which is IBM supplied and has a Run Priority of 50. The Time Slice is 5000 milliseconds. This is lower than any PC Support process which runs with Priority 20.

Now lets look at the Sequence number 180 entry:

Routing entry sequence number . . . . . . . : 180
Program . . . . . . . . . . . . . . . . . . : *RTGDTA
Library . . . . . . . . . . . . . . . . . :
Class . . . . . . . . . . . . . . . . . . . : QWCPCSUP
Library . . . . . . . . . . . . . . . . . : QGPL
Maximum active routing steps . . . . . . . : *NOMAX
Pool identifier . . . . . . . . . . . . . . : 1
Compare value . . . . . . . . . . . . . . . : 'QPAPAS'

Compare start position . . . . . . . . . . : 37

The Class for this entry is QWCPCSUP which is IBM supplied and has a Run Priority of 20. This is the same as that of any PC Support process and places the SNA*ps 5250 workstation function at the same performance threshold as PC Support. The Time Slice is 500 milliseconds which is adequate for interactive sessions like SNA*ps 5250.

If the SNA*ps 5250 program call is made to a standard set of entries in QCMN, the results would be to use the QBATCH Class which would perform slower than a PC Support WorkStation Function emulation.

If the user logs on to the AS/400, then a job starts in the Interactive Subsystem or QINTER. All jobs managed by the QINTER subsystem use the QINTER Class. This Class has a Run Priority of 20 and a Time Slice of 2000 milliseconds. From this we can see that a SNA*ps 5250 connection will be running with priority 20 in the QINTER subsystem but then have to wait, on a busy machine, for time to complete the data transfer through the QCMN subsystem since it has a priority of 50 there. PC Support 5250 sessions do not have this delay since both jobs running on their behalf have priority of 20. (Remember 20 is better than 50.)

How to add the Routing entry to QCMN subsystem for SNA*ps 5250:

In order to configure the QCMN routing entries to improve performance on heavily loaded machines do the following steps. Log on as QSYSOPR or QSECOFR. Be sure all users on the QCMN subsystem have been warned with a broadcast message that the subsystem will be going down and all passthru sessions will be terminated. Stop the QCMN subsystem at the AS/400 console. Enter the following command on the command line:

ADDRTGE SBSD(QCMN) SEQNBR(180) CMPVAL(QPAPAS 37) PGM(*RTGDTA) CLS(QWCPCSUP)

The Sequence number has to be a number which is not currently in use by the subsystem. The compare value is the name QPAPAS which is the name of the Passthru program in the PGMEVOKE call. The class QWCPCSUP is an IBM supplied Class with Run Priority of 20. However, a new Class could be configured with a different Run Priority than 20 but this is not really necessary.

Changing Routing Entries For DAL For The AS/400
The DAL Server call is made to the routing entries of the QCMN subsystem just like the SNA*ps 5250 Passthru call. The DAL call is routed through the generalized PGMEVOKE 29 location and acquires the Class of that routing entry. The IBM default for this routing entry is QBATCH Class which has Run Priority 50. If DAL is compared with a PC Support connection (Run
Priority 20 which is higher and therefore providing better service), DAL will come out slower that any PC Support driven process. One fix is to change the Class of the PGMEVOKE 29 routing entry to something with a Run Priority of 20. This may not be the best solution for the overall AS/400 since all program calls which are only qualified by PGMEVOKE will be given an interactive process Run Priority. DAL as an interactive process should be running with at least a Run Priority of 20.

Adding A Prestart Job For DAL In Subsystem QCMN

As an alternative to altering the Class of the PGMEVOKE 29 routing entry, it makes more sense to define a new Class, like DALCLS and define a Run Priority and Time Slice that makes sense. Use the CRTCLS AS/400 command and a Prompt Key and use the following as an example:

>>>>>>>>>>>>>>>>>>>>

                          Display Class Information
                                                        System:  APPLE SR
Class . . . . . . . . . . . . . . . . . . . . . . :   DALCLS
  Library . . . . . . . . . . . . . . . . . . . . :     QGPL
Run priority  . . . . . . . . . . . . . . . . . . :   20
Time slice in milliseconds  . . . . . . . . . . . :   3000
Eligible for purge  . . . . . . . . . . . . . . . :   *YES
Default wait time in seconds  . . . . . . . . . . :   30
Maximum CPU time in milliseconds  . . . . . . . . :   *NOMAX
Maximum temporary storage in K bytes  . . . . . . :   *NOMAX

Text  . . . . . . . . . . . . . . . . . . . . . . :   Class for DALServer

>>>>>>>>>>>>>>>>>>>>

Notice the Run Priority of 20 (more like interactive) and Time Slice of 3000 milliseconds (more like a batch process).

Next, a Prestart Job should be added to the QCMN Subsystem. Enter an ADDPJE command on the AS/400 and the Prompt Key. The example below should be used as a template to fill in the screen:

>>>>>>>>>>>>>>>>>>>>

                     Display Prestart Job Entry Detail
                                                        System:  APPLE SR
Subsystem description:   QCMN           Status:   ACTIVE


Program  . . . . . . . . . . . . . . . . . . . . :   DALSERVER
 Library  . . . . . . . . . . . . . . . . . . . :     DALLIB
User profile . . . . . . . . . . . . . . . . . . :   QUSER
Job  . . . . . . . . . . . . . . . . . . . . . . :   DALSERVER
Job description  . . . . . . . . . . . . . . . . :   *USRPRF
 Library  . . . . . . . . . . . . . . . . . . . :
Start jobs . . . . . . . . . . . . . . . . . . . :   *YES

Initial number of jobs . . . . . . . . . . . . . :   3
Threshold  . . . . . . . . . . . . . . . . . . . :   2
Additional number of jobs  . . . . . . . . . . . :   2
Maximum number of jobs . . . . . . . . . . . . . :   *NOMAX
Maximum number of uses . . . . . . . . . . . . . :   200
Wait for job . . . . . . . . . . . . . . . . . . :   *YES
Pool identifier  . . . . . . . . . . . . . . . . :   1
Class  . . . . . . . . . . . . . . . . . . . . . :   DALCLS
 Library  . . . . . . . . . . . . . . . . . . . :     QGPL
 Number of jobs to use class  . . . . . . . . . :     *CALC
Class  . . . . . . . . . . . . . . . . . . . . . :   *NONE
 Library  . . . . . . . . . . . . . . . . . . . :
 Number of jobs to use class  . . . . . . . . . :     *CALC

>>>>>>>>>>>>>>>>>>>>

The most important entries on this screen are:

1) Program name - DALSERVER
2) Library Name - DALLIB is the DAL install default
3) Initial number of Jobs should be kept at the default of 3
4) The Additional number of Jobs should be kept at 2 which is the value used to determine how many additional jobs to start after the initial number are started and used.
5) Maximum number of jobs stays at *NOMAX
6) The Class should be DALCLS which is in library QGPL. This is the Class we just created for the DALSERVER and it will be used with the Prestart Job entry in Subsystem QCMN.

When the DAL process starts now, it will start faster and have a Run Priority of 20 which will place it on the same level as PC Support and Showcase VISTA, an AS/400 database query tool, which is competing with DAL.

Let's test this enhancement for DAL. If we connect a DAL client to the AS/400 and then do a WRKACTJOB on the AS/400, we see that a job has been started for the DALSERVER as a PJ (Prestart Job) in Subsystem QCMN.

>>>>>>>>>>>>>>>>>>>>

Opt  Subsystem/Job  User        Type  CPU %  Function        Status
    QBATCH         QSYS        SBS      .0                   DEQW
    QCMN           QSYS        SBS      .0                   DEQW
      DALSERVER    QUSER       PJ       .0                   CPCW  <<<DAL

      TKNAXTC      XCOM        EVK      .0  *  -PASSTHRU     EVTW
    QCTL           QSYS        SBS      .0                   DEQW
      QSYSSCD      QPGMR       BCH      .0  PGM-QEZSCNEP     EVTW
    QINTER         QSYS        SBS      .0                   DEQW
      QPADEV02     QSECOFR     INT      .0  CMD-WRKACTJOB    RUN
    QSPL           QSYS        SBS      .0                   DEQW

>>>>>>>>>>>>>>>>>>>>

If we work with the details for DALSERVER connection (option 5) and then display the run attributes of the Job (option 3), we see that the DALSERVER now has the Class privileges of DALCLS (RP of 20 and TS of 3000 ms):

>>>>>>>>>>>>>>>>>>>>

Job:   DALSERVER      User:   QUSER          Number:   019163

Run priority  . . . . . . . . . . . . . . . . . . :   20
Time slice in milliseconds  . . . . . . . . . . . :   3000
Eligible for purge  . . . . . . . . . . . . . . . :   *YES
Default wait time in seconds  . . . . . . . . . . :   30
Maximum CPU time in milliseconds  . . . . . . . . :   *NOMAX
 CPU time used . . . . . . . . . . . . . . . . . :     5335

Maximum temporary storage in K bytes  . . . . . . :   *NOMAX
 Temporary storage used  . . . . . . . . . . . . :     6

>>>>>>>>>>>>>>>>>>>>


Another DAL For AS/400 Performance Enhancement
It is possible to place the DALSERVER in AS/400 main storage and have it load more quickly at program start time and perhaps program execution time depending on the available RAM space in the selected pool. The AS/400 command is SETOBJACC (Set Object Access). The function of SETOBJACC is shown below from the AS/400 help screen on this command.

The Set Object Access (SETOBJACC) command temporarily changes the speed of access to an object by bringing the object into a main storage pool or purging it from all main storage pools. An object can be kept main storage resident by selecting a pool for the object that has available space and does not have jobs associated with it. Repeated use of the command can cause a set of objects to be resident in a main storage pool.

The command entry screen for SETOBJACC is shown below filled in with the default DAL values.

>>>>>>>>>>>>>>>>>>>>
                         Set Object Access (SETOBJACC)


Type choices, press Enter.


Object . . . . . . . . . . . . . > DALSERVER     Name
  Library  . . . . . . . . . . . >   DALLIB      Name, *LIBL, *USRLIBL...
Object type  . . . . . . . . . . > *PGM          *FILE, *PGM
Storage pool:
  Shared pool or subsystem name  > *BASE         Name, *JOB, *BASE...
  Pool identifier  . . . . . . . > 2             1-10

>>>>>>>>>>>>>>>>>>>>

After this command has been done the following appears on line 25 of the 5250 screen:

"3K of DALSERVER brought to pool with 9K unused".

The DALSERVER is now launched by the AS/400 as quickly as possible. It is a Prestart Job in the QCMN subsystem and it is resident in a Main Storage pool. These suggestions should enhance DAL for AS/400 performance on very busy or smaller AS/400s (9402 and 9404 models).
Not helpful Somewhat helpful Helpful Very helpful Solved my problem