-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Scalabiliyt using Hibernate
PostPosted: Wed Jun 16, 2004 9:20 am 
Newbie

Joined: Fri Jun 04, 2004 8:55 am
Posts: 2
Details:
Hibernate 2.1.4
Oracle 8.1.7
Oracle JDBC classes12.zip
Java JDK 1.3.1

I am trying to stress test Hibernate. I have an existing application that
gets log records and inserts them into an Oracle database. This is a Corba application that receives insert requests from a listener app and sends the insert to Oracle. The current production application uses an Oracle data source
, connection pool and jdbc to insert the data. I am testing Hibernate
and doing the same processing except with the c3p0 connection pool. To keep the test the same I am using the jdbc connection rather then trying to persist a java object.

The production version of the code can sustain up to 330 inserts per second.
The hibernate version of the code maxes out at around 180 tps.

Both versions of the test run on the same hardware/dbms combination and use the same process.

cs = getClientSession(); // Calls SessionFactory.openSession()
Connection con = cs.connection();
Statement stmt = con.createStatement();
stmt.executeUpdate(sql);

stmt.close();
cs.close();



My basic question is are there overheads in Hibernate that I need to be aware of that can be optimized or turned off?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 10:04 am 
Beginner
Beginner

Joined: Mon Jun 07, 2004 4:21 pm
Posts: 44
Location: Boston
Enabling batching might help. Set it to a non zero value.

hibernate.jdbc.batch_size


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 10:11 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
try what lneelaka said,
also show c3p0 config

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 11:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
If you are running inside an appserver, use the appserver connection pool.

ie. don't test c3p0 vs. appserver connection pool, they have differenct behaviors.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 16, 2004 11:46 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Oh, also, I don't see you commit the txn! Note that Hibernate returns connections that have a txn started!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.