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-
UTILIZATIONEffective CPU
share of the VM11
10
100
20 %
2
15
100
30 %
3
25
100
50 %
1 At peak load the CPU would always be assigned herePlanning 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-
UTILIZATIONEffective CPU
share of the VM 11
10
20
20 %
2
15
25
25 %
3
25
40
40 %
1 At peak load the CPU would not always be assigned herePlanning 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-
UTILIZATIONEffective CPU
share of the VM 11
10
100
30 %
2
15
100
45 %
3
25
25
25 %
1 At peak load the CPU would always be assigned hereExample (with one VM group, SU /390)
VM
(mono SU)CPU-QUOTA
MAX-CPU-
UTILIZATIONEffective CPU
share of the VM 11
10
100
30 %
2
15
100
45 %
VM group
GROUP1
3
425
MEMBER-CPU-QUOTA
80
2025
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!
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.
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
|
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:
|
Example for a CPU pool with 2 normal CPUs and 4 available normal CPUs
VM1 (BI) | VM2 (BI) | VM3 (MONO) | |
---|---|---|---|
| 90.00 | 50.00 | 10.00 |
Effective CPU share of the VM ( | 30.00 % | 16.67 % | 3.33 % |
The effective CPU share of a VM may be restricted by the following constraints:
|
|
|
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:
|
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:
|
Example for a CPU pool with 2 normal CPUs and 4 available normal CPUs with restricted VMs
VM1 (BI) | VM2 (BI) | VM3 (MONO) | |
---|---|---|---|
| 10.00 | 50.00 | 90.00 |
| 3.33 % | 16.67 % | 30.00 % |
| 100.00 | 15.00 | 60.00 |
Effective maximum | 50,00 % | 15,00 % | 25,00 % |
Effective CPU share of the VM | 10,00 % | 15,00 % | 25,00 % |
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:
|
|
Example for a CPU pool with 2 normal CPUs on a Server Unit with 4 CPUs
VM group | |||
VMs | VM1 (BI) | VM2 (BI) | VM3 (MONO) |
---|---|---|---|
| 90.00 | 60.00 | |
| - | 50.00 | 10.00 |
Effective CPU share of the VM ( | 30.00 % | 16.67 % 2 | 3.33 % 2 |
1 | Assuming that the maximum utilization of VMs is not restricted |
2 | Ignoring “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:
|
|
|
|
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:
|
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:
|
Example for a CPU pool with 2 normal CPUs on a Server Unit with restricted VMs
VM group | |||
VMs | VM1 (BI) | VM2 (BI) | VM3 (MONO) |
---|---|---|---|
| 10.00 | 90.00 | |
| - | 50.00 | 90.00 |
Effective CPU share of the VM ( | 5.00 % | 16.07 % | 28.93 % |
| - | 50.00 | |
| 100.00 | 15.00 | 60.00 |
Effective maximum utilization ( | 50,00 % | 15,00 % | 25,00 % |
Effective CPU share of the VM | 10,00 % | 15,00 % | 25,00 % |
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.