Apic-v, APIC virtualization, is an optimization of the Intel CPU for virtual interrupts and APIC virtualization, and using APIC-V can substantially reduce the number of VM exit results due to APIC access, tracking virtual APIC status, and delivering virtual interrupts ( These operations can be done directly in VMX non-root mode without VM Exit. Intel introduced the Apic-v feature in the IVYBRIDGE-EP server CPU. For more information on apic-v, you can refer to the chapter "Chapter APIC Virtualization and Virtual interrupts" in Intel's sdm-3c. (The Ivy Bridge EP was released in September 2013 and published in October)
Support for APIC-V has been achieved in the latest Xen and KVM. This article mainly shares the performance improvements that were recently introduced in Xen to test apic-v features.
On the IVYBRIDGE-EP system, the Intel 82599 Network card (10GB) is allocated directly to Xen HVM guest usage and Netperf is used to test network throughput. (Network I/O is able to reflect the apic-v benefits). Some of the test data are shown in the following illustration:
The test here is explained as follows:
1. The first set of data is the case where the message size of the Netperf test is large (each message 16384Bytes size); At this time, the network card throughput almost reached the limit of 9.3 Gbps, and in the case of using APIC-V, The guest's CPU utilization decreased by 2.3%.
2. The second set of data was a small message size (64Bytes), with throughput increased by 0.8% while using APIC-V, while CPU utilization was reduced by 0.3%.
3. The third group is more complex, it starts with 2 guest, assigns a function of 82599 network cards, and binds the vcpu of the two guest to the same physical CPU, and in order to enable the physical CPU to run at full capacity, it also uses the "XENPM Set-scaling-minfreq 1 1200M "and" XENPM set-scaling-maxfreq 1 1200M "command reduces the frequency of this physical CPU to 1200MHz (highest bit 2700MHz before descending). The throughput here is the sum of network throughput in two guest, and the network throughput is up by 7.5% when the same physical CPU is running at full capacity using APIC-V.