Managing performance with the asynchronous API

The asynchronous API can result in a large number of concurrent tasks within a CICS system. CICS will automatically begin workload management should a region reach MXT, and you can regulate performance yourself using TRANCLASS. Transaction tracking and statistics are also available to monitor the performance of regions running asynchronous workloads.

Regulating performance

Using the TRANCLASS resource

By specifying the TRANCLASS of parent transactions, you can control the maximum number of parent tasks that will run in a system at any given time, and by extension the number of child tasks that will be created by those parents.

Use the MAXACTIVE attribute of TRANCLASS to ensure that the combined number of parent and child transactions is less than the MXT for your system. The MAXACTIVE value for your child tasks should be higher than the MAXACTIVE value for parent tasks, assuming that a given parent task will create multiple children.

Important: If you do choose to set TRANCLASS for your child transactions, don't use the same TRANCLASS for child transactions and parent transactions, otherwise you can end up with a system full of parent tasks and no space for child tasks to attach

Automatic regulation by CICS system management

If a region becomes overloaded, CICS will automatically start regulating workflow to prevent too many child tasks being created. Parent tasks issuing a RUN TRANSID command will be suspended and using the ASPARENT wait type put in a queue, and resumed when workload levels in the region drop.

When parent tasks are resumed, workload in the region may fluctuate, and parent tasks may be suspended and resumed in quick succession. This is the expected behavior, and indicates that automatic system management is properly protecting CICS from excessive asynchronous requests.

If your asynchronous workload is regularly causing problems for your region, consider regulating workload using TRANCLASS as described above.

Monitoring performance

Using previous transaction tracking

Previous transaction data characteristics allow you to track the relationships between tasks in your region. For example, if one of your child tasks is hanging, you can use this data to see which parent task is waiting for a response from that child, and make a decision about how to resolve the problem.

Using statistics and monitoring data

Asynchronous services statistics and Monitoring field data are available to help you monitor and diagnose asynchronous workloads. You can find out how many RUN TRANSID and FETCH commands were issued by an application, how much time was spent waiting for child tasks to complete, and other useful information to help monitor and improve asynchronous performance.

Using CICS policies

You can also use CICS policies to manage asynchronous workload using new rule types introduced specifically to handle asynchronous requests.