perf- CPU- Solaris
CPU
The first line of metric is the summary since boot.Interval of collection is specified as 1st param along with command name.
vmstat collects the aggregate stats of all the CPU's
Saturation
Number of queues waiting for CPU is run queue length or size.
kthr:r of vmstat gives this value.
sar -q 5 5 gives info on swapped out threads. It also gives runq-sz. Swapping out threads is a last resort for relieving memory pressure, so this field will be 0 unless there was memory shortage.
Amount of time spent waiting for a CPU is measured using the LAT latency value of command prstat -mL
vmstat and sar(system activity reporter) also give the user,system utilization and ilde time of the cpu.
Number of processors in the system and their speed psrinfo -vm
Load average represents both CPU utilization and saturation.
uptime and prstat give this info. A value equal to CPU count means 100% utilisation.
1-,5- and 15- minute averages are obtained.
sar can capture historic data by enabling interval of collection. crontab -e sys
mpstat summarizes stats for each cpu.
High values of
migr migration of threads between processors
smtx mutex contention events on kernel.
srw read/write lock contention events on kernel.
syscl system call rate
is bad for performance.
Who is using the CPU
prstat gives pid versus cpu utilisation%
prstat -Lm -p pid, gives thread breakdown of pid.
To see what the thread is doing, use pstack pid/processor no, ex: pstack 25691/2
use dtrace to find out who is causing the high system calls.
dtrace -n 'syscall:::entry { @[execname]=count();}'
use dtraceto drill deeper and find the exec name
dtrace -n 'syscall:::entry /execname=="name_of_exec"/ { @[probefunc]=count();}'
use dtrace to drill even deeper to get the stack calls.
dtrace -n 'syscall:::entry /execname=="name_of_exec"/ { @[ustack]=count();}'
The first line of metric is the summary since boot.Interval of collection is specified as 1st param along with command name.
vmstat collects the aggregate stats of all the CPU's
Saturation
Number of queues waiting for CPU is run queue length or size.
kthr:r of vmstat gives this value.
sar -q 5 5 gives info on swapped out threads. It also gives runq-sz. Swapping out threads is a last resort for relieving memory pressure, so this field will be 0 unless there was memory shortage.
Amount of time spent waiting for a CPU is measured using the LAT latency value of command prstat -mL
vmstat and sar(system activity reporter) also give the user,system utilization and ilde time of the cpu.
Number of processors in the system and their speed psrinfo -vm
Load average represents both CPU utilization and saturation.
uptime and prstat give this info. A value equal to CPU count means 100% utilisation.
1-,5- and 15- minute averages are obtained.
sar can capture historic data by enabling interval of collection. crontab -e sys
mpstat summarizes stats for each cpu.
High values of
migr migration of threads between processors
smtx mutex contention events on kernel.
srw read/write lock contention events on kernel.
syscl system call rate
is bad for performance.
Who is using the CPU
prstat gives pid versus cpu utilisation%
prstat -Lm -p pid, gives thread breakdown of pid.
To see what the thread is doing, use pstack pid/processor no, ex: pstack 25691/2
use dtrace to find out who is causing the high system calls.
dtrace -n 'syscall:::entry { @[execname]=count();}'
use dtraceto drill deeper and find the exec name
dtrace -n 'syscall:::entry /execname=="name_of_exec"/ { @[probefunc]=count();}'
use dtrace to drill even deeper to get the stack calls.
dtrace -n 'syscall:::entry /execname=="name_of_exec"/ { @[ustack]=count();}'
Comments