db2 调整连接数的优化

The Version 9.5 default for the max_coordagents and max_connections parameters will be AUTOMATIC, with max_coordagents set to 200 and max_connections set to -1 (that is, set to the value of max_coordagents). These settings set Concentrator to OFF.

While configuring max_coordagents or max_connections online, there will be some restrictions and behavior to be aware of:
  • If the value of max_coordagents is increased, the setting takes effect immediately and new requests will be allowed to create new coordinating agents. If the value is decreased, the number of coordinating agents will not be reduced immediately. Rather, the number of coordinating agents will no longer increase, and existing coordinating agents might terminate after finishing their current set of work, in order to reduce the overall number of coordinating agents. New requests for work that require a coordinating agent will not be serviced until the total number of coordinating agents is less than the new value and a coordinating agent becomes free.
  • If the value for max_connections is increased, the setting takes effect immediately and new connections previously blocked because of this parameter will be allowed. If the value is decreased, the database manager will not actively terminate existing connections; instead, new connections will not be allowed until enough of the existing connections are terminated to bring the value down so that it is less than the new maximum.
  • If max_connections is set to -1 (default), then the maximum number of connections allowed is the same as max_coordagents, and when max_coordagents is updated offline or online; the maximum number of connections allowed will be updated as well.

Both of these parameters can be configured with a starting value and an AUTOMATIC setting. For example, the following command associates a value of 200 and AUTOMATIC to the max_coordagents parameter:

UPDATE DBM CONFIG USING max_coordagents 200 AUTOMATIC   这里的200是指为起始连接数,不是自动上限数

someothers  :

db2stop force

db2start

db2 connect reset

 

nhz94259@163.com
原文地址:https://www.cnblogs.com/nhz-M/p/8097595.html