7.13 How are Virtual CPUs Allocated to Virtual Machines?

When you create or edit a virtual machine, you have the option to specify two different values for the number of processors (also known as virtual CPUs) that are allocated to a virtual machine. These represent:

  • the maximum number of virtual CPUs that can be made available to a running virtual machine (maxvcpu)

  • the actual number of virtual CPUs that a virtual machine should be using at runtime (vcpu)

The number of virtual CPUs that the virtual machine actually has available at any one time is dynamically allocated by the hypervisor as required, by changing the number of processors (vcpu) for the running virtual machine within Oracle VM Manager. This value can never exceed the maximum number of processors (maxvcpu) that you have also specified within Oracle VM Manager.

If you want to change the maximum number of virtual CPUs (maxvcpu) that a virtual machine can have, the virtual machine must be rebooted after this value is changed. The maximum number of virtual CPUs (maxvcpu) cannot exceed the values described in the Oracle VM Release Notes.

Guest virtual machine boot behavior, in relation to virtual CPU allocation, differs depending on the mode of virtualization that the guest is configured for. Modes of virtualization are discussed further in Section 7.1, “What are Virtualization Modes or Domain Types?”. For instance, for a paravirtualized virtual machine (PVM), the guest virtual machine boots with as many virtual CPUs as are specified for the maximum number of processors (max_vcpu) in Oracle VM Manager and then works its way down to the configured number of processors (vcpu) that should be available to the virtual machine at runtime. If the difference between these two values is large, then it may take some time before the guest virtual machine is actually running with the specified number of virtual CPUs (vcpu). On the other hand, a hardware-virtualized virtual machine (HVM) boots with exactly the number of virtual CPUs (vcpu) that are specified in the configuration.

Once the virtual machine is running with the specified number of virtual CPUs, you can increase or decrease this value within Oracle VM Manager as required, and the number of processor cores available to the running guest operating system is automatically adjusted.

Oracle VM permits over-subscription of the host server's physical CPUs. This means the total number of virtual CPUs, allocated to all virtual machines combined, can exceed the number of physical CPUs. CPU over-subscription can be used to increase VM density and server resource utilization, which reduces the total cost of computing. It has no negative impact on VM performance as long as there is sufficient CPU capacity, especially for workloads that are not compute-intensive: CPU resources not consumed by an idle VM can be used by other VMs. It is the administrator's task to monitor CPU allocation and prioritization so that VMs have sufficient processing power to meet their service objectives.

Note

For details about virtual machine configuration, administration and health monitoring, refer to the following sections in the Oracle VM Manager User's Guide:

For further information on performance optimization goals and techniques for Oracle VM Server for x86, see Optimizing Oracle VM Server for x86 Performance, on Oracle Technology Network at: http://www.oracle.com/technetwork/server-storage/vm/ovm-performance-2995164.pdf.