For best performance, the initial heap segment should be large enough to satisfy all requests for heap storage. The Language Environment storage report generated by the RPTSTG(ON) option shows you how much heap storage is being used, the total number of segments allocated to the heap, the statistics for the optional heap pools algorithm, and the recommended values for the HEAP, ANYHEAP, BELOWHEAP, and HEAPPOOLS run-time options. For PL/I multitasking applications, the Language Environment THREADHEAP run-time option can be used to tune heap storage at the task level.
The heap pools algorithm can be used to significantly increase the performance of heap storage allocation, especially in a multi-threaded application that experiences contention for heap storage. However, it the algorithm is not properly tuned, heap storage could be used inefficiently.
Tuning the heap pools algorithm for an application is a three step process :
Any time there is a significant change in the workload, repeat these tuning steps to obtain optimal HEAPPOOLS values.
You can tune stack storage by using the Language Environment STACK and THREADSTACK run-time options. RPTSTG(ON) can have a negative affect on the performance of your application, because as the application runs, statistics are kept on storage requests. Therefore, always use the IBM-supplied default setting RPTSTG(OFF) when running production jobs. Use RPTSTG(ON) only when debugging or tuning applications.