• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Need inputs for Database Tuning using Spring and Dbcp Connection pool

Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Spring in my project and instantiating dataSource as below.

Below is my properties file.

Please suggest :-
a)Any changes in the properties marked in Bold(initialSize,maxActive,maxidle,minIdle). My application will be concurrently used by around 100 users and total users are around 3000.
b)I am using Tomcat Server to deploy my application.Should I be using JNDI for connections instead of directly specify connection properties? Is above way of using connections good for a production System?

I have asked same question @ SF.

Posts: 2759
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would increase maxIdle. Setting it to 30 means that you might be cycling through connections too quickly. Normally to set maxIdle, in an enterprise, you talk to your DBAs about how many idle connections they will be able to support from your application. In an enterprise setting where the database is expected to support multiple applications, the DBAs should have an idea of how much load they expect from each app, and how important each app is. This should give them a rough guideline around how many idle connections they should assign to each app

I would also increase maxActive. If you say 100 users concurrently, does it mean 100 concurrent users at the absolute peak? Have you measured this somehow or is this is a guesstimate? If it's a guesstimate, then add a buffer if you haven't already.

Of course, these are numbers that you are starting with. You should have a plan to monitor the usage so you can adjust these numbers as you go.

Most databases can handle 10s of 1000s of idle connections. Normally, I wouldn't worry about such a low number. However, talk to the person who knows most about your database.
    Bookmark Topic Watch Topic
  • New Topic