You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by neal <ne...@yahoo.com> on 2002/08/30 06:40:24 UTC

DBCP: optimum settings

Im wondering what the maximum active conn objects is in a DBCP pool.  On my
production server I'm running Tomcat 4.0.4 on Linux, using Connector/J 2 and
MySQL 3.23.  I'm running a 733 PII, with 256 MB RAM.  I've got
resourceParams maxWait set to 100 and maxIdle set to 3000.

Does anyone know what would be optimum with this config, off hand?   Just
trying to get a basic idea.

Thanks.
Neal


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: optimum settings

Posted by Struts <sc...@hotmail.com>.
I running Tomcat4.0.1 on Win2000,using sun.jdbc.odbc.drvier,but return value is null?

can you tell me  the error come from ?
----- Original Message ----- 
From: "neal" <ne...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, August 30, 2002 12:40 PM
Subject: DBCP: optimum settings


> Im wondering what the maximum active conn objects is in a DBCP pool.  On my
> production server I'm running Tomcat 4.0.4 on Linux, using Connector/J 2 and
> MySQL 3.23.  I'm running a 733 PII, with 256 MB RAM.  I've got
> resourceParams maxWait set to 100 and maxIdle set to 3000.
> 
> Does anyone know what would be optimum with this config, off hand?   Just
> trying to get a basic idea.
> 
> Thanks.
> Neal
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

Re: DBCP: optimum settings

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 29 Aug 2002, neal wrote:

> Date: Thu, 29 Aug 2002 21:40:24 -0700
> From: neal <ne...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: DBCP: optimum settings
>
> Im wondering what the maximum active conn objects is in a DBCP pool.  On my
> production server I'm running Tomcat 4.0.4 on Linux, using Connector/J 2 and
> MySQL 3.23.  I'm running a 733 PII, with 256 MB RAM.  I've got
> resourceParams maxWait set to 100 and maxIdle set to 3000.
>
> Does anyone know what would be optimum with this config, off hand?   Just
> trying to get a basic idea.
>

There's no general purpose answer to this, because it is *totally*
application dependent.

The max active connections determines the maximum number of simultaneous
requests your database will be hit with from the webapp that is using the
pool.  How many can it support?  How many TCP connections can your OS and
JVM support?

Tuning parameters like this is an exercise in tradeoffs -- increasing the
limit (and actually running into it) generally causes response times to
worsen for everyone -- your job is to achieve an appropriate balance.  The
interesting part is that the relationship between more users and slower
response is usually not linear -- in fact, it often has a very sharp
kneebend where supporting "n" users is ok, but supporting "n + 5" users
starts to go through the roof.

But you need to start by asking yourself how many simultaneous users you
expect to have executing your app.  Start with maxActive set to that
number and back it down if response times are too long.  Along the way, be
prepared to start tuning the database operations that go too long (this is
usually *much* more important than the size of the connection pool) or
buying some more hardware.

>Thanks.
> Neal

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>