Ebs performance tune_con9030_pdf_9030_0001
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Ebs performance tune_con9030_pdf_9030_0001

  • 927 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
927
On Slideshare
927
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
22
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 2. E-Business Suite Release 12.1Upgrade Best Practices -Technical InsightIsam AlyousfiSenior Director, Applications PerformanceSamer BarakatSenior Architect, Applications Performance2 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 3. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracles products remains at the sole discretion of Oracle. Copyright © 2012, OracleOracle and/or its affiliates. All reserved.3 3 Copyright © 2012, and/or its affiliates. All rights rights reserved.
  • 4. <Insert Here> Introduction4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 5. Introduction Context within Performance Management Configuration Operational Patching & Performance Requirements Best Practices Upgrades Testing & & Capacity Best Practices Planning Workload Performance Performance People Management Triage & Monitoring & Management Resolution Trending5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 6. Agenda • Introduction to Performance Triage Approach • Tuning Application Modules • Tuning the Concurrent Manager • Tuning the Database Tier6 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 7. Performance Triage7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 8. Performance Triage & Resolution How to Approach a Performance Issue  DEFINE the problem clearly  GATHER the right data to analyze the issue  Identify the ROOT CAUSE of the problem, possibly gather additional data  Search for a KNOWN SOLUTION or workaround that addresses the root cause of the problem  If it is a product issue, PASS ON the right information to support/dev through the regular channels  Try to identify a TEMPORARY WORKAROUND to alleviate the issue while you get a permanent fix8 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 9. Performance Triage & Resolution Define the Problem  Get a clear understanding & quantitative definition of the issue  Where is the time going ? Get the right diagnostics – What? – Where? – When? – Why? – How?  Identify the Techstack components in-play  Refer to the architecture9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 10. Performance Triage & Resolution Gather  ~ 80% of issues are DB processing related  If non-database (client side) processing occurs within the flow, you may see DB wait events like SQL*Net Message from client TCP Socket% PLSQL Lock Timer  Keep a watchful eye on OS metrics and resource consumption in all 3 tiers10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 11. Performance Triage & Resolution Gather Diagnostic Data Start with MOS Doc 1121043.1 for How-to & Best Practices • SQL Tuning • Database Tuning • Trace files • AWR Report (mos: 748642.1) • SQLT output (mos: 215187.1) • ADDM report (mos: 250655.1) • Trace Analyzer (mos: 224270.1) • Active Session History (ASH) • AWR Report (mos: 748642.1) • Forms Tuning • 11g SQL Monitor Report • Forms Tracing (mos: 373548.1) • AWR SQL Report (awrsqrpt.sql) • FRD Log (mos: 445166.1) • Generic note (mos: 438652.1) • PL/SQL Tuning • Middletier Tuning • Product logs • JVM Logs • PL/SQL Profiler (mos: 808005.1) • JVM Sizing/Tuning (mos: 362851.1,278868.1) • Reports Tracing (mos: 111311.1) • OS - OSWatcher (mos: 301137.1)11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 12. Performance Triage & Resolution Gather Enhanced Performance Diagnostics for Oracle E-Business Suite (mos: 1362660.1) •Gather as much diagnostic data as possible in one round trip to customer. •Available on 12.1.3 as a standalone patch# 12544073 (Mandatory Pre-Requisite AD Patch# 12991557) •Enhancement to FND_TRACE : New procedure “set_preferences” enables you to •Enable tracing for sessions •Enable tracing for one or more SQL statements using SQL_ID (*) •Generate CBO trace when tracing SQL statements (*) •Trace PL/SQL using PL/SQL Hierarchical Profiler (*) •Set Statistics Level (*) - Only in Oracle Database 11g+12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 13. Performance Triage & Resolution Gather Enhanced Performance Diagnostics for Oracle E-Business Suite (mos: 1362660.1) •One or more of the following outputs can generated automatically after the end of traced session. The concurrent program Gather Diagnostic Data for Traced Sessions is automatically submitted via System Administrator responsibility to gather this output. •AWR, ADDM and ASH Reports •Session Statistcs •SQLT output (*) •Trace Analyzer output, which includes SQLT output for top SQLs •Objects statistics when a SQL statement is traced, but SQLT output is not chosen or not installed •Real-Time SQL Monitor Report when a SQL statement is traced (**) •SQL Detail Report when a SQL Statement is traced (***) (* )Requires SQLT tool - Note 215187.1, (** )Oracle DB 11g+ (*** )Oracle DB 11.2.0.1+13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 14. Performance Triage & Resolution14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 15. Performance Triage & Resolution  Check for Known Issues & Available Fixes/Workarounds – MOS  Check the basics – Version levels – Required Configuration » Init.ora : Notes 396009.1 (R12) & 216205.1 (11i) – Latest patch levels – Recommended Patch lists in MOS , OAM – Also check for product specific notes  Best Practices in Performance for EBS – http://blogs.oracle.com/stevenChan/15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 16. Tuning the Applications16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 17. Tuning the Applications Patch Current – Apply latest Release Update Packs  Release 12.1.3: Patch 9239090 : MOS Doc: 1080973.1  Release 12.0 - RUP6: Patch 6728000 : MOS Doc: 743368.1 – Apply the latest EBS Family Packs + Recommended Patch List  Patching & Maintenance Advisor: (EBS) 11i and R12 (MOS Doc 313.1)  OAM Patch Wizard – “Recommended Performance Patches for the Oracle E-Business Suite”, MOS Doc 244040.1  Recommended performance patches for all the modules and tech stack components are consolidated in this note17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 18. Tuning the Applications Stay Current – Upgrade techstack components to the latest certified levels For example (as of Aug/2012), for R12 => Database 11.2.0.3, Forms 10.1.2.3, OC4J 10.1.3.5, JDK 6, etc  http://blogs.oracle.com/stevenChan/resource/certifications.html18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 19. Tuning the Applications Performance Best Practices – Purge & Archive  Implement a regular purge process including transient data as well as obsolete transactional data  Purge old data before performing upgrades  Many documented standard programs available – ~260 purge programs in R12  Purge Portal – Purge programs can be configured, initiated and monitored » Set the execution frequency as well view history of purge programs – R12: programs tagged with the “Purge” program type19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 20. Tuning the Applications System Administrator > Oracle Applications Manager >Purging/Critical Activities20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 21. Tuning the Applications Performance Best Practices – Logging  FND: Debug Log Enabled - Set it to ‘Yes’ (12.0 RUP3+, 12.1.x)  FND: Debug Log Level - Set to Unexpected (Level=6)  Query FND_LOG_MESSAGES to check the logging traffic  With above profile configuration – If the query shows a large number of rows being created, there could be exceptions and errors which need to be investigated21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 22. Tuning the Applications Performance Best Practices – Workflow  For background engines via Concurrent Manager, set the ‘Process Stuck’ parameter to ‘No’ – Identification of stuck workflows is resource intensive – Start a separate background engine to handle stuck/timed out processes with a low frequency –i.e. once a day  Use deferred activities to improve online response times for flows such as Scheduling, PO Document Approval, etc.  Purge runtime data (Conc Program: FNDWFPR) – Can run by ITEM_TYPE – Monitor/Troubleshoot old workflows not properly closed – Purge frequently22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 23. Tuning the Applications Performance Best Practices – Workflow  Run $FND_TOP/sql/wffngen.sql to translate the activity function calls into static calls – Edit & add heavily used ITEM_TYPES itemtypeList_t (‘WFSTD’,’FNDFFWF’) – Generates wffncal2b.pls in utl_file_dir to re-create pkg  Disable retention on Workflow Queues – DBMS_AQADM.ALTER_QUEUE(queue_name=>:b1,retention_time=>0);  Partition runtime tables for higher scalability – MOS Doc: 260884.1  For high volume batch processing in RAC use ITEM_TYPE to Node affinity23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 24. Tuning the Applications Performance Best Practices – Order Management  R12 OM Performance Fixes & Configuration Options to speed up processing: MOS Docs 849060.1 & 130511.1  Use streamlined workflows – Consider seeded workflow: “Line Flow Generic: Performance” – Removes unnecessary activities and sub-processes, reducing WF data significantly  Use Deferred tax & credit check  For online booking speed, consider deferring scheduling –MOS Doc 421314.1  Configurator should be setup to use a separate pool of JVMs24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 25. Tuning the Applications Performance Best Practices – Order Management  For online order entry, use the Quick Sales Order Form – OEXOETEL  Disable Debugging –OM: Debug Level, set to 0 for OFF –QP: Debug Mode, set to Request Viewer Off –WSH: Debug Enabled, set to No –WSH: Debug Level, set to 0 for OFF  Set “MRP: Calculate Supply Demand” to No –Only enable for a user session if detailed supply / demand data needs to be reviewed in an ATP Inquiry25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 26. Tuning the Applications Performance Best Practices – Financials  Account Analysis & Journal Entries Report – MOS Doc 983063.1 – Troubleshoot & Tune XML generation – BI Publisher – Recommended Performance Fixes – Debug, Scalable Flags and Memory setting recommendations –OOM Issues  Subledger Accounting & Accounting Hub - MOS Doc 791049.1 – Recommended Performance Fixes – Custom Indexing guidelines – Optimize # of Processors, Processing Unit Size & Event Class ordering – Payables specific fixes in MOS Doc 1271365.126 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 27. Tuning the Applications Performance Best Practices – Financials AR  Profile Option : AR: AutoInvoice Gather Statistics – Set to "NO" once representative stats have been gathered for RA_INTERFACE* tables  Index trx flexfields for headers & lines used in validation –interface_line_attributeN columns  Parallelize Batch flow – By supplied parameters where possible » e.g. Autoinvoice – Manually by data sets if needed » e.g. Rev Rec, AutoReceipts/Remittance, Auto-accounting (R12)27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 28. Tuning the Applications Runtime Performance Testing Tips – Use Automated, scripted tools  EBS Test Started Kits (Winrunner/QTP) – Bundled QA based automated scripts for EBS testing - Patch 8408886  Oracle Applications Testing Suite (Accelerators for EBS) – Web and Forms based flows – Complement with user participation tests and batch load tests with frequent and critical jobs – References http://blogs.oracle.com/stevenChan/2009/10/oats_ebs_certified.html http://blogs.oracle.com/stevenChan/2009/08/evolutionary_steps_automated_testing_ebs.html28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. Tuning the Concurrent Manager29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 30. Tuning the Concurrent Manager CM General Best Practices Workload Management Strategy CM Configuration Best Practices Parallel Concurrent Processing (PCP) Best Practices Concurrent Manager Tracing Best Practices30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 31. Tuning the Concurrent Manager General Best Practices – Manage CM Jobs Lifecycle: 50% of performance tuning is in the business!  Review long-running auto resubmitted jobs  Review short/long-running jobs – selective parameters?  Don’t purge jobs that the users then have to run again  Trim the fat: Review and eliminate concurrent jobs that are not required and/or are not being used by users. – Manage CM Managers : More managers/workers != more throughput  Avoid enabling an excessive number of standard or specialized managers.  A common guideline is between 1-2 target process per CPU, but this needs to be balanced with resources required by online activity  Utilize Parallel Concurrent Processing (PCP) to leverage the Cluster (RAC) .31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 32. Tuning the Concurrent Manager General Best Practices – Manage CM State Data:  Purge the FND tables on a regular basis using the “Purge Concurrent Request and Manager Data” program  Patch 7530490 for R12 or 7834670 for 11i (MOS Doc ID 822368.1)  High throughput: Keep *.out and *.log on fast disks. Use Separate disks if throughput seems slow especially on NFS Filers  Truncate the reports.log file in log directory. Watch for 2GB limit on any output files (Doc ID 842850.1) – Manage CM Schedules:  Use specialization rules and work shifts to bind specific jobs to specific time windows .  Avoid scheduling resource intensive batch requests during peak activity.  Reschedule some programs to run when the concurrent managers have excess capacity.  Define Workload Management Strategy based on job average duration and system usage profile.32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 33. Tuning the Concurrent Manager Workload Management Strategy – Avoid Short Sleep Times • *Enough for a couple of minutes of work • **Set cache size to at least twice the number of workers – Specialization rules and work shifts • Bind specific jobs to specific time windows • Profile Option: Concurrent: Active Request Limit can be used restrict the number of concurrent requests that may be run simultaneously by each user • Specialize if there are too many jobs in a specific category33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 34. Tuning the Concurrent Manager Configuration Best Practices – Conflict Resolution Manager Sleep Time:  To maximize throughput for jobs which spawn parallel workers (i.e. Auto Invoice, Payroll), consider reducing the sleep time of the Conflict Resolution Manager (CRM)  Default is 60s, consider 5 or 10 seconds – Concurrent Manager Sleep Time:  Define dedicated queues for short and frequent requests and increase the sleep times for managers which do not require near real-time job execution  Reducing sleep time to a very low value many cause excessive CPU utilization. – Transaction Manager Sleep Time:  Set the profile “Concurrent:Wait for Available TM” to 1 (second) to minimize TM latency. The profile sets the total time to wait for a TM before switchover to next available TM  Set Sleep time on Transaction Managers to 30 minutes. this avoids constant polls to check for shutdown requests.34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 35. Tuning the Concurrent Manager Configuration Best Practices – CM Queues :  Consider dedicating certain concurrent managers to process either short or long running programs to avoid queue backup  Add more queues if all queues are running at maximum capacity only if resources permit.  Tune the sleep time for queues with a large number of target processes. – Cache Size:  The cache size specifies the number of requests that will be cached each time the concurrent manager reads from the FND_CONCURRENT_REQUESTS table  Increase the cache size (number of requests cached) to at least twice the number of target processes  Increasing the cache size will boost the throughput of the managers by attempting to avoid sleep time.35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 36. Tuning the Concurrent Manager Configuration Best Practices – Transaction Managers (Pipes vs Advanced Queue) :  Transaction Managers are used for synchronous online processing (ex:Inventory Transactions)  Transaction Managers can use Pipes or queues (AQ).  Set System Profile: “Concurrent:TM Transport Type”: to either Pipe/Queue  Use queues in RAC for easier setup while supporting Failover.  Queues are Available in 11i (Doc ID 413636.1)  For R12 (or 11i post Oracle 10.1) AQ is largely self-tuning36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 37. Tuning the Concurrent Manager Parallel Concurrent Processing (PCP) Best Practices – Utilize Parallel Concurrent Processing (PCP) to leverage the Cluster (RAC).  Use dedicated CM queues with specialization rules (inclusion/exclusion) for programs with high scalability needs  Group by application, program, user, request_type; examples: – OM, Receivables Super User, Create Accounting – WF background engines Node to ITEM_TYPE assignment  Use Affinity : Direct some workload components to specific RAC nodes to maximize scalability by minimizing inter-node communication and synchronization work.  For RAC and PCP refer to MOS Doc ID1359612.1  Recommended: set the profile option ‘Concurrent: PCP Instance Check ‘ to OFF  Configure Multiple Concurrent Manager Instances. Each CM Instance points to a specific DB instance37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 38. Tuning the Concurrent Manager Parallel Concurrent Processing (PCP) Best Practices – PCP: 1 – 1 correspondence of CM nodes to RAC nodes  Set <s_cp_twotask> per CM node to tie to a specific RAC instance.  Do not use a load balanced TNS entry for the value of s_cp_twotask. The request may hang if the sessions are load balanced.  Define primary/secondary CM nodes for Failover – 12.1 define node affinity at the program level  Concurrent | Program | Define ( See MOS Doc ID 1129203.1)  12.1.3 introduced option to define node affinity at the program level – Concurrent -> Program -> Define38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 39. Tuning the Concurrent Manager Parallel Concurrent Processing (PCP) Best Practices – Extending Affinity to the Applications Tier (Forms)  Set Profile Option "Database Instance" at App or Resp level which can be tied to two_task value or to a service – Extending Affinity to the Applications Tier (Self-service)  Set Profile Options “App%Agent” to web tier hosts configured for specific services …or  Set Profile Option "Applications Database ID" to node specific DBC file name39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 40. Tuning the Concurrent Manager Parallel Concurrent Processing (PCP) Best Practices Application Affinity Example • 16TB DB 4 Node Cluster, 11.1.0.7, 15K concurrent peak users Node 1 Node 3 Order Management Financials – Install Base Node 2 GL, AP, PO, FA Payroll Node 4 Shipping Self-Service – HR (with self-service) Accounts Receivable Education iProc, Expenses Benefits Project Accounting Contracts DBI OTL (self-service) Imaging40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 41. Tuning the Concurrent Manager Concurrent Manager Tracing Best Practices – Program Level  Not recommended  Enable the trace/profiling option in the concurrent program definition – Request Level  Ensure “Concurrent: Allow Debugging” is set to ‘Yes’  Use the Debug Options button in the Request Submission Form – Tracing Documents  280391.1 How to Retrieve SID Information For a Running Request41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 42. Tuning the Concurrent Manager References (MOS Docs) • 1359612.1 Webcast E-Business Suite - RAC & Parallel Concurrent Processing • 1367676.1 Webcast E-Business Suite - Concurrent Manager Performance • 164085.1 Enhancing and Automating Oracle Applications Concurrent Processing • 1057802.1 Best Practices for Performance for Concurrent Managers • 1304305.1 E-Business Concurrent Processing Information Center42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 43. Tuning the Database43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 44. Tuning the Database Tier Configuration Best Practices CBO – Statistics Gathering Performance Management Common corrective actions to maximize scalability 11g New Features44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 45. Tuning the Database Tier Configuration Best Practices  Tune Init.ora Parameters: – Ensure mandatory init.ora parameters are set correctly. – MOS Docs 396009.1 & 216205.1 (R12 & 11i respectively)  Apply Required Patches & Fixes/Workarounds for Known Issues – Recommended Performance Patches -MOS Doc 244040.1 – Required Patching – Interoperability Notes »11gR1 Certified with 11i and R12 – MOS Docs 452783.1 & 735276.1 »11gR2 Certified with 11i – MOS Doc 881505.145 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 46. Tuning the Database Tier Configuration Best Practices  Properly Size SGA/PGA Memory : – Use Large/Huge pages. For example on Linux HugePages – MOS Doc 744769.1 – Only SGA allocation benefits from large/huge pages, PGA allocation does not. – Consider both SGA and PGA memory requirement when sizing your RAM »For dedicated server processes plan for PGA allocation of 30-40MB per shadow process (correlated to the process init.ora parameter) »For shared server processes, user connections allocate almost all of their memory from the SGA, so more SGA memory will be needed, and much less PGA will be required.46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 47. Tuning the Database Tier Configuration Best Practices  Tune Disk IO: – Ensure kernel asynchronous I/O is enabled and supported for the underlying file system (if file systems are being used for the DB files) – Configure & verify direct IO is used (if file systems are being used for the DB files) »Improves performance/scalability by simulating raw devices, avoiding file system cache traffic – Ensure your IO subsystem can handle your peak IO load & IOPS »Consider RAID, S.A.M.E. configuration with sufficient spindles »Measure with ORION tool or in 11g DBMS_RESOURCE_MANAGER.CALIBRATE_IO – MOS Doc 727062.1 – Reduce the IO workload »Tune expensive SQL »Trim the workload of unnecessary tasks »Do 3X less IO on average with 11g Advanced Compression Option47 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 48. Tuning the Database Tier Configuration Best Practices  Convert to the OATM Tablespace Model – OATM Consolidates # of Apps tablespaces from 400 to ~12  MOS Doc 248857.1 – OATM Uses automatic segment management (ASSM) along with uniform extent sizes for tablespaces containing large transaction tables/indexes. – OATM supports uniform extent allocation and auto allocate extent (AUTOALLOCATE ) management – OATM provides efficient space utilization. This is achieved by supporting locally managed tablespaces as opposed to the dictionary managed tablespace – OATM Helps avoid frequent space management operations. – Migration utility can be used to migrate a schema at a time48 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 49. Tuning the Database Tier Configuration Best Practices  Tune Backend Code Execution Path – Utilize PL/SQL Native Compilation. – Pin Top Apps PL/SQL packages by executions helps avoid shared pool fragmentation and reloads. – Check for cursor leaks select oc.sid,oc.hash_value,oc.sql_text,count(*) from v$open_cursor oc, v$session ss where oc.sid = ss.sid and oc.sql_text not like %COMMIT% group by oc.sid,oc.hash_value,oc.sql_text having count(*) > 5 order by 4;49 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 50. Tuning the Database Tier Configuration Best Practices  Tune Backend Code Execution Path – Check for SQL statements using literals with a large number of occurrences. – Cursor leaks/literals can result in ORA-4031 errors. – On RAC ensure PX requests do not span instances  10g - Set instance specific values for INSTANCE_GROUPS, PARALLEL_INSTANCE_GROUP  11gR1 - Can be done as above or via services  11gR2 - PARALLEL_FORCE_LOCAL =true – Tune sequence cache sizes for hot sequences (e.g. 1,000 or higher) in order to minimize index key contention for the Apps surrogate keys. – Make sure to use FNS_STATS to gather statistics.50 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 51. Tuning the Database Tier CBO – Statistics Gathering  Disable the 10g/11g automatic job to gather stats  Do not gather statistics excessively on entire schemas or the entire database such as nightly or weekly  Use the GATHER_AUTO option to gather incrementally  Use only FND_STATS or the Gather Schema / Table Statistics Concurrent Programs – Do NOT USE the analyze or dbms_stats command directly. It is not supported, and can result in sub-optimal plans. – When Gather Schema Statistics concurrent program is used fnd_stats does the bookkeeping for the run.51 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 52. Tuning the Database Tier CBO – Statistics Gathering  FND_STATS supports column histograms. – Histograms can be seeded by calling to fnd_stats.load_histogram_cols.  Analyze all schemas at 10%, then for some specific objects use higher sampling x% – Due to data skew, some tables benefit from higher sampling % – For 11g, can use value of zero (AUTO_SAMPLE_SIZE)  Consider locking stats for very volatile tables once a representative set is gathered – Some Interface tables – Other examples: ap_selected_invoices, wsh_pr_workers – Use FND_STATS.LOAD_XCLUD_TAB to skip the table52 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 53. Tuning the Database Tier CBO – Statistics Gathering  FND_STATS now supports Database 11g Extended Stats. The Multi-Column Statistics are used by Oracle to estimate the combined selectivity of the predicates.  Multi-Column Stats can be seeded by calling FND_STATS.LOAD_EXTNSTATS_COLS. FND_STATS Schema/Table stats will take care of the gathering stats on Multi-Column stats.  11g Extended Stats FND_STATS Patch 9470196. Also, in patch set 9962815.53 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 54. Tuning the Database Tier Performance Management • Establish baselines for different workloads by collecting system level performance information – AWR (Automatic Workload Repository) Report – ADDM (Automatic Database Diagnostic Monitor) Report – ASH (Active Session History) Report – Real-Time SQL Monitoring Report (11g+) •Parallel queries and queries taking > 5 seconds – Operating system statistics •OSW Document Doc ID 301137.1 •OSWg Document Doc ID 461053.154 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 55. Tuning the Database Tier Performance Management • Monitor and trace critical flows & concurrent programs – ASH (Active Session History) Report – SQL Trace Level 8 (with waits) or Level 12 (with waits and binds) followed by TKPROF • Check both raw trace and TKPROF • Interpreting Raw SQL_TRACE files MOS Doc ID 39817.1 – Trace Analyzer (TRCA) reads an Event 10046 SQL Trace file and provides a comprehensive report for performance analysis and tuning MOS Doc ID 224270.1 • Monitor and trace specific SQLs – SQLTXPLAIN (aka SQLT) MOS Doc ID 215187.1 •Maintained by Oracle Support - often requested •Collects information on why the execution plan was chosen55 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 56. Tuning the Database Tier Performance Management • Trace/TKPROF … Get the complete session story Set Trace Parameters – max_dump_file_size=unlimited •Ensure there is sufficient disk space in the tracing directory – user_dump_dest or if diagnostic_dest is set in Oracle11g •(diagnostic_dest)/diag/rdbms/(dbname)/(instname)/trace •background_dump_dest for parallel slave processes – STATISTICS_LEVEL=ALL Generate Trace – Forms: Help -> Diagnostics -> Trace – OA HTML: Diagnostics -> Tracing – Set the profile: “Initialization SQL Statement - Custom“. Use FND_CTL.FND_SESS_CTL56 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 57. Tuning the Database Tier Performance Management • Trace/TKPROF … Get the complete session story – Raw trace must be •A complete, non-truncated trace file *** DUMP FILE SIZE IS LIMITED TO 12345 BYTES*** – From before the user action began To the point the DB session ends** – Run TKPROF from the correct Oracle home •Use the sort options = fchela,exeela,prsela – TKPROF output MUST have •Runtime Execution Plans and Row Counts & Row Source Stats •Run Time Execution Plan = “Row Source Operation” != “Explain Plan” – Best practices, detailed how-to steps & recommended tracing patches •MOS Doc 1121043.1 (Also review Appendix B – Getting In-Memory partial runtime stats)57 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 58. Tuning the Database Tier Performance Management call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 7674758 780.79 728.70 0 1 0 0 Fetch 7674758 6328.78 6757.80 225987 153846532 0 7674758 ------- -------- -------- ---------- ---------- ---------- ---------- ---------- total 15349517 7009.58 7486.52 225987 153846533 0 7674758 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: ALL_ROWS Parsing user id: 173 (recursive depth: 2) Rows Row Source Operation ------- --------------------------------------------------- 7674758 SORT AGGREGATE (cr=153846532 pr=225987 pw=0 time=7174772779 us) 7675089 NESTED LOOPS (cr=153846532 pr=225987 pw=0 time=6919378560 us) 7675089 SORT UNIQUE (cr=123146176 pr=162809 pw=0 time=6083080435 us) 55878643 TABLE ACCESS BY INDEX ROWID AR_TRX_COGS_GT (cr=123146176 pr=162809 pw=0 time=5577872837 us) 136390387 INDEX RANGE SCAN AR_TRX_COGS_N1 (cr=23439707 pr=37706 pw=0 time=2136416980 us)(object id.. 7675089 TABLE ACCESS BY INDEX ROWID RA_CUSTOMER_TRX_LINES_ALL (cr=30700356 pr=63178 pw=0 time=539908369 us) 7675089 INDEX UNIQUE SCAN RA_CUSTOMER_TRX_LINES_U1 (cr=23025267 pr=2820 pw=0 time=196155435 us)(object ..58 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 59. Tuning the Database Tier Performance Management • Regularly Review Automatic Workload Repository (AWR) data for different workloads – Use DBMS_WORKLOAD_REPOSITORY or Enterprise Manager to create snapshots – Generate reports using $ORACLE_HOME/rdbms/admin/awrrpt.sql – Review the Advisory sections in AWR to fine tune SGA & PGA. – Monitor and correlate top SQL in AWR to business flows. – Review Load Profile and Top 5 Timed Events section to determine utilization & bottlenecks and review relevant detailed sections for these events.59 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 60. Tuning the Database Tier Performance Management • Regularly Review Automatic Workload Repository (AWR) data for different workloads – For Latch related waits •Often due to: non-sharable SQL, sub-optimal SQL which performs full table or full index scans, dynamic object creation/removal, etc. •Review the latch Statistics section to determine the hot latches •Trace waiter and holder sessions to determine actual cause – For I/O related waits •Review SQL sections by Logical/Physical reads and the Segment Statistics sections by I/O – For Enqueue related or buffer busy waits •Review the following sections: enqueue, segment statistics by buffer busy waits, row lock & ITL waits60 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 61. Tuning the Database Tier Performance Management • RAC AWR Analysis – Verify SQL execution is optimized – 10046 trace/SQL Monitoring – Collect AWR data from all instances •awrgrpt.sql and awrgdrpt.sql (cluster-wide base and diff reports) – Verify IO, CPU utilization and Interconnect messaging performance are within acceptable limits – Drill down on cluster wait events + “SQL order by Cluster Waits” – Correlate SQL executions on all instances accessing/modifying top segments in Segment Statistics by •Global Cache Buffer Busy & Buffer Busy Waits •CR/Current Blocks Received •Logical Reads61 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 62. Tuning the Database Tier Performance Management with EM-DB Console62 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 63. Tuning the Database Tier Performance Management with EM-DB Console63 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 64. Tuning the Database Tier Common corrective actions to maximize scalability  If bottleneck is IO related... ` (db file sequential read, db file scattered read, log file sync, free buffer waits, etc...) – Tune Top SQL is always the first step – Make sure that system has updated statistics. – Maximize Memory availability, allocate generously to buffer cache, review AWR advisories & monitor swapping & paging. – Use ASM or alternatively use the SAME methodology for db files. – IO Sub-system:  RAID 10 still preferred most often for high end requirements Ideal avg. response times of < 10ms. – Check for excessive/redundant indexing. – Configure async IO, use quick IO technologies.64 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 65. Tuning the Database Tier Common corrective actions to maximize scalability  If the bottleneck is concurrency related (enq%, latch%, buffer busy%, etc… ) – Use global hash-partitioned indexes for hot leaf blocks - Identify via AWR "Top logical IOs by Segment" – Some of these waits are commonly caused by bad SQL execution plans i.e. :latch: cache buffer chains, %buffer busy waits, read by other session – Make sure to use ASSM and OATM tablespace model. – Increase INITRANS to alleviate ITL contention. – Increase sequence caches, – Work with support/consulting to evaluate if table/index partitioning will help . – If the program allows, more frequent commits (batch size) can help by reducing the CR (consistent read) work required.65 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 66. Tuning the Database Tier Common corrective actions to maximize scalability  If the bottleneck is RAC related ... (gc%, global%, etc...) – First do all the steps mentioned previously... – Check interconnect configuration -- Use Jumbo frames. – Do not use parallel query/DML across nodes  Use instance_groups & parallel_instance_groups settings – Review Parallel Concurrent Processing & Application Affinity configurations  12.1.3 introduced option to define node affinity at the program level – Concurrent -> Program -> Define – Perform RAC focused AWR analysis …66 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 67. Tuning the Database Tier Why upgrade EBS to – Internal tests show 10-20% improvement in EBS batch & reporting workloads – Significant RAC Performance improvements – Oracle internal’s production EBS system on 11gR2; – Lower cost with Advanced compression, better/automated diagnostics, lower-risk upgrade with SPM/RAT/SPA … – Best Practices/Tips white papers »twp_upgrading_10g_to_11g_what_to_expect_from_optimizer.pdf »http://www.oracle.com/us/solutions/benchmark/apps-benchmark/67 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 68. Tuning the Database Tier 11g SQL Tracing Enhancements – New tracing parameter PLAN_STAT  first_execution | all_executions | adaptive* – Key tracing patches* listed on MOS Doc 1121043.1 – Turn trace on for just 1 or a list of sql_id’s – With real-time row source stats monitoring from v$sql_plan_statistics – no more waiting hours for a complete trace to get the right trace data – Expanded event syntax : - alter session set events ’sql_trace [sql:a5ks9fhw2v9s1|56bs32ukywdsq] … - Sql_trace wait=true | false, bind=true | false,planstat=never | first_execution | all_executionss|adaptive level = 1| 4| 8| 12 | 1668 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 69. Tuning the Database Tier 11g Automatic SQL Monitoring & Tuning69 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 70. Tuning the Database Tier 11g Performance Enhancements  Optimizer improvements – SPM (SQL Plan Management)– quick relief while permanent solution arrives – Better density estimates for skewed data – Faster, more accurate statistics with AUTO_SAMPLE_SIZE – Extended statistics - address predicate correlation – Adaptive cursor sharing – to address bind peeking issues  Some others… – Interval partitioning, Additional partitioning schemes – Text indexing performance enhancements – RAC scales better & AWR is more RAC aware – Many others..70 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 71. Tuning the Database Tier References (MOS Docs) • 1121043.1 Collecting Diagnostic Data for Performance Issues in Oracle E-Business Suite • 1362660.1 Enhanced Performance Diagnostics for Oracle E-Business Suite Release 12.1.3 • 301137.1 OSW Document • 461053.1 OSWg Document • 215187.1 SQLTXPLAIN (SQLT) • 224270.1 Trace Analyzer (TRCA) • 39817.1 Interpreting Raw SQL_TRACE files • 280391.1 How to Retrieve SID Information For a Running Request71 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 72. Other References72 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 73. References  R12.1 documentation roadmap (790942.1)  Oracle E-Business Suite Release 12.1 Info center (806593.1)  Database preparation guidelines for R12.1 upgrade (761570.1)  Patching FAQs (459156.1, 225165.1)  Staged or shared APPL_TOP and distributed AD (734025.1, 384248.1, 236469.1)  OAM “Patch Wizard” overview and FAQ (976188.1, 976688.1)  AD Command Line Options for Release R12 (1078973.1)  Recommended Performance Fixes (244040.1)  R12 Upgrade Sizing & Best Practices (399362.1)73 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 74. Additional Resources74 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 75. Additional Resources  EBS R12.1 Upgrade related Reports – EBS 12.1.3 Data Model Comparison Report (1290886.1) – EBS ATG Seed Data Comparison Report (1327399.1) – EBS File Comparison Report (1446430.1) – EBS pre-install patches Report (1448102.1)  White paper – Planning Your Oracle E-Business Suite Upgrade from Release 11i to Release 12.1 (987516.1) – R12 Upgrade considerations by product: Financials (889733.1) – Oracle E-Business Suite Upgrades and Platform Migration (1377213.1)  Have Upgrade questions ? Please post on OTN R12 upgrade forum http://forums.oracle.com/forums/forum.jspa?forumID=395&start=075 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 76. Oracle Demos Moscone WestEnd-to-End Management of Oracle W-063E-Business SuiteSOA-Based Integration for Oracle W-064E-Business SuiteNew User Productivity Capabilities in Oracle W-065E-Business SuiteOracle E-Business Suite 12.1 Technical W-066Upgrade Best PracticesAdvanced Architecture and Technology Stack W-067for Oracle E-Business Suite 76 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 77. Related SessionsWednesday CON8809 - Oracle E-Business Suite 12.1 Upgrade Best Moscone West10:15 am Practices: Technical Insight 3011 Isam Alyousfi, Udayan Parvate CON9032 - Upgrading Your Customizations of Oracle Moscone West10:15 am E-Business Suite 12.1 2016 Sara Woodhull CON9259 - Oracle E-Business Suite Internationalization and Moscone West10:15 am Multilingual Features 2018 Maher Al-Nubani CON9029 - Oracle E-Business Suite Directions: Moscone West11:45 am Slashing Downtimes with Online Patching 2016 Kevin Hudson 77 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 78. Related SessionsWednesday CON9027 - Personalize and Extend Oracle E-Business Suite Moscone West1:15 pm Applications with Rich Mashups 2016 Gustavo Jimenez, Padmaprabodh Ambale CON9036 - Advanced Oracle E-Business Suite Architectures: Moscone West3:30 pm Maximum Availability, Security, and More 2016 Elke Phelps CON9047 - Efficiently Scaling Oracle E-Business Suite on Moscone West5:00 pm Oracle Exadata and Oracle Exalogic 2016 Isam Alyousfi, Nishit Rao 78 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 79. Related SessionsThursday CON8716 - Web Services and SOA Integration Options for Moscone West11:15 am Oracle E-Business Suite 2016 Rekha Ayothi, Veshaal Singh CON9030 - Recommendations for Oracle E-Business Suite Moscone West11:15 am Performance Tuning 2018 Isam Alyousfi, Samer Barakat CON3429 - Using Oracle ADF with Oracle E-Business Suite: Moscone West11:15 am The Full Integration View 3003 Siva Puthurkattil, Juan Camilo Ruiz, Sara Woodhull CON9020 - Integrating Oracle E-Business Suite with Oracle Moscone West12:45 pm Identity Management Solutions 2016 Sunil Ghosh, Elke Phelps 79 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 80. Related SessionsThursday CON9019 - Troubleshooting, Diagnosing, and Optimizing Moscone West2:15 pm Oracle E-Business Suite Technology 2016 Gustavo Jimenez CON9031 - The Top 10 Things You Can Do to Secure Your Moscone West2:15 pm Oracle E-Business Suite Instance 2018 Eric Bing, Erik Graversen 80 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 81. Q&A81 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 82. 82 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 83. 83 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.