eG Monitoring
 

Measures reported by GfConnPoolTest

A connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and wastes resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database. As opposed to this, the lack of adequate connections in the pool can prolong the time taken to connect to a database.

To analyze the impact of connection pools on the database connection time, use the GfConnPoolTest test. This test auto-discovers the connection pools configured on the GlassFish server, tracks the usage of connections in each pool, and reports whether/not sufficient connections are available in the pools to handle the connection requests to the GlassFish server. This way, the test points you to connection pools that are starved for connections and helps you assess how this impacts connection requests to the GlassFish server.

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
Created_connections Indicates the number of connections that were currently created in this pool. Number  
Used_connections Indicates currently used connections in this pool. Number A high value indicates a large number of connections to the database.
Free_connections Indicates the total number of free connections in this pool. Number  
Used_Connections_Percent Indicates the percentage of currently used connections in this pool. Percent  
Request_waiting_time Indicates waiting time of the last request that was serviced in the pool. Secs  
Avg_waiting_time Indicates average waiting time per successful request to this pool. Secs The effectiveness of a connection pool can be measured by observing how much it reduces the connection time. A low value for this measure is hence a clear indicator that the connection pool is effective in reducing the wait time of connection requests. A high value on the other hand, could indicate that the pool is running out of connections often, causing connection requests to wait for long periods of time to be processed.
Connection_timedout Indicates the total number of connections in this pool that timed out between the start time and the last sample time. Number  
Potential_connection_leak Indicates currently available potential connection leaks. Number Ideally, the value of this measure should be 0.
Waiting_que_length Indicates the number of connection requests to this pool that are currently in waiting queue. Number A consistent increase in the value of this measure could indicate that there are not enough connections in the pool to service the connection requests received by the GlassFish server.
Failed_connections Indicates number of connections in this connection pool that failed validation from the start time until the last sample time. Number Ideally, the value of this measure should be 0.
Released_connections Indicates the current number of logical connections released to this pool. Number  
Destroyed_connections Indicates the number of physical connections in this pool that were destroyed since the last reset. Number