Site icon Voina Blog (a tech warrior's blog)

#Jboss: Data source connection optimizations

Advertisements

In a high load system deployed on Jboss Application Server the following optimizations for data source pool resources may be needed.

1. Change the minimum and maximum pool size of a data source (MyDS).

This will ensure that we always have a minimum number of allocated connections and also we set a threshold to the maximum number of connections in order not to starve the Database of available connections and harm other systems using the same Database.

/subsystem=datasources/data-source=MyDS:write-attribute(name=min-pool-size,value=25)/subsystem=datasources/data-source=MyDS:write-attribute(name=max-pool-size,value=200)

2. Prefill database connection pool

This will ensure that a minimum number of connections are already allocated and available at start-up.

/subsystem=datasources/data-source=MyDS:write-attribute(name=pool-prefill,value=true)

3. Flush Idle Connections

This will ensure that idle connections are flushed and released.

/subsystem=datasources/data-source=MyDS:write-attribute(name=flush-strategy,value=IdleConnections)

4. Set a 1 min Idle Connection timeout

This will specify how long to wait until an idle connection is flushed and released.

/subsystem=datasources/data-source=MyDS:write-attribute(name=idle-timeout-minutes,value=1)

Exit mobile version