Sunday, February 17, 2013

Oracle Coherence for ADF BC - Performance Test

As you already know (Oracle Coherence Integration and ADF BC Programmatic VO) - Oracle Coherence can be integrated relatively easy into ADF BC and can help to improve ADF BC runtime performance for cached data. This is true, but it was interesting to do a quick research and check in practice - how much optimization Coherence caching gives for ADF BC application. I was using fairly simple application (ADFCoherenceApp_v2.zip) from my previous Coherence post (mentioned above). This application comes with two exactly same screens - one is based on regular SQL View Object, another is based on programmatic Coherence enabled View Object. I was running identical JMeter stress test for both screens.

Here you can download JMeter stress test scripts:

1. ADF screen with regular SQL View Object - AMTestDefault.jmx

2. ADF screen with programmatic Coherence enabled View Object - AMTestCoherence.jmx

Scripts are configured to run 50 parallel threads, 1850 requests in total. Recorded script actions - use Next, Last, First and Previous buttons - navigate through rowset. Scroll down/up and select rows in af:table component:


I executed 30 runs for each of the screens - default SQL VO and Coherence cache based VO. Average request execution result for both screens: 1.34 seconds for Coherence cache VO and 1.62 seconds for SQL VO. This is logical result, because data is cached with Coherence and retrieved directly from the cache for each of the 50 users. While with SQL based VO, data is retrieved from DB each time new user (50 in total) opens a new session:


This shows - to retrieve data from Coherence cache is faster comparing to retrieving the same data from DB with SQL. Sample application is fairly basic, but the same tendency will be reflected in production enterprise systems. Of course we can't use Coherence for every use case, but for such use cases where fast data access is required - Coherence will be great help.

Below I show you samples from the stress test.

Coherence cache based VO:



SQL based VO:



Lessons learned: runtime performance is much faster when using programmatic VO as a wrapper to access data from Coherence cache, comparing to POJO bean (Data Access Optimization in ADF with Oracle Coherence) acting as a wrapper to access Coherence cache. This seems because ADF BC Data Control runtime performance is faster comparing to POJO Data Control performance - this is on my list to verify with another JMeter stress test.

4 comments:

Anonymous said...

I think there is a problem with your graph. The time axis starts at 1.2, but it would look better if it started at 1.3 instead.

Andrej Baranovskij said...

I have changed it to be from 0, this is better.

Andrejus

Unknown said...

I am trying to migrate your example to JDeveloper 12.1.3 but have run into problems with the database connection. It appears to be looking for a connection named HRDSDS and fails because it can't find it. I am trying to run the application in the SOA Suite version of JDeveloper 12.1.3 Quick Start on the integrated WLS server. I have looked through the source code and can't find any references to HRDSDS. Do you have any ideas?

Phil.

Andrej Baranovskij said...

Hi,

ADF BC in this sample is using HR schema, you must define jdbc/HrDSD data source in WLS to make it work.

Regards,
Andrejus