XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Enabling Intel APICv for better performance

    Scheduled Pinned Locked Moved Development
    1 Posts 1 Posters 14 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TeddyAstieT
      TeddyAstie Vates 🪐 XCP-ng Team Xen Guru
      last edited by

      ⚠ 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 reboot
      

      Once enabled, you can check hardware support with

      xl dmesg | grep -A 25 "VMX: Supported advanced features"
      

      And look for APIC Register Virtualization and Virtual Interrupt Delivery.

      The feature can be disabled with

      /opt/xensource/libexec/xen-cmdline --delete-xen apicv
      # then reboot
      

      What 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

      1 Reply Last reply
      Reply Quote 1

      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
      • First post
        Last post