num_poolagents - Agent pool size configuration parameter

This parameter sets the maximum size of the idle agent pool.

Configuration type
Database manager
Applies to
  • Database server with local and remote clients
  • Database server with local clients
  • Partitioned database server with local and remote clients
Parameter type
Configurable online
Default
100, AUTOMATIC [-1, 0 - 64000]
Note: The default value is subject to change by the Db2® Configuration Advisor after initial database creation.

This configuration parameter is set to AUTOMATIC with a value of 100 as the default. A setting of -1 is still supported, and translates into a value of 100. When this parameter is set to AUTOMATIC, the database manager automatically manages the number of idle agents to pool. Typically, this means that once an agent completes its work, it is not terminated, but becomes idle for a period of time. Depending on the workload and type of agent, it might be terminated after a certain amount of time.

When using AUTOMATIC, you can still specify a value for the num_poolagents configuration parameter. Additional idle agents will always be pooled when the current number of pooled idle agents is less than or equal to the value that you specified.

Examples

num_poolagents is set to 100 and AUTOMATIC
As an agent becomes free, it is added to the idle agent pool, where at some point the database manager evaluates whether it should be terminated or not. At the time when the database manager considers terminating the agent, if the total number of idle agents pooled is greater than 100, this agent will be terminated. If there are less than 100 idle agents, the idle agent will remain awaiting work. Using the AUTOMATIC setting allows additional idle agents beyond 100 to be pooled, which might be useful during periods of heavier system activity when the frequency of work can fluctuate on a larger scale. For cases where there are likely to be less than 100 idle agents at any given time, agents are guaranteed to be pooled. Periods of light system activity can benefit from this by incurring a less start up cost for new work.
num_poolagents is configured dynamically
If the parameter value is increased to a value greater than the number of pooled agents, the effects are immediate. As new agents become idle, they are pooled. If the parameter value is decreased, the database manager does not immediately reduce the number of agents in the pool. Rather, the pool size remains as it is, and agents are terminated as they are used and become idle again-gradually reducing the number of agents in the pool to the new limit.

Recommendation

For most environments the default of 100 and AUTOMATIC will be sufficient. If you have a specific workload where you feel too many agents are being created and terminated, you can consider increasing the value of num_poolagents while leaving the parameter set to AUTOMATIC.