Distributing computation impact

You can use processor affinity to distribute the computation impact of CPU virtual processors (VPs) and other processes. On computers that are dedicated to the database server, assigning CPU VPs to all but one of the CPUs achieves maximum CPU utilization.

On computers that support both database server and client applications, you can bind applications to certain CPUs through the operating system. By doing so, you effectively reserve the remaining CPUs for use by database server CPU VPs, which you bind to the remaining CPUs with the VPCLASS configuration parameter. Set the aff option of the VPCLASS configuration parameter to the numbers of the CPUs on which to bind CPU VPs. For example, the following VPCLASS setting assigns CPU VPs to processors 4 to 7:
VPCLASS cpu,num=4,aff=(4-7)
When specifying a range of processors, you can also specify an incremental value with the range that indicates which CPUs in the range should be 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 do not have 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

Copyright© 2019 HCL Technologies Limited