Adaptive Server task management includes three states for a process: running, runnable, sleeping, and blocked. When a process is not running (executing on the CPU), it is:
Waiting on the CPU (the “runnable” state)
Sleeping because of disk or network I/O
Blocked on a resource (a lock, semaphore, spinlock, and so on)
A wait event occurs when a server process suspends itself, sleeps, and waits for another event to wake it. Adaptive Server includes unique wait event IDs for each of these wait events. Query monSysWaits and monProcessWaits to find the number of times—and the total amount of time—that a process waited for each wait event.
The value of WaitTime in the monSysWaits table
is in seconds. The value of the WaitTime in
the monProcessWaits table is in milliseconds.
This chapter describes a selection of the more common wait events and actions you can perform to avoid them.