• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need inputs for Database Tuning using Spring and Dbcp Connection pool

 
Ankur Luthra
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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?

P.S.
I have asked same question @ SF.
http://stackoverflow.com/questions/26230531/need-inputs-for-database-tuning-using-spring-and-dbcp-connection-pool

Regards,
Ankur
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!