Overview
Provides all the settings and configurations you need to enhance the performance for Cisco Catalyst 8000V running in KVM environments.
Increase the performance of a Cisco Catalyst 8000V instance running in a KVM environment by modifying certain settings on the KVM host. These settings are independent of the IOS XE configuration settings on the Cisco Catalyst 8000V instance.
-
These settings might affect the number of VMs you can instantiate on a server.
-
Tuning steps are most impactful for a small number of VMs that you instantiate on a host.
To improve the KVM configuration performance, Cisco recommends that you do the actions listed in this table.
| Action |
Sample configuration (if applicable) |
|---|---|
| Enable vCPU pinning |
|
| Enable emulator pinning |
|
| Enable numa tuning. Ensure that all vCPUs are pinned to the physical cores on the same socket. |
|
| Set hugepage memory backing |
|
| Use virtio instead of IDE |
|
| Use graphics VNC instead of SPICE. |
|
| Remove unused devices such as USB, tablet devices |
|
| Disable memballoon |
|
CPU pinning
Improve the performance of KVM environments by using the KVM CPU Affinity option to assign a virtual machine to a specific processor. To use this option, configure CPU pinning on the KVM host.
In the KVM host environment, use these commands:
| Command |
Action |
|---|---|
| virsh nodeinfo | Verifies the host topology to find out how many vCPUs are available for pinning by using the following command. |
| virsh capabilities |
Verifies the available vCPU numbers. |
| virsh vcpupin<vmname> <vcpu#> <host core#> |
Pins the virtual CPUs to sets of processor cores. Execute this KVM command for each vCPU on your Cisco Catalyst 8000V instance. |
-
This example pins the virtual CPU 1 to host core 3.
virsh vcpupin c8000v 1 3
-
This example shows the KVM commands needed if you have a Cisco Catalyst 8000V configuration with four vCPUs and the host has eight cores:
virsh vcpupin c8000v 0 2
virsh vcpupin c8000v 1 3
virsh vcpupin c8000v 2 4
virsh vcpupin c8000v 3 5
The host core number can be any value from 0 to 7. For more information, refer to the official KVM documentation.
When you configure CPU pinning, consider the CPU topology of the host server. If you are using a Cisco Catalyst 8000V instance with multiple cores, do not configure CPU pinning across multiple sockets.
BIOS settings
Optimize the performance of the KVM configuration by applying the recommended BIOS settings listed in this table.
| Configuration |
Recommended setting |
|---|---|
| Intel Hyper-Threading Technology |
Disabled |
| Number of Enable Cores |
ALL |
| Execute Disable |
Enabled |
| Intel VT |
Enabled |
| Intel VT-D |
Enabled |
| Intel VT-D coherency support |
Enabled |
| Intel VT-D ATS support |
Enabled |
| CPU Performance |
High throughput |
| Hardware Prefetcher |
Disabled |
| Adjacent Cache Line Prefetcher |
Disabled |
| DCU Streamer Prefetch |
Disable |
| Power Technology |
Custom |
| Enhanced Intel Speedstep Technology |
Disabled |
| Intel Turbo Boost Technology |
Enabled |
| Processor Power State C6 |
Disabled |
| Processor Power State C1 Enhanced |
Disabled |
| Frequency Poor Override |
Enabled |
| P-State Coordination |
HW_ALL |
| Energy Performance |
Performance |
Host OS settings
Cisco recommends that you use hugepages and enable emulator pinning on the host. These actions are recommended on the host.
-
Enable IOMMU=pt
-
Enable intel_iommu=on
-
Enable hugepages
-
Use SR-IOV if your system supports it for higher networking performance. Check the SR-IOV limitations your system might have.
In addition to enabling hugepages and emulator pinning, configure: nmi_watchdog=0 elevator=cfq transparent_hugepage=never
If you use Virtio VHOST USER with VPP or OVS-DPDK, you can increase the buffer size to 1024 (rx_queue_size='1024' ) provided the version of your QEMU supports it.
IO Settings
You can use SR-IOV to enhance performance. However, this may introduce limitations such as the number of virtual functions (VF), OpenStack limitations for SR-IOV like QoS support, live migration, and security group support.
If you use a modern vSwitch such as fd.io VPP or OVS-DPDK, reserve at least two cores for the VPP worker threads or the OVS-DPDK PMD threads.
Configure these parameters to run the VPP through command line.
| Parameter |
Description and notes |
|---|---|
| -cpu host |
This parameter causes the VM to inherit the host OS flags. You need libvirt version 0.9.11 or later for this feature to be available in the XML configuration. |
| -m 8192 |
Requires 8GB RAM for optimal zero packet drop rates. |
| rombar=0 |
Disables PXE boot delays. Set rombar=0 to the end of each device option list or add "<rom bar=off />" to the device xml configuration. |