Oracle RAC and the Lamport algorithm
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.
Oracle Database 10g: Real Application Clusters Handbook Home: Oracle RAC troubleshooting: Introduction 1: Oracle RAC: Log directory structure in cluster ready services 2: Oracle RAC: Log directory structure in Oracle RDBMS 3: Oracle RAC and the Lamport algorithm 4: Oracle RAC: ON and OFF 5: Oracle RAC: Database performance issues 6: Oracle RAC: Debugging node eviction issues 7: Oracle RAC: Member voting 8: Oracle RAC: Cluster reconfiguration steps 9: Oracle RAC: Debugging CRS and GSD using DTRACING