Interrupt Mode Support
Longhorn supports SPDK interrupt mode for V2 data engine volumes as an alternative to the default polling mode.
In polling mode, SPDK reactors busy-poll for work. This keeps the allocated CPU cores close to 100% utilization and delivers the lowest latency. In interrupt mode, I/O completions wake the reactors through events, while SPDK keeps low-frequency background checks for NVMe/TCP control work and safety. This reduces idle CPU usage without changing the V2 data engine CPU allocation model.
Interrupt mode is a good fit for clusters with limited CPU resources, a relatively small number of volumes, or sporadic I/O. V2 still runs SPDK reactors on CPUs selected by the CPU mask, even when interrupt mode is enabled.
| Polling Mode (Default) | Interrupt Mode | |
|---|---|---|
| I/O handling | Reactors continuously poll for work | I/O completions wake reactors through events |
| Idle CPU usage | Close to 100% on each allocated CPU core | Very low, with low-frequency background checks |
| Latency | Lowest and most predictable latency | Slightly higher under sustained high-throughput workloads |
| Best fit | High-performance workloads with frequent I/O | Resource-constrained clusters, fewer volumes, or sporadic I/O |
| CPU allocation | Uses CPUs selected by the V2 data engine CPU mask | Uses CPUs selected by the V2 data engine CPU mask |
In interrupt mode, I/O completions wake the SPDK reactors through events instead of being discovered by constant polling. The system behavior shifts to the following:
Because the remaining checks run at low frequency rather than thousands of times per second, the reactors stay idle most of the time when there is no I/O. An idle Instance Manager therefore uses very little CPU, while still retaining safeguards for connection recovery and missed events.
V2 data engine enabled
If you add an NVMe disk as a node disk using the nvme disk driver, IOMMU must be enabled. To verify:
find /sys/kernel/iommu_groups/ -type l
Example output (IOMMU enabled):
/sys/kernel/iommu_groups/0/devices/0000:e6:0b.1
/sys/kernel/iommu_groups/1/devices/0000:34:0a.6
/sys/kernel/iommu_groups/2/devices/0000:a0:00.0
If the command returns no output, IOMMU is not enabled.
Note: IOMMU support may not be exposed on virtualized instances. If unsure, consider using a bare-metal instance, or consult your cloud provider’s documentation or support team.
For more information, see the official SPDK documentation.
To enable interrupt mode globally, update the data-engine-interrupt-mode-enabled setting.
Interrupt mode uses the same V2 data engine CPU allocation settings as polling mode. Longhorn still starts the SPDK target daemon (spdk_tgt) with an effective CPU mask, which determines the CPUs that SPDK reactors can use. For CPU mask syntax, calculation examples, global settings, and per-node overrides, see Configurable CPU Cores.
The important difference is CPU consumption, not CPU placement:
| Polling Mode | Interrupt Mode | |
|---|---|---|
CPUs available to spdk_tgt | CPUs selected by the effective CPU mask | CPUs selected by the effective CPU mask |
| Idle behavior | Reactors continuously busy-poll | Reactors can block while waiting for I/O events or low-frequency checks |
| Idle CPU usage | Close to 100% on each masked CPU | Very low, but not zero |
| Peak CPU usage | Bounded by the masked CPUs | Bounded by the masked CPUs |
For example, if the effective CPU mask is 0x3, SPDK uses two reactors pinned to CPU 0 and CPU 1 in both modes. In interrupt mode, those reactors use very little CPU while idle, but the V2 data engine still cannot use CPUs outside CPU 0 and CPU 1. Under load, it can still saturate both CPUs.
Keep these points in mind when enabling interrupt mode:
Copyright © 2019-2026 Longhorn a Series of LF Projects, LLC. Documentation Distributed under CC-BY-4.0.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
For website terms of use, trademark policy and other project policies please see lfprojects.org/policies.