Multi-core Processor performance is the key for SUN Solaris 10. For example, SUN T1 (Niagara 1) has 8 cores and each core can run 4 threads in parallel. I would like to introduce several tools to monitor performance of multi-core processors.
1. psrinfo
dogwood{hda2}1: psrinfo -v
Status of virtual processor 0 as of: 01/23/2008 09:07:34
on-line since 12/28/2007 08:22:51.
The sparcv9 processor operates at 1503 MHz,
and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 01/23/2008 09:07:34
on-line since 12/28/2007 08:22:49.
The sparcv9 processor operates at 1503 MHz,
and has a sparcv9 floating point processor.
psrinfo can get every core of processor status. The following is part of man page of psrinfo.
DESCRIPTION
psrinfo displays information about processors. Each physical
processor may support multiple virtual processors. Each vir-
tual processor is an entity with its own interrupt ID, capa-
ble of executing independent threads.
Without the processor_id operand, psrinfo displays one line
for each configured processor, displaying whether it is on-
line, non-interruptible (designated by no-intr), spare,
off-line, faulted or powered off, and when that status last
changed. Use the processor_id operand to display information
about a specific processor. See OPERANDS.
2. mpstat
dogwood{hda2}5: mpstat 5 2
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 8 1 15 28 15 337 9 62 8 0 6470 3 3 0 95
1 9 1 22 360 252 387 8 62 9 0 7147 3 3 0 94
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 1 0 13 19 10 532 2 143 14 0 1934 3 2 0 95
1 0 0 4 361 257 539 0 144 14 0 2051 3 2 0 95
mpstat will get each core statistics. Please care about several things:
- idl: the value shouldn’t be less than 30, otherwise, you have to troubleshooting.
- sys: the value shouldn’t be greater than 15, otherwise, you should figure out the problem.
- xcal: the number of inter-processor cross-calls.
- csw: the number of context switch.
- syscl: the number of system call.
3. kstat
kstat -m cpu
kstat can get kernel module statistics of CPU. The following is part of man page of kstat.
DESCRIPTION
The kstat utility examines the available kernel statistics,
or kstats, on the system and reports those statistics which
match the criteria specified on the command line. Each
matching statistic is printed with its module, instance, and
name fields, as well as its actual value.
Kernel statistics may be published by various kernel subsys-
tems, such as drivers or loadable modules; each kstat has a
module field that denotes its publisher. Since each module
may have countable entities (such as multiple disks associ-
ated with the sd(7D) driver) for which it wishes to report
statistics, the kstat also has an instance field to index
the statistics for each entity; kstat instances are numbered
starting from zero. Finally, the kstat is given a name
unique within its module.
Each kstat may be a special kstat type, an array of name-
value pairs, or raw data. In the name-value case, each
reported value is given a label, which we refer to as the
statistic. Known raw and special kstats are given statistic
labels for each of their values by kstat; thus, all pub-
lished values can be referenced as
module:instance:name:statistic.
When invoked without any module operands or options, kstat
will match all defined statistics on the system. Example
invocations are provided below. All times are displayed as
fractional seconds since system boot.
Share on Facebook
Tags: How-to, Solaris by hengdu
No Comments »