eG Monitoring
 

Measures reported by SybSpinContnTest

Spinlocks are lightweight synchronization primitives which are used to protect access to data structures. They are generally used when it is expected that access to a given data structure will need to be held for a very short period of time. When a thread attempting to acquire a spinlock is unable to obtain access it executes in a loop periodically checking to determine if the resource is available instead of immediately yielding. After some period of time a thread waiting on a spinlock will yield before it is able to acquire the resource in order to allow other threads running on the same CPU to execute. This is known as a backoff. If the threads are waiting for a longer than usual period, then the resource cannot be accessed till the necessary changes are made. This process is called spinlock contention. Though the spinlocks are held for extremely brief duration, the impact on the CPU resources will be higher ranging from a high CPU resource utilization, high transaction rates and a reduced performance of the Sybase server. In order to avoid such conditions, it is necessary to keep a check on the spinlocks. The SybSpinContnTest test helps administrators greatly in this exercise!

This test auto-discovers the named spinlocks and reports the percentage of spinlock contention on the resources, CPU cycle spinning activity, and grabs and waits of each spinlock.

Output of the test : One set of results for each named spinlock being monitored.

The measures made by this test are as follows:

Measurement Description Measurement Unit Interpretation
Contention Indicates the number of times an engine encountered this spinlock contention on the resource, and had to wait as a percentage of the total spinlock requests for that resource. Percent The value of this measure should not exceed 10%. For example, if the spinlock contention is more than 10% in the cache, consider using named caches or adding cache partitions. The number of cache partitions is always a power of 2 such that you can approximately reduce half of the spinlock contention when you increase the number of partitions each time.

The detailed diagnosis of this measure, if enabled, provides details such as SpinlockslotID, Ownerpid, Lastownerpid, Spid, login name, Status, etc.
Grabs Indicates the number of grabs for this spinlock per second. Grabs/sec  
Spins Indicates the number of CPU spins that are made per second to acquire this spinlock. Spins/sec Ideally, the value of this measure should be low. A signifigance increase in the value indicates high CPU utilization, which results high performance lag.
Waits Indicates the number of waits that are occured per second for this spinlock. Waits/sec If the value of this measure is consistently high, identify which resource causing waits and fine tune the appropriate SQL queries.