Coupling facility structure size

When a new coupling facility structure is allocated for a data sharing group, its size is usually taken from the value of the INITSIZE parameter in the CFRM policy.

After the structure is allocated, you can dynamically change its size with the following z/OS® command:

SETXCF START,ALTER,SIZE=newsize,STRNAME=strname

The new SIZE value cannot be greater than the SIZE value in the CFRM policy, but it can be smaller than the INITSIZE value. If the coupling facility has enough space, z/OS increases (or decreases) the size of the structure to the new size; the INITSIZE value of the policy remains unchanged.

In most cases, Db2 uses the new SIZE value for any subsequent allocations of the structure instead of the INITSIZE value in the CFRM policy. Any of the following subsequent allocations can use the new SIZE value:
  • A group buffer pool or SCA is deallocated and then reallocated
  • A secondary structure is allocated for a duplexed group buffer pool, SCA, or lock structure, if duplexing is started after the size of the primary structure was dynamically changed
  • Any structure is rebuilt with the following z/OS command:
    SETXCF START,REBUILD,STRNAME=strname
The new size is recorded across a restart of Db2 and is used for all subsequent allocations until one of the following events occurs:
  • A CFRM policy is started, and the policy has a different INITSIZE value than the size of the structure that was dynamically changed with the SETXCF START,ALTER command
  • Another SETXCF START,ALTER command is issued to dynamically change the size of the structure
Exception: If a lock structure is deallocated and all the members are down, the INITSIZE value is used. This is a consideration for disaster recovery or for situations where data sharing groups are cloned. During normal operation of a data sharing group, you are unlikely to encounter this situation.

Recommendations for coupling facility sizes

Coupling facility structures contain some static control structures. When a structure is initially allocated, these static structures are allocated to accommodate the potential size of the coupling facility structure. In other words, the size of the static structures is proportional to the maximum size (the value of the SIZE parameter) of the coupling facility structure. If the SIZE value is much larger than the INITSIZE value, a large percentage of the initial structure's size might be used for these static structures, leaving you with little usable storage space in the structure.

Tip: You can use the coupling facility structure sizer (CFSizer) tool to help you calculate CF structure storage sizes for Db2 data sharing. For more information, see The CFSizer tool .

In general, specify a SIZE value that is larger than the INITSIZE value, but limit the SIZE value in the following ways:

  • Not more than two to three times the INITSIZE value for the SCA and lock structure.
  • 1.2–1.5 times the INITSIZE value for group buffer pools, but not be more than two times the INITSIZE value. For example, if the INITSIZE value for a group buffer pool is 100 MB, specify a SIZE value of 200 MB or less.