Try OpenEdge Now
skip to main content
Startup Command and Parameter Reference
Startup Parameter Descriptions : Spin Lock Retries (-spin)

Spin Lock Retries (-spin)

Use Spin Lock Retries (-spin) to set a value to use the spin lock mechanism or a system of semaphores and queues.
Operating system and syntax
UNIX / Windows
-spin n
Use with
Maximum value
Minimum value
Single-user default
Multi-user default
Database Server
10,000, or 6000 * # CPUs1

1 For single CPU systems, the default is 10,000. For multi-CPU systems, the default is 6000 * # of CPUs

The number of times a process tries to acquire a latch before pausing.
If the value of n is greater than 0, then a spin lock algorithm is used for shared-memory data structures. When a process has to lock a shared-memory structure, the process tries up to n times to acquire the latch for that structure. If it has not acquired the latch in n tries, the process pauses, or naps. The length of the pause increases gradually if the process repeatedly fails to acquire a latch. After the allotted nap time, the process wakes up and tries to acquire the lock again. If it fails to acquire the lock, it will retry up to the number of tries specified by n.
If the value of n is 0, a system of semaphores and queues is used instead of spin locks. The spin lock algorithm is much more efficient than using semaphores when you have multiple processors.
On multiprocessor machines, the default value is 6000 * # of CPUs. If this causes too much CPU usage, reduce the value. If you have fast processors, a value as high as 10,000 * # of CPUs might be effective.
You can evaluate the -spin values through the OpenEdge Monitor (PROMON utility) R&D options. See OpenEdge Data Management: Database Administration for more information on the PROMON utility. The -spin parameter controls the performance indicator called resource waits. By setting the -spin value higher, you can reduce the resource waits. Note that when setting the -spin value higher ceases to reduce the resource waits, continuing to set it higher can adversely effect CPU utilization. To view the resource waits value:
*Access PROMON and enter R&D at the main menu.
*Choose option 3. Other Displays, then choose option 1. Performance Indicators to view the resource waits. Resource waits is the last item reported in the listing.