Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

runq-sz not reporting in whole numbers with one cpu

SOLVED
Go to solution
Kirk Reindl
Frequent Advisor

runq-sz not reporting in whole numbers with one cpu

10.20
E-Box
1 CPU

I have question regarding the output in the runq-sz column of the sar -q command.

In my mind I believe a system with only one CPU should only report whole numbers in the runq-sz column. Why? Because any whole number devided by one should be that number. The only thing that may change this is if there is a one and half process. Aren't you either a process or not a process?

Please look at this output:

@ccchpcis::root_ /> sar -qM 5 10

HP-UX ccchpcis B.10.20 E 9000/806 09/06/02

11:19:02 runq-sz %runocc swpq-sz %swpocc
11:19:07 1.0 20 0.0 0
11:19:12 2.0 20 0.0 0
11:19:17 0.0 0 0.0 0
11:19:22 1.7 60 0.0 0
11:19:27 0.0 0 0.0 0
11:19:32 1.0 60 0.0 0
11:19:37 1.7 60 0.0 0
11:19:42 0.0 0 0.0 0
11:19:47 1.5 40 0.0 0
11:19:52 1.0 20 0.0 0

Average 1.4 28 0.0 0
@ccchpcis::root_ />

If you read the man page on sar -q runq-sz it states, "Average length of the run queue(s) of processes in memory and runable.

Because it states average, I could understand non-whole numbers on a multiple CPU system (IE--3CPUs--1st with 2proc in queue 2nd with 5 proc in queue and 3rd with 3proc in queue-----10 divided by 3= 3.3), but not on a single CPU system.

Am I on to anything here?? Any insight would be appreciate.

Thanks
Kirk Reindl
2 REPLIES
Tom Danzig
Honored Contributor
Solution

Re: runq-sz not reporting in whole numbers with one cpu

You're collecting runq data in 5 second intervals. The reported runq-sz id the average of all the samples (i.e. ticks) in the 5 second interval.
keith persons
Valued Contributor

Re: runq-sz not reporting in whole numbers with one cpu

Kirk,

It's the result of statistical averaging. The only way you would always get a whole number every time, even on a single processor machine, is if the sum of all the datapoints is always evenly divisible by the number of those datapoints. The probability of this occurring (those damned sadistics again...^o^) is so small as to be statistically insignificant. Hope this helps.

Keith