Академический Документы
Профессиональный Документы
Культура Документы
Table of Contents
Document Overview.......................................................................................................... 3 Siebel CRM Versions and Supported Oracle Database Versions...................... 4 Transitioning from RBO to CBO ............................................................................ 5 Transitioning from Oracle CBO 9i to Oracle CBO 10g.................................. 5 Cost Based Optimizer Statistics.................................................................................... 6 Collecting Optimizer Statistics .............................................................................. 6 Deleting Optimizer Statistics ................................................................................. 7 Locking Optimizer Statistics................................................................................... 7 System Optimizer Statistics................................................................................... 7 Know When to Create a Stored Outline .................................................................... 9 Fix the root cause, not the symptom! ............................................................... 9 Dropping Outlines ...................................................................................................... 9 Peeking of User Binds in Siebel CRM........................................................................ 10 Double Hard Parse in Siebel 7.7/7.8 ................................................................ 10 Environment Variable SIEBEL_ORA_BIND_PEEK ........................................ 11 Bind Peek with Single Hard Parse in Siebel 8.1.1 and Back Porting to Earlier Versions of Siebel ...................................................................................... 11 Hidden parameter _optim_peek_user_binds ................................................ 11 Preparing and Administrating the Siebel Database for CBO ........................... 12 Default Database Parameters ............................................................................. 12 Recommended Database Parameters .............................................................. 12 Hidden Parameters in Oracle 10G ..................................................................... 15 Parameter OPTIMIZER_INDEX_COST_ADJ .................................................... 16 Hard-coded Session Parameters for Siebel OM Sessions......................... 16 Bibliography and Useful References ......................................................................... 17 Oracle Corporation Documentation................................................................... 17 Oracle Product Defects Affecting Siebel .................................................................. 18 Oracle 9i Product Defects...................................................................................... 18 Oracle 10g Product Defects.................................................................................. 19
2
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Document Overview
The purpose of this document is to publish a formal recommendation for Siebel CRM configuration and performance tuning on the Oracle database platform. Siebel CRM performance tuning is a complex area. There is no one size fits all solution. A well-tuned out-of-box Siebel CRM configuration may need to be further enhanced for most implementations given the different data volume, the data shape, the transaction mix, and the customizations, etc. Multiple documents and recommendations exist on this subject from different sources, which are either too general or too specific. Many times those documents contradict each other, and even deviate from what Siebel CRM performance experts recommend. This document is an attempt to reconcile all documents published in the past. It provides concise guidelines on key areas that affect performance of Siebel CRM application deployed on the Oracle database platform. It defines a set of basic rules to implement for Siebel CRM configuration and performance tuning on the Oracle database platform. If such rules are meticulously deployed, it should lay down a solid foundation for further performance tuning. This document should be used in conjunction with Siebel CRM Troubleshooting Guide, which is currently being developed.
3
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Siebel 7.7 Siebel 7.7 Siebel 7.7 Siebel 7.8 Siebel 7.8 Siebel 7.8 Siebel 8.0 Siebel 8.0 Siebel 8.1
With the exception of Siebel CRM version 7.7 on Oracle 8i Enterprise Server, all the above listed Siebel CRM versions can only be configured to use the Cost Based Optimizer (CBO). This differs from the recommended configuration for pre-Siebel 7.7 CRM versions, which utilized the Rule Based Optimizer (RBO) on Oracle 8i Enterprise Server. In the vast majority of cases, performance of the Siebel application with properly implemented and configured CBO will meet or exceed RBO performance, ceteris paribus (i.e. under similar architecture/network topologies, hardware configurations, data volumes/distributions, storage characteristics, etc.). Detailed discussion of the RuleBased Optimizer (RBO) is beyond the scope of this document. The following provides general guidelines for RBO to CBO migration.
4
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
5
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
EXECUTE DBMS_STATS.GATHER_TABLE_STATS ( ownname => '<table owner>' , tabname => '<table name>' , method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO' , granularity => 'ALL' , cascade => TRUE , degree => DBMS_STATS.DEFAULT_DEGREE );
It is critical to note that we do not recommend collecting histograms statistics for all columns. Such histograms statistics can be created only for tables with highly skewed data where some values have a disproportional number of rows. Unnecessary introduction of histograms in the statistics collection is one of the most common mistakes. We strongly recommend that the optimizer statistics histograms be created using 'for all indexed columns size auto' method (please see the syntax in the above example). However, there are a few exceptions to this rule. Some tables in Siebel CRM schema are known to have skewed data, and collection of all column statistics histograms may lead to generation of better query plans. Below is the list of such tables, along with the recommended method and syntax to create the optimizer statistics:
Siebel Table Name S_POSTN_CON S_ORG_BU S_ORG_GROUP Oracle Optimizer Statistics Collection Method FOR ALL COLUMNS SIZE 254 FOR ALL COLUMNS SIZE 254 FOR ALL COLUMNS SIZE 254
One needs to benchmark the application performance to make sure that full column statistics histograms do help in their environment.
6
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
EXECUTE DBMS_STATS.DELETE_TABLE_STATS ( ownname => '<table owner>' , tabname => '<table name>' );
There are a few cases when we recommend to delete optimizer statistics collected for Siebel CRM data tables:
We recommend using 'for all indexed columns size auto' to generate statistics before any query tuning. If the statistics were created differently, it is necessary to delete them1 and recreate a new set of the optimizer statistics using 'for all indexed columns size auto' method before starting the query tuning.
Regenerating statistics using 'for all indexed columns size auto' may not clean-up entirely the previous statistics. Therefore, the statistics must be deleted first to make sure there are no residuals.
7
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
workload (noworkload) and statistics captured with a workload. In addition to CPU cost, disk I/O and memory utilization are also captured, to ensure that CBO picks the plan with the lowest estimated cost relative to other plans. Many Oracle DBAs attempt to leverage system optimizer statistics for further tuning of Siebel CRM application. Such actions may cause unpredictable degradation in performance of certain Siebel CRM application views and queries, and are strongly discouraged. We recommend that DBAs refrain from collecting system optimizer statistics, or altering any Oracle default settings pertaining to systems statistics.
8
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Dropping Outlines
To comply with the above recommendation, it may be necessary to identify the Stored Outlines that exist in the environment, check if the outlines have been used, and understand their intended usage. [USER|ALL|DBA]_OUTLINES view should be used to display information about existing outlines:
In certain cases, CBO ignores the Outline if it cannot use it. For example, if an index that the Outline is supposed to use is dropped the CBO will ignore the Outline and generates a new query plan.
9
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
The Stored Outlines can be dropped by using a PL/SQL package DBMS_OUTLN. For example:
10
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Bind Peek with Single Hard Parse in Siebel 8.1.1 and Back Porting to Earlier Versions of Siebel
In Siebel 8.1.1 a solution was devised to enable bind variable peeking using single hard parsing. This fix has already been ported 8.0.0.6 FP and 7.8.2.12 FP. We are in process of back porting the fix to 7.7.2.12 FP. This solution resolves the issues arising from bind peek with double hard-parse or no bind peek in earlier versions explained in the last 2 sections. Our recommendation is to upgrade to one of the above-mentioned FixPack versions, as soon as such version is available for the corresponding base version of Siebel CRM product.
11
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
It is always a good idea to set the OPTIMIZER_FEATURES_ENABLE = <Oracle DB patch version being used> to get full benefit of a series of optimizer feature supported by Oracle DB version. Hence, if your db version is already 10.2.x, then you can set the OPTIMIZER_FEATURES_ENABLE=10.2.x.
OPTIMIZER_DYNAMIC_SAMPLING This parameter controls the level of dynamic sampling performed by the optimizer. OPTIMIZER_MAX_PERMUTATIONS This parameter restricts the number of permutations of the tables the optimizer will consider in queries with joins. A higher value result in
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
12
higher parse time, a lower value carries the risk of overlooking a good plan. NOTE: Starting with Oracle Database 10g, this parameter has been made obsolete. Refer to the Oracle documentation for further information. OPTIMIZER_INDEX_COST_ADJ Controls the access path 100 100 1 selection to be more or less index friendly. QUERY_REWRITE_ENABLED Enable or disable query False True False rewriting globally for the database (**) Do not automatically alter the values of these parameters, which have been deprecated to hidden parameters in 10g, based on the recommendations for visible parameters in version 9i. The parameters below should be set according to the information documented in the following Siebel Bookshelf references: Siebel Installation Guide for Microsoft Windows Version 8.0 > Configuring the RDBMS > Configuring an Oracle Database for Siebel Applications > Guidelines for Configuring Settings in the init.ora File. Siebel Installation Guide for UNIX Version 8.0 > Configuring the RDBMS > Configuring an Oracle Database for Siebel Applications > Guidelines for Configuring Settings in the init.ora File. Siebel Installation Guide for Microsoft Windows: Servers, Mobile Web Clients, Tools Version 7.8 > Configuring the RDBMS > Configuring Oracle for Siebel Applications > Guidelines for Configuring Settings in the init.ora File. Siebel Installation Guide for UNIX: Servers, Mobile Web Clients, Tools Version 7.8 > Configuring the RDBMS > Configuring Oracle for Siebel Applications > Guidelines for Configuring Settings in the init.ora File. Siebel Installation Guide for Microsoft Windows: Servers, Mobile Web Clients, Tools Version 7.7 > Guidelines for Configuring the RDBMS > Configuring Oracle for Siebel Applications. Siebel Installation Guide for UNIX: Servers, Mobile Web Clients, Tools Version 7.7 > Guidelines for Configuring the RDBMS > Configuring Oracle for Siebel Applications. Recommended Value DB_FILE_MULTIBLOCK_READ_COUNT The database buffer cache For most implementations, parameter dictates the this value should be set number of data blocks read between 16 and 32 blocks in a single Oracle I/O and adjusted as necessary. operation during a table You may want to set an scan. initial value of 32. SORT_AREA_SIZE This value is specified in Set bytes, and may be adjusted PGA_AGGREGATE_TARGET according to the number of instead. When not setting users, the amount of RAM PGA_AGGREGATE_TARGET available, and the size of - You should start with an Oracle Parameter Description
13
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
sorted queries.
SORT_AREA_RETAINED_SIZE
Specifies (in bytes) the maximum amount of the user global area (UGA) memory retained after a sort run completes. The retained size controls the size of the read buffer, which Oracle uses to maintain a portion of the sort in memory.
initial value of 1,000,000 (1 MB). Optimal performance can be achieved for the Dictionary Managed TEMP tablespaces if the extents are uniform and a multiple of the SORT_AREA_SIZE. Set PGA_AGGREGATE_TARGET instead. When not setting PGA_AGGREGATE_TARGET - Derived from SORT_AREA_SIZE.
The following related parameters should be set by a trained DBA and according to the information in the applicable Oracle database documentation and requirements for your implementation. General guidance on these related settings is provided below: Oracle Parameter PGA_AGGREGATE_TARGET General Guidance For most production implementations with a substantial number of users, this value should be set to 1 GB or greater. Monitor PGA target advisory views for additional guidance. All the advisories in Oracle9i TYPICAL in production and Release 2 including the ALL in TEST environments. Buffer Cache Advisor are controlled by a newly introduced parameter STATISTICS_LEVEL. Relevant to parallel Set execution operations and to PGA_AGGREGATE_TARGET the query portion of DML or instead. When not setting DDL statements. It specifies PGA_AGGREGATE_TARGET the maximum amount of - Derived: 2 * memory, in bytes, to be SORT_AREA_SIZE used for hash joins. Specifies the policy for If sizing work areas. This PGA_AGGREGATE_TARGET parameter controls the is set, then AUTO. If mode in which working PGA_AGGREGATE_TARGET areas are tuned. is not set, then MANUAL. Description Specifies the target aggregate PGA memory available to all server processes attached to the instance.
STATISTICS_LEVEL
HASH_AREA_SIZE
WORKAREA_SIZE_POLICY
14
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
OFF Always use this method for semi- In some cases, setting _always_semi_join to OFF join when possible renders better performance. This is due to Siebel OMs FIRST_ROWS_10 optimization strategy. However, it is recommended that a customer run a thorough performance testing to verify whether this setting improves performance in the Siebel environment Enable the use of bitmap plans for tables with only Btree indexes Determine how long to defer down converts for hot buffers FALSE For Siebel OLTP environment, it is recommended to set _b_tree_bitmap_plans to FALSE and _partition_view_enabled to FALSE 0 For a Siebel RAC implementation, it is recommended to set _gc_defer_time to 0. This is applicable to Oracle 9i and 10g environments
_b_tree_bitmap_plans
_gc_defer_time
_no_or_expansion
OR expansion FALSE during optimization Some customers report setting this parameter to is disabled TRUE is providing better performance. However, Siebel does not perform better consistently with this setting. It is recommended to set this parameter to FALSE 100 Starting with Oracle Database 10g, optimizer_max_permutations is an obsolete parameter. It is recommended to leave this hidden parameter setting to its default value FALSE For Siebel OLTP environment, it is recommended to set _partition_view_enabled to FALSE and _b_tree_bitmap_plans to FALSE
_optimizer_max_permuta Limit the optimizer tions maximum join permutations per query block _partition_view_enabled Enable/disable partitioned views
15
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Parameter OPTIMIZER_INDEX_COST_ADJ
This parameter is of critical importance for Siebel CRM application performance. Incorrect setting may result in severe performance degradation of Siebel CRM application. For Oracle 9i CBO setting OPTIMIZER_INDEX_COST_ADJ = 1 is imperative. This will set the optimizer goal for best response time (versus best throughput). Incorrect setting may cause the optimizer to favor full-table scans instead of index access. For Oracle 10g/11g CBO setting OPTIMIZER_INDEX_COST_ADJ = 1 is also recommended, although the default setting of 100 will deliver good results in most cases.
It is important to understand that in-house tuning of Siebel CRM application was performed with OPTIMIZER_INDEX_COST_ADJ = 1 setting. This means that customers who want to implement OPTIMIZER_INDEX_COST_ADJ = 100 on Oracle 10g/11g will need to allocate extra development time for additional tuning that may be necessary. The need for such tuning is not considered to be an optimizer defect or a regression issue. Oracle Engineering will only review cases when it is confirmed that a specific query performance is equally unacceptable both under OPTIMIZER_INDEX_COST_ADJ = 1 and OPTIMIZER_INDEX_COST_ADJ = 100 settings. In all other cases, additional tuning should be provided on-site, or OPTIMIZER_INDEX_COST_ADJ setting should be reverted to 1. Under no circumstances OPTIMIZER_INDEX_COST_ADJ parameter should be set to values other than 1 (Siebel recommended) or 100 (Oracle default on 10g/11g).
The above session parameters should not be altered to other values by any means.
16
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
17
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Bug 4275247 Bug 3380026 Bug 3220073 Bug 3075139 Bug 3018146 Bug 3566843 Bug 4335559
Internal only. Fixed in 9.2.0.6 Fixed in 9.2.0.5 Fixed in 9.2.0.5. Fixed in 9.2.0.5 Fixed in 9.2.0.7 Fixed in 9.2.0.6
18
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
7430474 6990305 7236148 Note 406966.1 Note 4724074.8 Bug 6455161 Bug 5240607 Note 4878299.8 Bug 4742607
Higher "cache buffer chains" latch gets / higher "consistent gets" after truncate/Rebuild FIRST_K_ROWS may choose inefficient NESTED LOOPS join Bad plan from join with FIRST_ROWS_N or a ROWNUM predicate "cache buffer chains" latch contention from concurrent index range scans in extreme situations, excessive CPU consumption without any user-SQL activity.
19
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide December 2008 Authors: James Qiu, Paul Blokhin, Mehdi Gerami Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2008, Oracle. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
20
Performance Tuning Guide for Siebel CRM Application on Oracle Part I - Cost-Based Optimization Guide