Implementing Dynamic Tuning for IBM CICS resource attributes
The Dynamic Tuning (DTN) facility can dynamically alter the following resource attributes:
- The IBM Db2 Connection attributes values for TCBLIMIT and THREADLIMT that can be monitored with the CDB2CON view.
- The MXT (MAXTASK) value in IBM CICS that is defined in the SIT and can be monitored with the CTRNCLA view with transaction class DFHTCL00.
Implementing DTN for CICS resource attributes requires the following items:
- Dynamic tuning parameters that you set using the Dynamic Tuning Administration family of views.
- Activate dynamic tuning at time of CICS-PAS connection in CMRSOPT.
- An Alarm Management alarm definition that monitors resource consumption values in the resource view.
This alarm is triggered when the DTN processing determined that the attribute value it is monitoring should be increased and it sets the new value in the Desired Value field. - A BMC AMI Ops Automation Rule definition that is triggered when the alarm issues messages indicating a new attribute value should be set.
- A BMC AMI Ops Automation REXX EXEC that invokes IMFEXEC CICS SET commands to alter the attribute value.
By default, the dynamic tuning (DTN) function is disabled. The DTN function requires that you use the CMRDTN administration family of views to create a CMRDTNnn member in UBBPARM to define the following:
- The targets and the available resource attributes that DTN can control
- The parameters to control dynamic tuning for these attributes
For more information about using the CMRDTN views to administer dynamic tuning parameters, see CMRDTN-view. If DTN is enabled and the current CICS target name is not defined in CMRDTNnn (either explicitly or by wildcard), the target will not have dynamic tuning activated.
Dynamic tuning uses the criteria and action parameters defined in CMRDTNnn. When dynamic turning is activated, every time the resource view (such as CDB2CON or CTRNCLA) is used, dynamic tuning processing occurs. DTN processing checks if the specified criteria is met. If the specified criteria is met, DTN calculates a Desired Value according to how much you want the attribute to be increased by examining what you defined in the action parameters.
The following views display the dynamic tuning parameters and the statistics of DTN:
- The CDB2CONT view shows the DB2CON values (see CDB2CON-view)
- The CTRNCLAM view shows the MXT values (see CTRNCLA-view)
For additional information about how the attributes are monitored and set, press F1 on the fields of the views to access the online Help.
The following table describes the criteria and checks that occur in this order:
Criteria | Checks |
---|---|
No SOS | The region must not be in a CICS SOS (short on storage) condition. This is a required criteria that users cannot control. |
Parameter | The monitored parameter usage is above or equal to the specified threshold (Action % Util). |
CPU | The CICS CPU usage must be less than the specified threshold (CPU % Limit). |
DSA | The CICS DSA (below and above) usage is less than the specified threshold (DSA % Limit) . |
Once all the criteria is met, DTN processing sets the Desired Value field in the record to the new value according to the action parameters values defined in CMRDTNnn.
There are two action parameters that can be set in CMRDTNnn:
Action Parameter | Description |
---|---|
Adjustment % | The percentage of the original value of the monitored attribute that DTN will increase when all criteria is met. |
Maximum % increase | The maximum percent of the original value of the monitored attribute that DTN will increase to. |
Changing the attributes
The DTN processing in the supported resource view (such as CDB2CON and CTRNCLA) sets the Desired Value in the view but it does not change the attribute. The attribute changes automatically only if you use the provided alarm, OpsA Rule, and OpsA EXECs to change the attribute value.
Distributed Alarm samples in BBACTDEF
The BBACTDEF data set contains the following alarms that you need to use for DTN:
- BBKYD2CN – Alarm CICSD2CNSETATR, which is based on the CDB2CONT view
- BBKYMXT – Alarm CICSMXTSETATR, which is based on the CTRNCLAM view
The alarm for a DTN supported resource view (such as CDB2CONT or CTRNCLAM), if active, is set to issue the view every 60 seconds. If the Desired Value is different from the Current Value, DTN processing issues the alarm message; for example: CICSD2CNSET*. This alarm triggers the OpsA Rule.
You must add the alarms to the UNIX file system using the ALRMDIST view. When you use the Add (A) command, change the group name in the alarm to CMRDYNTN to keep the DTN alarm together. Note that the Group Name does not change in ALRMDIST after you issue the add command but the Alarm definition views reflect the change.
Before you enable the alarm, change the CONTEXT to the name of the CONTEXT you want the alarm to monitor. The targets in the CONTEXT must belong to a target group specified in CMRDTN00 with the corresponding parameter group. For example: if the alarm is CICSD2CNSETATR, CMRDTN00 must have a Target Group with the targets in the CONTEXT and the target group has to have a DB2CON parameter group.
For more information about alarms, see Using distributed alarms.
BMC AMI Ops Automation Rule RULCMRDT
Copy the OpsA Rule named RULCMRDT from BBSAMP to your BBI-SS PAS hlq.UBBPARM. This Rule contains:
- Rule ID CMRD2CST, which detects the alarm message CICSD2CNSET* and invokes the EXEC CMRD2CNA, passing it the alarm message.
- Rule ID CMRMXTT, which detects the alarm message CICSMXTSET* and invokes the EXEC CMRMXTA passing it the alarm message.
The member names must be the same as the distributed name. Modify the CONTEXT value to the CONTEXT you used in the alarm definition. Use Rules Processor in BMC AMI Ops for Automation to enable the Rule. For more information about using OpsA Rules, see Using Rules with BMC AMI Ops Automation.
BMC AMI Ops Automation EXEC
When the RULCMRDT Rule fires, it schedules either the CMRD2CNA or CMRMXTA EXEC. Copy these EXECs from BBSAMP to a data set in the SYSPROC DD concatenation in the BBI-SS PAS.
- CMRD2CNA EXEC uses the data in the alarm message to perform the following tasks:
- Set the CICS target to the where the Db2 Connection resource attribute TCBLIMIT or THREADLIMT value are to be altered
- Execute the CICS command to set the desired attribute value
- CMRMXTA EXEC uses the data in the alarm message to perform the following tasks:
- Set the CICS target to where the MXT attribute value is to be altered
- Execute the CICS command to set the desired value
For more information about using OpsA EXECs, see Using advanced automation with BMC AMI Ops Automation.
Starting and stopping Dynamic Tuning
After you have set up the parameters with the CMRDTN view, follow these steps to turn on Dynamic Tuning:
- Specify YES on the Enabled Dyn Tune at Startup option from the CMRSOPT administration family of views.
This activates Dynamic Tuning when CICS connects to the BBI-SS PAS. For more information about using the CMRSOPT views to change the Dynamic Tuning settings, see CMRSOPT-view. - Use the DTY/DTN commands in the CREGAGT view to turn Dynamic Tuning on or off for the life of the CICS-PAS connection.