JDBC Pool Manager - Steady Pool Size Tuning

Sun has recently announced the "GlassFish Enterprise Manager". I would talk about a particular feature : "Performance Advisor". One of the management rules of Performance Advisor is the JDBC Pool Manager. Jdbc pool manager tunes the steady pool size and maximum pool sizes of jdbc connection pools based on the load. This blog would briefly talk about steady pool size tuning.


 Example


Consider a cricket website. On a non–match day, there will be a minimum number of requests to this website. On a match–day, even if it is a working day, people tend to use such websites to check the runs and number of wickets. The number of requests will pour in as a result and for maximum resource utilization, the steady pool size needs to go up. If done manually, the administrator will have to configure this steady pool size.


 After  a while, number of requests are bound to come down. As a result, the steady pool size would have to be brought down. This constant recomputing of steady pool size based on the load is automated by the JDBC Pool Manager.


How is it Configured?


Assume there is a jdbc connection pool : cricket–info–pool. jdbc/cric is the resource that references this pool. The cricket–info–pool is set to a default steady pool size of 8. An application that uses the jdbc resource to get information from a database is set up. Client access this application to retrieve information. JDBC Pool Manager rule can set up from admin GUI.



  • The Default Max Connections is the maximum number of connections that can be provided from the pool at any point of time.

  • The management rule tunes the steady pool size in Sampling Frequency number of seconds.

  • The sample size denoted by Number of Samples is used to calculate the moving average value for number of connections.


Marking cricket-info-pool under PoolNames will configure the rule for this connection pool.  Click on Save after entering all the details.The domain needs to be restarted now, as the rule is configured for the target "server".


On domain restart, you can observe from the server.log that the steady pool size is recalculated to a certain value. After a while, assuming there are 500 client requests for a period of 10 minutes.



The steady pool size is recalculated every 60 seconds (default sampling frequency) to a new value suitable for the current number of requests.

Comments:

Nice blog Shalini, love the cricket analogy :)

Posted by Arun Gupta on February 15, 2009 at 03:28 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

shalini_m

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today