Monitor resources that impact CPU utilization

Threads, network communications, and virtual processors impact CPU utilization. You can use onstat -g arguments to monitor threads, network communications, and virtual processors.

Use the following onstat -g command options to monitor threads.

onstat -g Option Description
act Displays active threads.
ath Displays all threads.

The sqlexec threads represent portions of client sessions; the rstcb value corresponds to the user field of the onstat -u command.

cpu Displays the last time the thread ran, how much CPU time the thread used, the number of times the thread ran, and other statistics about all the threads running in the server.
rea Displays ready threads.
sle Displays all sleeping threads.
sts Displays maximum and current stack use per thread.
tpf tid Displays a thread profile for tid.

If tid is 0, this argument displays profiles for all threads.

wai Displays waiting threads, including all threads waiting on mutex or condition, or yielding.

Use the following onstat -g command options to monitor the network.

onstat -g Command Option Description
ntd Displays network statistics by service.
ntt Displays network user times.
ntu Displays network user statistics.
qst Displays queue statistics.

Use the following onstat -g command options to monitor virtual processors.

onstat -g Command Option Description
glo Displays global multithreading information, including CPU-use information about virtual processors, the total number of sessions, and other multithreading global counters.
sch Displays the number of semaphore operations, spins, and busy waits for each VP.
spi Displays spin locks that are acquired by virtual processors after they have spun more than 10,000 times.

To reduce contention, reduce the number of virtual processors, reduce the load on the computer, or, on some platforms, use the no-age or processor affinity options of virtual processors. If sh_lock mutexes have highly contended spin locks, create private memory caches for CPU virtual processors by setting the VP_MEMORY_CACHE_KB configuration parameter.

wst Displays wait statistics.