Hibernate performance degradation for persist and merge after upgrade from 3.6 to 4.3.5


We did a performance test with ContiPerf http://databene.org/contiperf and found performance degradation.

Test includes persisting and merging of POJO class without any associations. Attached are - 1) Entity class 2) Test cases

Below are the test results for multi-threaded tests-

with hibernate 4.3.5 :-
persist(test1) - 20000 invocations, 8 threads, rampup 1000ms - 42,381 ms
Throughput: 456 / s
Min. latency: 5 ms
Average latency: 16 ms
Median: 13 ms
90%: 23 ms
Max latency: 460 ms

select + merge (test2) - 20000 invocations, 8 threads, rampup 1000ms - 86,177 ms
Throughput: 232 / s
Min. latency: 7 ms
Average latency: 33 ms
Median: 29 ms
90%: 49 ms
Max latency: 535 ms

with hibernate 3.6 :-

persist(test1) - 20000 invocations, 8 threads, rampup 1000ms - 32,442 ms
Throughput: 616 / s
Min. latency: 4 ms
Average latency: 11 ms
Median: 9 ms
90%: 15 ms
Max latency: 470 ms

select + merge(test2) - 20000 invocations, 8 threads, rampup 1000ms - 63,798 ms
Throughput: 313 / s
Min. latency: 6 ms
Average latency: 24 ms
Median: 19 ms
90%: 38 ms
Max latency: 535 ms


JUnit 4.11, Oracle, ContiPerf 2.3.2


Steve Ebersole
October 27, 2015, 7:15 PM

This bug report does not indicate that the reported issue affects version 5.x. Versions prior to 5.x are no longer maintained. It would be a great help to the Hibernate team and community for someone to verify that the reported issue still affects version 5.x. If so, please add the 5.x version that you verified with to the list of affected-versions and attach the (preferably SSCCE) test case you used to do the verification to the report; from there the issues will be looked at during our triage meetings.

For details, see http://in.relation.to/2015/10/27/great-jira-cleanup-2015/

Steve Ebersole
October 28, 2015, 3:25 AM

As part of verifying that this issue affects 5.0, please just set the "Affects version". Leave the "verify-affects-5.0" label and leave the issue in "Awaiting Response" status; these are critical for us to be able to track these verifications and triage them. Thanks.

Deepak Raut
October 30, 2015, 12:22 PM

There was some execution behavior difference in our code between the runs we had, after taking care of that, we came to know there is no performance issue.
We use JIRA for our project as well and this kind of left to be updated with our findings confusing it has already been done. Sorry about that!

You can close this as User Misunderstanding.

Steve Ebersole
October 30, 2015, 2:20 PM

Thanks for checking!




Deepak Raut

Fix versions




Suitable for new contributors


Requires Release Note


Pull Request





Affects versions