When a VM is scheduled under VM2000 the VM2000 hypervisor starts a loadable virtual CPU of a VM on a free real CPU. VM2000 uses two different processes for scheduling at VM runtime:
CPU assignment in time slices (see below)
Fixed CPU assignment (dedicated CPUs, see "Fixed CPU assignment" below)
Here the CPU performance of the server is distributed ideally across the loadable virtual machines in accordance with the settings for the VMs.
CPU assignment in time-slicing mode
Normally the number of attached real CPUs in a CPU pool is less than the sum of the attached virtual CPUs of all active VMs which are assigned to this CPU pool. VM2000 starts a virtual CPU on a real CPU from the pool using time slicing.
The maximum size of the time slice is defined dynamically for each virtual CPU of a VM in VM2000 in the range from 0.1 to 8.0 milliseconds. VMs with a “very small” CPU quota are then also assigned a smaller time slice. The maximum size of the time slice is only reached in few cases on the current BS2000 servers. Generally a time slice is terminated by the virtual CPU of the VM entering the interruptible idle status.
The VM2000 administrator can influence the distribution of the CPU performance using VM-specific control parameters, see "VM-specific control parameters" below. VM2000 also enhances the performance, e.g. by means of CPU affinity, see "CPU affinity" below.
The scheduling priority of the individual guest systems is derived from the specified CPU quotas and the CPU time used most recently.
VM-specific control parameters
The control parameters which are relevant to performance for a VM in time slicing are:
Multiprocessor level of the VMs/guest systems
CPU quota of the VM group, CPU quotas/member CPU quotas of the VMs (see "CPU share of a VM" below)
Performance limit of the VM or VM group (MAX-CPU-UTILIZATION, see "Performance limit of a VM" below)
VM privilege IO-PRIORITY (see "Peripherals")
The time period in which a guest system can accept the CPU quota assigned to it depends to a very large extent on the degree of utilization of the VM2000 time slice, both that of the home guest system and of the other guest systems. This degree of utilization is high when the workload is CPU-intensive and low when the workload is I/O-intensive.
If a guest system does not fully utilize the VM2000 time slice assigned to it, this improves the I/O behavior of the other guest systems.
In the case of a multiprocessor VM, VM2000 attempts to distribute the unused share of a virtual CPU’s CPU performance primarily to the other virtual CPUs of the VM.
However, if the time slice is utilized fully by a guest system, the I/O times can be considerably increased, above all for guest systems whose load consists almost exclusively of I/O-intensive tasks. The measures that can then be taken are:
restriction of the CPU-intensive guest system by MAX-CPU-UTILIZATION (see "Performance limit of a VM" below) and/or
assignment of the privilege IO-PRIORITY (see "Peripherals")
/SHOW-VM-STATUS INFORMATION=*SCHEDULE provides information on the mean value of a guest system’s used time slice. Here the wait time up to activation of the virtual CPU is output as the measurement for the “increase of the VM”.
CPU share of a VM
In the information commands VM2000 outputs various CPU quotas for a VM or VM group which enable the VM2000 administrator to observe the planned and current distribution of the CPU performance:
CPU-Q (CPU quota, /SHOW-VM-ATTRIBUTES/-RESOURCES)
is the (MEMBER-)CPU-QUOTA of the VM set with /CREATE-VM or /MODIFY-VM-ATTRIBUTESEFF-Q (effective CPU quota, /SHOW-VM-ATTRIBUTES/-RESOURCES INFORMATION=*CPU)
is the standardized CPU quota of the VM taking into account the constraints multiprocessor level, performance limit of the VM and CPU pools
(sum of the standardized CPU quotas of all configured VMs = 100%).
EFF-Q shows the CPU share of the VM or VM group to be expected in the long term in the event of a CPU-intensive load in all guest systems and when all real and virtual CPUs are connected.CUR-Q (current CPU quota, /SHOW-VM-STATUS)
is the standardized CPU quota of the VM taking into account the constraints multiprocessor level, performance limit of the VM and CPU pools
(sum of the standardized CPU quotas of all active VMs = 100%).
CUR-Q shows the CPU share of the VM or VM group to be expected at present in the event of a CPU-intensive load in all guest systems and in relation to the real and virtual CPUs currently connected.
Performance limit of a VM
If a VM or VM group is never to be assigned more than a particular percentage of the server’s CPU performance (not if CPUs are free, either), this can be defined using the MAX-CPU-UTILISATION parameter. Restricted CPU performance can, for example, be required in the context of service levels. The parameter enables excess CPU utilization by a guest system with a CPU-intensive load to be restricted.
CPU affinity
In time slicing VM2000 attempts to ensure with scheduling that a virtual CPU starts on the same real CPU in the event of the next scheduling procedure. CPU caches and initialization data of the VM are retained and reduce the indirect overhead. However, the primary aim is to optimize the response time.
Fixed CPU assignment (dedicated CPUs)
To use dedicated CPUs, the number of attached real CPUs in a CPU pool must be at least as high as the sum of the attached virtual CPUs of all active VMs which are assigned to this CPU pool. When this is the case, VM2000 automatically assigns precisely one real CPU to each virtual CPU of a VM in this CPU pool.
In this case the VM2000 administrator can use the VM attribute VM-ACTIVE-IDLE to determine whether a VM still retains control over a real CPU if the VM’s virtual CPU which is running on it is inactive (interruptible wait state, "idle"), see "CPU pools".