-->
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.  [ 6 posts ] 
Author Message
 Post subject: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Tue Jun 01, 2010 3:32 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Hey,

Hibernate docs and Gavin claim that the overhead over JDBC is 10%

I run hibernate own performance tests.
The test located under hibernate source:
hibernate-distribution-3.5.1-Final\project\testsuite\src\test\perf\org\hibernate\test\perf\NewerPerformanceTest.java

The test contains some tests.

The testMany result was ratio of 2 in mysql located on the same machine.

The other tests also get ratio bigger than 2.

Gavin get angry when people give him their own tets cases . he always claim that they wasnt write them correct.
So here is hibernate own performance test (i didnt dive inside it to check how to get better performance) and the results are bad!!!!

Thank you


Last edited by avihaimar on Fri Jun 04, 2010 5:40 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Wed Jun 02, 2010 1:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 11, 2009 2:26 am
Posts: 29
hey, so what's your point? :)
if i remember correct, those *perf* testes in testsuite are not maintained anymore since hibernate 3.3.x
i will check with others dev, and if yes, then we will move them to unmaintained directory
thanks


Top
 Profile  
 
 Post subject: Re: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Wed Jun 02, 2010 10:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Please point us to the section of the docs that show us claiming that Hibernate adds zero overhead to JDBC (which is what you say we claim).

The numbers I see routinely say anywhere between 10 and 20 percent. The problem of course lies in the fact that as your domain model gets more complex the overhead generally goes down. The inverse of that is that on simple domain models the overhead tends to be higher than "real life", hence why we repeatedly say that benchmarks of O/R Mapping tools is largely pointless.


Top
 Profile  
 
 Post subject: Re: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Wed Jun 02, 2010 2:18 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Gavin in a lot of places talk on overhead of 10%

It turns out that the overhead of Hibernate itself, compared to equivalent direct SQL/JDBC, is almost always so small as to be irrelevant.
http://www.javaperformancetuning.com/news/interview041.shtml

Hibernate consistently offers superior performance over straight JDBC coding.
http://www.hibernate.org/about/why-hibernate.html

In the FAQ they claim for 10% overhead and so more
http://simoes.org/docs/hibernate-2.1/15.html -Hibernate performance FAQ

I dont find the link now, but in some place someone show his tests which show huge overhead and Gavin made angry on him and said that those tests are wrong and they have tests that show 10% overhead.

So, i go to the tests run them and get 100%- 500% overhead.

My point- i wish to see test with overhead of 10% . The test shouldnt be a batch (bulk) because in the typical application scenario you load single rows from a given type (you load the custome, customer credit....) and you dont run in a loop that do an average on bulk loading


Last edited by avihaimar on Fri Jun 04, 2010 5:44 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Wed Jun 02, 2010 3:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You sure seem to an agenda and/or axe to grind here. I'll let someone else help if they wish

(btw Hibernate+jdbc taking twice as long over jdbc is not 200% overhead...)


Top
 Profile  
 
 Post subject: Re: Hibernate performance vs JDBC - I run hibernate own test
PostPosted: Wed Jun 02, 2010 3:14 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
My agenda is hibernate success.

Look on the following posts and on the comments there.
http://www.codefutures.com/weblog/andygrove/2007/10/hibernate-conclusions.html

In the above post the writer tell about his bad expereince in confronting hibernate team with his own benchmark.
He wrote:
Quote:
However, the real surprise for me was how the performance and scalability compared between the two approaches. I spent a couple of days building a realistic subset of the application I was recommending the technology for and then ran benchmarks against a large database on dedicated test hardware. The results showed that Hibernate didn’t scale at all well compared to Spring JDBC for this application.

I posted some questions to the Hibernate forum to validate the approach I had taken and I received the rather terse and unhelpful reply “This is called 'A useless microbenchmark' and has been addressed a thousand times.” from a member of the Hibernate team. I did some reading of the Hibernate Performance FAQ and found some interesting statements in there, such as "We claim that Hibernate performs well" and "Many people try to benchmark Hibernate. All public benchmarks we have seen so far had (and most still have) serious flaws.". It almost seems like it is taboo to question Hibernate performance. I don't understand this defensive stance since most developers would recognize that there is a trade off between ease of use and performance


This is one of dozen example in the web for failed to discuess hibernate team on benchmarking.

We all wish to hibernate success and performance is a key to success.In order to success hibernate need to prove the small overhead.
hibernate visibility by publish a good and proven benchmark is required.

I have 6 years experience with hibernate.
In most of the time (not all) i recommended for hibernate.
In order to make the recommendation and the decision to chose hibernate easier for company that didn't use hibernate a proven benchmark is required.

My suggestion is to fix the test and not removed them.The test will be used as a performance reference and will be used to make hibernate performance visibility higher and not a taboo as it today.
A benchmark should include lot of cases like:
Simple objects
Complex objects
Bulk
Read
Write
Merge complex graph and more


If you want i am willing to take this task under my responsibility and to create a better performance test, but i need your cooperation with this.

Thank you


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