• 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

Persistence: Hibernate vs iBATIS vs JDBC: Performance

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic