The tool DTraceToolKit-0.99/Kernal/cputimes under reads the IDLE time when
some of the CPUs are completely idle for long periods.
I have an 8 CPU box which is not doing much. If I run cputimes on it for an
interval of 5 seconds and add up the times then the sum only comes to about 50%
of the available time. I understand that this is because the probes,
sysinfo:unix:idle_enter:idlethread
sched:::on-cpu and
sched:::remain-cpu
will not fire for any given CPU until it has been busy. cputimes relies on one
of these probes firing to start the counting for each CPU. If a CPU is totally
idle it will not be counted by cputimes.
I cannot find any warning about this scenario in the docs.
Does anyone agree with me or have I missed the point?
Outputs:-
Number of CPUs:-
kstat -p cpu_info:::brand
cpu_info:0:cpu_info0:brand UltraSPARC-IV+
cpu_info:1:cpu_info1:brand UltraSPARC-IV+
cpu_info:2:cpu_info2:brand UltraSPARC-IV+
cpu_info:3:cpu_info3:brand UltraSPARC-IV+
cpu_info:16:cpu_info16:brand UltraSPARC-IV+
cpu_info:17:cpu_info17:brand UltraSPARC-IV+
cpu_info:18:cpu_info18:brand UltraSPARC-IV+
cpu_info:19:cpu_info19:brand UltraSPARC-IV+
Output from cputimes
# ./cputimes 5
2007 Oct 9 11:02:48,
THREADS TIME (ns)
KERNEL 753817000
PROCESS 2743407100
IDLE 16330537400
2007 Oct 9 11:02:53,
THREADS TIME (ns)
KERNEL 347982400
PROCESS 6815626900
IDLE 12777698400
2007 Oct 9 11:02:58,
THREADS TIME (ns)
KERNEL 198875000
PROCESS 427450900
IDLE 19304229300
The total for each ouput comes to approximately 50% of 40 000 000 000 which
is the available time for each interval (number of cpus * interval in ns).
Whilst
CPU times was running I ran the following one-liner in another window to see
which CPUs are being used:-
dtrace -n 'sysinfo:unix:idle_enter:idlethread,sched:::on-cpu,sched:::remain-cpu
[EMAIL PROTECTED]();} tick-60s{exit(0);}'
dtrace: description
'sysinfo:unix:idle_enter:idlethread,sched:::on-cpu,sched:::remain-cpu ' matched
4 probes
CPU ID FUNCTION:NAME
18 81237 :tick-60s
16 16187
18 52565
17 53135
19 56125
--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]