#Jboss: Data source connection optimizations

By | June 21, 2023

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)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.