5.2.4. Adding Virtual Processors and Processing Units

Even with shared processor LPARs, processors (virtual processors) can be added dynamically at runtime. The number of resulting virtual processors must not exceed the number of maximum virtual processors for the LPAR. When adding virtual processors, the current entitlement must be taken into account. For example, if the current entitlement is 0.20 and the LPAR already has 4 virtual processors, no further virtual processors can be added without first increasing the entitlement!

As an example we consider the LPAR aix05, with the aim of increasing the number of virtual processors by 2. The LPAR currently has the following processor resources:

$ lpar lsproc aix05
            PROC         PROCS           PROC_UNITS                         UNCAP   PROC   
aix05  shared  1    1        4    0.1  0.1      2.0  uncap              100     DefaultPool

Currently the LPAR has only one virtual processor and an entitlement of 0.1. For an increase by 2 virtual processors to a total of 3 virtual processors, an entitlement of at least 3 * 0.05 equal to 0.15 is required. Accordingly, the attempt to increase the number of virtual processors by 2 will fail:

$ lpar addprocs aix05 2
hmc01: chhwres -m ms06 -r proc  -o a -p aix05 --procs 2
ERROR: remote HMC command returned an error (1)
StdErr: HSCL1566 The operation failed because the ratio of assigned processing units to assigned virtual processors for partition 5 would have been less than the minimum ratio supported by the operating system on the partition.

The “lpar addprocunits” (add processing units) command can be used to increase the number of processing units (entitlement). We increase the entitlement by 0.05:

$ lpar addprocunits aix05 0.05

Now that the LPAR has a total entitlement of 0.15, the increase by 2 virtual processors can be carried out without a problem:

$ lpar addprocs aix05 2

If the change is only to be made in a profile, then the “-p” option must be used with the profile name:

$ lpar -p standard addprocunits aix05 0.05
$ lpar -p standard addprocs aix05 2