• Keine Ergebnisse gefunden

Performance Considerations

Im Dokument IBM System/34 Sort (Seite 66-70)

NUMBER OF SEQUENCE SPECIFICATIONS

The more sequence specifications you use, the less main storage space will be available for records.

• Code required by the select/build routine for any sort job uses about 100 bytes of storage. (The select/build routine is the mach ine language program created by the sequence specifications.)

• Each sequence specification uses about 25 bytes of storage. (Remember that comment lines use no main storage.)

• If you specify includes and/or omits (referring to packed data) for your sort job, the select/build routine will use an additional 200 bytes of storage.

• If you specify field statements (referring to packed data) for your sort job, the select build routine will use an additional 80 bytes of storage.

• An alternate collating sequence uses an additional 375 bytes of storage.

Consider using additional sequence specifications to ex-clude records you do not want to sort. Your sort job may run faster than if you use fewer specifications but process more records.

ALTERNATE COLLATING SEQUENCE

Use of an alternate collating sequence increases the time it takes to run a sort job (see Alternate Collating Sequence in Appendix B).

DISK LOCATION OF FI LES

Because the sort program must move each record you want to sort at least two times (first from the input file to the work file, then from the work file to the output file), file location affects how long it takes to run a job. The dis-tance the.disk arm (or arms) must travel between the input and work files and between the work and output files can be minimized to reduce running time.

Performance Considerations 6-1

File Placement On a Single Disk System

The following shows how the input, work, and output files for a sort job can be placed on a single disk system. The·

first method shown is usually the fastest:

Methods of File Placement On a Single Disk System Positions of Read Head to Read the Input, Work, and Output Files

Read Head Movement

/I~

1@lliltltll

Usually Processes the Fastest

6-2

File Placement On a Multiple Disk System

The following shows how input, work, and output files for a sort job can be placed on a multiple disk system. The first method shown is usually the fastest:

Methods of File Placement On a Multiple Disk System

Read Head Movement

Positions of Read Head to Read the Input, Work, and Output Files

/1""

1

li\\ltI\Ja~I\\I1\11\Q:\1i.11\1Ii1II\\I\\\11\\1\11\\\1\1\\~\1\\\I\I\II1\II\\\lt\\\\\\I\1I

Input

I

Disk Area ===*=o:;::::ut=p=u=t *=( ====*====*==

Input

I

Work Output

First Disk

Read Head Movement

---V

----~7

l ... ~ ....

Disk Area I Output IWork I

I

I

Input (Work

I I

I I I I

Second Disk

bt:iIIttt\iitJ

Usually Processes the Fastest

The first disk can be either disk A 1 or A2; the second disk is the other one. If all files must be contained on one disk in a multiple disk system, use file placement as des-cribed under File Placement on a Single Disk System.

Note: On a system that is running in a multiprogramming mode, a sort job may run faster if one spindle is totally dedicated to accessing the sort input, work, and output files.

AUTOMATIC WORK FILE ALLOCATION Single Disk System

Automatic work file allocation usually increases the time needed to run a sort job on a single disk system because an automatically allocated work file is not arranged for a fast sort run. If you want to minimize sort running time, determine the best location for your work file and use the

FILE statement to specify your work file location rather than using automatic work file allocation.

Mu!tiple Disk System

Automatic work file allocation usually does not increase the time needed to run a sort job on a multiple disk system.

Run time increases only if both input and output files are on one disk and space is not available for the work file on the other disk. In this case, sort job run time is similar to the time required to run the same sort job on a single disk system.

ORDER OF RECORDS IN THE INPUT FILE

The order of input file records can affect how long it takes to run a sort job. Suppose that two files have about the same number of records to be sorted. Suppose further that the two files contain identical information; however, the first file has more records in the sequence you want than the second file has. The records in the first file can usually be sorted faster than those in the second file if the same sequence specifications are used to sort both files.

NON-VERI FY OPTION

If an N is entered in column 34 of the sort header specifi-cation, the sort program does not verify data written on the work file. The amount of performance improvement depends on file size, number of records, and file location.

Because you might create a file of invalid data when you specify the non-verify option, using this option is usually not the best way to improve your sort program perfor-mance. You should consider other factors that affect performance before you use this option.

REGION SIZE

You can increase the region size that the sort program uses whenever you have enough main storage available to do so.

The larger region size usually allows the sort program to process more records per disk access, which usually reduces the time required to sort records in a file. (The minimum region size for the sort program is 14K bytes.)

SYSTEM ENVIRONMENT IN WHICH A SORT JOB EXECUTES

Two identical sort jobs operating in equal size regions may have different run times, depending on their respective sys-tem environments. A sort job that competes for syssys-tem resources in a multiprogramming environment usually re-quires more running time that the same sort job would require if it were the only job executing on the system.

Performance Considerations 6-3

6-4

Each of the seven jobs in this section has:

1. An introduction explaining its purpose 2. Filled-out sequence specification sheets 3. Discussion of the sequence specifications

The first six jobs use the following files and input records.

(Sample Job 7 uses other files and input records, which are explained in the introduction to that job.)

Files Inventory file

Records in Files Inventory records

Transaction Issue records file

Receipt records

Adjustment records

Contents of Records Quantities of items in stock

Number of trans-actions for each stock item

Sh ipments of items to customers

Purchases of more items tram suppliers (vendors)

Corrections to inven-tory quantities

Im Dokument IBM System/34 Sort (Seite 66-70)