-
1. Re: Interceptor stack kills CMP performance
giorgio42 Sep 9, 2002 4:02 PM (in response to giorgio42)
I explored the topic a bit further, and I detected, that my previous performance comparison was a bit unfair, because it included a 'find' on each instance for the CMP version.
After I changed this (simply doing a findAll() and then creating a value object for each instance), the CMP performance is still at least 3, most of the time however 5 - 10 times worse than using direct JDBC calls.
I tried the following options to improve speed:
1) declaring all getters and the loadAttributes() method read-only in jboss.xml
2) shrinking the interceptor stack.
Option 1) leads to a slightly, but almost not noticeable better performance.
For option 2) I removed one interceptor after the other, re-running the performance test each time.
The most interesting outcome is, that even removing almost all interceptors does not lead to a significant performance improvement, except the EntityMultiInstanceSynchronisation interceptor. Removing this interceptor reduces the time to read the 1000 test entities by 50%, AS LONG AS no attributes or only the primary key field is accessed. Copying four of the seven attributes leads to the same performance as before (when the EntityMultiInstanceInterceptor is included), and copying all attributes doubles the time required for reading the test entities.
After researching this topic for two days I did not find any convincing possibility to improve the CMP reading performance to tolerable values. Therefore I have to implement the reporting part of my application using direct JDBC calls. What a shame!
Regards
Georg -
2. Re: Interceptor stack kills CMP performance
dsundstrom Sep 9, 2002 5:50 PM (in response to giorgio42)To be honest, JBossCMP has not been heavly preformce tested by me. Other have and posted patches that gave us major improvements. Considering what you are doing, JDBC will always be faster, so you have a choice to make raw speed vs maintance cost. It is you choice based on you situation.
Just a quick question. Are you using a single wrapping transaction? Did you try the value class pattern where you load all the values you are interested in. This usually gives a preformance boost. -
3. Re: Interceptor stack kills CMP performance
giorgio42 Sep 11, 2002 3:19 AM (in response to giorgio42)Dain,
- yes, I am using a single wrapping transaction. Using commit option A instead of B has no noticeable effect on performance.
- yes, I am loading all values into a value object inside a loadAttributes() method of the EB.
Of course CMP will always be slower than raw JDBC. The point is: how much slower?
With the current performance, I cannot build an interactive application that lists more than a few hundred (~300) value objects created from EBs in a page or window, otherwise the window will take too long to build up. This is a severe limitation.
I have read that you want to do a CMP-based forum for the JBoss web site. It would be interesting to see how it performs. And also how you solve the concurrent access problems.
Regards
Georg -
4. Re: Interceptor stack kills CMP performance
giorgio42 Sep 11, 2002 3:47 AM (in response to giorgio42)
I include an Excel spreadsheet of my performance test results, exported as tab-separated ascii file and the (stripped-down) code of my test EB.
And the jboss.xml as well.
If you could give any hints on how to speed up the EB performance, this would be greatly appreciated.
Regards
Georg -
5. Re: Interceptor stack kills CMP performance
giorgio42 Sep 11, 2002 3:51 AM (in response to giorgio42)
Dain,
I decided to remove the Excel spreadsheet.
I'd like to send it to you directly.
Georg -
6. Re: Interceptor stack kills CMP performance
dsundstrom Sep 11, 2002 2:51 PM (in response to giorgio42)Send it to me dain@daingroup.com. I am super busy right now so I won't be able to look at it right away.
-
7. Re: Interceptor stack kills CMP performance
hunterhillegas Oct 21, 2002 12:34 PM (in response to giorgio42)Just curious whatever happened with this thread... Did anything ever come of this stuff?
-
8. Re: Interceptor stack kills CMP performance
giorgio42 Oct 23, 2002 3:55 PM (in response to giorgio42)
I sent the stuff to Dain, but never got an answer so far.
Regards
Georg