Database agent management
Most applications establish a one-to-one relationship between the number of connected applications and the number of application requests that can be processed by the database server. Your environment, however, might require a many-to-one relationship between the number of connected applications and the number of application requests that can be processed.
- The max_connections parameter specifies the maximum number of connected applications
- The max_coordagents parameter specifies the maximum number of application requests that can be processed concurrently
The connection concentrator is enabled when the value of max_connections is greater than the value of max_coordagents. Because each active coordinating agent requires global database resource overhead, the greater the number of these agents, the greater the chance that the upper limits of available global resources will be reached. To prevent this from occurring, set the value of max_connections to be higher than the value of max_coordagents, or set both parameters to AUTOMATIC.
- If you are confident that your system can handle all of the connections that might be needed, but you want to limit the amount of global resources that are used (by limiting the number of coordinating agents), set max_connections to AUTOMATIC. When max_connections is greater than max_coordagents, the connection concentrator is enabled.
- If you do not want to limit the maximum number of connections
or coordinating agents, but you know that your system requires or
would benefit from a many-to-one relationship between the number of
connected applications and the number of application requests that
are processed, set both parameters to AUTOMATIC. When both parameters
are set to AUTOMATIC, the database manager uses the values that you
specify as an ideal ratio of connections to coordinating agents. Note
that both of these parameters can be configured with a starting value
and an AUTOMATIC setting. For example, the following command associates
both a value of 200 and AUTOMATIC with the max_coordagents parameter:
update dbm config using max_coordagents 200 automatic
.
Example
- The max_connections parameter is set to AUTOMATIC and has a current value of 300
- The max_coordagents parameter is set to AUTOMATIC and has a current value of 100
- Connections 1 to 100 create new coordinating agents
- Connections 101 to 300 do not create new coordinating agents; they share the 100 agents that have been created already
- Connections 301 to 400 create new coordinating agents
- Connections 401 to 600 do not create new coordinating agents; they share the 200 agents that have been created already
- and so on...
If the number of connections is reduced, but the amount of work being driven by the remaining connections is high, the number of coordinating agents might not be reduced right away. The max_connections and max_coordagents parameters do not directly affect agent pooling or agent termination. Normal agent termination rules still apply, meaning that the connections to coordinating agents ratio might not correspond exactly to the values that you specified. Agents might return to the agent pool to be reused before they are terminated.
If finer granularity of control is needed, specify a simpler ratio. For example, the ratio of 300:100 from the previous example can be expressed as 3:1. If max_connections is set to 3 (AUTOMATIC) and max_coordagents is set to 1 (AUTOMATIC), one coordinating agent can be created for every three connections.