Previous Topic: 6.8.5.3.1.1 Summarizing Processor Pool Data

Next Topic: 6.8.5.3.2 System z9 Processors' Pools

6.8.5.3.1.2 Special Purpose Processors' Weight Management

The distribution of the shared CPU resources is determined by
the weight assigned to each LPAR configured with shared
processors.  PR/SM manages shared standard CP and shared
special purpose processors as separate pools of physical
resources.  As such, the processing weights assigned to
logical partitions using shared special purpose processors
are totaled and managed independently from the total weights
derived from all of the logical partitions using shared
standard CP processors.  As a result, any shared IFLs or
zAAPs in the configuration are combined with the shared ICFs
(Integrated Coupling Facilities).

When a logical partition uses shared processors, the zAAPs
defined to the partition use shared special purpose
processors and the weight given to the zAAPs is equal to the
partition's weight.  Since logical special purpose processors
(zAAP, IFL, ICF) are dispatched on the same type of physical
processing unit, their relative weights need to be carefully
adjusted in order to avoid a negative impact on performance,
especially when the configuration includes shared coupling
facility LPARs.  These logical partitions tend to be
continuously dispatched due to their "active wait" polling
algorithm; and, if their weights are too high compared to
other LPARs sharing the special purpose processors (for
example, a z/OS partition with shared zAAPs), they dominate
the usage of the processors' time slices, thus possibly
interfering with work that wants to be dispatched on zAAPs.

The following example demonstrates the requirement to update
weights of Coupling Facility or Linux logical partitions when
a shared zAAP is added to the configuration:

Base configuration:
------------------

NUMBER OF PHYSICAL PROCESSORS: 5
                   CP        : 4
                   ICF       : 1

                   PROCESSOR  ALLOWED
LPAR NAME  WEIGHT  NUM  TYPE  RESOURCE
---------- ------- ---  ----  --------
ZOS1         900     4   CP      90%
ZOS2         100     4   CP      10%
           =======            ========
            1000                100%

ICF1         550     1   ICF     55%
ICF2         450     1   ICF     45%
           =======            ========
            1000                100%

In this configuration, the ZOS1 LPARs may use the capacity
of 3.6 standard CP processors, and ZOS2 may use 0.4
processor.

On the other hand, the two coupling facility LPARs sharing a
single special purpose processor (ICF) each use about half of
the ICF.

Adding a zAAP:
-------------

Adding a zAAP to the ZOS2 LPAR without adjusting the weights
of the special purpose processors' pool results in the
following:

NUMBER OF PHYSICAL PROCESSORS: 5
                   CP        : 4
                   ICF       : 2 (1 ICF + 1 zAAP)

                   PROCESSOR  ALLOWED
LPAR NAME  WEIGHT  NUM  TYPE  RESOURCE
---------- ------- ---  ----  --------
ZOS1         900     4   CP      90%
ZOS2  +-->   100     4   CP      10%
      !    =======            ========
      !     1000                100%
      !
ICF1  !      550     1   ICF     50%
ICF2  !      450     1   ICF     41%
ZOS2  +-->   100     1   ICF      9%
           =======            ========
            1100                100%

Looking at the above numbers, nothing changed for the z/OS
LPARs in regards to their relative share of the standard CP
processors; but instead of adding a full zAAP to the ZOS2
LPAR, we actually only added a small portion of a zAAP.
Considering how PR/SM manages weights, the ICF1 coupling
facility LPAR has now 50% of all shared special purpose
processors' capacity available.  The pool being now comprised
of 2 processors (the ICF plus the zAAP we just added), ICF1
can actually use up to one full physical engine.  Similarly,
ICF2 now has 41% of these total resources, meaning it can use
0.82 physical engine.  This only allows 0.18 for the zAAP
work on the ZOS2 LPAR.

To allow the full zAAP capacity to be used by the ZOS2 LPAR,
adjust the weights of the shared special purpose processors'
pool as follows:

1)  Always start with zAAP weight over which we have no
    control, and sum up the weights of the partitions that
    have shared zAAPs, as well as the total number of shared
    zAAPs:

    TOT_ZAAP_WEIGHT = sum of LPARs' weights with shr zAAPs

    TOT_ZAAP_PROCS  = total number of shared zAAPs

    In our example we only have one LPAR configured with
    zAAPs and only one shared zAAP; therefore this total is
    equal to 100.

2)  The above total divided by the number of shared zAAPs
    gives the weight of one processor in the special purpose
    processors' pool:

    ONE_SPPROC_WEIGHT = TOT_ZAAP_WEIGHT / TOT_ZAAP_PROCS

3)  Use the above value to reset the weight of the other
    special purpose LPARs (in our example ICF1 and ICF2) to
    the same ratio we had before the zAAP, using the
    following formula:

    LPAR_NEW_WEIGHT = ONE_SPPROC_WEIGHT x (previous share)

    In our example the adjusted weights for the two ICF1 and
    ICF2 LPARs are:

    ICF1_NEW_WEIGHT = 100 x 55% = 55

    ICF2_NEW_WEIGHT = 100 x 45% = 45

Once the weights are adjusted, the configuration should look
like this:

NUMBER OF PHYSICAL PROCESSORS: 5
                   CP        : 4
                   ICF       : 2 (1 ICF + 1 zAAP)

                   PROCESSOR  ALLOWED
LPAR NAME  WEIGHT  NUM  TYPE  RESOURCE
---------- ------- ---  ----  --------
ZOS1         900     4   CP      90%
ZOS2         100     4   CP      10%
           =======            ========
            1000                100%

ICF1          55     1   ICF     27.5%
ICF2          45     1   ICF     22.5%
ZOS2         100     1   ICF     50%
           =======            ========
             200                100%