Auto Alter capabilities

You can avoid cross invalidations due to directory reclaims and writes failed due to lack of storage by using a z/OS® capability called Auto Alter.

This capability is initiated by the z/OS structure full monitoring that occurs regularly for each structure. Structure full monitoring adds support for the monitoring of objects within a coupling facility structure. This type of monitoring determines the level of usage for objects within a coupling facility, and issues a warning message if a structure full condition is imminent. Doing this allows tuning actions to avoid a structure full condition. Structure full monitoring occurs every few seconds.

Auto Alter has algorithms that can request the coupling facility to dynamically increase or decrease the number of entries and/or data page elements to avoid structure full conditions. It can increase or decrease the size of the structure if necessary.
Note: The design point for Auto Alter is for gradual growth, not to handle spikes in the workload.

Auto Alter applies to all coupling facility structures. For the lock structure, it can only dynamically increase the RLE portion of the structure. It can increase the size of the SCA. Its main value in Db2; however, is for the group buffer pools. Guessing at a proper directory to data ratio is almost impossible. A group buffer pool usually needs more than a 5:1 ratio. Static values might or might not be accurate and, over time, they could change as the workload changes. Auto Alter can pinpoint precisely the ratio needed at any given time and change the ratios dynamically. By comparison, if the ratio is changed by operator command, the structure must be manually rebuilt, which causes a slight disruption.

When either the directory entries or data pages exceed the FULLTHRESHOLD, XES will increase the size of the structure and will increase the component in short supply while decreasing the other one. For Db2 group buffer pools, the shortages usually occur for the data elements, not directory entries.

Note that if there is general storage stress on the coupling facility (less than 10% free storage), XES can decrease those structures with ALLOWAUTOALTER(YES). XES will never decrease them below MINSIZE (defaulted to 75% of INITSIZE).

Even though XES is directing the coupling facility to make the changes, the Db2 -DISPLAY GROUPBUFFERPOOL command reflects the current directory to data ratios. The total numbers of directory entries and data elements are found in the coupling facility usage summary section of the RMF coupling facility activity report.

These are the main Auto Alter capabilities:
  • Auto Alter supports autonomic tuning, because you set the sizes and Auto Alter does the rest.
  • Auto Alter alters ratios in the coupling facility without rebuilding the structure (versus the Db2 -ALTER GROUPBUFFERPOOL command that requires a rebuild).
  • Auto Alter builds a better directory to data ratio than manual tuning (up to 40:1). Reclaim avoidance adjusts dynamically to changes with workload.
  • Auto Alter can avoid the error: Writes failed due to lack of storage.
  • Auto Alter allows database administrators to change local buffer pool sizes or add a member without needing a CFRM policy change. It adjusts to gradual growth in the workload.

The way you should have sized your group buffer pools is for proactive tuning, where there is enough storage in each structure to allow for growth, either through increases in local buffer pools or by adding another Db2 member. The goal is to allow group buffer pool tuning to be ignored for a certain amount of time, perhaps six months to a year. This approach is safe when there is sufficient storage available in the coupling facilities.

Important: Your z/OS systems teams must allow enough white space in each coupling facility to allocate all of the structures in both coupling facilities. In the rare event that a coupling facility fails, for whatever reason, the structures should rebuild quickly in the remaining coupling facility. This is specified in the STRUCTURE statement via the REBUILDPERCENT value of 1, and the PREF keyword, where at least one other coupling facility is referenced.
Once you have sized your structures, it is easy to start using Auto Alter. You can enter the parameter ALLOWAUTOALT(YES) with each STRUCTURE statement for which you want to allow structure alteration. This example shows the GBP0 definition:
STRUCTURE NAME=groupname_GBP0
INITSIZE=16000
SIZE=32000
ALLOWAUTOALT(YES)
FULLTHRESHOLD=80
MINSIZE=16000
PREFLIST=(CF2,CF1)
DUPLEX(ENABLED)
REBUILDPERCENT(1)

You do not want the group buffer pool to fall below the INITSIZE you have specified, so you can code MINSIZE with the same value as INITSIZE. You also set the FULLTHRESHOLD to 80% (also the default).