CPU Utilization/Saturation

Hi! I have following problem: How can I calculate 100 % CPU utilisation if I have 8 chip (SPARCV6 dual core)? Which load is 100 % CPU utilisation? Hope someone can help!

You can use "mpstat 2" to display individual processor load and "prstat" to identify what processes are using the CPUs.

prstat is much accurate enough..

mpstat shows statistics prstat doesn't. No accuracy issue here.

I must confess I'm not sure I understood exactly what the OP question is really about though ...

You can reach a 100% CPU load with a single process on a multi-CPU & multi-core system assuming that process is multi-threaded.

There is a small code called cyclesoak (zc) which does a subtractive method for measuring CPU utilization. It is more accurate. Basically it launches a number of processes, to eat up 100% of the CPU when there is no load. Then as you load the CPU with other processes the amount of work its able to do goes down, this gives the CPU utilization of everything else. Pretty easy to integrate into something like gkrellm. You'd have to google for it b/c I don't know a website for it off hand.

i tell you what... there is no chance i would run this code on a production server :smiley:

Neither on my laptop. That battery life and environment unfriendly hack looks a really bad idea to me.
Prstat has microstate accounting for those wanting more accurate load metrics.

Yeah its not meant to be something that you let run all the time on a real system. I use it for benchmarking things.

However it brings up a point that whatever you use to measure CPU usage invariably uses CPU its self, thus making it less accurate. The subtractive decode method takes this to an extreme, but is accurate because it knows the percentage of the CPU its using (100%) the error in other tools is the inability to know how much CPU they are using. Then again in 99% of the situations this error is negligible.