Home > Storage > PowerFlex > White Papers > Installing and configuring Oracle Linux KVM on Dell PowerFlex > Hard partitioning
Oracle Linux KVM offers a method to create hard partitioning, which is also known as CPU pinning. This involves binding vCPUs to physical CPU threads or cores, thus preventing vCPUs from being scheduled to run on physical CPUs other than the ones specified. With Oracle Linux Virtualization Manager and Oracle Linux KVM, to conform to the Oracle hard partition licensing requirement, you must bind a virtual machine to physical CPUs or cores. In order to qualify for this partitioning, a user must adhere to the following documentation: Hard Partitioning with Oracle Linux KVM.
On an x86-based system, a CPU core (without hyperthreading) or a CPU thread (with hyperthreading) is presented as a physical CPU by the hypervisor or bare metal operating system. vCPUs are exposed to the guest virtual machine as CPUs. The guest schedules applications on these vCPUs, and the hypervisor schedules these vCPUs over the physical CPU cores or threads.
The host running Oracle Linux KVM should meet the requirements of the Oracle Linux KVM compute host as defined in the hard partitioning document mentioned previously. The Oracle Linux Virtualization Manager provides a utility called olvm-vmcontrol, through which users can get and set the CPU/vCPU bindings for a virtual machine on Oracle Linux KVM.
CPU pinning should be configured as one of the first tasks after creation of the virtual machine. At the very least, it needs to be done prior to installation of the Oracle Database software.
The olvm_vmcontrol utility can run on the host running the Oracle Linux Virtualization Manager or on a separate Oracle Linux host that has connectivity to the Oracle Linux Virtualization Manager.
Essential to CPU pinning is associating the VM in question with a particular KVM host since pinning does not traverse, or cannot be transferred, between hosts. If the user does select a server, when the VM is pinned, the server it starts on after will be the designated one. It is a best practice, however, to set the server in the UI as in Figure 10.
To install the utility, users must install the required RPM which is available in the existing Oracle Linux repositories:
yum install olvm-vmcontrol
The utility is run with the same name, olvm-vmcontrol, and accepts three commands to manipulate CPU pinning: getvcpu, setvcpu, and rmvcpu.
CPU configuration
Begin by determining the attributes of the Oracle Linux KVM CPU configuration using the command lscpu. Figure 11 is provided as an example below:
The above output indicates:
Oracle Linux KVM includes a command line utility named virsh which can be performed to manage the virtual machines in the environment. There is a read-only flag that can be used without authentication and is useful in retrieving information about the status of CPU pinning. Here, in Figure 12, list the running VMs on the chosen KVM host.
The commands indicate that a VM named austin160.dellhcilab.com is configured with 4 vCPUs (0-3) and that currently all CPUs 0-95 (threads) of the KVM host are available for all vCPUs. This means that the vCPUs for this VM are not pinned to physical cores.