cf_num_workers - Number of worker threads configuration parameter
The cf_num_workers parameter specifies the total number of worker threads on the cluster caching facility (CF). Worker threads are distributed among the communication adapter ports to balance the number of worker threads servicing requests on each interface.
- Configuration type
- Database Manager
- Applies to
- Applies to a Db2® pureScale® instance only.
- Parameter type
- Configurable offline
- Default [range]
- AUTOMATIC [1 - 31]
When set to the default (AUTOMATIC), the parameter value is configured to be one less than the number of available processors on the CF. The available CPUs are equally divided among the instances before one processor is subtracted from the resulting value for each instance. If there are coexisting members on the CF host, the number of worker threads on the CF is further divided by the total number of CF and members on a host.
If there is only one processor on the CF server machine, this value is set to 1.
The total number of CF worker
threads is shown in the cfdiag.log
file.
Number of workers assigned to each interface =
(cf_num_workers) / (number of interfaces)
When the cf_num_workers parameter
is set to AUTOMATIC, the database manager configures
the number of worker threads so that it is equally divisible by the
number of communication adapter ports configured for the CF.Total CF worker threads =
(7 processors) - (1 processor to prevent using all processors) = 6
Thus, number of workers connected to each cluster interconnect interface =
6 / 2 = 3
If you set the cf_num_workers parameter
manually, set the value to be equal or greater than the number of
communication adapter ports so that there is at least one worker thread
for each interface. If there is an insufficient number of worker threads
to cover all interfaces, an alert is logged for the CF,
which will fail to start. The parameter value must be changed to address
the problem.In a Db2 pureScale environment that uses sockets as the method of communication the AUTOMATIC value is configured differently. When sockets are used and the cf_num_workers is set to default (AUTOMATIC), the parameter value is configured to be four times the number of available processors on the instance.
- Restrictions:
- If you are running InfiniBand or uDAPL, do not set this value higher than the number of processors on the CF server machine. Each worker thread operates on a processor, waiting for uDAPL communication. Performance is affected if the number of worker threads exceeds the number of processors.