I am running some load against a db2 instance. The load is being generated through a java program that runs sql statements. This load generator program is running on another machine. I am running multiple JVMs of the load generator, each of which spawns multiple threads, which fire sql queries.
On the db2 server machine (AIX 7.1), I ran vmstat 1
and I see the below outut
kthr memory page faults cpu
----- ----------- ------------------------ ------------ -----------
r b avm fre re pi po fr sr cy in sy cs us sy id wa
16 0 2483017 4805102 0 0 0 0 0 0 11481 97937 24610 73 4 23 0
20 0 2483098 4805021 0 0 0 0 0 0 11488 109427 24965 74 5 21 0
18 0 2483015 4805104 0 0 0 0 0 0 12068 103477 25386 75 4 21 0
0 0 2483015 4805104 0 0 0 0 0 0 12893 105653 22407 75 4 21 0
14 0 2483015 4805104 0 0 0 0 0 0 13239 106536 23097 74 4 21 0
13 0 2483015 4805104 0 0 0 0 0 0 11745 105253 30494 70 4 25 0
16 0 2483015 4805104 0 0 0 0 0 0 9920 93743 33563 59 4 37 0
4 0 2483015 4805104 0 0 0 0 0 0 10717 91356 28120 62 4 34 0
16 0 2483015 4805104 0 0 0 0 0 0 12023 102409 26877 73 4 23 0
11 0 2483015 4805104 0 0 0 0 0 0 12222 105361 27300 74 4 22 0
17 0 2483015 4805104 0 0 0 0 0 0 13539 109858 25124 75 4 21 0
18 0 2483580 4804539 0 0 0 0 0 0 13808 113410 22928 75 5 21 0
16 0 2483022 4805097 0 0 0 0 0 0 13926 117611 22962 75 5 20 0
14 0 2483022 4805092 0 0 0 0 0 0 13913 111620 23642 74 5 21 0
16 0 2483025 4805085 0 0 0 0 0 0 12969 114079 24493 73 5 22 0
13 0 2483025 4805085 0 0 0 0 0 0 13610 109493 23120 76 5 20 0
16 0 2483025 4805085 0 0 0 0 0 0 12375 103619 24001 74 4 22 0
9 0 2483025 4805085 0 0 0 0 0 0 13233 108431 23304 75 4 20 0
13 0 2483025 4805085 0 0 0 0 0 0 11975 101451 24412 74 4 22 0
I am puzzled about the high value under the column "r" even though cpu is not fully busy. I had always thught that the column "r" is showing the built up process queue (waiting for cpu attention). But I looked at man vmstat
. It states that column "r" shows "Average number of runnable kernel threads over the sampling interval. Runnable threads consist of the threads that are ready but still waiting to run, and the threads that are already running."
Can anyone shed some light on how to find out if these are running threads or waiting? Can there be waiting threads if CPU is not 100% busy?
Thank you.
-- Parag