Configuring the cluster caching facility

Use the Db2® command line processor (CLP) or the Db2 configuration APIs to configure the cluster caching facility (CF) parameters for the IBM® Db2 pureScale® Feature.

About this task

The cluster caching facility configuration information is maintained as part of the Db2 database manager configuration information.

When the cluster caching facility is started, CF server configuration parameters are read from the database manager configuration file to initialize the CF server. The CF server creates and listens on a management port to receive CF server configuration information. Once a db2start command or an online action by a CF server or CF structure is finished, the CF server receives the server configuration parameters, and is fully initialized.

If the CF server configuration parameters are set to AUTOMATIC, their values are determined automatically during the startup of the CF server. During this startup, the CF server host is queried for the amount of physical RAM and the number of CPUs; this helps configure the appropriate values for the cf_mem_sz and cf_num_workers configuration parameters.

There are two ways to configure the CF server:
  • Updating configuration parameters using the CLP
  • Updating configuration parameters using APIs

Procedure

  • To view the values of CF server configuration parameters in the CLP, issue the GET DATABASE MANAGER CONFIGURATION command.

    For example, the following CF server configuration information is displayed when this command is issued in a Db2 pureScale instance:

    CF Server Configuration:
       Memory size (4KB)                     (CF_MEM_SZ) = AUTOMATIC
       Number of workers threads        (CF_NUM_WORKERS) = AUTOMATIC
       Number of connections              (CF_NUM_CONNS) = AUTOMATIC
       Diagnostic error capture level     (CF_DIAGLEVEL) = 2
       Diagnostic data directory path      (CF_DIAGPATH)

    See the GET DATABASE MANAGER CONFIGURATION command for more detailed output.

  • To update the values of CF server configuration parameters in the CLP, issue the UPDATE DATABASE MANAGER CONFIGURATION command.

    For example, the following information is displayed when this command is issued to update the CF memory size (cf_mem_sz):

    UPDATE DBM CFG USING CF_MEM_SZ 27152
    
    DB20000I  The UPDATE DATABASE MANAGER CONFIGURATION command 
    completed successfully.
    
    SQL1362W  One or more of the parameters submitted for immediate 
    modification were not changed dynamically.  Client changes will 
    not be effective until the next time the application is started 
    or the TERMINATE command has been issued.  Server changes will 
    not be effective until the next DB2START command.
    

    The CF server configuration changes do not take effect immediately. Any updating value is saved and applied the next time the CF server is started.

  • To reset the values of CF server configuration parameters in the CLP, issue the RESET DATABASE MANAGER CONFIGURATION (or RESET DBM CFG) command. The Db2 database manager configuration parameters are reset to their default value.
  • To update the values of CF server 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 server 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 server configuration parameters
    Token Data type
    SQLF_KTN_CF_MEM_SZ Uint32
    SQLF_KTN_CF_NUM_WORKERS Uint32
    SQLF_KTN_CF_NUM_CONNS Uint32
    SQLF_KTN_CF_DIAGLEVEL Uint16
    SQLF_KTN_CF_DIAGPATH
    SQLF_KTN_CF_DIAGPATH_FULL
    char(215)