This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Persistence: Hibernate vs iBATIS vs JDBC: Performance  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I carried out a rudimentry test to compare memory utilization by Hibernate (utilizing full resources vs only using connection manager), iBATIS and JDBC. Here is the order of call (if that matters):

1. Plain JDBC call

2. Hibernate connection manager

3. Hibernate

4. iBATIS


Each flow created a new connection but the memory calculation only inlcluded portion of code that is directly responsible for stored procedure execution / query execution. When I executed the code multiple times (over 10) in the same order (and for same data), the memory utilization was not consistent but porportion was somewhat consistent: JDBC took the least memory, and then hibernate with only connection manager, iBATIS and Hibernate. It was hard to record execution time (even milliseconds scale could not record).


If other goups have gone through similar path it would be nice to discuss. Also, about any sophisticated tools available for the same purpose besides WAS profiling mode.


Here is a typical memory snapshot:



----------------------USING ONLY THE CONNECTION MANAGER-------------

1. Total memory allocated for JVM: 15110 KB

2. BEFORE SP CALL: Total memory used: 10415 KB

3. AFTER SP CALL: Total memory used: 11721 KB

4. Additional memory used: 1306 KB

----------------------USING FULL HIBERNATE RESOURCES-------------

1. Total memory allocated for JVM: 15110 KB

2. BEFORE SP CALL: Total memory used: 12235 KB

3. AFTER SP CALL: Total memory used: 13839 KB

4. Additional memory used: 1604 KB

----------------------USING PLAIN JDBC RESOURCES-------------

1. Total memory allocated for JVM: 15110 KB

2. BEFORE SP CALL: Total memory used: 15087360 B

3. AFTER SP CALL: Total memory used: 15087416 B

4. Additional memory used: 56 B

----------------------USING iBATIS-------------

1. Total memory allocated for JVM: 14355 KB

2. BEFORE SP CALL: Total memory used: 9349 KB

3. AFTER SP CALL: Total memory used: 10389 KB

4. Additional memory used: 1040 KB
 
That feels good. Thanks. Here's a tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!