Oracle RAC and the Lamport algorithm
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
The Lamport algorithm is fast and scalable in RAC as it generates the SCNs in parallel and the SCNs are assigned to the transactions on a first come, first serve basis. The distributed lock manager (DLM) controls and monitors the lock management and conflict resolution.
Another algorithm that is simpler than Dr. Lamport's bakery algorithm is based on the broadcasting operation after a commit operation, and this is the default SCN generation algorithm in single instance Oracle implementations. In this method, the SCN is broadcasted to the participating nodes immediately after a commit operation. This ensures that read consistency is at the highest level so that the participating nodes know the current state of the transaction irrespective of the workload. This method puts additional load on the systems, as it has to broadcast the SCN for every commit; however, the other nodes can see the committed SCN immediately.
The initialization parameter max_commit_propagation_delay limits the maximum delay allowed for SCN propagation to the participating nodes and controls the SCN scheme used in the OPS/RAC environment. This parameter defaults to 7 seconds (700 centiseconds) in most of the platforms except for the Compaq Tru64 UNIX. When we set the max_commit_propagation_delay initialization parameter to any value less than 100, the broadcast on commit algorithm is used. The alert log is updated immediately after startup with the method used for SCN generation.
Let's start the second instance and check the reconfiguration event entries in the alert.log:
SQL> startup nomount;
In the alert log of the second instance we see this:
Mon Aug 29 17:40:35 2005 lmon registered with NM - instance id 2 (internal mem no 1) Mon Aug 29 17:40:37 2005 Reconfiguration started (old inc 0, new inc 2) List of nodes: 0 1 Global Resource Directory frozen Update rdomain variables
Now two nodes in the clusters have internal IDs of 0 and 1. The rest of the messages are pretty much the same as in the first instance's alert log file.
Use the following table of contents to navigate to chapter excerpts or click here to view RAC Troubleshooting in its entirety.
|About the book:|
|Oracle Database 10g: Real Applications Clusters Handbook Learn to implement Oracle real application clusters from the ground up. Maximize database availability, scalability, and efficiency. Find RAC concepts, administration, tuning, and troubleshooting information. You'll learn how to prepare and create Oracle RAC databases and servers, and automate administrative tasks. You'll also get full coverage of cutting-edge Oracle RAC diagnostic tools, backup and recovery procedures, performance tweaks and custom application design strategies. Buy this book at McGraw-Hill/Osborne|
|About the author:|
|K Gopalakrishnan is a senior principal consultant with the Advanced Technology Services group at Oracle Corporation, specializing exclusively in performance tuning, high availability, and disaster recovery. He is a recognized expert in Oracle RAC and Database Internals and has used his extensive expertise in solving many vexing performance issues all across the world for telecom giants, banks, financial institutions, and universities.|