One common cause of poor application performance is resource misconfiguration, particularly for pooled resources like DataSource Connections. Resource pools can affect application performance if they are too small, work on requests has to wait until a connection is available from the pool, or if the pool is too large, heap space occupied by unused connections cannot be used for other resources. RTI collects metrics about connection pools that can be used to tune application performance. These metrics allow you to track connection pool usage so you can configure the pool to a size appropriate to anticipated or measured loads. Use the following steps to analyze connection pool usage:
  1. Find connection pool of interest in Metrics→JCA.
  2. Compare the in use count, maximum in use counts, and max size values.
  3. As an alternative to the previous section where we showed using Plot ... from the Event Summary view, we can add metrics to the plot from the Metrics chart itself. Use the Configure () button in the Metrics chart to open the Plot Application Metrics dialog. Expand JCA on the left, and select the DataSource: the available metrics will appear on the right. Double-click on each you want to add: InUseConnectionCount, MaxConnectionsInUseCount, and MaxSize. Look at the checkbox list in the button and uncheck any you don't want to appear there, then click OK.
    We can see that we are only using about 15 connections and the pool is configured for 250 connections. If the load is representative we can safely reduce the pool size to say 50 connections and save some memory for other uses.
Another way to gauge connection pool usage is to check the elapsed times of the getConnection() methods calls used to get a connection from the pool.  If the pool is "undersized" we will see significant wait time to get a connection.  Use the following steps to check connection pool wait times:
  1. Find the JDBC-GetConnection events in the Event Summary view.  We can see that there is quite a wide range of elapsed times, from 0 seconds to 4 seconds.  This indicates that some threads are waiting to get connections from the pools.
  2. 2. Right-click on the JDBC-GetConnection node and choose Filter JDBC-GetConnection events.  The deep-dive editor table will show all the JDBC-GetConnection events and they will be plotted in the Transaction Chart.  Again, we can see quite a number of requests to get connections have to wait.

loading table of contents...