Interrupt Mode Support

Starting with v1.10.0, Longhorn supports SPDK interrupt mode for V2 data engine volumes. Interrupt mode provides an alternative to the default polling mode, offering improved CPU efficiency in certain environment.

Interrupt mode is particularly suitable for clusters with limited CPU resources and a relatively small number of volumes. While polling mode maximizes performance by keeping CPU utilization close to 100% on allocated cores, interrupt mode reduces CPU usage by allowing the SPDK reactor to adjust its usage dynamically instead of continuously polling.

Overview

Polling Mode vs Interrupt Mode

Polling Mode (Default):

  • Continuously polls for I/O operations
  • Provides the lowest latency
  • Consumes ~100% of the allocated CPU core at all times
  • Best suited for high-performance workloads with frequent I/O

Interrupt Mode:

  • Uses interrupt-driven I/O handling
  • CPU consumption scales with the number of attached volumes
  • Better suited for resource-constrained environments

Prerequisites

  • Longhorn v1.10.0 or later
  • V2 data engine enabled
  • No attached v2 volumes when changing the setting

Configuration

Global Setting

To enable interrupt mode globally, update the data-engine-interrupt-mode-enabled setting.

Important Considerations

  • Volume State Requirement: The setting can only be changed when no V2 volumes are attached. Longhorn blocks updates if any V2 volume is active.
  • Global Effect: The setting applies to all V2 volumes.

Performance Characteristics

Enable interrupt mode when:

  • Running in resource-constrained clusters
  • Managing only a small number of volumes
  • CPU resources are limited or shared with other workloads
  • I/O patterns are sporadic rather than continuous
  • Energy efficiency is a priority

Limitations

Hybrid Implementation

The current V2 volume interrupt mode uses a hybrid approach for NVMe/TCP transport:

  • Admin Queue Operations: Still relies on periodic polling for keepalive and controller recovery
  • I/O Queue Completion: Uses polling for command completion
  • Residual CPU Usage: Results in a small but constant CPU load, even when attach volumes are idle

Performance Trade-offs

  • Latency: Slightly higher than polling mode

Operational Restrictions

  • Setting Changes: Cannot be modified while V2 volumes are attached
  • Global Scope: Applies globally; no per-volume override is available

© 2019-2025 Longhorn Authors | Documentation Distributed under CC-BY-4.0


© 2025 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.