Enabling Intel APICv for better performance
-
Consider this feature as experimental 
Many Intel CPUs have support for Intel APICv (APIC Virtualization) features that aims at reducing the number of APIC-related VM-Exits in guests, hence improving performance.
This has been introduced circa Intel Ivy Bridge-EP, and is also available on somewhat recent client CPUs as well. But keep in mind that not all SKUs have support for it.Xen has support for it since roughly Xen 4.3, yet XenServer (and XCP-ng) originally disabled by default due to issues at this time around live migration between hardware that supports it and ones that don't.
Internal testing on the feature shows performance improvements in various benchmarks (5-10% in I/O benchmarks up to 30% on nginx with a Ice Lake Xeon). We didn't test on other CPUs, but older CPUs (in particular those affected by L1TF/Foreshadow) may observe larger improvements.
How to enable
This feature exists in the Xen version shipped in XCP-ng, but disabled by default, you can enable support on the host with
/opt/xensource/libexec/xen-cmdline --set-xen apicv=1 # then rebootOnce enabled, you can check hardware support with
xl dmesg | grep -A 25 "VMX: Supported advanced features"And look for
APIC Register VirtualizationandVirtual Interrupt Delivery.The feature can be disabled with
/opt/xensource/libexec/xen-cmdline --delete-xen apicv # then rebootWhat to test
Along with general feedback on the feature (does it work, supported hardware, ...), we're interested on :
- interactions with live migration, especially with hosts that have different configuration of APICv
- performance on various workloads (web server, databases, I/O, ...)
What about AMD ?
AMD counterpart is AVIC (Advanced Virtualized Interrupt Controller) introduced (in practice) with Zen 2 (but also existed on some Carrizo CPUs) then improved with x2AVIC with Zen 4.
Xen support for (x2)AVIC is currently work in progress.
Refer to Denis Mukhin's presentation on AVIC for Xen (Xen Summit 2026) : https://youtu.be/RhaJsOU_PIA -
Sharing some results. I enabled this on my homelab server, a Dell R630 with Intel Xeon
E5-2630 v4(Broadwell).
No adverse impact noticed.
The CDM results on Windows is higher than previous runs however, I do not go in depth with I/O benchmarking. (I am using the latest win-pv-drivers on Windows and the rust-based guest tools on Linux)
Controller is in HBA mode. VM SR is using SMAPIv3 (ZFS, RAID-0,noopscheduler)
CDM results. Windows Server 2019 4 vCPU/8GB RAM/single VHD:

I installed ScyllaDB on Alma Linux 10.2 (4 vCPU/8GB RAM & two VHDs, ScyllaDB uses a dedicated drive for data) with
io_uringenabled andnoopscheduler set on VM.
Here are the IOTune results from the ScyllaDB installation:Measuring sequential write bandwidth: 826 MiB/s (deviation 13%) Measuring sequential read bandwidth: 1061 MiB/s (deviation 6%) Measuring random write IOPS: 50791 IOPS (deviation 11%) Measuring random read IOPS: 62977 IOPS (deviation 16%)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login