Enlarging the TCQ
To enlarge the TCQ:
- AVERAGE PROCESS SIZE. Determine the size of the average
Process for your site. To do this, you need to know the type and average
number of steps in your average Process. Use the following table to
calculate the TCQ space needed for your average Process. Take the
number of steps and multiply that by the number of bytes for the Process
component, then add the number of bytes for a Process header (1,616).
If you do not know what the average Process looks like, assume that
the average Process contains five COPY steps:
Process Component Number of Bytes Process Header 1,616 COPY Step 1,024 RUN TASK 128 RUN JOB 176 GOTO Step 96 EXIT Step 96 IF Statement 208
For example, if the average Process contains five COPY steps, the space required would be 1,616 + (5 * 1,024) = 6,736 bytes.Note: The largest Process can contain up to 1 MB and must fit within 43 TCQ records. A TCQ CISIZE of 24 KB is sufficient to hold the maximum size Process.
- TCQ CISIZE. Calculate the appropriate TCQ CI size that should be defined for the average Process. The larger the TCQ CI size, the fewer I/O operations have to be done to read/write the TCQ entry. Ideally, the average Process should fit in a single TCQ entry, but if the average Process is greater than 30 KB, then select a TCQ CI size of 30 KB.
- TCQ CIs PER PROCESS. Calculate the number of TCQ CIs required for a single Process. For example, if the average Process is 36 KB and you use a TCQ CI size of 30 KB, then each Process takes 2 TCQ CIs.
- NUMBER OF PROCESSES. Calculate the number of Processes you expect to be in the TCQ at any one time, including Processes that are waiting for a connection or their turn to execute, Processes that are executing, Processes that have been held, and Processes that are going through retry. Double or triple this number, then multiple this number by the number of TCQ CIs required for each Process. For example, if you think that you'll have no more than 100 Processes in the queue at any one time, use 200 or 300 for the number and multiply it by the number of TCQ CIs required by each Process.
- TCQ RECORDS. The result of this calculation is the number of records and CISIZE that should be defined in the TCQ VSAM definition. The average and maximum record size should be the CISIZE - 7.
- TCX CISIZE. Now, make sure that the TCX definition will
be able to map this number of TCQ entries. Take the number of records
from Step 5, divide by 4, and add 12. Then, to obtain the average
and maximum record size for the TCX VSAM definition, round this number
up to the next valid CI Size (minus 7)
Assume that the average Process consists of 10 COPY steps, 10 IF statements and 10 RUN TASK statements and you want to allocate space to hold 1,000 of these Processes:
AVERAGE PROCESS SIZE: 1,616 + (10 * 1,024) + (10 * 208) + (10 * 128) = 15,216
TCQ CISIZE: 16,384 (good value that would hold a complete average Process)
TCQ CIs PER PROCESS: 1
NUMBER OF PROCESSES: 1,000
TCQ RECORDS: 1,000
TCX CISIZE: 512 (this would map up to (( 512 - 7 - 12) / 2 * 8) = 1,968 TCQ RECORDS)Note: If you change the TCX or TCQ definitions, you must COLD start the TCQ.