z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Tuning stack storage

z/OS Language Environment Programming Guide for 64-bit Virtual Addressing Mode
SA38-0689-00

For best performance, the initial stack size should be set large enough to satisfy all requests for stack storage. The Language Environment storage report generated by the RPTSTG(ON) option shows you how much stack storage is being used, as well as the total number of stack increments which were required by the application. An initial stack segment that is too large can waste storage and degrade overall system performance.

You can tune stack storage by using the Language Environment STACK64 and THREADSTACK64 runtime options; consult z/OS Language Environment Programming Reference for details.

RPTSTG(ON) and the STORAGE runtime option 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) and STORAGE only when debugging or tuning applications. See z/OS Language Environment Programming Reference for more information about RPTSTG and STORAGE.

The default value of 128MB for the maximum stack size of the STACK64 and THREADSTACK64 runtime options may cause excessive use of system resources (such as real storage) when running a multithreaded application that creates many pthreads. For such applications, you should use the Language Environment® Storage Report (RPTSTG runtime option) to determine your application's actual pthread stack storage usage. Then use the THREADSTACK64 runtime option to set the maximum stack size to a value closer to the actual usage.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014