Skip to Content.
Sympa Menu

grouper-dev - RE: Grouper Query with hib2 vs hib3

Subject: Grouper Developers Forum

List archive

RE: Grouper Query with hib2 vs hib3

Chronological Thread 
  • From: Chris Hyzer <>
  • To: Shilen Patel <>
  • Cc: Grouper Dev <>
  • Subject: RE: Grouper Query with hib2 vs hib3
  • Date: Sat, 23 Feb 2008 23:28:48 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US


I assume I can cc the group with your message (to share knowledge about our
action item)... I think I have an answer (though not one people will like)...

I used the CVS tag: GROUPER_20080217_POST_HIB3 (and change the config to use
c3p0), and run the test class from HEAD (TestGroup0.runPerfProblem() will
commit this soon), and when hib2, it ran in ~4800ms, and when hib3 it ran in
~4950ms. This is not a significant difference. That tag is the hib3
upgrade, but not the inverse of control or transactions. So it makes me
think hib3 is not much slower than hib2. However, in profiling results, it
does seem like Hibernate spends more time when hib3 for some reason (you
might see it in your results too)...

When profiling, if you can eliminate the startup time from the picture you
will get a more accurate picture of the differences. Im sure we are not as
interested in the startup time of grouper, just once it is started, how long
queries take. I think I read the hib3 startup is slower than hib2, so if
that is a part of the profiling, the results might be tainted. In jprobe I
set a trigger on enter/exit a method to start/stop profiling. Hopefully
Yourkit has a similar feature.

Anyways, in HEAD, which has hib3 and inverse of control and transactions, the
result of that test are hib2: ~4800ms, hib3: ~5300ms. This is the 10%
difference. As you can see from my attachment, a certain percentage of the
callback overhead is used by the flush/clear which is needed by nested
transactions or unit tests don't pass and nested transactions don't work (not
to say all of that is overhead, maybe hibernate has done some work it wont
have to do later?). But if I comment out those lines it doesn't completely
reconcile the differences (some must be the anonymous inner classes and other
code needed to support the changes).

Im afraid that at this point this is going to be a necessary hit for the
ability to support transactions, unless we want to spend more time trying to
streamline. Though it is more than I would have estimated it would be. Im
not using a very full grouper db, so if I can somehow replicate the data you
are using for your test that would be good: either sending me your exported
data somehow, or if it is private, cleansing it somehow and reproducing...


> -----Original Message-----
> From: Shilen Patel
> [mailto:]
> Sent: Friday, February 22, 2008 1:38 PM
> To: Chris Hyzer
> Subject: Grouper Query with hib2 vs hib3
> Hi Chris,
> Here are some profiling results from a query executed using Hibernate
> 2 and Hibernate 3. The actual Java code executed is:
> GrouperQuery gq =
> GrouperQuery.createQuery(session, new GroupAttributeFilter("name",
> "ECON", rootStem));
> Set queryGroups = gq.getGroups();
> The session was created using GrouperSystem to skip through most of the
> privilege checking.
> This query returned 3804 results and the actual Oracle query took about
> the same amount of time for hib2 (671 ms) vs hib3 (673 ms).
> However, the time to execute gq.getGroups() was very different. 4.9
> seconds with hib2 vs 5.6 seconds with hib3. I'm getting this 10-15%
> difference in execution time consistently.
> This seems very odd and I don't see any explanations for this
> difference. Can you take a look?
> Please let me know if you need any additional information.
> Thanks,
> -- Shilen

Attachment: grouperProfile.gif
Description: grouperProfile.gif

  • RE: Grouper Query with hib2 vs hib3, Chris Hyzer, 02/23/2008

Archive powered by MHonArc 2.6.16.

Top of Page