-->
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: 3x slower after upgrade from hibernate 3.2.5.ga to 4.3.4
PostPosted: Fri Mar 21, 2014 7:10 am 
Newbie

Joined: Thu Mar 20, 2014 2:54 pm
Posts: 2
Hello,

finally decided (in fact forced because of jar incompatibilities) to upgrade my webapp from hibernate 3.2.5.ga to 4.3.4-final.

this went rather smooth, only needed to change namespaces in config and mapping files (yes, still doing old-school mapping).

as part of my regression tests, i was creating a 'long' report in my webapp. with 3.2.5.ga this took ~15 seconds, with 4.3.4-final this takes ~45 seconds.

what did i check:
+ i enabled the sql statement logging:
- the same number of statements was used in both cases
- 1 type of statement changed (in 3.2.5 a 'left outer join' was used, in 4.3.4 a 'inner join' was used), i assume this is a hibernate optimization
+ i checked the cpu usage with top: with 3.2.5 mysqld uses up to 15%, while with 4.3.4 mysqld only uses up to 5%. tomcat is using in both cases close to 100% of 1 cpu => so bottleneck seems to be in java
+ i tried to replace the c3p0 jar that was packaged with hibernate (c3p0-0.9.2.1.jar) with a more recent one (c3p0-0.9.5-pre6.jar), but this has no effect

does this ring a bell or any suggestion on how to further investigate this?

below is my config file

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>
<!-- properties -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:5555/bla-app?zeroDateTimeBehavior=convertToNull</property>
<property name="hibernate.connection.username">foo</property>
<property name="hibernate.connection.password">bar</property>

<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>

<!-- to be able to use true, false in HQL -->
<property name="hibernate.query.substitutions"> true 1, false 0 </property>

<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.min_size">10</property>
<property name="hibernate.c3p0.timeout">200</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.acquire_increment">3</property>

<!-- mapping files -->
...

</session-factory>

</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: 3x slower after upgrade from hibernate 3.2.5.ga to 4.3.4
PostPosted: Tue Mar 25, 2014 10:04 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi, no this doesn't ring a bell. If any it's very surprising, as we did a lot of healthy performance optimisations lately which are inlcluded in 4.3.4.Final so I would expect opposite results.
Is there any way you could profile it and identify the issue? I guess something must be going wrong, and if you can isolate the cause you should win a much better performance.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: 3x slower after upgrade from hibernate 3.2.5.ga to 4.3.4
PostPosted: Wed Mar 26, 2014 7:18 am 
Newbie

Joined: Thu Mar 20, 2014 2:54 pm
Posts: 2
ok, resolved.

the new version was hitting the configured permgen limit. after increasing this limit, the report creation took the same time in 3.2.5 and 4.3.4.


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.