Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 5057 invoked from network); 30 Aug 2002 16:54:35 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 30 Aug 2002 16:54:35 -0000 Received: (qmail 17642 invoked by uid 97); 30 Aug 2002 16:54:29 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 17427 invoked by uid 97); 30 Aug 2002 16:54:27 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 17299 invoked by uid 98); 30 Aug 2002 16:54:27 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Fri, 30 Aug 2002 09:53:51 -0700 (PDT) From: "Craig R. McClanahan" To: Tomcat Users List Subject: Re: DBCP: optimum settings In-Reply-To: Message-ID: <20020830094726.X71205-100000@icarus.apache.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Thu, 29 Aug 2002, neal wrote: > Date: Thu, 29 Aug 2002 21:40:24 -0700 > From: neal > Reply-To: Tomcat Users List > To: Tomcat Users List > 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: For additional commands, e-mail: