Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Effect of Configuration on CPU Utilization > Virtual Processors and CPU Utilization >

Monitoring Virtual Processors

Monitor the virtual processors to determine if the number of virtual processors configured for the database server is optimal for the current level of activity.

Using Command-Line Utilities

You can use the following command-line utilities to monitor virtual processors.

onstat -g glo

Use the onstat -g glo option to display information about each virtual processor that is currently running as well as cumulative statistics for each virtual-processor class.

The vps field in the output shows the number of virtual processors currently active for that class. In the sample output for onstat -g glo in Figure 3, the vps field shows that 3 CPU VPs are currently active.

Use the onstat -g rea option, as onstat -g rea describes, to determine if you need to increase the number of virtual processors.

Figure 3. onstat -g glo Output
MT global info:
sessions threads  vps      lngspins
1        15       8        0

Virtual processor summary:
class    vps      usercpu          syscpu           total
 cpu       3       479.77          190.42          670.18
 aio       1         0.83            0.23            1.07
 pio       1         0.42            0.10            0.52
 lio       1         0.27            0.22            0.48
 soc       0         0.00            0.00            0.00
 tli       0         0.00            0.00            0.00
 shm       0         0.00            0.00            0.00
 adm       1         0.10            0.45            0.55
 opt       0         0.00            0.00            0.00
 msc       1         0.28            0.52            0.80
 adt       0         0.00            0.00            0.00
 total     8       481.67          191.93          673.60

Individual virtual processors:
   vp        pid         class    usercpu          syscpu           total
    1        1776         cpu      165.18           40.50          205.68
    2        1777         adm        0.10            0.45            0.55
    3        1778         cpu      157.83           98.68          256.52
    4        1779         cpu      156.75           51.23          207.98
    5        1780         lio        0.27            0.22            0.48
    6        1781         pio        0.42            0.10            0.52
    7        1782         aio        0.83            0.23            1.07
    8        1783         msc        0.28            0.52            0.80
                          tot      481.67          191.93          673.60
onstat -g rea

Use the onstat -g rea option to monitor the number of threads in the ready queue. The status field in the output shows the value ready when the thread is in the ready queue. The vp-class output field shows the virtual processor class on which the thread executes. If the number of threads in the ready queue is growing for a class of virtual processors (for example, the CPU class), you might have to add more of those virtual processors to your configuration. Figure 4 displays sample onstat -g rea output.

Figure 4. onstat -g rea Output
Ready threads:
tid     tcb     rstcb   prty    status                  vp-class   name

6       536a38  406464  4       ready                     3cpu    main_loop()
28      60cfe8  40a124  4       ready                     1cpu    onmode_mon
33      672a20  409dc4  2       ready                     3cpu    sqlexec
onstat -g ioq

Use the onstat -g ioq option to determine whether you need to allocate additional AIO virtual processors. The command onstat -g ioq displays the length of the I/O queues under the column len, as Figure 5 shows. You can also see the maximum queue length (since the database server started) in the maxlen column. If the length of the I/O queue is growing, I/O requests are accumulating faster than the AIO virtual processors can process them. If the length of the I/O queue continues to show that I/O requests are accumulating, consider adding AIO virtual processors.

Figure 5. onstat -g ioq and onstat -d Outputs
onstat -g ioq

AIO I/O queues:
q name/id    len maxlen totalops  dskread dskwrite  dskcopy
  adt   0      0      0        0        0        0        0
  msc   0      0      1       12        0        0        0
  aio   0      0      4       89       68        0        0
  pio   0      0      1        1        0        1        0
  lio   0      0      1       17        0       17        0
  kio   0      0      0        0        0        0        0
  gfd   3      0      3      254      242       12        0
  gfd   4      0     17      614      261      353        0


onstat -d
Dbspaces
address  number   flags    fchunk   nchunks  flags    owner    name
a1de1d8  1        1        1        1        N        informix rootdbs
a1df550  2        1        2        1        N        informix space1
 2 active, 32,678 maximum
Chunks
address  chk/dbs offset   size     free     bpages   flags pathname
a1de320  1   1   0        75000    66447             PO-   /ix/root_chunk
a1df698  2   2   0        500      447               PO-   /ix//chunk1
 2 active, 32,678 maximum 

Each chunk serviced by the AIO virtual processors has one line in the onstat -g ioq output, identified by the value gfd in the q name column. You can correlate the line in onstat -g ioq with the actual chunk because the chunks are in the same order as in the onstat -d output. For example, in the onstat -g ioq output in Figure 5, there are two gfd queues. The first gfd queue holds requests for root_chunk because it corresponds to the first chunk shown in the onstat -d output in Figure 5. Likewise, the second gfd queue holds requests for chunk1 because it corresponds to the second chunk in the onstat -d output.

If the database server has a mixture of raw devices and cooked files, the gfd queues correspond only to the cooked files in onstat -d output.

Using ISA

To monitor virtual processors with ISA, click on the VPs page on the main ISA page. ISA uses information that the onstat -g glo command-line option generates. Click Refresh to rerun the commands and display fresh information.

Using SMI Tables

You must connect to the sysmaster database to query the SMI tables. Query the sysvpprof SMI table to obtain information on the virtual processors that are currently running. This table contains the following columns.

Column
Description
vpid
Virtual-processor ID number
class
Virtual-processor class
usercpu
Seconds of user CPU consumed
syscpu
Seconds of system CPU consumed
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]