Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Number of attached real and virtual CPUs in the CPU pool

&pagelevel(5)&pagelevel

For availability reasons each CPU pool must have at least one attached real CPU if at least one of the following conditions applies:

  • The CPU pool is assigned a VM in state RUNNING, SETUP(MIGR) or IN HOLD (WAIT).

  • The CPU pool is assigned a VM in state INIT-ONLY or DOWN (SU x86).

The number of attached virtual CPUs of a VM in state RUNNING or IN HOLD (WAIT) should be less than or equal to the number of attached real CPUs of the CPU pool to which the VM is assigned.

This principle guarantees optimum operation of a guest system, i.e. losses in performance (e.g. through scheduling or processor locks) are avoided.

If the principle for a VM in state RUNNING or IN HOLD (WAIT) is no longer fulfilled (overdimensioned VM), the VM will nevertheless continue to run with a too high multiprocessor level and the resultant disadvantages.


If the number of attached real CPUs is reduced, in most cases VM2000 guarantees that this principle will be fulfilled. In certain cases (highlighted in bold print on the following passages) the VM2000 administrator should cooperate with the guest system operator to ensure the principle is fulfilled.

The following cases can occur:

  • Attached real CPUs are deleted from a CPU pool (/SWITCH-VM-CPU):

    • The command is rejected if the last attached real CPU is to be removed, but a VM in state RUNNING, SETUP(MIGR) or IN HOLD (WAIT) is assigned to the CPU pool, or, on SU x86, also in state INIT-ONLY or DOWN (message/return code VMS4612).

    • Otherwise a check is made for all VMs which are assigned to the CPU pool to see whether the above-mentioned principle can still be fulfilled after the command has been executed. Depending on the ATTACHED-VM-CPUS=*ACTIONS(SOURCE-CPU-POOL=...) parameter, the command will be rejected (SOURCE-CPU-POOL=*CHECK-NUMBER) or executed (SOURCE-CPU-POOL=*ADJUST-NUMBER) if necessary.

    • When SOURCE-CPU-POOL=*ADJUST-NUMBER, VM2000 checks the status of the virtual CPUs of all VMs of the source CPU pool and, if required, issues reconfiguration commands for a corresponding number of virtual CPUs in the guest system.

  • A VM is started with /START-VM:

    If the multiprocessor level m of the VM is greater than the number n of attached real CPUs in the CPU pool, only n virtual CPUs are attached when the guest system is started. The remaining m - n CPUs are identified accordingly by VM2000 (state BLOCK). They can be attached in the guest system later only if further attached real CPUs are added to the CPU pool.

  • A VM (state RUNNING or IN HOLD (WAIT)) or VM group (with VMs in state RUNNING or IN HOLD (WAIT)) is assigned to a different CPU pool (/ASSIGN-VM-(GROUP-)TO-CPU-POOL):

    If the principle is not fulfilled in the new CPU pool, the ATTACHED-VM-CPUS operand determines the further procedure:

    • When ATTACHED-VM-CPUS=*CHECK-NUMBER, the command is rejected.

    • When ATTACHED-VM-CPUS=*ADJUST-NUMBER, the command is executed if the CPU pool to which the VM or VM group is to be assigned contains at least one attached CPU. The VM or VM group is assigned to the new CPU pool. In addition, VM2000 attempts to detach the excess CPUs (asynchronous, implicit /DETACH-DEVICE in the guest system for a corresponding number of virtual CPUs). These detached CPUs cannot initially be attached again by the guest system; they are identified accordingly by VM2000.
      (State of the virtual CPU in the information commands of VM2000: BLOCK).

  • A VM in state RUNNING is being migrated and the CPU pool on the target SU has fewer real CPUs attached than the CPU pool on the source SU (/MIGRATE-VM):

    If the principle is not fulfilled in the new CPU pool, the command is executed if the CPU pool to which the migrated VM is to be assigned contains at least one attached CPU. In addition, VM2000 attempts to detach the excess CPUs (asynchronous, implicit /DETACH-DEVICE in the guest system for a corresponding number of virtual CPUs). Initially, these detached CPUs cannot be attached again by the guest system. They are identified accordingly by VM2000.
    (State of the virtual CPU in the information commands of VM2000: BLOCK).

  • A real CPU is detached (/DETACH-VM-RESOURCES):

    VM2000 prevents the last attached real CPU in a CPU pool from being detached in the following cases:

    When the CPU pool is assigned a VM with an active guest system (message/return code VMS4617)
    When the CPU pool is assigned a VM

    If the principle is no longer fulfilled for a VM in state RUNNING or IN HOLD (WAIT), the VM nevertheless continues to run with a multiprocessor level which is too high (overdimensioned VM). If necessary, the multiprocessor level should be reduced in the guest system by detaching a virtual CPU using /DETACH-DEVICE. A virtual CPU thus detached is then in state BLOCK and can be attached again only when the number of attached real CPUs in the CPU pool has been increased.

  • A real CPU fails on a SU /390 and cannot be replaced by a hot spare CPU:

    If there are other attached real CPUs in the CPU pool, the procedure to be followed is the same as that described in paragraph "A real CPU is detached".

    If the last attached real CPU of a CPU pool fails, VM2000 initiates the following recovery measure to ensure that the VMs and VM groups affected can run:

    • In the case of a CPU pool other than the standard CPU pool, the VMs and VM groups affected are assigned to the standard CPU pool

    • If the standard CPU pool itself was affected, the attached real CPU with the highest CPU-ID is added to the standard CPU pool. If this CPU itself is the last attached real CPU of a CPU pool, the VMs and VM groups thus affected are also assigned to the standard CPU pool.

    The CPU shares of the VMs are recalculated accordingly.

 

If the number of attached real CPUs in a CPU pool is increased, the principle is always fulfilled. Nevertheless, the VM2000 administrator should take the following into account:

  • Attached real CPUs are added to a CPU pool (/SWITCH-VM-CPU)

    For all VMs of the target CPU pool whose number of attached virtual CPUs is less than their multiprocessor level, VM2000 cancels the state BLOCK for the relevant number of virtual CPUs of the VM. The virtual CPU can then be attached again in the guest system using /ATTACH-DEVICE.

    The ATTACHED-VM-CPUS operand determines the implicit actions of VM2000 for the virtual CPUs of the VMs which are assigned to the target CPU pool:

    • When ATTACHED-VM-CPUS=*ACTIONS(TARGET-CPU-POOL=*NONE), no further implicit actions are performed. The number of attached virtual CPUs in the VMs remains unchanged.

    • When ATTACHED-VM-CPUS=*ACTIONS(TARGET-CPU-POOL=*ADJUST-NUMBER), VM2000 checks the state of the virtual CPUs of all VMs of the target CPU pool and, if required, issues reconfiguration commands for a corresponding number of virtual CPUs in the guest system.

  • Real CPUs are attached (/ATTACH-VM-RESOURCES):

    For all VMs of the affected CPU pool whose number of attached virtual CPUs is less than their multiprocessor level, VM2000 cancels the state BLOCK for the relevant number of virtual CPUs in the VM. A detached virtual CPU can then be attached again in the guest system using /ATTACH-DEVICE.

  • A VM (state RUNNING or IN HOLD (WAIT)) or a VM group (with VMs in state RUNNING or IN HOLD (WAIT)) is assigned to a CPU pool which has more attached real CPUs than the previous CPU pool (/ASSIGN-VM-(GROUP-)TO-CPU-POOL):

    The command is executed. If the multiprocessor level of a VM is greater than the number of attached virtual CPUs, the state BLOCK is canceled for a corresponding number of virtual CPUs. The ATTACHED-VM-CPUS operand determines the further procedure:

    • ATTACHED-VM-CPUS=*CHECK-NUMBER results in no further actions.

    • When ATTACHED-VM-CPUS=*ADJUST-NUMBER, VM2000 attempts to attach the corresponding number of virtual CPUs (asynchronous, implicit /ATTACH-DEVICE in the guest system for a corresponding number of virtual CPUs).

  • A VM in state RUNNING is being migrated und the CPU pool on the target SU has more real CPUs attached than the CPU pool on the source SU (/MIGRATE-VM):

    The command is executed. If the multiprocessor level of a VM is greater than the number of attached virtual CPUs, the state BLOCK is canceled for a corresponding number of virtual CPUs. In addition, VM2000 attempts to attach the virtual CPUs that were in state BLOCK (asynchronous, implicit /ATTACH-DEVICE in the guest system for these virtual CPUs).