1 / 41

Using Oracle Fusion Middleware to Create Fast and Scalable Applications

Using Oracle Fusion Middleware to Create Fast and Scalable Applications. Stevan Malesevic, Scott Oaks, Kim Lichong Oracle, Performance team September 29, 2014. Oracle Product Stack. Program Agenda. Java HotSpot tuning WebLogic Application Server Application Development Framework

dexter
Download Presentation

Using Oracle Fusion Middleware to Create Fast and Scalable Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Oracle Fusion Middleware to Create Fast and Scalable Applications Stevan Malesevic, Scott Oaks, Kim LichongOracle, Performance team September 29, 2014

  2. Oracle Product Stack

  3. Program Agenda Java HotSpot tuning WebLogic Application Server Application Development Framework SOA 1 2 3 4

  4. Program Agenda Java HotSpot tuning WebLogic Application Server Application Development Framework SOA 1 2 3 4

  5. Oracle Java (HotSpot) Tuning • JVM performance is critical to the overall performance of ADF/WLS applications • WLS 12c now uses HotSpot by default instead of jRockit • JDK 7u40 is recommended; JDK 8 is supported starting in 12.1.4 • Many important performance-related fixes for Fusion Middleware available in JDK 7u40 • Emphasis on reducing the amount of tuning required

  6. What to tune in Java 7 • TieredCompilation – enable with –XX:+TieredCompilation • On by default in Java 8 • Faster Startup • Slightly faster runtime performance • Increased native memory usage, though still small (~256M) • Heap Sizes • For JavaEE apps, best to set –Xmx == -Xms • One exception: WLS admin servers should have a small Xms • GC Algorithms • Maximize Throughput or Minimize Pauses

  7. GC Algorithms for FMW: Throughput • Throughput (Parallel) GC will usually give better overall throughput • Long pauses may lead to unusual results • Dependent on amount of data left in heap • 4GB for FMW is a usual inflection point

  8. GC Algorithms for FMW: G1 • G1 eliminates long pauses by concurrently collecting the heap • Optimizes memory collection at the expense of CPU • Recommended for heaps >4GB • Particularly when lots of live data is left

  9. HotSpot Tuning Resources • Java Performance by Charlie Hunt and Binu John • Systemic Approach to tuning Java Apps • Java Performance Tuning: The Definitive Guide by Scott Oaks • Lower-level JVM tuning details

  10. Program Agenda Java HotSpot tuning WebLogic Application Server Application Development Framework SOA 1 2 3 4

  11. Foundation Runtime for Oracle Fusion Middleware Products Oracle WebLogic Server Identity Management Suite Content Management Suite Business Intelligence Suite SOA Suite WebCenterSuite Java EE/ISVApps WebLogic Server Java EE: Reliability, Availability, Scalability & Performance Enterprise Manager Development Tools JDeveloper/Eclipse Admin and Operations HotSpot High Performance JVM Proven toOutperform Best forOracle Portfolio Lowest Cost of Operations

  12. WebLogic Server Tuning Overview • WebLogic Server provides good out-of-the-box default tuning for a large range of applications, as well as auto-tuning features (e.g. auto-tuned thread pool) • For optimal performance on a given application, additional application-specific tuning can help • Large number of tuning options available – we’ll review some of the most important. • Wealth of additional information in “Oracle Fusion Middleware Performance and Tuning for Oracle WebLogic Server”.

  13. JavaServer Pages (JSP) • Pre-compile JSPs • The weblogic.appc compiler generates and compiles the classes needed to deploy EJBs and JSPs to WebLogic Server. • Alternatively JSPs can be pre-compiled during deployment time (in weblogic.xml) <jsp-descriptor> <precompile>true</precompile> </jsp-descriptor> • Prevent JSP pages to timeout <param-name>jsp_timeout</param-name> <param-value>600</param-value>

  14. JDBC Connection Pooling

  15. Tuning JDBC • Pool Sizes • Initial Capacity = Number of connections created when pool is initialized • Minimum Capacity – Should be tuned for light load • Maximum Capacity – Should be tuned for peak DB throughput • Shrink Frequency = Reduces connections to current average need • Tune sizes based on DataSource statistics. Ensure connection wait time is not high. • Use Logging Last Resource (LLR) optimization instead of XA to minimize cost of two-phase commit • Use connection test (Test Connections on Reserve) with care

  16. Prepared Statement Cache • Keeps compiled SQL statements in memory • Avoid round-trip to DB if reused • Carefully tune for memory intensive applications • Oracle DB Driver – Use Driver Statement Cache • Overall memory footprint smaller than WebLogic Statement Cache • Data Source properties: • oracle.jdbc.implicitStatementCacheSize= • oracle.jdbc.maxCachedBufferSize= • Non-Oracle JDBC Driver – Use WebLogic Statement Cache • Monitor DB parsers and app server memory to tune cache size

  17. Work Manager Self-Tuning Thread Pool Work Managers Parallel Muxer Socket Readers Priority Based Queue

  18. Program Agenda Java HotSpot tuning WebLogic Application Server Application Development Framework SOA 1 2 3 4

  19. ADF BC – Application module configuration • General AM Pool Configurations • (jbo.dofailover) Specifies if failover for http replication is enabled or not. By default it is disabled • (jbo.locking.mode) Specifies the locking mode. The default is pessimistic. Web applications should set the locking mode to optimistic to avoid creating the row-level locks. • (jbo.ampool.maxpoolsize) Chose max pool size to satisfy peak load and prevent overload

  20. ADF BC – Application module configuration • General AM Pool Configurations • (jbo.recyclethreshold) Chose recycle threshold to satisfy average user load. • (jbo.ampool.timetolive) Chose time AM can live. In case of no leaks set to unlimited (-1) • AM will hold onto db connection by default. If number of db connections is a issue switch to db connection pooling (-Djbo.doconnectionpooling=true -Djbo.txn.disconnect_level=1) • (jbo.load.components.lazily=true) Enable AM lazy loading reduce memory usage

  21. ADF Config • Most of high level config goes to web.xml file and by default properties are configured for best performance • org.apache.myfaces.trinidad.COMPRESS_VIEW_STATE • compresses view state to save live memory and reduces size of replicated session. CPU usage is a tradeoff • org.apache.myfaces.trinidad.CLIENT_STATE_MAX_TOKENS: • Specifies how many view tokens should be stored

  22. ADF Config • Session time-out is important for live memory <session-config> <session-timeout>15</session-timeout> </session-config> • Cache resource. • By default ADF makes static resources (css, js, png,..) cacheable on browser. • Custom apps should mark their resources for caching as well • Map resources to trinidad caching servlet

  23. ADF Config <servlet> <servlet-name>resources</servlet-name> <servlet class> org.apache.myfaces.trinidad.webapp.ResourceServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>resources</servlet-name> <url-pattern>/your_app/*</url-pattern> </servlet-mapping>

  24. ADF Config • Use partial page navigation feature • Partial Page Navigation is a feature of the ADF Faces framework that enables navigating from one ADF Faces page to another without a full page transition in the browser. The new page is sent to the client using Partial Page Rendering (PPR)/Ajax channel. • The main advantage of partial page navigation over traditional full page navigation is improved performance: the browser no longer re-interprets and re-executes Javascript libraries, and does not spend time for cleanup/initialization of the full page • Enable PPR navigation in web.xml • oracle.adf.view.rich.pprNavigation.OPTIONS set to onWithForcePPR

  25. ADF Config • Profiling • oracle.adf.view.rich.profiler.ENABLED: Specifies whether or not to use the automated profiler instrumentation code provided with the JavaScript Profiler. The default is false. Set to true to enable the JavaScript profile. When the profiler is enabled, an extra roundtrip is needed on each page to fetch the profiler data. By default, JDeveloper uses the /WEB-INF/profiler.xml configuration file. To override the location of the profiler.xml file, use the ROOT_FILE context parameter, as described next. You may also want to set DEBUG_JAVASCRIPT to true, to turn off JavaScript obfuscation. You also must set the LOGGER_LEVEL to at least INFO.

  26. ADF Config • Check for default values • javax.faces.STATE_SAVING_METHOD value client • org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION value false • oracle.adf.view.rich.LOGGER_LEVEL value OFF • oracle.adf.view.rich.ASSERT_ENABLED value false • org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT value false • org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION value false • org.apache.myfaces.trinidad.resource.DEBUG value false • oracle.adf.view.rich.automation.ENABLED value false

  27. Program Agenda Java HotSpot tuning WebLogic Application Server Application Development Framework SOA 1 2 3 4

  28. SOA Architecture

  29. SOA Work Managers – new in 12c

  30. SOA Enterprise Manager– Tuning SOA components

  31. SOA Enterprise Manager– Tuning SOA components via MBean Browser

  32. Performance Tunings – Overview SOA Component Level SOA Infrastructure Generic • BPEL/BPMN • AuditLevel • OneWayDeliveryPolicy • InMemoryOptimization • MaxRecoverAttempt • ADF tuning for BPMN worklist/workspace • OSB • Execution/Message Tracing • Proxy/Result Caching • Poll_interval/Read_limit • Adapters • ThreadsCount • MaxRaiseSize • MaxTransactionSize • UseBatchDestroy • DistributedPolling • EDN • NumOfThreads • AuditLevel • Payload Validation • Work Managers • Lazy Loading • DB profiles • Auto Purge • Weblogic Application Server • JVM • Database + + *Majority of the parameters can be configured via EM

  33. Key DB Parameters • Consult with DBA • Avoid performance testing • with out of the box settings * Not a comprehensive list

  34. SOA Purge Has one of the biggest performance impacts on a SOA business application Impacts performance of runtime SQL queries Slows down console access when querying for auditing data Very large overhead when purging data – longer cycles required, defragmentation of DB, maintenance window If retention periods are long, larger disk space is required – BLOB column tables grow taking up bigger chunk of the DB Retention period dependent on customer policies/requirements Auto purge is default in 12c.

  35. Performance Tunings – Database • DB CPU • Log file sync • enq: HW – contention • enq: TX – index contention • enq: SQ - contention • Optimizer statistics collection: ensure optimal execution plan being generated.

  36. Performance Tunings – Database • When investigating slow sql, use sql trace or capture execution plan for detailed analysis, for example, check if the sub-optimal operation is related to stale/unrepresentative stats • Sometimes, SQL performance suffer from change in execution plan due to state statistics, change in data volume or bind peeking. • Goal of SQL plan baselines is to preserve the performance of corresponding SQL statements, regardless of changes in the database.

  37. SOA Performance Resources Session ID: CON8388Session Title:Simplified Performance Tuning for Oracle SOA Suite 12cVenue / Room: Moscone South - 236Date and Time: 10/2/14, 14:30 - 15:15

  38. Additional Performance Tuning Resources • 11g and 12c Tuning Guides (available on OTN) • Oracle Fusion Middleware Performance and Tuning Guide 11g / 12c • Oracle Fusion Middleware Performance and Tuning for Oracle WebLogic Server 11g / 12c • 11g and 12c ADF Developer Guides (available on OTN)

More Related