Manage virtual processors

To manage virtual processors, you need to initialize VP classes, add and drop VPs, and monitor VPs.

Initialize a VP class

Check your Informix® Administrator's Guide and the for information about VP-class initialization.

Add and drop VPs

You can add or drop virtual processors in a user-defined VP class or in the CPU VP class while the database server is online. Use onmode -p to add a VP to a class or to drop a VP from a class.

The following command adds one virtual processor to the newvp class (which the code fragment in Define a yielding user-defined VP class defines):
onmode -p +1 newvp

To remove a virtual processor, specify a negative value in the -p option. For more information about the onmode utility, see the .

Monitor virtual processors

You can use the following onstat -g commands to monitor VPs:
  • onstat -g glo to generate information about global multithreading such as CPU use of virtual processors and total number of sessions.
  • onstat -g rea to generate information about the number of threads in the ready queue of the VP class.
  • onstat -g sch to generate information about the number of semaphore operations, spins, and busy waits for each virtual processor.

A user-defined VP class appears in the onstat -g glo output as a new process. You can use the -g glo option to find the virtual process in which your DataBlade® API module is loaded. The following list shows the last section of the output of this onstat command.

Figure 1: The onstat -g glo command output
Individual virtual processors:
 vp    pid       class       usercpu   syscpu    total     Thread    Eff
 1     23322     cpu         26.15     1.11      27.26     185.03    14%
 2     23326     adm         0.00      0.05      0.05      0.00       0%
 3     23327     lio         0.07      0.82      0.89      34.74      2%
 4     23352     pio         0.02      0.59      0.61      7.20       8%
 5     23353     aio         1.12      2.30      3.42      78.70      4%
 6     23354     newvp       0.00      0.02      0.02      0.00       0%

In The onstat -g glo command output, the onstat utility displays CPU usage for the CPU VP as the first line of output. It displays the processor and CPU usage for the user-defined VP newvp.

For more information about the onstat utility, see the .

In addition, you can select information from the sysvpprof SMI table about the virtual processors that are currently running. The sysvpprof SMI table exists only in the sysmaster database.