Set processor affinity with the VPCLASS configuration parameter

To set processor affinity with the VPCLASS configuration parameter, you can specify individual processors or ranges of processors that you want to assign the virtual processors.

When specifying a range of processors, you can also specify an incremental value with the range that indicates which CPUs in the range are assigned to the virtual processors. For example, you can specify that the virtual processors are assigned to every other CPU in the range 0-6, starting with CPU 0.
VPCLASS CPU,num=4,aff=(0-6/2)
The virtual processors are assigned to CPUs 0, 2, 4, 6.

If you specify VPCLASS CPU,num=4,aff=(1-10/3), the virtual processors are assigned to every third CPU in the range 1-10, starting with CPU 1. The virtual processors are assigned to CPUs 1, 4, 7, 10.

When you specify more than one value or range, the values and ranges are not required to be incremental or in any particular order. For example you can specify aff=(8,12,7-9,0-6/2).

The database server assigns CPU virtual processors to CPUs in a circular pattern, starting with the first processor number that you specify in the aff option. If you specify a larger number of CPU virtual processors than physical CPUs, the database server continues to assign CPU virtual processors starting with the first CPU. For example, suppose you specify the following VPCLASS settings:
VPCLASS cpu,num=8,aff=(4-7)
The database server makes the following assignments:
  • CPU virtual processor number 0 to CPU 4
  • CPU virtual processor number 1 to CPU 5
  • CPU virtual processor number 2 to CPU 6
  • CPU virtual processor number 3 to CPU 7
  • CPU virtual processor number 4 to CPU 4
  • CPU virtual processor number 5 to CPU 5
  • CPU virtual processor number 6 to CPU 6
  • CPU virtual processor number 7 to CPU 7

For more information, see the VPCLASS configuration parameter in the Informix® Administrator's Reference.