Preventive Service Planning
Abstract
It is recommended that you set the MaxConnections property to at least 2 to 3 times the number of user IDs.
Content
By default, the MaxConnections property is set to 100. If you are concerned about memory usage and want to set a limit, it is recommended that you set the MaxConnections property to at least 2 to 3 times the number of user IDs. This setting retains a high ratio of the size of connection pool to the number of different DB2® Content Manager user IDs (if you expect more than one thread to be running with the same user ID at the same time). For example, if you have 80 users, the MaxConnections property should be set to a value between 160 and 240.
When the ratio of total connections to total user IDs is low, you will more often run into a situation where there is no space in the pool to create a new connection for a particular user ID. If the maximum connections behavior is set to return an error, for example, setMaxConnectionBehavior(CMBConnectionPool.CMB_MAX_CONNECTIONS_ERROR), then you will have more users receiving errors and failing to get a connection. If the maximum connection behavior is set to wait for a connection, then you might have many threads waiting until a connection for some other user ID can be destroyed or timed out to make room in the pool for a new connection for this user ID to be created. Destroying and creating connections in the pool incurs extra overhead, which again slows the pool response time and can result in more waiting threads. As a result, overall connection pool performance will be poor when the MaxConnections property setting is insufficient for the total number of user IDs that are using the pool.
However, remember that pool performance varies greatly with each customer's system and usage, and therefore you need to do testing and tuning to find the optimal pool settings for your particular environment and application needs. This is a case-by-case issue.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21259555