-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Performance Breaking After Some Time
PostPosted: Thu Jan 26, 2012 11:10 am 
Newbie

Joined: Thu Jan 26, 2012 10:57 am
Posts: 2
Hi Everybody,

we are somewhat confused by our problem: First everything is working smoothly, our use cases run through with fine performance. But after 'some time' (whatever the trigger is???) our application's performance drops and everything Hibernate related is running two or three time slower.
We did already check for memory leaks, database (mysql) parameters, table indexes, c3p0 parameters, etc. etc. etc. but did not find anything - well, actually we found several minor things, but none solved our problem.
Oh, and we have everything running under Windows, as our clients require this. One (only one) test system running Ubuntu does slow down too, but seems to be slowing down by only about 50% instead of 200% and more under Windows.

Does anybody have any clue on what's going wrong here?

Tanks a lot!

Cheers,
Christoph


Top
 Profile  
 
 Post subject: Re: Hibernate Performance Breaking After Some Time
PostPosted: Fri Jan 27, 2012 3:07 am 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
How much work is being done within each session? Is it possible that you work with only one very large session? This session "holds" all entities being read which slows down everything that has to be done with all the entities the session holds (e.g. dirty checking). You could try session.flush() and session.clear() at certain points to get rid of entities that you don't need anymore. And you should use a session only as long as you need it.


Top
 Profile  
 
 Post subject: Re: Hibernate Performance Breaking After Some Time
PostPosted: Fri Jan 27, 2012 4:59 am 
Newbie

Joined: Thu Jan 26, 2012 10:57 am
Posts: 2
CDillinger wrote:
How much work is being done within each session? Is it possible that you work with only one very large session? This session "holds" all entities being read which slows down everything that has to be done with all the entities the session holds (e.g. dirty checking). You could try session.flush() and session.clear() at certain points to get rid of entities that you don't need anymore. And you should use a session only as long as you need it.


The sessions are only being used for a single request, typically around 200-500ms. We currently even do a flush() and clear() before we close the session in order to avoid anything related with c3p0 session pooling.

But I noticed one more thing: Beside all other persistence related things getting slower the Transaction.commit() gets remarkably slower. From around 25ms up to 150-250ms for the same operation.

Any clue? Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.