Progress
Database Administration
Guide and Reference


Spin Lock Retries (-spin)

Operating 
System 
and Syntax 
UNIX 
NT 
-spin n 
Use 
With 
Maximum 
Value 
Minimum 
Value 
Single-user 
Default 
Multi-user 
Default 
DBS
0
0

n

The number of times a process tries to acquire a latch before pausing.

Use Spin Lock Retries (-spin) to set a value to use the spin lock mechanism or a system of semaphores and queues. If the value of n is greater than 0, 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, then 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.

In some cases, if the value of n is 1, it might improve performance even on a single-processor machine because Progress uses the spin lock mechanism. Do not set this parameter to a value larger than 1 if your machine has only one processor.

On multi-processor machines, try a value of 2,000. If this causes too much CPU usage, reduce the value. If you have many fast processors, a value as high as 10,000 might be effective.

You can evaluate the -spin values through the Progress Monitor (PROMON utility) R&D options. See "Progress Monitor R&D Options," of this manual. 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:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095