Use the DB2® command
line processor (CLP) or the DB2 configuration
APIs to display and update cluster caching facility (CF)
memory configuration parameters for the database.
About this task
The cluster caching facility (CF)
structure memory configuration information is maintained as part of
the DB2 database configuration
information.
The cluster caching facility structure
memory used for Group Buffer Pool (GBP), lock usage, and Shared Communication
Area (SCA) is allocated for the cluster caching facility during
the first database activation on any member and remains allocated
until deactivation on the last member. These parameters have a default
value set to AUTOMATIC. When set to AUTOMATIC, DB2 computes appropriate
sizes for these parameters during database activation. Because these
values are closely related and dependent on one another, manually
setting at least one of the parameters causes none of the parameters
to be calculated during activation even if some parameters remain
set to AUTOMATIC. Their values are what the most
recent automatically calculated value was and can be viewed with the GET
DB CFG SHOW DETAIL command.
The ONLINE option is also supported for structure
parameters. Any updates to CF memory parameters are applied immediately.
Update requests are synchronous and are not returned until the new
value is set by the CF server.
There
are two ways to configure the
cluster caching facility memory
for a database:
- Updating configuration parameters using the CLP
- Updating configuration parameters using APIs
- To view the values of the CF structure
configuration parameters in the CLP, issue the GET DATABASE
CONFIGURATION command.
For example, this CF structure
configuration information is displayed when this command is issued
in a DB2 pureScale® instance:
CF Resource Configuration:
CF self-tuning memory = ON
CF database memory size (4KB)
(CF_DB_MEM_SZ) = AUTOMATIC
Group buffer pool size (4KB)
(CF_GBP_SZ) = AUTOMATIC
Global lock memory size (4KB)
(CF_LOCK_SZ) = AUTOMATIC
Shared communication area size (4KB)
(CF_SCA_SZ) = AUTOMATIC
See the GET
DATABASE CONFIGURATION command for more detailed output.
Note: The
group buffer pool (GBP) parameter requires a sufficient amount of
directory entries in the CACHE structure to handle read-and-register
(RAR) requests. DB2 monitors
free directory entries and data element counts on every RAR request
and automatically adjusts these values as needed. This adjustment
is done dynamically or by online updates, regardless of whether the cf_gbp_sz parameter
is configured as AUTOMATIC or not. For more information
about CF structure
configuration parameters, see the topic "Configuration parameters
summary for the DB2 pureScale Feature".
When
you use the
SHOW DETAIL option to view the current
values for structure configuration parameters, this information is
displayed:
CF Resource Configuration:
CF self-tuning memory = ON
Group buffer pool size (4KB)
(CF_GBP_SZ) = AUTOMATIC(32768) AUTOMATIC(32768)
Global lock memory size (4KB)
(CF_LOCK_SZ) = AUTOMATIC(17000) AUTOMATIC(17000)
Shared communication area size (4KB)
(CF_SCA_SZ) = AUTOMATIC(1500) AUTOMATIC(1500)
See the GET DATABASE CONFIGURATION command
for more detailed output.
The result shown for each structure
parameter has two corresponding values. If the values in parentheses
are different there is a pending update to the value of the structure
parameter. The value enclosed in the first set of parentheses is the
current value for the structure parameter. The value enclosed in the
second set of parentheses is the pending value for the structure parameter.
When
there is both a primary CF server
and a secondary CF server,
only the configuration information for the primary CF server
is displayed. The same value applies to
both CF servers.
- To update the values of CF structure
configuration parameters in the CLP, issue the UPDATE DATABASE
CONFIGURATION (or UPDATE DB CFG) command.
Updating structure parameters to any value other than the default
setting (AUTOMATIC) results in theCF structure
memory size being fixed.
For example, this command is
issued to set the size of the Global Lock Manager memory to 20,000
pages:
UPDATE DATABASE CONFIGURATION FOR WSDB USING CF_LOCK_SZ 20000
Note: An update to decrease the amount of memory for structure
parameters does not take immediate effect if there is not enough unused
memory to accommodate the request. To see if an update is pending
for structure parameters issue the GET DB CFG command
from the CLP.
- To reset the values of CF structure
configuration parameters in the CLP, issue the RESET DATABASE
CONFIGURATION (or RESET DB CFG) command.
The CF structure
configuration parameters are reset to their default value of AUTOMATIC.
- To update the values of CF structure
configuration parameters using application programming interfaces
(APIs), call the db2CfgSet API. To view the values,
issue the db2CfgGet API.
The getting
and setting of
CF structure
configuration parameters is supported by entries for the token element
in the
db2Cfg data structures used when calling
the
db2CfgGet or
db2CfgSet APIs.
Table 1. Supported db2Cfg tokens in getting and
setting of CF structure
configuration parametersToken |
Data type |
SQLF_DBTN_CF_GBP_SZ |
Uint32 |
SQLF_DBTN_CF_SCA_SZ |
Uint32 |
SQLF_DBTN_CF_LOCK_SZ |
Uint32 |
SQLF_DBTN_CF_DB_MEM_SZ |
Uint32 |