irqbalance
Distribute hardware interrupts across CPUs
SYNOPSIS
irqbalance [OPTIONS]
PARAMETERS
--oneshot
Runs irqbalance once, performs a rebalancing act, and then exits.
--debug
Enables verbose debug messages for troubleshooting.
--quiet
Suppresses normal output, showing only errors.
--nopoll
Disables polling for new devices; useful if devices are static or for one-shot runs.
--irr <0|1>
Enables (1) or disables (0) IRQ rebalancing. Primarily for daemon mode.
--pidfile <file>
Specifies an alternative PID file path for the daemon.
--disable
Completely disables IRQ balancing, forcing the daemon to exit if running.
--powerthresh <threshold>
Sets the power-saving threshold (default is 1000). Higher values prioritize power savings over performance.
--banirq <IRQ_number>
Prevents a specific IRQ from being balanced by irqbalance. Can be used multiple times.
--bancpu <CPU_number>
Prevents a specific CPU from receiving IRQs from irqbalance. Can be used multiple times.
--hintpolicy <0|1>
Defines how irqbalance respects device affinity hints (0=ignore, 1=respect).
--policyscript <path>
Specifies an external script to consult for custom balancing decisions.
--deepestcache
Spreads IRQs across CPUs that share the deepest common cache, optimizing cache locality.
--numa_hint_on_hotplug
Attempts to balance new hotplugged devices on NUMA nodes based on hints.
DESCRIPTION
irqbalance is a Linux daemon that dynamically distributes hardware interrupts (IRQs) across multiple CPU cores or threads in a multi-processor or multi-core system. Its primary goal is to prevent a single CPU from becoming an IRQ bottleneck, thereby improving system performance and responsiveness, especially for I/O-intensive workloads like networking and storage.
The daemon constantly monitors system activity, identifies IRQ hot spots, and intelligently reassigns IRQ affinity (the CPU or set of CPUs an IRQ can run on) to spread the load more evenly. It strives to place IRQs on CPUs that are less busy or have less cache contention, optimizing resource utilization. While it typically runs as a continuous service in the background, it can also be executed once using the --oneshot option for immediate rebalancing. Configuration can be adjusted via command-line options or a system-wide configuration file, such as /etc/sysconfig/irqbalance or /etc/irqbalance.conf.
CAVEATS
While generally beneficial, irqbalance might introduce slight overhead on systems with extremely low I/O, where manual IRQ affinity tuning might be more precise for specialized workloads. It respects manually set smp_affinity settings for specific IRQs. For highly customized or high-performance environments, direct manipulation of /proc/irq/<IRQ>/smp_affinity might be preferred over automated balancing. Modern versions are NUMA-aware, but complex NUMA topologies may still require fine-tuning beyond the daemon's automated decisions.
CONFIGURATION FILE
On many Linux distributions, irqbalance's persistent configuration is managed via a file such as /etc/sysconfig/irqbalance or /etc/irqbalance.conf. This file often contains environment variables or command-line options passed to the daemon at startup, allowing for system-wide customization.
SERVICE MANAGEMENT
As a daemon, irqbalance is typically managed using standard service management tools. For systems using systemd, it can be controlled with commands like systemctl start irqbalance, systemctl stop irqbalance, systemctl enable irqbalance, and systemctl status irqbalance.
HISTORY
irqbalance has been a staple utility in Linux distributions for many years, evolving to automate what was previously a manual and often complex task of distributing hardware interrupts. Its development has focused on improving intelligent balancing, incorporating NUMA awareness, and optimizing for power savings in modern server and desktop environments. It effectively replaced earlier, less sophisticated methods of IRQ distribution, making it easier for system administrators to achieve better I/O performance out-of-the-box.
SEE ALSO
cat /proc/interrupts, lscpu(1), tuned(8)