Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

ADF Mythbusters UKOUG'14

6,337 views

Published on

Busting popular myths in ADF, UKOUG 2014 session. Red Samurai Consulting - Florin Marcus, Andrejus Baranovskis.

Published in: Software
  • Be the first to comment

ADF Mythbusters UKOUG'14

  1. 1. ADF Mythbusters Andrejus Baranovskis Florin Marcus
  2. 2. Company Profile 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
  3. 3. Agenda Batches Of AM Pools and DB Connections Pools Activation-Safe Application Modules Maximum Number of Regions Per Page JSP vs Facelets
  4. 4. “Batches Of” Oracle Service Request: 3-9978776141 Performance and Memory Impact
  5. 5. “Batches Of”: How It Works
  6. 6. “Batches Of”: How It Works Batches of 1 - a network round trip for each record
  7. 7. “Batches Of”: How It Works Batches of 5 - a network round trip for every 5 records
  8. 8. “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
  9. 9. “Batches Of”: Methodology Target Scope Tools 4 ADF applications in production for more than 6 months. Typical use cases: multiple queries per page, returning less than 100 records each. Fetching millions of records over JDBC is out of scope. JMeter, Oracle Application Testing Suite, JRockit, Java Mission Control, Weblogic Console, Spy Servlet, Redsamurai Performance Audit.
  10. 10. Batches Of: Test Results No relevant impact when: Less than 15 active user sessions and “Connection Delay Time” is lower than 150 ms.
  11. 11. Batches Of: Response Time Response time with 100 user sessions
  12. 12. Batches Of: Memory Consumption ADF 11g One user browsing the application
  13. 13. Batches Of: Memory Consumption ADF 11g ADF 12c One user browsing the application
  14. 14. Batches Of: Conclusions ADF 11g: ADF 12c: 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. ADF 12c scales better!
  15. 15. 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.
  16. 16. AM Pools DB Pools The Great Schism Oracle Service Request: 3-9979146351
  17. 17. AM or DB Pools: The Tickbox
  18. 18. AM or DB Pools: The Options Begin Request Process Request Send Response jbo.doconnectionpooling=false (Default)
  19. 19. AM or DB Pools: The Options Begin Request Process Request Send Response jbo.doconnectionpooling=true
  20. 20. “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
  21. 21. AM or DB Pools: Memory char[] and byte[] (%) in ADF 11g
  22. 22. AM or DB Pools: Memory char[] and byte[] (%) in ADF 12c
  23. 23. 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.
  24. 24. 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 )
  25. 25. Activation-Safe AMs Oracle Service Request: SR 3-9979203251 The trouble with high loads
  26. 26. “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
  27. 27. “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.
  28. 28. “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.
  29. 29. Maximum Number of Regions Code vs performance Oracle Service Request: 3-9979119591
  30. 30. 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
  31. 31. 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.
  32. 32. Max No of Regions: Response Time
  33. 33. 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.
  34. 34. JSP vs Facelets Is conversion to Facelets necessary?
  35. 35. 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
  36. 36. JSP vs Facelets: Methodology Goal Tools Migrating a 12c application from jsp to facelets. Oracle Application Testing Suite, DMS Spy Servlet
  37. 37. JSP vs Facelets: Response Time Faster initialization of facelets
  38. 38. 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

×