• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Application-JDBC Pooling-Performance Boosting

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi All,

Do you think if JDBC Connection Pooling can increase throughtput performance for a Java application ? We are talking about a performance of 4000 inserts/second of 2KBytes records.

Thanks in advance,

Ulvi
 
Ranch Hand
Posts: 430
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
take a look here: http://www.javaranch.com/journal/200601/JDBCConnectionPooling.html

hth
 
ulvi ugur
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

Thanks for the reference but I am not sure if the article is applicable for my case as I am _not_ running any servlet/beans which represent many users with a lot of intermittent requests. In my case, I have only one application and main question is if it makes sense to use more than one connection to increase performace.

Any additional comments ?

Thanks again,

Ulvi

 
Leandro Coutinho
Ranch Hand
Posts: 430
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, you don't need to create more connections than you are using. What you can do is avoid to open and close connections, and instead you use a connection pool. Take a look in c3p0 -> http://www.mchange.com/projects/c3p0/index.html

I don't know if it is useful to your case. Try to execute the inserts in batch.

I'm just learning this subject as well, so wait for others replies and do your own search. =)

Other interesting links:
http://www.precisejava.com/javaperf/j2ee/JDBC.htm
http://www.ibm.com/developerworks/data/library/techarticle/dm-0708calio/
http://www.javaperformancetuning.com/tips/jdbc_batching.shtml
http://en.wikipedia.org/wiki/Connection_pool
 
ulvi ugur
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

After some weeks, I can answer my own post; more connections simply increase the performance there. Running 50-60 simultaneous connections in multi-threads increased our performance like 30-40 times.

Thanks for the replies anyways.

Ulvi
 
Good night. Drive safely. Here's a tiny ad for the road:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic