G'Day Henrik,

On Wed, May 21, 2008 at 07:24:50PM +0200, Henrik Johansson wrote:
> Hello all,
> 
> I a bit curious, what other factors that the availability of CPU-time  
> can cause latency for processes scheduling?
> 
> I have a few M5000 running 127111-10 with lots of CPU-cycles to spare,  
> but according to microstate accounting threads sometimes spend ~5-35%  
> of their time waiting to be scheduled.
> 
> Total idle time reported by vmstat is about 60-80%

This isn't as strange as it sounds - if you have lots of threads that are
woken up by the same event (mutex_exit, turnstiles), then the run queue may
be saturated for a short amount of time.  When those threads are dispatched,
the CPUs return to idle.  All of this happens within your sampling interval
(1 second?), so you see both CPU dispatcher latency and idle time and the
same time.

>  and mpstat shows  
> that no cpu(hwthread) is utilized to even near the 100%. I've also  
> seen that the  run queue sometimes goes up to 2 while we still have  
> lots of cpu-time left.

Try running dispqlen.d from the DTraceToolkit (it boils down to a one-liner);
this samples the dispatcher queue lengths much faster (1000 Hertz) than, say,
vmstat (1 Hertz).  runocc.d may be interesting too.

DTrace is certainly the best tool for this job - you can trace scheduler
events using the 'sched' provider, and raw kernel events using 'fbt'.

Brendan

-- 
Brendan
[CA, USA]
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to