Performance
Automatic Performance Tuning
Changing your system pools in multi-pool systems is integral to increasing system performance. Having too much memory in an unused pool is not good. However, monitoring and adjusting shared pool sizes could easily be a full- time job for some shops. Fortunately, OS/400 has a system value (QPFRADJ - Performance Adjustment) that, when set properly, will automatically perform adjustments to storage pool sizes and activity levels, for shared pools. It has three values: a 0 performs no adjustment; a 1 performs an adjustment upon each IPL; and a 2 performs an adjustment at IPL and small adjustments periodically while the system is running. I would also suggest that a value of 2 be tried. If you are doing jobs which require more storage, such as save and restore, change the pool before calling the job with the Change Shared Pool (CHGSHRPOOL) command.
- Tim Johnston
Faster CPYF File Copies
When you are copying one file to another file and the physical record sequence of the resulting file does not matter, key a '1' in the FROMRCD parameter of the Copy File (COPYF) command. This will cause the copy to read the from file in arrival sequence which is much faster than reading the file in keyed sequence. Here is an example of the command:
CPYF FROMFILE(LIB1/AAA) TOFILE(LIB2/BBB) MBROPT(*ADD) + FROMRCD(1)
- Fred Skinner
Changing Date Format Considerations
Several applications convert the MMDDYY format into another format by multiplying the MMDDYY format by 10000.01. This can take up to forty times more CPU than some move operations take. Consider using the following example (pseudo-code) for data conversion:
... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 IDATE DS I 1 4 MMDD1 I 5 6 YY1 I 1 2 YY2 I 3 6 MMDD2 * C MOVE 012689 TMPDAT 6 C MOVE TMPDAT DATE C MOVE MMDD1 TMPDAT2 4 C MOVE YY1 YY2 C MOVE TMPDAT2 MMDD2 ... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
- Fred Skinner
Peformance Implications of WRKACTJOB to WRKSYSACT
Both the Work with Active Jobs (WRKACTJOB) and Work with System Activity (WRKSYSACT) commands are useful to get an indication of system performance. WRKACTJOB does use a fair amount of system resources, so you may wish to avoid using this command if you are trying to troubleshoot a busy system. You must have Performance Tools installed on your system to use WRKSYSACT; however, this command does not use nearly as much of system resources as WRKACTJOB. Only one person can use the WRKSYSACT command at a time.
If you want to use the automatic refresh capability of the WRKSYSACT command, you must be sure that the terminal keyboard is not in the 'type-ahead' function, because, to exit from the auto-refresh mode of WRKSYSACT, you must press the Attn key. Unless you turn off the type-ahead feature before entering WRKSYSACT auto-refresh mode, you will be locked in that mode until you end that job from another terminal or use the SysRq key.
To toggle the type-ahead feature for a display between off and on, press Alt- Hex, then press 'K'.
- Fred Skinner
Use Odd Length Packed Fields for Numerics
The AS/400 does packed decimal arithmetic. Extra IMPI instructions and CPU time are required to handle the extra half-byte for even-length fields. Defining numeric fields as packed decimal or moving numeric fields into a packed field within the program before calculations will improve CPU utilization for frequently used fields.
- Fred Skinner
Collect Performance Data
Did you know that you can collect Performance Data automatically? If this is your first time, you need to submit the performance collection job as follows:
SBMJOB JOBD(QGPL/QPFRCOL) USER(*JOBD) + RQSDTA(*JOBD) RTGDTA(*JOBD)
You must submit this job after using the Add Performance Collection (ADDPFRCOL) command.
The ADDPFRCOL command lets you create a job that will run automatically.
- Leigh Guerra
Faster Processing by Sequential Read
When processing a file in an RPG program, it is more efficient to process it sequentially. So if you don't need to process by keys (say you want to change the year field from 91 to 92 on all records), leave the 'K' out of column 31 in the F Specs. The first time I tried this, I saved 20 minutes off a two-hour batch job.
- Kristen Ball
LATEST COMMENTS
MC Press Online