Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Removing Oracle RAC sequence contention 

Oracle Database Tips by Donald BurlesonFebruary 14, 2015

Question:  I am deploying an application on a 5 node RAC cluster and the application will generate sequences on each instance.  What are the most common ways to reduce contention on busy RAC database where there is contention for sequence generation?

Answer:  Sequences in Oracle are the same as a single instance, and the RAC internals will manage the uniqueness of the sequence.  First, see these Oracle best practices for Oracle RAC sequence usage.  

However, it's important to understand that Sequence numbers may be out of order when many nodes are simultaneously generating sequences.  Conversely, if only one node's application is generating the sequence numbers, then we will not see this contention.

The "contention that we see on busy RAC systems (with high insert DML are because each application of each node is competing for resources that exist on the database.  Fortunately, Oracle has several tools for relieving Oracle RAC sequence contention:

  • Use the sequence "cache" option: Oracle has a method for  caching frequently reference sequences, and you can also cache sequences with n-way Streams replication for fast access to sequence values.  Caching sequences is especially important for high-DML applications with lots on insert and update activity.  You can easily cache as sequence with the "add/alter sequence xxx cache" command.  The "cache" clause caches the specified number of sequence values into the buffers in the SGA, speeding-up sequence access speed.

  •  Use the noorder sequence clause:  When creating sequences for a RAC environment, DBAs should use the noorder keyword to avoid an additional cause of SQ enqueue contention that is forced ordering of queued sequence values.  In RAC, a best practice is to specify the "noordered" clause for a sequence.  With a non-ordered sequence, a global lock not required by a node whenever you access the sequence.

  •  Increase sequence index freelist groups (or use ASSM):  Indexes with key values generated by sequences tend to be subject to leaf block contention when the insert rate is high.

    There are sources of contention in RAC with sequences.  Indexes are usually supported by indexes and it is not uncommon to witness index block leaf contention with high insert rates as many insert statements compete for the highest index leaf block in order to get their sequence number.

    One remedy is to alter the index to use additional freelists groups.  You can often achieve the same relief from index block contention by using ASSM or using ht sequence "cache" option", but beware that ASSM performance may degrade under "massive" insert DML. (over 100 inserts per second)

  •  Use sequence staggering:  A staggered sequence insert trigger is a specific constant added to the sequence value based on the instance number. This isolates each set of inserts and prevents inadvertent attempts to use the same sequence number.

These are the  most common method that are used to reduce RAC sequence contention.  For more details or to have a RAC expert certify your database for performance, consider using a remote RAC health check.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster