CPU Optimization Guidelines
Let’s examine some commonly used programming techniques and utility jobs that contribute to high CPU use by batch workloads and determine what can be done to remediate them.
Utility and Batch Jobs
Some types of batch jobs can be optimized by using the most efficient utility for the function. Restarts for long-running batch jobs also have a significant impact and should be examined.
DSNTIAUL to DB2 unload utility: DSNTIAUL can extract data from multiple DB2 tables using SQL code containing joins. This is something that UNLOAD won’t be able to handle. However, when it comes to extracting data from tables that don’t have to be joined, the UNLOAD utility scores significantly higher from a resource consumption perspective.
DSNTIAUL utility upgrade: Using old versions of applications or databases, including DB2, can hamper performance. Newer versions of DB2 for z/OS have enhanced utilities that are significantly superior to their older avatars. The DB2 Version 8 DSNTIAUL utility program is up to 50 percent faster (and consumes fewer resources) than its predecessor in Version 7 due to multi-row fetch support for the utility program. For sites running V7 or older versions, much can be gained by making the version upgrade.
Review batch job space allocations: Often, data sets are used in batch jobs that don’t have enough space allocated to them to hold the volume of data they require. While over-estimation of space should be avoided, under-estimation is a bigger problem; it wastes precious CPU resources. Increasingly, we encounter batch jobs that have failed with a space abend after doing more than 50 percent of the required work. If such a job completes after a restart, then it would mean it has used more than 150 percent of the CPU resources it should have normally required. Giving greater attention to estimation and coding of space parameters could lead to significant CPU savings. Space allocations for data sets can be reviewed for jobs that consistently abend due to SB37, SE37, or any of the other abend codes related to space errors. You can identify such jobs by looking at prior abend history for a batch job in the high CPU consumers list.
Best Practices for COBOL
The program usage section in the performance profile identifies the CPU usage for COBOL statements during application program execution. Consider these best practices: