Re: Understanding high CPU utilization
Posted in 1997
In article <340E2741.58C8@umich.edu>, Brian Braun <bbraun@umich.edu>
writes
>
>Hello informix pros,
>
>I'm a unix systems administrator looking at a performance problem on a
>machine whose only function in life is to run a version 7.2 informix
>database. CPU utilization on the box is almost always 100% with user
>time being around 90%, all of it is from oninit. There is no paging,
>minimal disk activity and minimal user activity. The hardware is an IBM
>SP2 wide node running aix4.1.4.
>
>After looking at the output of various onstat commands I found something
>that looks somewhat strange to me. I run a onstat -g tpf with the
>thread id and see the following:
>
>Thread profiles
>tid lkreqs lkw dl to lgrs isrd iswr isrw isdl isct isrb lx bfr bfw lsus
>lsmx seq
>66 1630372676 34 0 0 7797 3381784 865 867 0 1732 0 0
>521007501 3968 0 5992 79390
>
I beileve (from reading sysmaster and generally knowing about what
other onstat options give that these are the meanings of each
column:-
tid 66 Thread Id
lkreqs 1630372676 Lock requests
lkw 34 Lock waits
dl 0 Deadlocks
to 0 Lock timeouts
lgrs 7797 Log records written
isrd 3381784 ISAM (Disk) reads
iswr 865 ISAM (Disk) writes
isrw 867 ISAM rewrites (write to the same page twice)
isdl 0 ISAM deletes
isct 1732 ISAM commits
isrb 0 ISAM rollbacks
lx 0 Long Transactions
bfr 521007501 Buffers Reads
brw 3968 Buffer Writes
lsus 0 Log space used
lsmx 5992 Maximum log space used
seq 79390 Sequentaial scans
If you examine $INFORMIXDIR/etc/sysmaster.sql (the sql script used to
create the sysmaster database (Yes it is created by running
dbaccess < $INFORMIXDIR/etc/sysmaster.sql) when you first initialise
OnLine - I've seen it running!!), you will see
sysmaster contains the table sysrsttcb, these are the internal RSAM
thread control blocks, each thread has a control block associated
with it. Near the bottom you will see the above columns - they all
start with upf_ but they have similar names and useful comments next
to them!
It appears this thread is doing millions of buffer reads and
sequential scans. It is probably scanning the same table thousands
of times. Checkout the definition of sysptntab which is a list of
partitions (tables) and contains similar information. It should show
you the partnum of the table which is being sequantial scanned.
Then
select hex(partnum), tabname from systables
will allow you to get the table name.
PS Sorry fot the late reply - I've been sick and I'm only just
starting to recover.
>I guess my question is what do these headings mean and could this be the
>cause of my CPU problem. There are actually a couple of these threads
>on the system. Using other onstat commands I tracked them back to
>processes running on the unix machine. The unix processes themselves
>use very little CPU.
>
>Any other suggestions of things to look at would be appreciated. Thanks
>for taking the time to look at this.
--
David Williams