Post on 18-Jul-2015
ADF, ADF Mobile, BPM, SOA, WebCenter
Small Team of Experts, Focused on Technical Quality Results
Customers – Global Corporations, Medium and Small Business
Oracle Technical Blog – 8 Years (~700 posts)
Oracle Fusion Middleware Innovation Award 2010, SOA Partner Community Award for Outstanding Contribution Across the Globe 2010
Company Profile
Agenda
Batches Of
AM Pools and DB Connections Pools
Activation-Safe Application Modules
Maximum Number of Regions Per Page
JSP vs Facelets
“Batches Of”: What Docs Say
9.2.4.2 Consider Whether Fetching One Row at a Time is Appropriate
[...] By default, the framework will fetch rows in batches of one row at a time. If
you are fetching any more than one row, you will gain efficiency by setting
this in Batches of value.
However the higher the number, the larger the client-side buffer required, so
avoid setting this number arbitrarily high. If you are displaying results n rows at
a time in the user interface, it's good to set the fetch size to at least n+1 so
that each page of results can be retrieved in a single round trip to the
database.
Developing Fusion Web Applications with Oracle Application Development Framework
Target
Scope
ToolsJMeter, Oracle Application Testing Suite,
JRockit, Java Mission Control, Weblogic
Console, Spy Servlet,
Redsamurai Performance Audit.
4 ADF applications in production for more than 6
months.
“Batches Of”: Methodology
Typical use cases: multiple queries per page,
returning less than 100 records each. Fetching
millions of records over JDBC is out of scope.
Batches Of: Test Results
No relevant impact when:
Less than 15 active user sessions
and
“Connection Delay Time” is
lower than 150 ms.
Batches Of: Conclusions
ADF 11g:
ADF 12c:
ADF 12c scales better!
Huge impact over memory size due to OJDBC
Driver 11g design, intentionally trading memory
for performance.
Memory impact is significantly lower because
new version of OJDBC Driver is less memory
hungry.
Batches Of: Conclusions
Performance improvement are significant when values are
between 10 - 40.
Oracle JDBC Dev Team suggests the “Batches Of” (Fetch
Size) to be less than 100.
Retrieving all records in a single round trip doesn’t
necessarily improve performance.
AM or DB Pools: The Options
Begin Request Process Request Send Response
jbo.doconnectionpooling=false (Default)
AM or DB Pools: The Options
Begin Request Process Request Send Response
jbo.doconnectionpooling=true
“AM or DB Pools”: What Docs Say
51.2.6 What You May Need to Know About How Database
and Application Module Pools Cooperate
Performance Tip:
Leave the “jbo.doconnectionpooling” configuration
parameter set to “false” for best performance without
sacrificing scalability and reliability.Developing Fusion Web Applications with Oracle Application Development Framework
AM or DB Pools: What we say
jbo.doconnectionpooling=false used to be best practice with
Oracle JDBC Drivers versions 8i or 9i, designed for minimal
memory use.
Driver’s performance improved by an average of 30% on 10i
version, by storing queried data into buffer (char[] and byte[]) arrays.
These buffers consume large amounts of memory that gets freed
only when statements are closed.
Holding statements open in ADF BC is no longer necessary since
“Statement Caching” was introduced at Datasource level.
AM vs DB Pools: What we say
jbo.doconnectionpooling=false brings scalability
problems with ADF 11g, but improves on ADF 12c
jbo.doconnectionpooling=true is the way OJDBC was
designed to be used on latest versions.
jbo.doconnectionpooling=false should be either dropped
or re-architected (javax.sql.rowset.CachedRowSet )
“Activation-Safe”: What Docs Say
50.10 Testing to Ensure Your Application Module is
Activation-Safe
“If you have not explicitly tested that your application module
functions when its pending state gets activated from a
passivation snapshot, then you may encounter an unpleasant
surprise in your production environment when heavy system
load tests this aspect of your system for the first time.”Developing Fusion Web Applications with Oracle Application Development Framework
“Activation-Safe”: What we say
Few ADF teams are doing activation-safe testing from
project start.
Fixing already built ADF applications is expensive and
sometimes impossible to fix without significant refactoring.
“Activation-Safe”: What we say
If max number of users is previously known, the application
module pool can be configured to suppress recycling.
Recycling application modules with the purpose of saving
memory is wrong idea of scalability.
Activation-safety is mandatory for ADF systems running in
Failover Cluster environments, otherwise it may be ignored.
Max No of Regions: What Docs Say
8.3.6 ADFc: Region Usage
“Adding regions to a page can be a powerful addition to the
application. However, regions can be a resource-intensive
component on the page. For better performance, consider using
regions only when the specific functionality is required.”
Fusion Middleware Performance and
Tuning Guide 11 g
“10 is the maximum amount of regions that you should have on a
single page just for good performance.”
ADF Architecture TV -Performance and Tuning - Controller and View Layer
Max No of Regions: Methodology
Goal Refactoring a complex page with a hierarchy of 25
regions to a page with a single region, preserving
the UI Component layout.
We made sure the data was previously queried
and cached before page load, so database hit
would not affect the measurements.
Max No of Regions: Conclusions
Subsequent testing while refactoring from 25 regions to 1 region didn’t
show any significant improvement below 10 regions use. The
improvement was minimal and increased constantly while number of
regions decreased.
Response time overhead when using 25 regions was 100 ms.
This is less than 2% of the response time, when querying is included.
Production ADF applications handle thousands of users with 40 regions
on the landing page.
JSP vs Facelets: What Docs say
“Unlike JSP documents, which are compiled into an
intermediate Servlet at runtime, Facelets don’t impose this
unnecessary overhead and build the JSF component tree
directly.
This leads to far better performance in the component tree
creation and page rendering processes.”
JavaServer Faces 2.0 Overview and Adoption Roadmap in Oracle ADF Faces
JSP vs Facelets: Methodology
Goal
Tools
Migrating a 12c application from jsp to facelets.
Oracle Application Testing Suite, DMS Spy
Servlet
References
http://docs.oracle.com/middleware/1213/adf/develop/index.html
http://www.oracle.com/technetwork/database/application-development/jdbc-memory-management-
12c-1964666.pdf
https://www.youtube.com/watch?v=FO1soDjSpO4
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adffaces-jsf20-190927.pdf