Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Example of managing CPU pools

&pagelevel(5)&pagelevel

The example below illustrates how the VM2000 administrator manages CPU pools on an SU /390.
Asynchronous messages are marked with %.


/show-vm-resources information=*cpu ———————————————————————————————————  (1)
VM-ID        CPU-POOL  GR-CPU-Q  CPU-Q/ EFF-Q  MAX-U/ EFF-U  PROC
 1 MONITOR   *STDPOOL            30.00/ 42.85 100.00/ 50.00  2(+1)

 2 C1SYS1    *STDPOOL            40.00/ 57.14 100.00/100.00  4(+1)
VM-ID        SCHED ACT-I  VIRT CPUS
 1 MONITOR    TS    NO    00(RUN),01(RUN),02(OFF)
 2 C1SYS1     TS    NO    00(RUN),01(RUN),02(RUN),03(RUN),
                          04(OFF)
CPU-ATTR     CPU-POOL     REAL CPUS
NORMAL       *STDPOOL     00(ATT),01(ATT),02(ATT),03(ATT)
EXTRA                     NONE
SPARE                     04(DET)
/create-vm-cpu-pool cpu-pool-name=pcust1 ——————————————————————————————  (2)
VMS4601 CPU POOL 'PCUST1' CREATED
/switch-vm-cpu cpu-id=(02,03),from-cpu-pool=*stdpool,to-cpu-pool=pcust1,
    attached-vm-cpus=*actions(source-cpu-pool=*adjust-number) —————————  (3)

VMS4608 CPU '02' SWITCHED FROM CPU-POOL '*STDPOOL' TO CPU-POOL 'PCUST1'
VMS4608 CPU '03' SWITCHED FROM CPU-POOL '*STDPOOL' TO CPU-POOL 'PCUST1'

VMS4621 IMPLICIT DETACH-DEVICE FOR VIRTUAL CPUS ON
        VIRTUAL MACHINE (2,C1SYS1) STARTED ————————————————————————————  (4) 
%  VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (2,C1SYS1),

           CODE 80FFFFFF, CPU 03
%  VMS2011 CPU 03 OF VIRTUAL MACHINE (2,C1SYS1) STOPPED

%  VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (2,C1SYS1),
           CODE 80FFFFFF, CPU 02
%  VMS2011 CPU 02 OF VIRTUAL MACHINE (2,C1SYS1) STOPPED

/show-vm-cpu-pool cpu-pool-name=*all,information=*cpu —————————————————  (5)
CPU-POOL SCHED CPU-ATTR REAL CPUS
*STDPOOL   TS  NORMAL   00(ATT),01(ATT)

PCUST1     -   NORMAL   02(ATT),03(ATT)
/assign-vm-to-cpu-pool vm-id=c1sys1,to-cpu-pool=pcust1,cpu-quota=80 ———  (6)
VMS4618 CPU POOL ASSIGNMENT OF VIRTUAL MACHINE (2,C1SYS1) CHANGED
        FROM CPU POOL '*STDPOOL' TO CPU POOL 'PCUST1'

/create-vm memory-size=512,vm-name=c1sys2,processor=*bi,cpu-quota=20,
           cpu-pool-name=pcust1 ———————————————————————————————————————  (7)

VMS3050 VIRTUAL MACHINE (3,C1SYS2) CREATED
VMS4615 VIRTUAL MACHINE (3,C1SYS2) ASSIGNED TO CPU POOL 'PCUST1'

/show-vm-cpu-pool cpu-pool-name=pcust1,information=*vm ————————————————  (8)
CPU-POOL SCHED VM-ID       VM-GROUP ATT PROC
PCUST1     DC   2 C1SYS1              2  4(+1)

                3 C1SYS2              0  2(+1)
/add-vm-devices vm-id=c1sys2,
     units=*pubset-devices(pubset=*by-pubres-device(unit=fc1c)) ———————  (9)
VMS4005 DEVICE 'FC1C' ASSIGNED TO VIRTUAL MACHINE (3,C1SYS2)

VMS4005 DEVICE 'FC1D' ASSIGNED TO VIRTUAL MACHINE (3,C1SYS2)
VMS4220 PUBSET '4IVL' WITH PUBRES DEVICE 'FC1C' ASSIGNED TO VM (3,C1SYS2)
/add-vm-devices units=(cj,ck),vm-id=c1sys2
VMS4005 DEVICE 'CJ' ASSIGNED TO VIRTUAL MACHINE (3,C1SYS2)

VMS4005 DEVICE 'CK' ASSIGNED TO VIRTUAL MACHINE (3,C1SYS2)
/start-vm ipl-unit=fc1c,vm-id=c1sys2
%  VMS2023 CPU 00 OF VIRTUAL MACHINE (3,C1SYS2) STARTED

%  VMS2023 CPU 01 OF VIRTUAL MACHINE (3,C1SYS2) STARTED
%  VMS2023 CPU 02 OF VIRTUAL MACHINE (3,C1SYS2) STARTED
%  VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (3,C1SYS2),
           CODE 80FFFFFF, CPU 02
%  VMS2011 CPU 02 OF VIRTUAL MACHINE (3,C1SYS2) STOPPED
%  VMS2050 GUEST SYSTEM ON VM (3,C1SYS2) READY
/show-vm-cpu-pool cpu-pool-name=pcust1,information=*summary ——————————— (10)
CPU-POOL SCHED REAL-NORMAL-CPUS REAL-EXTRA-CPUS VIRT-CPUS
               ALL ATT DET OFF  ALL ATT DET OFF    RUN
PCUST1     TS    2   2   0   0    0   0   0   0      4
/show-vm-resources information=*cpu,
                   vm-id=*by-cpu-pool(cpu-pool-name=pcust1) ——————————— (11)

VM-ID        CPU-POOL  GR-CPU-Q  CPU-Q/ EFF-Q  MAX-U/ EFF-U  PROC
 2 C1SYS1    PCUST1              80.00/ 40.00 100.00/ 50.00  4(+1)

 3 C1SYS2    PCUST1              20.00/ 10.00 100.00/ 50.00  2(+1)
VM-ID        SCHED ACT-I  VIRT CPUS
 2 C1SYS1     TS    NO    00(RUN),01(RUN),02(BLOCK),03(BLOCK),04(OFF)
 3 C1SYS2     TS    NO    00(RUN),01(RUN),02(OFF)
/shutdown-vm vm-id=c1sys2,action=*shutdown(quiet-time=0) —————————————— (12)
VMS2054 SHUTDOWN OF GUEST SYSTEM ON VM (3,C1SYS2) INITIATED
%  VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (3,C1SYS2),

           CODE 80FFFFFF, CPU 01
%  VMS2033 'EXC0557 SHUTDOWN PROCESSING COMPLETED' FROM VM (3,C1SYS2) VIA SVP

%  VMS2051 GUEST SYSTEM ON VM (3,C1SYS2) DOWN; REASON: SHUTDOWN
%  VMS2037 NON-INTERRUPTIBLE WAIT STATE FOR VIRTUAL MACHINE (3,C1SYS2),
           CODE 80FFFFFF, CPU 00
/show-vm-cpu-pool cpu-pool-name=pcust1,information=*all
CPU-POOL SCHED CPU-ATTR REAL CPUS

PCUST1     DC  NORMAL   02(ATT),03(ATT) ——————————————————————————————— (13)
CPU-POOL SCHED VM-ID       VM-GROUP ATT PROC

PCUST1     DC   2 C1SYS1              2  4(+1)
                3 C1SYS2              0  2(+1)
/delete-vm vm-id=c1sys2 ——————————————————————————————————————————————— (14)
VMS4009 DEVICE 'CJ' REMOVED FROM VIRTUAL MACHINE (3,C1SYS2)
VMS4009 DEVICE 'CK' REMOVED FROM VIRTUAL MACHINE (3,C1SYS2)

VMS4009 DEVICE 'FC1C' REMOVED FROM VIRTUAL MACHINE (3,C1SYS2)
VMS4009 DEVICE 'FC1D' REMOVED FROM VIRTUAL MACHINE (3,C1SYS2)
VMS4619 VIRTUAL MACHINE (3,C1SYS2) REMOVED FROM CPU POOL 'PCUST1'
VMS4024 VIRTUAL MACHINE (3,C1SYS2) TERMINATED
/assign-vm-to-cpu-pool vm-id=c1sys1,to-cpu-pool=*stdpool,cpu-quota=40 — (15)
VMS4618 CPU POOL ASSIGNMENT OF VIRTUAL MACHINE (2,C1SYS1) CHANGED
        FROM CPU POOL 'PCUST1' TO CPU POOL '*STDPOOL'

/switch-vm-cpu cpu-id=*all,from-cpu-pool=pcust1,to-cpu-pool=*stdpool,
        attached-vm-cpus=*actions(target-cpu-pool=*adjust-number) ————— (16)

VMS4608 CPU '02' SWITCHED FROM CPU-POOL 'PCUST1' TO CPU-POOL '*STDPOOL'
VMS4608 CPU '03' SWITCHED FROM CPU-POOL 'PCUST1' TO CPU-POOL '*STDPOOL'

VMS4620 IMPLICIT ATTACH-DEVICE FOR VIRTUAL CPUS ON
        VIRTUAL MACHINE (2,C1SYS1) STARTED ———————————————————————————— (17) 
%  VMS2023 CPU 02 OF VIRTUAL MACHINE (2,C1SYS1) STARTED

%  VMS2023 CPU 03 OF VIRTUAL MACHINE (2,C1SYS1) STARTED
/show-vm-cpu-pool cpu-pool-name=pcust1,information=*all ——————————————— (18)
CPU-POOL SCHED CPU-ATTR REAL CPUS
PCUST1     -   NORMAL   NONE
CPU-POOL SCHED VM-ID       VM-GROUP ATT PROC
PCUST1     -      NONE
/delete-vm-cpu-pool cpu-pool-name=pcust1 —————————————————————————————— (19)
VMS4605 CPU POOL 'PCUST1' DELETED

--------------------------------------------------------------------------------------------------------------

(1)

The command shows the initial situation for this example:
The data center has four real normal CPUs on this Server Unit. The existing spare CPU plays no role. A customer VM C1SYS1 with the attributes shown is running. Time slicing (TS) is used for scheduling, see "Scheduling procedure". The VM2000 administrator also operates the customer VM. The meaning of the output columns is described in more detail in the section "Planning distribution of the CPU capacity to the VMs".

(2)

The customer now rents two real normal CPUs for his/her exclusive use. To permit this the VM2000 administrator creates the CPU pool PCUST1.

(3)

The real CPUs 02 and 03 are switched from the standard CPU pool to the customer CPU pool PCUST1.

(4)

The SOURCE-CPU-POOL=*ADJUST-NUMBER operand causes VM2000 to check for all VMs in the source CPU pool, whether the number of their virtual CPUs remains greater than or equal to the remaining number of real CPUs. In this case VM2000 initiates a detach operation for the virtual CPUs 02 and 03 in the customer system as only two real CPUs are left in the standard CPU pool but four virtual CPUs are running in the customer VM C1SYS1. After detachment virtual CPUs 02 and 03 are still “blocked” (CPU status BLOCK).

(5)

The information output for the CPU pools shows the distribution of real normal CPUs.

(6)

The customer VM C1SYS1 is assigned to the customer CPU pool PCUST1. The VM’s CPU quota is reset in the process.

Note
With this command the default value ATTACHED-VM-CPUS=*CHECK-NUMBER is used to check whether the number of attached virtual CPUs of the VM (2) is less than or equal to the number of attached real CPUs of the CPU pool (2). If this were not the case, the command would be rejected.

(7)

The customer wants to have a further VM so that the two customer VMs can share the capacity of the rented CPUs in a ratio of 4:1. For this purpose the VM2000 administrator creates the customer VM C1SYS2 with a CPU quota of 20 and assigns it to the customer CPU pool PCUST1.

(8)

The information output for the customer CPU pool PCUST1 shows that initially only the customer VM C1SYS1 is running. As for two attached virtual CPUs the VM also has two attached real CPUs available in the CPU pool, a fixed assignment is implemented during scheduling (dedicated CPUs, DC), see "Scheduling procedure".

(9)

The customer system is started. Here the virtual spare CPU 02 is also briefly started and then stopped again.

(10)

The information output for the customer CPU pool PCUST1 shows a concise overview of the real and virtual CPUs. As four virtual CPUs are now running on two real CPUs of the CPU pool, time slicing is automatically used for scheduling (TS).

(11)

The information output for the VMs of the customer CPU pool PCUST1 shows that the two VMs are sharing the available CPU capacity in the required ratio (planned values).

(12)

After a certain time, the VM2000 administrator shuts down the guest system on VM C1SYS2.

(13)

As a result the procedure for fixed CPU assignment is automatically used again for scheduling (dedicated CPUs, DC), see "Scheduling procedure".

(14)

The VM is terminated and removed from the customer CPU pool PCUST1.

(15)

The VM C1SYS1 is (once more) assigned to the standard CPU pool. The CPU quota is reset to the earlier value in the process.

(16)

All real CPUs of the customer CPU pool PCUST1 are once more switched to the standard CPU pool.

(17)

The TARGET-CPU-POOL=*ADJUST-NUMBER operand causes VM2000 to check for all VMs in the target CPU pool, whether the number of their virtual CPUs is less than or equal to the new number of real CPUs. In this case VM2000 initiates an attach operation for virtual CPUs 02 and 03 in the customer system as four real CPUs will be in the standard CPU pool but only two of the four virtual CPUs created are running in the customer VM C1SYS1.

(18)

Neither CPUs nor VMs are contained in the CPU pool PCUST1. It can be deleted.

(19)

The CPU pool PCUST1 is deleted. The initial situation for the example has now been reestablished.