Internal_display_only | ||||||
---|---|---|---|---|---|---|
|
Panel | ||||
---|---|---|---|---|
In this section:
|
...
Note |
---|
If available for operating systems where the utility tuned-admin exists (most recent releases of Red Hat derived O/Ses), the virtual-host setting is very beneficial for guest VM responsivity.
tuned-adm active (output should be virtual-host)
tuned-adm profile virtual-host
echo virtual-host > /etc/tuned/active_profile |
...
...
The following figure shows virt-manager running on a local Linux desktop OS and remotely managing three VMs installed on two physical KVM Hosts.
...
...
Virt-manager Connected To KVM Hosts And Managing Three VMs
The Installer tool assigns the first four CPU cores to a VM when it is created. A second VM created on the same KVM Host requires the same resource allocation as the first VM.
...
Info | ||
---|---|---|
| ||
If SS7 and Diameter are running on the same VM, then eight CPU cores must be assigned to the VM. In addition to the four CPU cores assigned as default when the VM was created, four CPU cores are added to the default setting. |
Note | ||
---|---|---|
| ||
Proper performance of the DSC requires full cores and not hyperthreaded cores. When pinning, use only Processor IDs that represent actual cores, not hyperthreaded cores. If you do not statically pin vCPUs to physical CPUs, your system may incur a significant degradation in performance. |
...
Anchor | ||||
---|---|---|---|---|
|
...
Open the VM using virt-manager to view and set the VM's CPU parameters.
The CPU Pinning option is set in virt-manager's Processor Configuration screen, as shown in the following figure.
...
...
Virt-manager's Processor Configuration Screen - CPU Pinning Option
You can also use the following commands to assign a VM (vCPU) to a pysical CPU device.
Code Block |
---|
# virsh vcpupin <VM_name> x y --live --config
|
Note | ||
---|---|---|
| ||
Using the KVM GUI software to set the CPU pinning is prone to errors. Certain versions of the virt-manager software do not provide full support for the CPU pinning function. It is recommended that you verify CPU pinning on your system using the Linux system command (virsh) in a console window, for example: # virsh vcpupin <VM_name>
VCPU: CPU Affinity
----------------------------------
0: 12
1: 13
2: 14
3: 15
4: 16
5: 17 In the above example, the output indicates six vCPUs of <VM_name> are each assigned to one physical CPU device. The CPU mapping begins with vCPU_0 pinned to physical CPU_12; and continues to vCPU_5 pinned to physical CPU_17. |
...
Code Block |
---|
# virsh emulatorpin <VM_name> --cpulist 0-3 --config --current |
...
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
In a multi-processor system, NUMA allows some CPUs to access system resources faster than other CPUs. In a Linux OS, system resources are split up into NUMA domains. NUMA domains are used in virt-manager to set the CPU Pinning option of the VM. To identify NUMA domains on the KVM Host, run the command, lscpu (Linux RedHat OS), at the system prompt. For example, on a KVM Host running a Linux RedHat OS, the command returns the following:
|
...
Div | |||||||
---|---|---|---|---|---|---|---|
A VM uses special features available on a physical CPU device if it is allowed to identify all CPU resources (and their features) on the KVM Host. Host CPU visibility can be enabled in virt-manager using the 'Copy Host CPU Configuration' button available in the Processor Configuration screen. The following figure shows virt-manager's Processor Configuration screen and the location of the 'Copy host CPU configuration' button. The VM CPU and emulator pinning can be configured at install time using the installation file (refer to The VM Configuration File).
|
...
Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Recent CPU devices allow CPU Frequency Scaling to reduce power consumption when only partial CPU resources are required. Under heavy traffic (or traffic bursts) conditions, the DSC SWe VM performs better (that is, maintains a higher throughput with less latency) if CPU Frequency Scaling is disabled and the CPU cores are permitted to run at full speed all the time. To disable CPU Frequency Scaling, run the following Bash command on the KVM Host for each CPU running a VM :
On systems running a RedHat LinuxOS, the above command is used to set the CPU Frequency Scaling option, which can be enabled at runtime for specific Processor IDs.
The Frequency Scaling Governor setting does not persist across KVM Host reboots. If the KVM Host is running a RedHat OS variant, this setting can be made persistent by adding the line(s) to /etc/rc.d/rc.local. For further details, please consult the support documentation for your Linux OS on the KVM Host. |
Pagebreak |
---|
Div | |||||
---|---|---|---|---|---|
Some general recommendations are presented in this section, however, the list is not exhaustive. For more information on VM performance tuning, please consult your Linux OS and KVM Host vendor documentation.
|
...