Professional Documents
Culture Documents
CONTENTS
1 INTRODUCTION.........................................................................................................3 2 CAUSES OF POOR PERFORMANCE......................................................................3 3 PERFORMANCE TUNING.........................................................................................3 3.1 OPTIMAL DATABASE CONFIGURATION ...............................................................................4 3.2 ORACLE PARAMETERS TUNING........................................................................................5 3.3 SQL QUERY TUNING....................................................................................................6 3.4 OTHER PERFORMANCE TUNING .......................................................................................7 4 CONCLUSION..............................................................................................................8 5 REFERENCES: ............................................................................................................8
1 Introduction
The Siebel application architecture though efficient by its design, there are instances where the custom configuration leads to potential performance pitfalls. Such performance related issues can translate into screens that load slowly or database queries that fail to return the sought-after results. Other times, users must click through a puzzling series of screens rather than just one or two to get to the information they need. In addition, this drawback can be multifold in environments with large databases and wide data distribution across servers.
3 Performance Tuning
Often it is mistaken that solving a performance problem involves enigmatic talent. However, there is a particular process involved in approaching a performance problem. Figure below shows the methodology to approach a performance problem or simply tuning the system for best performance. Following this tuning methodology will make performance tuning no longer an issue. There are several books and whitepapers written on this subject and hence it is not being covered in this whitepaper. The scope of this whitepaper is to list the common causes for poor performance and the effective way to overcome the problem using the database tuning.
System Testing
Application Tuning
3.1
In an ideal scenario, creating a well-planned database to begin with requires less tuning or reorganizing during runtime. One can find plethora of resources available to facilitate creation of a high-performance Oracle databases. However, tuning engineers often attempt to modify a badly designed database consisting of thousands of tables and indexes, piece by piece. This is not only time consuming but prone to mistakes. Eventually one would end up rebuilding the whole database from scratch. Here is an alternative approach to tuning a pre-existing, prepackaged database.
Measure the exact space used by each object in the schema. The dbms_space
packages provide accurate space used by an index or a table. The dba_free_space
provides how much is free from the total allocated space, which is always more. Then run the benchmark test and again measure the space used. The difference results in an accurate report how much each table/index grows during the test. Using this data all of the tables can be right-sized i.e., capacity planned for growth during the test. Also from this we can figure out the hot tables used by the test and concentrate on tuning only those.
Create a new database with multiple index and data tablespaces. The idea is
to place all equi-extent-sized tables into their own tablespace. Keeping the data and index objects in their own tablespace reduces contention and fragmentation, and also provides for easier monitoring. Keeping tables with equal extent sizes in their own tablespace reduces fragmentation as old and new extent allocations are always of the same size within a given tablespace. So no room for empty odd sized pockets in between. This leads to compact data placement which reduced number of I/Os done.
Build a script to create all of the tables and indexes. This script should have the tables
being created in their appropriate tablespaces with the appropriate parameters like freelists, freelist_groups, pctfree, pctused etc. Use this script to place all of the tables in their tablespaces and then import the data. This ends up in a clean, defragmented, optimized, right-sized database.
3.2
db_cache_size=3048576000
The above parameter is used for determining the size for Oracles SGA (Shared Global Area). Database performance is highly dependant on available memory. In general, more memory increases caching, which reduces physical I/O to the disks. Oracles SGA is a memory region in the application which caches database tables and other data for processing. With 32-bit Oracle software on a 64-bit Solaris OE the SGA is limited to 4 GB. Oracle comes in two basic architectures: 64-bit and 32-bit. The number of address bits determines the maximum size of the virtual address space: 32- bi ts = 232 = 4 GB maximum 64- bi ts = 264 = 16777216 TB maximum For Siebel 10,000 concurrent users PSPP (Platform sizing and Performance program) workload the 4GB SGA is sufficient, hence the 32 bit Oracle server version can be used.
Setting db_block_max_dirty_target from default value of 4294967294 to Zero, disables writing of buffers for incremental check pointing purposes. Changing the db_writer_processes default value to 4 from the default value of 1, starts up 4 dbwr processes. The above 3 parameters reduce wait times in the database drastically and thereby improved Siebel overall throughput.
Db_block_size=8K
Default value is 2K. An 8K value for Siebel is optimal.
DB_BLOCK_LRU_LATCHES=48
DB_BLOCK_LRU_LATCHES specifies the upper bound of the number of LRU latch sets. Set this parameter to a value equal to the desired number of LRU latch sets. Oracle decides whether to use this value or reduce it based on a number of internal checks. If the parameter is not set, Oracle calculates a value for the number of sets base on number of CPUs. The value calculated by Oracle is usually adequate. Increase this only if misses are higher than 3% in V$LATCH. For Siebel 10000 users run on a 4 CPU machine, setting this to 48 is optimal.
distributed_transactions=0
Setting this value to 0 disables the oracle background process called reco. Siebel does not use distributed transactions hence we can get back CPU and Bus by having one less oracle background process. Its default value is 99.
replication_dependency_tracking=FALSE
Siebel does not use replication. Hence it is safe to turn off by setting it to false.
transaction_auditing=FALSE
The above parameter writes lesser redo for every commit. The nature of Siebel OLTP is plenty of small transactions with frequent commits. Hence setting this to false buys back CPU and bus.
3.3
Use of outer joins instead of inner joins. Inner joins may be used for joined
tables,with a resulting savings in overhead, provided you are guaranteed that all foreign key references are valid. For example, when the join is from a detail business component to its master, you are guaranteed of the existence of the master. You can configure the join as an inner join by setting the Outer Join Flag property of the Join object to FALSE. This improves the performance of queries that use the join.
Cascade Delete set in a many-to-many link. The Cascade Delete property in a Link
object definition must be correctly configured for use in a many-to-many link, or the first insertion or deletion in the association applet will be abnormally slow. A link object definition used in a many-to-many relationship is one that contains a non-NULL Inter Table setting. The Cascade Delete property in such a link must be set to NONE.
Use of EXISTS, Max, or Count functions in a search. Using the EXISTS, Max, or
Count functions in a search specification causes sub-queries within the main query, thus slowing performance.
Never put a sum([MVfield]) in a list column. This requires that a separate query be
executed for each record in the list, which is a significant performance issue.
3.4
the desired calculation, considerably increasing the time it takes to obtain the results of the query. The difference is that in the one case the calculations can take place before the results are returned, and in the other, they have to be performed in memory on the client.
Excessive number of business components in a view. As the number of different business components used in applets in a view increases, the display if data upon entry in to that view slows down. This is because each of the applets must be populated with data.
Number of fields in a business component. It There is no set limit on the number of fields in a business component or list columns in a list applet. However, a business component with too many active fields will have degraded performance. Also, in some database systems it is possible to generate a query that is too large to be processed.
4 Conclusion
Performance trouble shooting is an iterative process. One needs to consider performance implication during design. During development, you need to note any changes to potentially troublesome areas, especially multi-value groups and sort and search specifications in new and changed business components, as well as the addition of joins, extension tables, and indexes. Then you test the application to determine bottlenecks, using realistic data volumes and distribution in your test environment. You should focus the testing effort on the slowest, most important, and most highly configured views.
5 References:
I. Siebel Tools Reference Version 7.5 Rev. A II. Performance Tuning Siebel on the Sun Platform