cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject [C2] JdbcConnection Suggested Setting
Date Fri, 04 May 2001 16:27:33 GMT
This is to pass on a little knowledge.  The JdbcConnection pool is
set up to use a Hard Resource Limit.  This is by design, because many
DB vendors charge you licensing based on number of simultaneous connections.
Also, the more open connections you have on a machine, the more stress
you place on the networking mechanisms.

There comes a problem, however when you are opperating a machine under
heavy load, and are using many threads to handle connections.  The
Hard Resource Limiting policy then can become a gamble (do I have
enough connections to handle the load?).  In order to minimize the
gamble, here is my formula for finding a good starting point.

1) How many connections does the greediest page require?
     * Keep in mind that the esql logicsheet only requires
       one connection at a time, but the SQLTransformer
       requires two connections at one time.  If both of
       these are used together, then you have 3 simultaneous
       connections open.
     * Do not count actions--they are executed sequentially
       before the page generation process.

2) What is the expected load on my machine?  If you have a relatively
   quiet site, you won't need as many open connections.  If your site
   requires logging in, how many simultaneous users will be active?
     * Calculate 1 thread for every 3pages/second
     * Alternatively count 1 thread for every simultaneous user

Creq = Cpmax * T


Creq = total number of required connections
Cpmax = result from step 1 above (Connections/Page Max)
T = number of simultaneous threads

Granted, there is always the possibility of all threads accessing a
database backed page at the same time--so if you force your servlet
engine to only listen to the same number of threads as the JdbcConnectionPool
has connections you will never get the dreaded "Not Enough Resources" Exception.

To unsubscribe, e-mail:
For additional commands, email:

View raw message