idle% cpu and run queue

Hi Everybody,

Can anybody explain how CPU idle% is about 50%, but runq-sz more than 1?
sar from Solaris 10:

00:00:05    %usr    %sys    %wio   %idle
17:00:08      27      12       0      61
17:20:05      40      15       0      45
17:40:05      27      12       0      61
18:00:05      23      10       0      67
18:20:06      32      14       0      54
18:40:05      27      13       0      60
19:00:04      27      11       0      61
19:20:05      40      15       0      45

00:00:05 runq-sz %runocc swpq-sz %swpocc
17:00:07     1.7      50     0.0       0
17:20:06     1.9      60     0.0       0
17:40:04     1.7      52     0.0       0
18:00:06     1.5      46     0.0       0
18:20:06     1.6      52     0.0       0
18:40:06     1.4      47     0.0       0

Thanks

It is an artifact of sampling. For starters, it is an average value.

Let's look at an example:

The simplest example is a queue for a service, say an ATM machine. The queue can have nobody waiting there or sometimes as many as three people waiting. So, the average usage can be 50%, but on average when somebody gets there he has 1.5 people in front of him. There is no such thing as .5 of a person, of course.

What it says is that your cpu load is uneven with lots of no-load periods and lots of longer queues. Your result really shows that your system cpu resource is not heavily used. All is well. For the small timeframe you show.

sar is really great for gathering detail data but is not so great at assembling details into a useful report. I would use other resource measurement tools than sar, if you are going to be interpreting the output like a report.

1 Like

I expected exactly this answer.
Thank you, Jim.