commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject RE: [DBCP] Slow Performance Under Load
Date Thu, 24 Apr 2003 18:38:43 GMT

On Thu, 24 Apr 2003, Timko, Cheryl A. wrote:

> Date: Thu, 24 Apr 2003 13:37:43 -0400
> From: "Timko, Cheryl A." <>
> Reply-To: Jakarta Commons Users List <>
> To: 'Jakarta Commons Users List' <>
> Subject: RE: [DBCP] Slow Performance Under Load
> I have DBCP configured to use the default configuration where:
> driverClassName=oracle.jdbc.driver.OracleDriver
> url=jdbc:oracle:thin:@xxxxx:25000:mytestdb
> Username=xxx
> Password=xxx
> defaultAutoCommit=true
> defaultReadOnly=false
> logAbandoned=false
> removeAbandoned=false
> removeAbandonedTimeout=300
> maxActive=8
> maxIdle=8
> maxWait=-1
> minEvictableIdleTimeMillis=1800000
> timeBetweenEvictionRunsMillis=-1
> numTestsPerEvictionRun=3
> testOnBorrow=true
> testOnReturn=false
> testWhileIdle=false
> whenExhaustedAction=1
> Can you recommend more optimal configuration values?

One important consideration is how many simultaneous requests you are
trying to process.  Setting maxActive=8 means that having more than 8
simultaneous users will definitely cause slowdowns.

On the other hand, it's not a good idea to set maxActive to some
arbitrarily high value either -- the right answer tends to be very
specific to your particular application (and, of course, setting this to a
number higher than the maximum connections your database is configured to
support won't help either).  But I would definitely experiment with
different values for maxActive.

If you're talking about something like a web application where you get
bursts of simultaneous requests, followed by relatively low use, you
probably want to up the maxIdle setting to something close to what you set
maxActive to, in order to avoid needlessly closing connections and then
having to reopen them.

> Thanks in advance for your help!
> - Cheryl


View raw message