3-84 IBM Informix OnLine Database Server Administrator’s Guide

Monitor Shared Memory and Latches

Monitor Shared Memory and Latches
Monitor shared memory (tbstat -o) to capture a static snapshot of OnLine
shared memory that you can use for analysis and comparison.
Monitor latches to determine if a user process is holding a latch or if
contention of shared-memory resources exists.
From the command line, executetbstat -oto save a copy of the shared-
memory segment. You can executetbstat -o with a filename parameter to
specify the file to contain the output. Otherwise, the output is saved to
tbstat.out in the current directory. The shared-memory segment file is the
same size as the shared-memory segment. The size of shared memory is
displayedin the tbstat header. After you save a copy of shared memory to a
file, you can execute othertbstat options using the filename as a parameter.
Ifyou do, the tbstat information is derived from the shared-memory segment
stored in the specified file. Refer topage 7-91 for further information about
tbstat -o. Refer topage 7-80 for further information about tbstatfilename
syntax and use.
Executetbstat -p to obtain the value in the field lchwaits, which is the
number of times a user process (any process) was required to wait for a
shared-memorylatch. A large number of latch waits typically results from a
high volume of processing activity in which most of the transactions are
being logged. (The number of latches is not configurable and cannot be
increased.) Refer topage 7-92 for a complete listing of all fields that display
when you executetbstat -p.
Executetbstat -s to obtain general latch information. The output lists the
addressof any user process waiting for a latch. You can compare this address
with the users’ addresses in thetbstat -u output to obtain the user process
identification number.Never kill a database server process that is holding a
latch.If you do, OnLine immediately initiates an abort. Refer to page 7-97 for
a complete listing of all fields that display when you executetbstat -s.