Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Planning distribution of the CPU capacity to the VMs

&pagelevel(4)&pagelevel

The VM2000 administrator can plan how to distribute the CPU capacity to the VMs and VM groups in detail and modify this during ongoing operation.

Parameters for distributing the CPU capacity

In VM2000, there are two parameters which the VM2000 administrator can use to plan and influence the long-term distribution of the available CPU capacity to the VMs:

  • The CPU quota

    The CPU quota is a specification made by the VM2000 administrator for the CPU share of the CPU capacity of the CPU pool which a VM group or a VM that does not belong to a VM group has in comparison to the other VMs which are assigned to the same CPU pool directly or as members of a VM group.

    For VMs which do not belong to a VM group, the CPU quota is specified in the CPU-QUOTA operand when the VM is initialized (see "Initializing a VM") or specified in /MODIFY-VM-ATTRIBUTES.

    For VM groups (SU /390), the CPU quota is specified in the CPU-QUOTA operand of /CREATE-VM-GROUP or /MODIFY-VM-GROUP-ATTRIBUTES.

    For VMs which are members of a VM group, the member CPU quota determines the share the VM has of the VM group’s CPU share. The member CPU quota is specified in the MEMBER-CPU-QUOTA operand when the VM is initialized (see "Initializing a VM") or specified in /MODIFY-VM-ATTRIBUTES.

    To permit a better comparison, the CPU quotas set are used (on the basis of idealized conditions) to calculate a standardized CPU share for the VM of the CPU capacity of the Server Unit, which is referred to as the effective CPU share of the VM (EFF-Q), see paragraph "Calculating the effective CPU share of a VM".

    For the definition of the CPU capacity of a Server Unit, see paragraph "CPU capacity and CPU share of a VM".

    The effective CPU share of a VM is displayed in the CPU-Q / EFF-Q column of the VM2000 information commands in addition to the CPU quota set by means of a command.

  • The maximum CPU utilization

    The maximum CPU utilization restricts the CPU share of a VM or of a VM group. It is specified as the percentage of the available CPU capacity in VM2000 operation (number of available real normal CPUs) which is granted for the VM group or VM. The maximum CPU utilization thus restricts the CPU utilization of a VM or of a VM group which would otherwise take up too much CPU time.

    For VMs the maximum CPU utilization of the VM is specified in the MAX-CPU-UTILIZATION operand when the VM is initialized (see "Initializing a VM") or specified in /MODIFY-VM-ATTRIBUTES.

    For VM groups the maximum CPU utilization is specified in the MAX-CPU-UTILIZATION operand of /CREATE-VM-GROUP or /MODIFY-VM-GROUP-ATTRIBUTES.

    A standardized value, known as the effective maximum CPU utilization of the VM (EFF-U), is calculated (on the basis of idealized conditions) from the maximum CPU utilization set, see paragraph "Calculating the effective CPU share of a VM".

    The effective maximum CPU utilization of a VM is displayed in the CPU-U / EFF-U column of the VM2000 information commands in addition to the maximum CPU utilization set by means of a command.


Constraints for planning

Idealized conditions are assumed for calculating the effective CPU share and the effective maximum CPU utilization for the VM:

  • All real normal CPUs are attached (extra and spare CPUs are ignored)

  • All virtual machines are running at peak load on all virtual CPUs, i.e. they are making full use of their CPU time slices

  • Performance losses through scheduling are ignored

In ongoing VM2000 operation, /SHOW-VM-ATTRIBUTES/-RESOURCES display the planned values under the idealized conditions.
In ongoing VM2000 operation, /SHOW-VM-STATUS displays the planned values under the current conditions and the associated results measurement results, see paragraph "Output of the current planned and measured values for the CPU share of the VMs".


Specifying the parameters for distributing the CPU capacity

The VM2000 administrator has the following options for specifying the two parameters, CPU quota and maximum CPU utilization, which determine the CPU shares of a VM:

  • Planning the CPU share of the VMs via the CPU quota in the case of unrestricted CPU utilization of the VMs and VM groups (MAX-CPU-UTILIZATION = 100).
    This setting is designed for optimum utilization of the Server Unit. In the case of peak operation in all VMs, the effective CPU share of a VM is determined using the formulae in the paragraph "Calculating the effective CPU share of a VM". During offpeak operation, a VM with a low effective CPU quota can still take up a large amount of CPU capacity.

    Example (without VM groups)

    VM
    (mono SU)

    CPU-QUOTA

    MAX-CPU-
    UTILIZATION

    Effective CPU
    share of the VM1

    1

    10

    100

    20 %

    2

    15

    100

    30 %

    3

    25

    100

    50 %

    1   At peak load the CPU would always be assigned here

       

  • Planning the CPU share of all VMs via the maximum CPU utilization of the VMs and VM groups (MAX-CPU-UTILIZATION < 100).
    If the maximum CPU utilization of the VMs is set such that its sum is less than or equal to 100 (minus the utilization by the VM2000 hypervisor on SU /390), then the maximum CPU utilization of a VM in peak operation corresponds to the maximum CPU utilization of a VM in peak operation also corresponds to its CPU share (in percent). The load on the Server Unit depends on the sum of the maximum CPU utilization of the VMs and the load profiles of the VMs. In this case, the CPU quota is relevant for the prioritization, but not for the possible CPU utilization.

    Example (without VM groups)

    VM
    (mono SU)

    CPU-QUOTA

    MAX-CPU-
    UTILIZATION

    Effective CPU
    share of the VM 1

    1

    10

    20

    20 %

    2

    15

    25

    25 %

    3

    25

    40

    40 %

    1   At peak load the CPU would not always be assigned here

       

  • Planning the CPU share of selected VMs via the maximum CPU utilization (MAX-CPU-UTILIZATION <= 100).
    In this case, the maximum CPU utilization restricts the VMs which unintentionally take up a lot of CPU capacity. Nevertheless, the Server Unit remains optimally utilized during peak operation. For a restricted VM to be able to utilize its planned CPU capacity, the CPU quotas of the VMs must be set such that the expected CPU share of the VM corresponds to its maximum CPU utilization.

    Example (without VM groups)

    VM
    (mono SU)

    CPU-QUOTA

    MAX-CPU-
    UTILIZATION

    Effective CPU
    share of the VM 1

    1

    10

    100

    30 %

    2

    15

    100

    45 %

    3

    25

    25

    25 %

    1   At peak load the CPU would always be assigned here


    Example (with one VM group, SU /390)

    VM
    (mono SU)

    CPU-QUOTA

    MAX-CPU-
    UTILIZATION

    Effective CPU
    share of the VM 1

    1

    10

    100

    30 %

    2

    15

    100

    45 %

    VM group GROUP1


    3
    4

    25

    MEMBER-CPU-QUOTA

    80

    20

    25


    25

    25
    (25 %) 2

    20 %
    5 %

    1   At peak load the CPU would always be assigned here
    2   Distributed over the two VMs of the VM group
Recommendation

The CPU shares of the VMs and VM groups should continue to be regulated via the CPU quota in order to achieve optimum utilization during peak operation.

In the event of VMs with unacceptably high CPU utilization (or if a performance limit has been defined for the CPU time), this can be restricted by the maximum CPU utilization. Measurements have shown that the ratio of “load on the guest system / MAX-CPU-UTILIZATION” should be under 0.75, otherwise the response time behavior of the guest system concerned deteriorates considerably.

Data centers which provide a certain CPU capacity for a VM (expressed in RPF) must note that the nominal capacity of the Server Unit is reduced through the use of VM2000, depending on the number and multiprocessor level of the VMs. MAX-CPU-UTILIZATION=20 is thus less than 20% of the Server Unit's capacity!

The multiprocessor level of VMs with greatly restricted performance (effective CPU share < 1, e.g. because of MAX-CPU-UTILIZATION < 1) which is selected should also be low (MONO or at most BI (on Server Units without spare CPU)) to ensure that the guest system can operate without a hitch.


CPU capacity and CPU share of a VM

In addition to the CPU quota and maximum CPU utilization parameters, the CPU share of a VM also depends on the CPU capacity of the Server Unit or CPU pool to which the VM is assigned.

The CPU capacity of a Server Unit is the CPU capacity of the real (normal) CPUs which are available in VM2000 operation (see "Real CPUs"), irrespective of whether they are attached or detached. It is expressed in terms of the number of CPUs.

Attached extra CPUs increase the Server Unit’s CPU capacity temporarily (see "Increasing capacity with extra CPUs"). They are not taken into account for the calculations in this section.

The CPU capacity of a CPU pool is defined as the share of the real normal CPUs of the CPU pool (regardless of whether they are attached or detached) in the CPU capacity of the Server Unit according to the formula



Number of real normal CPUs of the CPU pool  x  100
CPU capacity of the CPU pool=—————————————————————%


Number of available real normal CPUs

Example

A CPU pool with two real normal CPUs on a Server Unit with 4 CPUs has a CPU capacity which is 50% of that of the Server Unit.


A virtual machine receives a (theoretical) share of the CPU capacity of the CPU pool to which the VM is assigned.

For planning purposes, the CPU capacity of the CPU pool and the parameters set (see "Parameters for distributing the CPU capacity") are used to calculate the CPU share of a VM in the Server Unit’s CPU capacity, see "Calculating the effective CPU share of a VM".


Calculating the effective CPU share of a VM

Theoretical values for the distribution of the available CPU capacity to the virtual machines are calculated under the idealized conditions mentioned on "Constraints for planning" from the values for the CPU quota and the maximum CPU utilization set by the VM2000 administrator.

 

Case 1: Not taking VM groups into account 

The effective CPU share of the VM (EFF-Q) is calculated using the formula:




CPU-QUOTA of the VM  x  CPU capacity of the  CPU pool 
(F1)EFF-Q=———————————————————————%



Sum of the CPU-QUOTAs of all VMs of the CPU pool


Example for a CPU pool with 2 normal CPUs and 4 available normal CPUs

VM1 (BI)

VM2 (BI)

VM3 (MONO)

CPU-QUOTA (sum: 150)

90.00

50.00

10.00

Effective CPU share of the VM (EFF-Q)1
(CPU capacity of CPU pool: 50 %)

30.00 %

16.67 %

3.33 %

1   Assuming that the maximum utilization of VMs is not restricted


The effective CPU share of a VM may be restricted by the following constraints:


          


(N1)EFF-Q<=Maximum CPU utilization of the VM (by means of command)%






          
Number of real normal CPUs of the CPU pool  ×  100
(N2)EFF-Q<=—————————————————————%



Number of available real normal CPUs

          

Number of virtual CPUs of the VM (multiprocessor level)  x  100


(N3)EFF-Q<=—————%



Number of available real normal CPUs


The effective maximum CPU utilization of the VM (EFF-U) is the minimum value for these constraints and restricts the effective CPU share of the VM:

(F2)EFF-Q  <=  EFF-U  =  Minimum((N1),(N2),(N3))


If the effective CPU share of one or more VMs (according to formula (F1)) is restricted by the effective maximum CPU utilization of the VM, the remaining CPU share is distributed to the unrestricted VMs in accordance with their CPU quota:


          
CPU-QUOTA of the VM  x  (CPU capacity of the CPU-Pools - SUM(LIM))      
(F3)EFF-Q=————————————————————————————— %



Sum of the CPU-QUOTAs of all unrestricted VMs of the CPU pool
where SUM(LIM) = Sum of the effective CPU shares of the VMs of the CPU pool whose effective CPU share is restricted by (N1) or (N3).


Example for a CPU pool with 2 normal CPUs and 4 available normal CPUs with restricted VMs

VM1 (BI)

VM2 (BI)

VM3 (MONO)

CPU-QUOTA (sum: 150)

10.00

50.00

90.00

EFF-Q acc. to formula (F1)
(CPU capacity of CPU pool: 50 %)

3.33 %

16.67 %

30.00 %

MAX-CPU-UTILIZATION

100.00

15.00

60.00

Effective maximum
utilization of the VM (EFF-U)

50,00 %
because of (N2)

15,00 %
because of (N1)

25,00 %
because of (N3)

Effective CPU share of the VM
restricted by EFF-U

10,00 %
acc. to formula (F3)

15,00 %
acc. to formula (F2)

25,00 %
acc. to formula (F2)

The CPU share is calculated in the VM2000 hypervisor. In the example, VM3 was given the maximum possible CPU share; the rest of the CPU capacity of the CPU pool remains for VM1 and VM2.

(In practice, the above example would mean that VM3 should be assigned the CPU capacity of one of the two CPUs available in the CPU pool (50% of the pool’s CPU capacity = 25% of the Server Unit’s CPU capacity = one CPU), while VM1 and VM2 with their two virtual CPUs each would share the CPU capacity of the other CPU in the CPU pool.)


Case 2: Taking VM groups into account  (SU /390)

The effective CPU share of the VM (EFF-Q) is calculated using the formula:


                                           
CPU-QUOTA (VM or VM group)  x  CPU capacity of the CPU pool 
(F1a)EFF-Q (VM or VM group)=————————————————————————————%



Sum of CPU-QUOTAs of all single VMs and VM groups of the CPU pool

                                                    
MEMBER-CPU-QUOTA of the VM  x  EFF-Q of the VM group
(F1b)EFF-Q (VM in the VM group)=—————————————————————————%



Sum of the MEMBER-CPU-QUOTAs of all VMs in the VM group


Example for a CPU pool with 2 normal CPUs on a Server Unit with 4 CPUs

VM group GROUP1

VMs                                                        

VM1 (BI)

VM2 (BI)

VM3 (MONO)

CPU-QUOTA (sum: 150)

90.00

60.00
(effective CPU share of the VM group:
60*50/150 = 20 %)

MEMBER-CPU-QUOTA (in VM group)

-

50.00

10.00

Effective CPU share of the VM (EFF-Q)1
acc. to formulas (F1a) and (F1b)
(CPU capacity of CPU pool: 50 %)

30.00 %

16.67 % 2

3.33 % 2

1Assuming that the maximum utilization of VMs is not restricted
2Ignoring “load balancing within the VM group”, see "CPU assignment in time slicing (SU /390)"


The effective CPU share of a VM may be restricted by the following constraints:


          


(N1a)EFF-Q<=Maximum CPU utilization of the VM (by means of command)%






          


(N1b)EFF-Q<=Maximum CPU utilization of the VM group (by means of command)%






          
Number of real normal CPUs of the CPU pool  ×  100
(N2)EFF-Q<=—————————————————————%



Number of available real normal CPUs of the server

          

Number of virtual CPUs of the VM (multiprocessor level)  x  100


(N3)EFF-Q<=—————%



Number of available real normal CPUs of the server


The effective maximum CPU utilization of the VM (EFF-U) is the minimum value for these constraints and restricts the effective CPU share of the VM:

(F2)EFF-Q  <=  EFF-U  =  Minimum((N1a),(N1b),(N2),(N3))


If the effective CPU share of one or more VMs (according to formulae (F1) and (F1b)) is restricted by the effective maximum CPU utilization of the VM, the remaining CPU share is distributed over the unrestricted VMs in accordance with their CPU quota:


          
CPU-QUOTA of the VM  x  (CPU capacity of the  CPU pool - SUM(LIM))
(F3)EFF-Q=————————————————————————————%



Sum of the CPU-QUOTAs of all unrestricted VMs of the CPU pool
where SUM(LIM) = Sum of the effective CPU shares of the VMs of the CPU pool whose effective CPU share is restricted by (N1) or (N3).


Example for a CPU pool with 2 normal CPUs on a Server Unit with restricted VMs

VM group GROUP1

VMs

VM1 (BI)

VM2 (BI)

VM3 (MONO)

CPU-QUOTA (sum: 100)

10.00

90.00
(effective CPU share of the VM group:
90*50/100 = 45 %)

MEMBER-CPU-QUOTA (in VM group)

-

50.00

90.00

Effective CPU share of the VM (EFF-Q)
acc. to formulas (F1a) and (F1b)
(CPU capacity of CPU pool: 50 %)

5.00 %

16.07 %

28.93 %

MAX-CPU-UTILIZATION (VM group)

-

50.00

MAX-CPU-UTILIZATION (VM)

100.00

15.00

60.00

Effective maximum utilization (EFF-U)

50,00 %
because of (N2)

15,00 %
because of (N1a)

25,00 %
because of (N3)

Effective CPU share of the VM
with constraints (EFF-Q)

10,00 %
acc. to formula (F3)

15,00 %
acc. to formula (F2)

25,00 %
acc. to formula (F2)

The CPU share is calculated in the VM2000 hypervisor. In the example, VM3 was given the maximum possible CPU share; the rest of the CPU capacity of the CPU pool remains for VM1 and VM2.

(In practice, the above example would mean that VM3 should be assigned the CPU capacity of one of the two CPUs available in the CPU pool (50% of the pool’s CPU capacity = 25% of the Server Unit’s CPU capacity = one CPU), while VM1 and VM2 with their two virtual CPUs each would share the CPU capacity of the other CPU in the CPU pool.)


Changes to the effective CPU share of a VM

The VM2000 administrator can explicitly control the effective CPU share of a VM by changing the CPU quota and the maximum CPU utilization, see "Parameters for distributing the CPU capacity". The relevant values are displayed using /SHOW-VM-RESOURCES INFORMATION=*CPU, see "SHOW-VM-RESOURCES (Output status of VM2000 resources)".

The effective CPU share of the VM changes implicitly during ongoing operation when the following changes occur:

  • The CPU quota of another VM or VM group which is assigned to the same CPU pool changes

  • The maximum utilization of the VM or VM group changes, which affects the VM’s effective CPU share

  • The number of normal CPUs which belong to the same CPU pool changes (regardless of their reconfiguration status)

  • The VM is assigned to another CPU pool

  • The VM is migrated

  • The number of VMs which are assigned to the same CPU pool changes

  • The number of VMs which belong to the same CPU pool changes

  • The CPU quota of the VM group to which the VM belongs changes

The effective CPU share of a VM does not change when virtual CPUs are reconfigured in the guest system.

When real CPUs are reconfigured, the number of active CPUs in VM2000 changes, but not the CPU capacity of the Server Unit under the assumed idealized conditions. The effective CPU share and the effective maximum utilization of the VMs do not change.

The attachment of an extra CPU does not cause the effective CPU share of the VMs to change.


Output of the current planned and measured values for the CPU share of the VMs

The /SHOW-VM-STATUS command (see "SHOW-VM-STATUS (Output VM2000 monitored data)"), in contrast to the idealized conditions assumed for planning, uses the current values of the active objects in VM2000 operation.

The active objects in VM2000 operation are:

  • The attached real normal and extra CPUs

  • The VMs in state RUNNING

  • The active virtual CPUs

As with the idealized conditions, it is assumed that all VMs in the RUNNING status are running at peak load on all active virtual CPUs, i.e. they are making full use of their CPU time slices.

In the VM-specific information block, /SHOW-VM-STATUS INFORMATION=*STD/*TIMER displays, in addition to the CPU quota set (CPU-Q), the planned values for the CPU share of the VMs (CUR-Q) calculated on the basis of the active objects in VM2000 operation and the maximum CPU utilization of the VMs (CUR-U), see "SHOW-VM-STATUS (Output VM2000 monitored data)".
The calculation is based on the formulae EFF-Q and EFF-U, which are shown on "Calculating the effective CPU share of a VM", but related to the active objects in VM2000 operation.

By way of comparison, the command displays the current measured values for the CPU shares of the VMs in absolute terms and as percentage values.