Its consuming almost 50% of the cpu for just one single query. So, I
had a curiosity and run two of the same kind and the CPU usage as per
topsa is split into two between these processes. I tried to run more
instance of the same query and now the cpu is split almost equally
among the three process...this info is from the topas output..
Name PID CPU% PgSp Owner
db2sysc 89018 33.3 3.0 db2owner
db2sysc 65134 32.7 3.0 db2owner
db2sysc 65620 31.3 3.0 db2owner
Now I tried to run the following command which I understand is
basically trying to get the same information as above how I do not see
the similar output...
ps aux| sort -n +2 > ps.out
-------------------------------
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
db2owner 65134 5.1 0.0 3640 1104 - A 17:19:09 119:43
db2agent db2owner 65620 5.3 0.0 3424 2080 - A 17:17:53
124:08 db2agent db2owner 89018 32.6 0.0 3160 1800 - A
09:42:37 118:07 db2agent
root 774 42.1 1.0 12 19648 - A 17:02:44 994:33 wait
root 516 42.2 1.0 12 19648 - A 17:02:44 995:52 wait
Would appreciate if somebody could tell me why is the wait command is
being listed as the one consuming the max cpu and the db2 processes
listed in topas output do not have similar values in this output.
TIA,
A Log.
A) Does this surprise you? If so, what was expected?
B) You may need to tune the database to improve performance.
> Now I tried to run the following command which I understand is
> basically trying to get the same information as above how I do not see
> the similar output...
>
> USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
>
> db2owner 65134 5.1 0.0 3640 1104 - A 17:19:09 119:43
> db2agent db2owner 65620 5.3 0.0 3424 2080 - A 17:17:53
> 124:08 db2agent db2owner 89018 32.6 0.0 3160 1800 - A
> 09:42:37 118:07 db2agent
> root 774 42.1 1.0 12 19648 - A 17:02:44 994:33 wait
> root 516 42.2 1.0 12 19648 - A 17:02:44 995:52 wait
>
> Would appreciate if somebody could tell me why is the wait command is
> being listed as the one consuming the max cpu and the db2 processes
> listed in topas output do not have similar values in this output.
The wait command is not consuming the most CPU. That value is
aggregate since the process started, and the wait process is what runs
when nothing else can. Therefore, it accumulates many, many CPU-seconds
since on most systems there's lots of free (read: wasted) cycles.
The ps information is not comparable to topas. One is a counter,
the other is live information. Apples and oranges.
--
Gary R. Hook / AIX PartnerWorld for Developers / These opinions are MINE
________________________________________________________________________